diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/utils/SkCamera.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/utils/SkCamera.cpp b/src/utils/SkCamera.cpp index a387257..ac6fa0f 100644 --- a/src/utils/SkCamera.cpp +++ b/src/utils/SkCamera.cpp @@ -371,6 +371,18 @@ void Sk3DView::setCameraLocation(SkScalar x, SkScalar y, SkScalar z) { fCamera.update(); } + +SkScalar Sk3DView::getCameraLocationX() { + return fCamera.fLocation.fX / SkFloatToScalar(72.0f); +} + +SkScalar Sk3DView::getCameraLocationY() { + return fCamera.fLocation.fY / SkFloatToScalar(72.0f); +} + +SkScalar Sk3DView::getCameraLocationZ() { + return fCamera.fLocation.fZ / SkFloatToScalar(72.0f); +} #endif void Sk3DView::translate(SkScalar x, SkScalar y, SkScalar z) { |