CameraRig class

Camera rig for VR: head position + rotation, with stereo eye offsets. Produces view and projection matrices for left/right eyes.

Implemented types

Constructors

CameraRig({Transform3D? headTransform, double fovY = 1.2, double near = 0.01, double far = 1000, double ipd = 0.064})

Properties

far double
Far clip plane.
getter/setter pair
fovY double
Field of view in radians (vertical).
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
headTransform Transform3D
final
ipd double
Inter-pupillary distance in meters.
getter/setter pair
leftViewMatrix → Matrix4
View matrix for the left eye.
no setter
monoViewMatrix → Matrix4
Monoscopic view matrix (center eye).
no setter
near double
Near clip plane.
getter/setter pair
position ↔ Vector3
getter/setter pair
rightViewMatrix → Matrix4
View matrix for the right eye.
no setter
rotation ↔ Quaternion
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

frustum(double aspectRatio) VrFrustum
leftProjectionMatrix(double aspectRatio) → Matrix4
Off-axis stereo projection for left eye.
leftViewProjection(double aspectRatio) → Matrix4
lookAt(Vector3 target) → void
monoViewProjection(double aspectRatio) → Matrix4
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
projectionMatrix(double aspectRatio) → Matrix4
Projection matrix for a given aspect ratio.
reset() → void
override
rightProjectionMatrix(double aspectRatio) → Matrix4
Off-axis stereo projection for right eye.
rightViewProjection(double aspectRatio) → Matrix4
rotate(double yaw, double pitch) → void
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited