Skip to content

Commit

Permalink
Enable Grabbing of base transform from VROCamera
Browse files Browse the repository at this point in the history
  • Loading branch information
dthian committed Jul 29, 2020
1 parent 4a56833 commit ee440b0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ViroRenderer/VROCamera.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ class VROCamera {
void setFOV(VROFieldOfView fov);
void setProjection(VROMatrix4f projection);

VROMatrix4f getBaseTransform() const {
VROMatrix4f camTrans;
camTrans.rotate(_baseRotation);
camTrans.translate(_basePosition);
return camTrans;
}

VROVector3f getBasePosition() const {
return _basePosition;
}
Expand All @@ -73,6 +80,10 @@ class VROCamera {
VROVector3f getUp() const {
return _up;
}

VROMatrix4f getBaseRotation() const {
return _baseRotation;
}
VROQuaternion getRotation() const {
return _rotation;
}
Expand Down

0 comments on commit ee440b0

Please sign in to comment.