All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
MathUtils.h File Reference

Linear algebra-related utility functions. More...

Functions

VuVector2F vuZeroVector2F ()
 Get a 2D zero vector (0,0)
 
VuVector2F vuOneVector2F ()
 Get a 2D one vector (1,1)
 
VuVector2F vuVector2FNegate (VuVector2F v)
 Negate a 2D vector.
 
VuVector2F vuVector2FAbs (VuVector2F v)
 Get the absolute vector of a 2D vector.
 
float vuVector2FMag (VuVector2F v)
 Compute the Euclidian norm of a 2D vector.
 
float vuVector2FMagSquared (VuVector2F v)
 Compute the Squared Euclidian norm of a 2D vector.
 
VuVector2F vuVector2FNormalize (VuVector2F v)
 Get a normalized 2D vector.
 
VuVector2F vuVector2FScale (VuVector2F v, float s)
 Multiply a 2D vector by a scalar value.
 
VuVector2F vuVector2FAdd (VuVector2F v1, VuVector2F v2)
 Get the sum of two 2D vectors.
 
VuVector2F vuVector2FSub (VuVector2F v1, VuVector2F v2)
 Get the difference of two 2D vectors.
 
float vuVector2FAngle (VuVector2F v1, VuVector2F v2)
 Compute the angle between two 2D vectors in degrees.
 
float vuVector2FDist (VuVector2F v1, VuVector2F v2)
 Compute the Euclidean distance between two 2D vectors.
 
VuVector2F vuVector2FLerp (VuVector2F v1, VuVector2F v2, float t)
 Compute the linear interpolation between two 2D vectors.
 
float vuVector2FDot (VuVector2F v1, VuVector2F v2)
 Compute the dot product of two 2D vectors.
 
VuVector3F vuZeroVector3F ()
 Get a 3D zero vector (0,0,0)
 
VuVector3F vuOneVector3F ()
 Get a 3D one vector (1,1,1)
 
VuVector3F vuVector2FToVector3F (VuVector2F v)
 Convert a 2D vector to a 3D vector (insert 0 as the last component)
 
VuVector3F vuVector3FNegate (VuVector3F v)
 Negate a 3D vector.
 
VuVector3F vuVector3FAbs (VuVector3F v)
 Get the absolute vector of a 3D vector.
 
float vuVector3FMag (VuVector3F v)
 Compute the Euclidian norm of a 3D vector.
 
float vuVector3FMagSquared (VuVector3F v)
 Compute the Squared Euclidian norm of a 3D vector.
 
VuVector3F vuVector3FNormalize (VuVector3F v)
 Get a normalized 3D vector.
 
VuVector3F vuVector3FScale (VuVector3F v, float s)
 Multiply a 3D vector by a scalar value.
 
VuVector3F vuVector3FAdd (VuVector3F v1, VuVector3F v2)
 Get the sum of two 3D vectors.
 
VuVector3F vuVector3FSub (VuVector3F v1, VuVector3F v2)
 Get the difference of two 3D vectors.
 
float vuVector3FAngle (VuVector3F v1, VuVector3F v2)
 Compute the angle between two 3D vectors in degrees.
 
float vuVector3FDist (VuVector3F v1, VuVector3F v2)
 Compute the Euclidean distance between two 3D vectors.
 
VuVector3F vuVector3FLerp (VuVector3F v1, VuVector3F v2, float t)
 Compute the linear interpolation between two 3D vectors.
 
float vuVector3FDot (VuVector3F v1, VuVector3F v2)
 Compute the dot product of two 3D vectors.
 
VuVector3F vuVector3FCross (VuVector3F v1, VuVector3F v2)
 Compute the cross product of two 3D vectors.
 
VuVector3F vuVector3FTransform (VuMatrix44F m, VuVector3F v)
 Transform a 3D vector by a 4x4 matrix.
 
VuVector3F vuVector3FTransformR (VuVector3F v, VuMatrix44F m)
 Transform a 3D vector by a 4x4 matrix.
 
VuVector3F vuVector3FTransformNormal (VuMatrix44F m, VuVector3F v)
 Transform a normal by a 4x4 matrix (rotation only)
 
VuVector3F vuVector3FTransformNormalR (VuVector3F v, VuMatrix44F m)
 Transform a normal by a 4x4 matrix (rotation only)
 
VuVector4F vuZeroVector4F ()
 Get a 4D zero vector (0,0,0,0)
 
VuVector4F vuOneVector4F ()
 Get a 4D one vector (1,1,1,1)
 
VuVector4F vuVector4FNegate (VuVector4F v)
 Negate a 4D vector.
 
VuVector4F vuVector4FAbs (VuVector4F v)
 Get the absolute vector of a 4D vector.
 
float vuVector4FMag (VuVector4F v)
 Compute the Euclidian norm of a 4D vector.
 
float vuVector4FMagSquared (VuVector4F v)
 Compute the Squared Euclidian norm of a 4D vector.
 
VuVector4F vuVector4FNormalize (VuVector4F v)
 Get a normalized 4D vector.
 
VuVector4F vuVector4FScale (VuVector4F v, float s)
 Multiply a 4D vector by a scalar value.
 
VuVector4F vuVector4FAdd (VuVector4F v1, VuVector4F v2)
 Get the sum of two 4D vectors.
 
