Viewer
A virtual camera in 3D world space.
Properties
pose
viewer.pose: ViewerPose, read-only
The pose of the viewer.
view
viewer.view: View, read-only
A view of the viewer (monoscopic rendering).
Methods
convertToViewerSpace
viewer.convertToViewerSpace(pose: Pose): Pose
Convert a pose
from world space to viewer space.
Arguments
pose: Pose
. A pose in world space.
Returns
The input pose
converted to viewer space.
Example
raycast
viewer.raycast(position: Vector2): Ray
Cast a ray from a point in the image space associated with this viewer.
Since: 0.4.0
Arguments
position: Vector2
. A point in image space, given in normalized units.
Returns
A ray in world space that corresponds to the given point.
forwardRay
viewer.forwardRay(): Ray
Compute a ray in the forward direction from the viewer.
Since: 0.4.0
Returns
A new ray in world space.