#include "include/utils/SkCamera.h"
static SkScalar SkScalarDotDiv(int count, const SkScalar a[], int step_a,
const SkScalar b[], int step_b,
SkScalar denom) { … }
SkPatch3D::SkPatch3D() { … }
void SkPatch3D::reset() { … }
void SkPatch3D::transform(const SkM44& m, SkPatch3D* dst) const { … }
SkScalar SkPatch3D::dotWith(SkScalar dx, SkScalar dy, SkScalar dz) const { … }
SkCamera3D::SkCamera3D() { … }
void SkCamera3D::reset() { … }
void SkCamera3D::update() { … }
void SkCamera3D::doUpdate() const { … }
void SkCamera3D::patchToMatrix(const SkPatch3D& quilt, SkMatrix* matrix) const { … }
Sk3DView::Sk3DView() { … }
Sk3DView::~Sk3DView() { … }
void Sk3DView::save() { … }
void Sk3DView::restore() { … }
#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
void Sk3DView::setCameraLocation(SkScalar x, SkScalar y, SkScalar z) {
SkScalar lz = z * 72.0f;
fCamera.fLocation = {x * 72.0f, y * 72.0f, lz};
fCamera.fObserver = {0, 0, lz};
fCamera.update();
}
SkScalar Sk3DView::getCameraLocationX() const {
return fCamera.fLocation.x / 72.0f;
}
SkScalar Sk3DView::getCameraLocationY() const {
return fCamera.fLocation.y / 72.0f;
}
SkScalar Sk3DView::getCameraLocationZ() const {
return fCamera.fLocation.z / 72.0f;
}
#endif
void Sk3DView::translate(SkScalar x, SkScalar y, SkScalar z) { … }
void Sk3DView::rotateX(SkScalar deg) { … }
void Sk3DView::rotateY(SkScalar deg) { … }
void Sk3DView::rotateZ(SkScalar deg) { … }
SkScalar Sk3DView::dotWithNormal(SkScalar x, SkScalar y, SkScalar z) const { … }
void Sk3DView::getMatrix(SkMatrix* matrix) const { … }
#include "include/core/SkCanvas.h"
void Sk3DView::applyToCanvas(SkCanvas* canvas) const { … }