#include <archon/math/matrix.H>
Collaboration diagram for Archon::Math::Matrix3x3:
Public Member Functions | |
Matrix3x3 () | |
Matrix3x3 (const Vector3 &x, const Vector3 &y, const Vector3 &z) | |
Matrix3x3 (Vector3 y, Vector3 z) | |
Produce a righthanded orthonormal map or coordinate system basis. | |
Matrix3x3 (const Rotation3 &r) | |
Matrix3x3 (const Quaternion &q) | |
Vector3 | getRow1 () const |
Vector3 | getRow2 () const |
Vector3 | getRow3 () const |
double | dotRow1 (const Vector3 &v) const |
double | dotRow2 (const Vector3 &v) const |
double | dotRow3 (const Vector3 &v) const |
Vector3 | diag () const |
double | det () const |
Matrix3x3 | operator+ (const Matrix3x3 &m) const |
Matrix3x3 | operator- (const Matrix3x3 &m) const |
Matrix3x3 | operator * (const Matrix3x3 &m) const |
Matrix3x3 | operator/ (const Matrix3x3 &m) const |
void | map (Vector3 &v) const |
Vector3 | operator() (const Vector3 &v) const |
Vector3 | operator * (const Vector3 &v) const |
Matrix3x3 | operator * (double f) const |
Matrix3x3 | operator/ (double f) const |
Matrix3x3 | operator- () const |
Matrix3x3 & | operator+= (const Matrix3x3 &m) |
Matrix3x3 & | operator-= (const Matrix3x3 &m) |
Matrix3x3 & | operator *= (const Matrix3x3 &m) |
Matrix3x3 & | operator/= (const Matrix3x3 &m) |
Matrix3x3 & | operator *= (double f) |
Matrix3x3 & | operator/= (double f) |
bool | operator== (const Matrix3x3 &m) const |
bool | operator!= (const Matrix3x3 &m) const |
void | set (const Vector3 &x, const Vector3 &y, const Vector3 &z) |
void | setRow1 (const Vector3 &v) |
void | setRow2 (const Vector3 &v) |
void | setRow3 (const Vector3 &v) |
void | setRow1 (double x, double y, double z) |
void | setRow2 (double x, double y, double z) |
void | setRow3 (double x, double y, double z) |
void | setRotation (const Rotation3 &) |
Create a rotation matrix M such that V x M is the rotation of V. | |
void | setRotation (const Quaternion &) |
Create a rotation matrix M such that V x M is the rotation of V. | |
void | setInverseOf (const Matrix3x3 &) |
Make this matrix the inverse of the argument. | |
void | negate () |
void | transpose () |
void | scale (const Vector3 &s) |
Multiplication by:. | |
void | invScale (const Vector3 &s) |
Multiplication by:. | |
void | rotate (const Rotation3 &r) |
Think of this matrix as a basis and let r.normalizedAxis be specified in the coordinates of it. | |
void | pitch (double angle) |
Rotate basis around its x-axis. | |
void | yaw (double angle) |
Rotate basis around its y-axis. | |
void | roll (double angle) |
Rotate basis around its z-axis. | |
void | rotateRightHandedOrthoNormal (const Rotation3 &) |
Rotate right-handed ortho-normal basis around any axis. | |
void | pitchRightHandedOrthoNormal (double angle) |
Rotate right-handed ortho-normal basis around its x-axis. | |
void | yawRightHandedOrthoNormal (double angle) |
Rotate right-handed ortho-normal basis around its y-axis. | |
void | rollRightHandedOrthoNormal (double angle) |
Rotate right-handed ortho-normal basis around its z-axis. | |
Static Public Member Functions | |
static const Matrix3x3 & | zero () |
static const Matrix3x3 & | identity () |
Public Attributes | |
Vector3 | x |
Vector3 | y |
Vector3 | z |
Layout:
x[0] y[0] z[0] x[1] y[1] z[1] x[2] y[2] z[2]
Definition at line 42 of file matrix.H.
|
Produce a righthanded orthonormal map or coordinate system basis. The x-axis is given as y cross z, the y axis is given as x-axis cross z, and the z.axis is given as z. Note that "ortho" refers to the fact that the axes are perpendicular to each other when seen from the reference coordinate system. "normal" means that the axis vectors have unit lenght when seen from the reference coordinate system. "righthanded" means that the three axes are arranged according to the right-hand rule ie. z-axis = x-axis cross y-axis when seen from the reference coordinate system.
setInverseOf(CoordSystem3x3(eye, Matrix3x3(up, eye-center)))
|
|
Multiplication by:. 1/s[0] 0 0 0 1/s[1] 0 0 0 1/s[2] Definition at line 195 of file matrix.H. Referenced by Archon::X3D::Viewer::renderFrame(). |
|
Rotate right-handed ortho-normal basis around its x-axis. Using rotate, pitch, yaw or roll repeatedly for small steps may easily lead to lack of ortho-normality. Therefore this method applies stabilization that keeps the basis right-handed and ortho-normal. Definition at line 203 of file matrix.C. References m, map(), Archon::Math::BasicVector< T, N >::normalize(), x, y, and z. |
|
Rotate right-handed ortho-normal basis around its z-axis. Using rotate, pitch, yaw or roll repeatedly for small steps may easily lead to lack of ortho-normality. Therefore this method applies stabilization that keeps the basis right-handed and ortho-normal. Definition at line 241 of file matrix.C. References m, map(), Archon::Math::BasicVector< T, N >::normalize(), x, y, and z. |
|
Think of this matrix as a basis and let r.normalizedAxis be specified in the coordinates of it. Then 'rotate' rotates this matrix around that axis. Note, if you want to apply the same rotation to several matrices, then it is more efficient to create a rotation matrix first, and then map through it each of the matrixes that are to be rotated. Definition at line 153 of file matrix.C. References Matrix3x3(), and operator *=(). Referenced by Archon::Raytracer::SceneLoader::doTransform(), pitch(), Archon::X3D::Viewer::renderFrame(), roll(), Archon::Raytracer::ViewState::trackballRoll(), Archon::Console3d::ViewState::trackballRoll(), and yaw(). |
|
Rotate right-handed ortho-normal basis around any axis. Using rotate, pitch, yaw or roll repeatedly for small steps may easily lead to lack of ortho-normality. Therefore this method applies stabilization that keeps the basis right-handed and ortho-normal. Definition at line 190 of file matrix.C. References m, map(), Archon::Math::BasicVector< T, N >::normalize(), x, y, and z. Referenced by Archon::Math::CoordSystem3x3::minimalTurn(). |
|
Multiplication by:. s[0] 0 0 0 s[1] 0 0 0 s[2] Definition at line 181 of file matrix.H. Referenced by Archon::Raytracer::Cylinder::Cylinder(), Archon::Raytracer::SceneLoader::doTransform(), and Archon::X3D::Viewer::renderFrame(). |
|
Create a rotation matrix M such that V x M is the rotation of V. The angle must be given in radians. The axis must be a unit vector. Definition at line 81 of file matrix.C. References Archon::Math::Rotation3::angle, Archon::Math::Rotation3::axis, Archon::Math::BasicVector< T, N >::set(), x, y, and z. Referenced by Matrix3x3(). |
|
Rotate right-handed ortho-normal basis around its y-axis. Using rotate, pitch, yaw or roll repeatedly for small steps may easily lead to lack of ortho-normality. Therefore this method applies stabilization that keeps the basis right-handed and ortho-normal. Definition at line 222 of file matrix.C. References m, map(), Archon::Math::BasicVector< T, N >::normalize(), x, y, and z. |