Interface IProvidesCameraOffset
Defines the API for a Camera Offset Provider This functionality provider is responsible for getting and setting offsets on the MR camera Offsets are cached statically in IUsesCameraOffset--there can be only one Camera Offset Provider
Inherited Members
Namespace: Unity.MARS
Syntax
public interface IProvidesCameraOffset : IFunctionalityProvider
Properties
CameraOffsetMatrix
Get the matrix that applies the camera offset transformation
Declaration
Matrix4x4 CameraOffsetMatrix { get; }
Property Value
Type | Description |
---|---|
Matrix4x4 |
cameraPositionOffset
Get or set the camera position offset
Declaration
Vector3 cameraPositionOffset { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
cameraScale
Get or set the camera scale
Declaration
float cameraScale { get; set; }
Property Value
Type | Description |
---|---|
Single |
cameraYawOffset
Get or set the camera rotation offset
Declaration
float cameraYawOffset { get; set; }
Property Value
Type | Description |
---|---|
Single |
Methods
ApplyInverseOffsetToDirection(Vector3)
Apply the inverse of the camera offset to a direction and return the modified direction. This is not affected by scale or position.
Declaration
Vector3 ApplyInverseOffsetToDirection(Vector3 direction)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | direction | The direction to which the offset will be applied |
Returns
Type | Description |
---|---|
Vector3 | The modified direction |
ApplyInverseOffsetToPose(Pose)
Apply the inverse of the camera offset to a pose and return the modified pose
Declaration
Pose ApplyInverseOffsetToPose(Pose pose)
Parameters
Type | Name | Description |
---|---|---|
Pose | pose | The pose to which the offset will be applied |
Returns
Type | Description |
---|---|
Pose | The modified pose |
ApplyInverseOffsetToPosition(Vector3)
Apply the inverse of the camera offset to a position and return the modified position
Declaration
Vector3 ApplyInverseOffsetToPosition(Vector3 position)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | position | The position to which the offset will be applied |
Returns
Type | Description |
---|---|
Vector3 | The modified position |
ApplyInverseOffsetToRotation(Quaternion)
Apply the inverse of the camera offset to a rotation and return the modified rotation
Declaration
Quaternion ApplyInverseOffsetToRotation(Quaternion rotation)
Parameters
Type | Name | Description |
---|---|---|
Quaternion | rotation | The rotation to which the offset will be applied |
Returns
Type | Description |
---|---|
Quaternion | The modified rotation |
ApplyOffsetToDirection(Vector3)
Apply the camera offset to a direction and return the modified direction. This is not affected by scale or position.
Declaration
Vector3 ApplyOffsetToDirection(Vector3 direction)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | direction | The direction to which the offset will be applied |
Returns
Type | Description |
---|---|
Vector3 | The modified direction |
ApplyOffsetToPose(Pose)
Apply the camera offset to a pose and return the modified pose
Declaration
Pose ApplyOffsetToPose(Pose pose)
Parameters
Type | Name | Description |
---|---|---|
Pose | pose | The pose to which the offset will be applied |
Returns
Type | Description |
---|---|
Pose | The modified pose |
ApplyOffsetToPosition(Vector3)
Apply the camera offset to a position and return the modified position
Declaration
Vector3 ApplyOffsetToPosition(Vector3 position)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | position | The position to which the offset will be applied |
Returns
Type | Description |
---|---|
Vector3 | The modified position |
ApplyOffsetToRotation(Quaternion)
Apply the camera offset to a rotation and return the modified rotation
Declaration
Quaternion ApplyOffsetToRotation(Quaternion rotation)
Parameters
Type | Name | Description |
---|---|---|
Quaternion | rotation | The rotation to which the offset will be applied |
Returns
Type | Description |
---|---|
Quaternion | The modified rotation |