Math
Navigation: Samples → Cauldron → Miscellaneous
Math
Sony VectorMath library wrapper.
Functions
PolarToVector
Vec4 PolarToVector(float yaw, float pitch)Converts polar rotation to a vector representation.
Returns: Vec4 representation of the polar rotation.
Parameters:
yaw(float) – [in] Yaw angle (in radians).pitch(float) – [in] Pitch angle (in radians).
Returns: Vec4
Source: framework/cauldron/framework/inc/misc/math.h (line 85, column 10)
Perspective
const Mat4 Perspective(float fovyRadians, float aspect, float zNear, float zFar, bool invertedDepth)Construct a perspective projection matrix with an inverted depth argument.
Returns: Mat4 perspective matrix.
Parameters:
fovyRadians(float) – [in] FOV (in radians).aspect(float) – [in] Aspect ratio.zNear(float) – [in] Near plane.zFar(float) – [in] Far plane.invertedDepth(bool) – [in] True if using inverted infinite depth.
Returns: const Mat4
Source: framework/cauldron/framework/inc/misc/math.h (line 98, column 16)
Orthographic
const Mat4 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].
Returns: Mat4 orthographic matrix.
Parameters:
left(float) – [in] Left plane.right(float) – [in] Right plane.bottom(float) – [in] Bottom plane.top(float) – [in] Top plane.zNear(float) – [in] Near plane.zFar(float) – [in] Far plane.invertedDepth(bool) – [in] True if using inverted infinite depth.
Returns: const Mat4
Source: framework/cauldron/framework/inc/misc/math.h (line 113, column 16)
InverseMatrix
inline Mat4 InverseMatrix(const Mat4 &srcMatrix)Returns the inverse of a matrix.
Returns: Mat4 inverted matrix.
Parameters:
srcMatrix(const Mat4 &) – [in] The matrix to inverse.
Returns: Mat4
Attributes: inline
Source: framework/cauldron/framework/inc/misc/math.h (line 122, column 17)
InverseMatrix
inline Mat3 InverseMatrix(const Mat3 &srcMatrix)Returns the inverse of a matrix.
Returns: Mat3 inverted matrix.
Parameters:
srcMatrix(const Mat3 &) – [in] The matrix to inverse.
Returns: Mat3
Attributes: inline
Source: framework/cauldron/framework/inc/misc/math.h (line 134, column 17)
LookAtMatrix
inline Mat4 LookAtMatrix(Vec4 eye, Vec4 lookAt, Vec4 up)Construct a matrix positioned at ‘eye’ and rotated to face ‘lookAt’.
Returns: Mat4 matrix.
Parameters:
eye(Vec4) – [in] Source (translation).lookAt(Vec4) – [in] Look at (direction).up(Vec4) – [in] Up vector to orient the matrix properly.
Returns: Mat4
Attributes: inline
Source: framework/cauldron/framework/inc/misc/math.h (line 148, column 17)
TransposeMatrix
inline Mat4 TransposeMatrix(const Mat4 &srcMatrix)Returns the transpose of a matrix.
Returns: Mat4 transposed matrix.
Parameters:
srcMatrix(const Mat4 &) – [in] The matrix to transpose.
Returns: Mat4
Attributes: inline
Source: framework/cauldron/framework/inc/misc/math.h (line 160, column 17)
MinPerElement
inline Vec4 MinPerElement(const Vec4 &vec1, const Vec4 &vec2)Returns a vector composed of per-element minimums.
Returns: Vec4 the 4-component vector of minimums per element.
Parameters:
vec1(const Vec4 &) – [in] Vector1.vec2(const Vec4 &) – [in] Vector2.
Returns: Vec4
Attributes: inline
Source: framework/cauldron/framework/inc/misc/math.h (line 173, column 17)
MaxPerElement
inline Vec4 MaxPerElement(const Vec4 &vec1, const Vec4 &vec2)Returns a vector composed of per-element maximums.
Returns: Vec4 the 4-component vector of maximums per element.
Parameters:
vec1(const Vec4 &) – [in] Vector1.vec2(const Vec4 &) – [in] Vector2.
Returns: Vec4
Attributes: inline
Source: framework/cauldron/framework/inc/misc/math.h (line 191, column 17)
Typedefs
Mat3
using Mat3 = math::Matrix3A type definition for a 3x3 matrix based on VectorMath::Matrix3.
Source: framework/cauldron/framework/inc/misc/math.h (line 43, column 1)
Mat4
using Mat4 = math::Matrix4A type definition for a 4x4 matrix based on VectorMath::Matrix4.
Source: framework/cauldron/framework/inc/misc/math.h (line 48, column 1)
Point2
using Point2 = math::Point2A type definition for a 2 component point based on VectorMath::Point2.
Source: framework/cauldron/framework/inc/misc/math.h (line 53, column 1)
Point3
using Point3 = math::Point3A type definition for a 3 component point based on VectorMath::Point3.
Source: framework/cauldron/framework/inc/misc/math.h (line 58, column 1)
Vec2
using Vec2 = math::Vector2A type definition for a 2 component vector based on VectorMath::Vector2.
Source: framework/cauldron/framework/inc/misc/math.h (line 63, column 1)
Vec3
using Vec3 = math::Vector3A type definition for a 3 component vector based on VectorMath::Vector3.
Source: framework/cauldron/framework/inc/misc/math.h (line 68, column 1)
Vec4
using Vec4 = math::Vector4A type definition for a 4 component vector based on VectorMath::Vector4.
Source: framework/cauldron/framework/inc/misc/math.h (line 73, column 1)