Nugget
|
Enumerations | |
enum class | Axis { X , Y , Z } |
Functions | |
void | generateRotationMatrix33 (Matrix33 *m, Angle t, Axis a, const Trig<> &trig) |
Generate a rotation matrix for a given angle and axis. | |
Matrix33 | generateRotationMatrix33 (Angle t, Axis a, const Trig<> &trig) |
Generate a rotation matrix for a given angle and axis. | |
void | multiplyMatrix33 (const Matrix33 &m1, const Matrix33 &m2, Matrix33 *out) |
Multiply two 3x3 matrices. | |
Matrix33 | multiplyMatrix33 (const Matrix33 &m1, const Matrix33 &m2) |
Multiply two 3x3 matrices. | |
void | scaleMatrix33 (Matrix33 *m, FixedPoint<> s) |
Scale a 3x3 matrix by a scalar. | |
void | matrixVecMul3 (const Matrix33 &m, const Vec3 &v, Vec3 *out) |
Multiply a 3x3 matrix by a 3D vector. | |
void | matrixVecMul3xy (const Matrix33 &m, const Vec3 &v, Vec2 *out) |
Multiply a 3x3 matrix by a 3D vector, returning only the x and y components. | |
FixedPoint | matrixVecMul3z (const Matrix33 &m, const Vec3 &v) |
Multiply a 3x3 matrix by a 3D vector, returning only the z component. | |
void | crossProductVec3 (const Vec3 &v1, const Vec3 &v2, Vec3 *out) |
Compute the cross product of two 3D vectors. | |
Vec3 | crossProductVec3 (const Vec3 &v1, const Vec3 &v2) |
Compute the cross product of two 3D vectors. | |
FixedPoint | matrixDeterminant3 (const Matrix33 &m) |
Compute the determinant of a 3x3 matrix. | |
FixedPoint | squareRoot (FixedPoint<> x, FixedPoint<> y) |
Computes the square root of a fixed point number, given an approximative hint. | |
FixedPoint | inverseSquareRoot (FixedPoint<> x, FixedPoint<> y) |
Computes the inverse square root of a fixed point number, given an approximative hint. | |
FixedPoint | normOfVec3 (const Vec3 &v) |
Computes the norm of a 3D vector. | |
void | normalizeVec3 (Vec3 *v) |
Normalizes a 3D vector. | |
void | fastNormalizeVec3 (Vec3 *v) |
Normalizes a 3D vector, using a faster but less accurate algorithm. | |
void | project (const Vec3 *v, FixedPoint<> h, Vec2 *out) |
Projects a 3D point onto a 2D plane. | |
|
strong |
psyqo::Vec3 psyqo::SoftMath::crossProductVec3 | ( | const Vec3 & | v1, |
const Vec3 & | v2 | ||
) |
Compute the cross product of two 3D vectors.
v1 | The first vector. |
v2 | The second vector. |
Compute the cross product of two 3D vectors.
v1 | The first vector. |
v2 | The second vector. |
out | The vector to store the result in. May be the same as v1 or v2. |
Normalizes a 3D vector, using a faster but less accurate algorithm.
v | The vector to normalize. |
psyqo::Matrix33 psyqo::SoftMath::generateRotationMatrix33 | ( | Angle | t, |
Axis | a, | ||
const Trig<> & | trig | ||
) |
Generate a rotation matrix for a given angle and axis.
t | The angle to rotate by. |
a | The axis to rotate around. |
trig | A trigonometry object to use for sine and cosine calculations. |
void psyqo::SoftMath::generateRotationMatrix33 | ( | Matrix33 * | m, |
Angle | t, | ||
Axis | a, | ||
const Trig<> & | trig | ||
) |
Generate a rotation matrix for a given angle and axis.
m | The matrix to store the result in. |
t | The angle to rotate by. |
a | The axis to rotate around. |
trig | A trigonometry object to use for sine and cosine calculations. |
FixedPoint psyqo::SoftMath::inverseSquareRoot | ( | FixedPoint<> | x, |
FixedPoint<> | y | ||
) |
Computes the inverse square root of a fixed point number, given an approximative hint.
x | The number to compute the inverse square root of. |
y | The approximative hint of the result. |
psyqo::FixedPoint psyqo::SoftMath::matrixDeterminant3 | ( | const Matrix33 & | m | ) |
Compute the determinant of a 3x3 matrix.
m | The matrix. |
Multiply a 3x3 matrix by a 3D vector.
m | The matrix. |
v | The vector. |
out | The vector to store the result in. May be the same as v. |
Multiply a 3x3 matrix by a 3D vector, returning only the x and y components.
m | The matrix. |
v | The vector. |
out | The vector to store the result in. |
Multiply a 3x3 matrix by a 3D vector, returning only the z component.
m | The matrix. |
v | The vector. |
psyqo::Matrix33 psyqo::SoftMath::multiplyMatrix33 | ( | const Matrix33 & | m1, |
const Matrix33 & | m2 | ||
) |
Multiply two 3x3 matrices.
m1 | The first matrix. |
m2 | The second matrix. |
Multiply two 3x3 matrices.
m1 | The first matrix. |
m2 | The second matrix. |
out | The matrix to store the result in. May be the same as m1 or m2. |
Normalizes a 3D vector.
v | The vector to normalize. |
psyqo::FixedPoint psyqo::SoftMath::normOfVec3 | ( | const Vec3 & | v | ) |
Computes the norm of a 3D vector.
v | The vector. |
Projects a 3D point onto a 2D plane.
v | The vector to project. |
h | The height of the plane. |
out | The vector to store the result in. |
Scale a 3x3 matrix by a scalar.
m | The matrix to scale. |
s | The scalar to scale by. |
FixedPoint psyqo::SoftMath::squareRoot | ( | FixedPoint<> | x, |
FixedPoint<> | y | ||
) |
Computes the square root of a fixed point number, given an approximative hint.
x | The number to compute the square root of. |
y | The approximative hint of the result. |