Math
Sony VectorMath library wrapper.
Typedefs
Type |
Description |
---|---|
typedef math::Matrix3 |
A type definition for a 3×3 matrix based on VectorMath::Matrix3.
|
typedef math::Matrix4 |
A type definition for a 4×4 matrix based on VectorMath::Matrix4.
|
typedef math::Point2 |
A type definition for a 2 component point based on VectorMath::Point2.
|
typedef math::Point3 |
A type definition for a 3 component point based on VectorMath::Point3.
|
typedef math::Vector2 |
A type definition for a 2 component vector based on VectorMath::Vector2.
|
typedef math::Vector3 |
A type definition for a 3 component vector based on VectorMath::Vector3.
|
typedef math::Vector4 |
A type definition for a 4 component vector based on VectorMath::Vector4.
|
Functions
Return type |
Description |
---|---|
cauldron::PolarToVector (float yaw, float pitch)
Converts polar rotation to a vector representation.
|
|
const Mat4 |
cauldron::Perspective ( float fovyRadians, float aspect, float zNear, float zFar, bool invertedDepth )
Construct a perspective projection matrix with an inverted depth argument.
|
const Mat4 |
cauldron::Orthographic ( float left, float right, float bottom, float top, float zNear, float zFar, bool invertedDepth )
Construct an orthographic projection matrix with z in range [0, 1].
|
cauldron::InverseMatrix (const Mat4 & srcMatrix)
Returns the inverse of a matrix.
|
|
cauldron::InverseMatrix (const Mat3 & srcMatrix)
Returns the inverse of a matrix.
|
|
Construct a matrix positioned at ‘eye’ and rotated to face ‘lookAt’.
|
|
cauldron::TransposeMatrix (const Mat4 & srcMatrix)
Returns the transpose of a matrix.
|
|
Returns a vector composed of per-element minimums.
|
|
Returns a vector composed of per-element maximums.
|
Detailed description
Sony VectorMath library wrapper.
Typedefs
Mat3
A type definition for a 3×3 matrix based on VectorMath::Matrix3.
Mat4
A type definition for a 4×4 matrix based on VectorMath::Matrix4.
Point2
A type definition for a 2 component point based on VectorMath::Point2.
Point3
A type definition for a 3 component point based on VectorMath::Point3.
Vec2
A type definition for a 2 component vector based on VectorMath::Vector2.
Vec3
A type definition for a 3 component vector based on VectorMath::Vector3.
Vec4
A type definition for a 4 component vector based on VectorMath::Vector4.
Global functions
PolarToVector
Vec4 cauldron::PolarToVector (float yaw, float pitch)
Converts polar rotation to a vector representation.
Parameters:
yaw |
Yaw angle (in radians). |
pitch |
Pitch angle (in radians). |
Returns:
Vec4
representation of the polar rotation.
Perspective
const Mat4 cauldron::Perspective (
float fovyRadians,
float aspect,
float zNear,
float zFar,
bool invertedDepth
)
Construct a perspective projection matrix with an inverted depth argument.
Parameters:
fovyRadians |
FOV (in radians). |
aspect |
Aspect ratio. |
zNear |
Near plane. |
zFar |
Far plane. |
invertedDepth |
True if using inverted infinite depth. |
Returns:
Mat4
perspective matrix.
Orthographic
const Mat4 cauldron::Orthographic (
float left,
float right,
float bottom,
float top,
float zNear,
float zFar,
bool invertedDepth
)
Construct an orthographic projection matrix with z in range [0, 1].
Parameters:
left |
Left plane. |
right |
Right plane. |
bottom |
Bottom plane. |
top |
Top plane. |
zNear |
Near plane. |
zFar |
Far plane. |
invertedDepth |
True if using inverted infinite depth. |
Returns:
Mat4
orthographic matrix.
InverseMatrix
Returns the inverse of a matrix.
Parameters:
srcMatrix |
The matrix to inverse. |
Returns:
Mat4
inverted matrix.
InverseMatrix
Returns the inverse of a matrix.
Parameters:
srcMatrix |
The matrix to inverse. |
Returns:
Mat3
inverted matrix.
LookAtMatrix
Construct a matrix positioned at ‘eye’ and rotated to face ‘lookAt’.
Parameters:
eye |
Source (translation). |
lookAt |
Look at (direction). |
up |
Up vector to orient the matrix properly. |
Returns:
Mat4
matrix.
TransposeMatrix
Returns the transpose of a matrix.
Parameters:
srcMatrix |
The matrix to transpose. |
Returns:
Mat4
transposed matrix.
MinPerElement
Returns a vector composed of per-element minimums.
Parameters:
vec1 |
Vector1. |
vec2 |
Vector2. |
Returns:
Vec4
the 4-component vector of minimums per element.
MaxPerElement
Returns a vector composed of per-element maximums.
Parameters:
vec1 |
Vector1. |
vec2 |
Vector2. |
Returns:
Vec4
the 4-component vector of maximums per element.