SilverLining
Public Member Functions | Public Attributes | Friends | List of all members
SilverLining::Matrix3 Class Reference

A simple 3x3 matrix class and its operations. More...

#include <Matrix3.h>

Inheritance diagram for SilverLining::Matrix3:
Inheritance graph
[legend]
Collaboration diagram for SilverLining::Matrix3:
Collaboration graph
[legend]

Public Member Functions

 Matrix3 ()
 Default contructor; performs no initialization for efficiency.
 
 Matrix3 (double e11, double e12, double e13, double e21, double e22, double e23, double e31, double e32, double e33)
 Constructor that instantiates the 3x3 matrix with initial values.
 
 ~Matrix3 ()
 Destructor.
 
bool operator== (const Matrix3 &rhs) const
 equality operator
 
bool operator!= (const Matrix3 &rhs) const
 in-equality operator
 
void SILVERLINING_API FromRx (double rad)
 Populates the matrix to model a rotation about the X axis by a given amount, in radians.
 
void SILVERLINING_API FromRy (double rad)
 Populates the matrix to model a rotation about the Y axis by a given amount, in radians.
 
void SILVERLINING_API FromRz (double rad)
 Populates the matrix to model a rotation about the Z axis by a given amount, in radians.
 
void SILVERLINING_API FromXYZ (double Rx, double Ry, double Rz)
 Populates the matrix as a series of rotations about the X, Y, and Z axes (in that order) by specified amounts in radians.
 
void SILVERLINING_API FromAxisAngle (const Vector3 &axis, double angle)
 Create a rotation matrix from axis and angle.
 
Matrix3 SILVERLINING_API operator* (const Matrix3 &mat)
 Multiplies two matrices together.
 
Vector3 SILVERLINING_API operator* (const Vector3 &rkVector) const
 Multiplies the matrix by a vector, yielding another 3x1 vector.
 
Matrix3 SILVERLINING_API Transpose () const
 Calculate the transpose of the matrix.
 
Matrix3 SILVERLINING_API Inverse () const
 Calculate the inverse of the matrix.
 
void SILVERLINING_API SetIdentity (void)
 Set to identity matrix.
 

Public Attributes

double elem [3][3]
 The data members are public for convenience.
 

Friends

Vector3 SILVERLINING_API operator* (const Vector3 &vec, const Matrix3 &mat)
 Multiplies a 1x3 vector by a matrix, yielding a 1x3 vector.
 

Detailed Description

A simple 3x3 matrix class and its operations.

Constructor & Destructor Documentation

◆ Matrix3() [1/2]

SilverLining::Matrix3::Matrix3 ( )
inline

Default contructor; performs no initialization for efficiency.

◆ Matrix3() [2/2]

SilverLining::Matrix3::Matrix3 ( double  e11,
double  e12,
double  e13,
double  e21,
double  e22,
double  e23,
double  e31,
double  e32,
double  e33 
)
inline

Constructor that instantiates the 3x3 matrix with initial values.

◆ ~Matrix3()

SilverLining::Matrix3::~Matrix3 ( )
inline

Destructor.

Member Function Documentation

◆ FromAxisAngle()

void SILVERLINING_API SilverLining::Matrix3::FromAxisAngle ( const Vector3 axis,
double  angle 
)

Create a rotation matrix from axis and angle.

◆ FromRx()

void SILVERLINING_API SilverLining::Matrix3::FromRx ( double  rad)

Populates the matrix to model a rotation about the X axis by a given amount, in radians.

◆ FromRy()

void SILVERLINING_API SilverLining::Matrix3::FromRy ( double  rad)

Populates the matrix to model a rotation about the Y axis by a given amount, in radians.

◆ FromRz()

void SILVERLINING_API SilverLining::Matrix3::FromRz ( double  rad)

Populates the matrix to model a rotation about the Z axis by a given amount, in radians.

◆ FromXYZ()

void SILVERLINING_API SilverLining::Matrix3::FromXYZ ( double  Rx,
double  Ry,
double  Rz 
)

Populates the matrix as a series of rotations about the X, Y, and Z axes (in that order) by specified amounts in radians.

◆ Inverse()

Matrix3 SILVERLINING_API SilverLining::Matrix3::Inverse ( ) const

Calculate the inverse of the matrix.

◆ operator*() [1/2]

Matrix3 SILVERLINING_API SilverLining::Matrix3::operator* ( const Matrix3 mat)

Multiplies two matrices together.

◆ operator*() [2/2]

Vector3 SILVERLINING_API SilverLining::Matrix3::operator* ( const Vector3 rkVector) const

Multiplies the matrix by a vector, yielding another 3x1 vector.

◆ SetIdentity()

void SILVERLINING_API SilverLining::Matrix3::SetIdentity ( void  )

Set to identity matrix.

◆ Transpose()

Matrix3 SILVERLINING_API SilverLining::Matrix3::Transpose ( ) const

Calculate the transpose of the matrix.

Friends And Related Function Documentation

◆ operator*

Vector3 SILVERLINING_API operator* ( const Vector3 vec,
const Matrix3 mat 
)
friend

Multiplies a 1x3 vector by a matrix, yielding a 1x3 vector.


The documentation for this class was generated from the following file: