Go to the source code of this file.
◆ varjo_GetEulerAngles()
Extracts the euler angles in radians from the given matrix.
Default convention is right handed counter clockwise rotation, where X-axis is negative and Y and Z axes are positive.
Rotations are global, to get local rotations flip the axes. Eg: Global rotation XYZ -> local rotation ZYX.
- Parameters
-
matrix | Matrix to extract the angles from. |
order | Euler axis order. |
direction | Rotation direction. |
handedness | Rotation Handedness. |
◆ varjo_GetPosition()
Gets the translation part from a transformation matrix.
- Parameters
-
matrix | Matrix to extract the translation from. |
◆ varjo_GetProjectionMatrix()
Creates a projection matrix from given FOV tangents.
- Parameters
-
tangents | Tangents for a view. |
- Returns
- projection Projection matrix with default depth transform.
- See also
- varjo_UpdateNearFarPlanes() To update the depth transform in the projection matrix.
◆ varjo_UpdateNearFarPlanes()
static void varjo_UpdateNearFarPlanes |
( |
double * |
projectionMatrix, |
|
|
varjo_ClipRange |
clipRange, |
|
|
double |
nearZ, |
|
|
double |
farZ |
|
) |
| |
|
static |
Updates the near and far clip plane distances in the projection matrix.
- Parameters
-
projectionMatrix | Projection matrix to modify. |
clipRange | Clip space range (0..1 or -1..1). |
nearZ | Positive distance in meters to the near plane. To indicate depth values reversed, can be greater than farZ. |
farZ | Positive distance in meters to the far plane. To indicate depth values reversed, can be smaller than nearZ. |