VuVector4F vuVector4FSub (VuVector4F v1, VuVector4F v2)
 Get the difference of two 4D vectors.
 
float vuVector4FDist (VuVector4F v1, VuVector4F v2)
 Compute the Euclidean distance between two 4D vectors.
 
VuVector4F vuVector4FLerp (VuVector4F v1, VuVector4F v2, float t)
 Compute the linear interpolation between two 4D vectors.
 
float vuVector4FDot (VuVector4F v1, VuVector4F v2)
 Compute the dot product of two 4D vectors.
 
VuVector4F vuVector4FTransform (VuMatrix44F m, VuVector4F v)
 Transform a 4D vector by a 4x4 matrix.
 
VuVector4F vuVector4FTransformR (VuVector4F v, VuMatrix44F m)
 Transform a 4D vector by 4x4 matrix and return the result.
 
VuVector8F vuZeroVector8F ()
 Get an 8D zero vector (0,0,0,0,0,0,0,0)
 
VuVector8F vuOneVector8F ()
 Get an 8D one vector (1,1,1,1,1,1,1,1)
 
VuMatrix33F vuZeroMatrix33F ()
 Get a 3x3 zero matrix.
 
VuMatrix33F vuIdentityMatrix33F ()
 Get a 3x3 identity matrix.
 
VuMatrix44F vuZeroMatrix44F ()
 Get a 4x4 zero matrix.
 
VuMatrix44F vuIdentityMatrix44F ()
 Get a 4x4 identity matrix.
 
VuBool vuMatrix44FIsIdentity (VuMatrix44F m)
 Check whether the 4x4 matrix is an identity matrix.
 
VuMatrix44F vuMatrix44FTranspose (VuMatrix44F m)
 Get the transpose of a 4x4 matrix.
 
float vuMatrix44FDeterminant (VuMatrix44F m)
 Get the determinant of a 4x4 matrix.
 
VuMatrix44F vuMatrix44FInverse (VuMatrix44F m)
 Get the inverse of a 4x4 matrix.
 
VuMatrix44F vuMatrix44FRotationMatrix (float angle, VuVector3F axis)
 Get a rotation matrix specified by axis-angle rotation (angle is in degrees)
 
VuMatrix44F vuMatrix44FTranslationMatrix (VuVector3F trans)
 Get a translation matrix specified by a translation vector.
 
VuMatrix44F vuMatrix44FScalingMatrix (VuVector3F scale)
 Get a scaling matrix specified by a scale vector.
 
VuMatrix44F vuMatrix44FTRSMatrix (VuVector3F trans, float angle, VuVector3F axis, VuVector3F scale)
 Get a transformation matrix composed of a translation vector, axis-angle rotation, and scaling vector.
 
VuMatrix44F vuMatrix44FPoseQuatMatrix (VuVector3F trans, VuVector4F quat)
 Get a transformation matrix composed of a translation vector and rotation (quaternion)
 
VuMatrix44F vuMatrix44FTranslate (VuVector3F trans, VuMatrix44F m)
 Translate a matrix by a vector and return the result.
 
VuMatrix44F vuMatrix44FRotate (float angle, VuVector3F axis, VuMatrix44F m)
 Rotate a matrix by a given axis/angle rotation (angle is in degrees)
 
VuMatrix44F vuMatrix44FScale (VuVector3F scale, VuMatrix44F m)
 Scale a matrix by a scalig vector.
 
VuMatrix44F vuMatrix44FPerspective (float fovy, float aspectRatio, float nearPlane, float farPlane)
 Create a perspective projection matrix immediately suitable for rendering in OpenGL (Z axis pointing towards the viewer)
 
VuMatrix44F vuMatrix44FOrthographic (float left, float right, float bottom, float top, float nearPlane, float farPlane)
 Create an orthographic projection matrix immediately suitable for rendering in OpenGL (Z axis pointing towards the viewer)
 
VuMatrix44F vuMatrix44FLookAt (VuVector3F eye, VuVector3F target, VuVector3F up)
 Create a "look-at" view matrix immediately suitable for rendering in OpenGL.
 
VuMatrix44F vuMatrix44FMultiplyMatrix (VuMatrix44F mA, VuMatrix44F mB)
 Multiply the two 4x4 matrices A and B and return (mA * mB)
 
void vuMatrix44FGetPoseRot (VuMatrix44F m, VuVector3F *trans, VuVector3F *axis, float *angle)
 Extract translation and rotation (axis-angle; angle is in degrees) from a 4x4 matrix.
 
void vuMatrix44FGetPoseQuat (VuMatrix44F m, VuVector3F *trans, VuVector4F *quat)
 Extract translation and rotation (quaternion) from a 4x4 matrix.
 
void vuMatrix44FGetTRS (VuMatrix44F m, VuVector3F *trans, VuVector3F *axis, float *angle, VuVector3F *scale)
 Decompose a 4x4 matrix into translation, rotation and non-uniform scale components.
 
void vuMatrix44FGetTRSQuat (VuMatrix44F m, VuVector3F *trans, VuVector4F *quat, VuVector3F *scale)
 Decompose a 4x4 matrix into translation, rotation and non-uniform scale components.
 

Detailed Description

Linear algebra-related utility functions.