Cyclone Cyclone: cyclone::Matrix3 Class Reference

cyclone::Matrix3 Class Reference

<Matrix3;Matrix3Intro More...

#include <core.h>

List of all members.

Public Member Functions

 Matrix3 ()
 Creates a new matrix.
 Matrix3 (const Vector3 &compOne, const Vector3 &compTwo, const Vector3 &compThree)
 Creates a new matrix with the given three vectors making up its columns.
 Matrix3 (real c0, real c1, real c2, real c3, real c4, real c5, real c6, real c7, real c8)
 Creates a new matrix with explicit coefficients.
void setDiagonal (real a, real b, real c)
 Sets the matrix to be a diagonal matrix with the given values along the leading diagonal.
void setInertiaTensorCoeffs (real ix, real iy, real iz, real ixy=0, real ixz=0, real iyz=0)
 Sets the value of the matrix from inertia tensor values.
void setBlockInertiaTensor (const Vector3 &halfSizes, real mass)
 Sets the value of the matrix as an inertia tensor of a rectangular block aligned with the body's coordinate system with the given axis half-sizes and mass.
void setSkewSymmetric (const Vector3 vector)
 Sets the matrix to be a skew symmetric matrix based on the given vector.Matrix3SetSkewSymmetric.
void setComponents (const Vector3 &compOne, const Vector3 &compTwo, const Vector3 &compThree)
 Sets the matrix values from the given three vector components.Matrix3SetComponents.
Vector3 operator * (const Vector3 &vector) const
 Transform the given vector by this matrix.
Vector3 transform (const Vector3 &vector) const
 Transform the given vector by this matrix.
Vector3 transformTranspose (const Vector3 &vector) const
 Transform the given vector by the transpose of this matrix.
Vector3 getRowVector (int i) const
 Gets a vector representing one row in the matrix.
Vector3 getAxisVector (int i) const
 Gets a vector representing one axis (i.e.
void setInverse (const Matrix3 &m)
 Sets the matrix to be the inverse of the given matrix.
Matrix3 inverse () const
 Returns a new matrix containing the inverse of this matrix.
void invert ()
 Inverts the matrix.Matrix3Inverse.
void setTranspose (const Matrix3 &m)
 Sets the matrix to be the transpose of the given matrix.
Matrix3 transpose () const
 Returns a new matrix containing the transpose of this matrix.Matrix3Transpose.
Matrix3 operator * (const Matrix3 &o) const
 Returns a matrix which is this matrix multiplied by the given other matrix.Matrix3MatrixMultiply.
void operator *= (const Matrix3 &o)
 Multiplies this matrix in place by the given other matrix.
void operator *= (const real scalar)
 Multiplies this matrix in place by the given scalar.
void operator+= (const Matrix3 &o)
 Does a component-wise addition of this matrix and the given matrix.
void setOrientation (const Quaternion &q)
 Sets this matrix to be the rotation matrix corresponding to the given quaternion.

Static Public Member Functions

static Matrix3 linearInterpolate (const Matrix3 &a, const Matrix3 &b, real prop)
 Interpolates a couple of matrices.

Public Attributes

real data [9]
 Holds the tensor matrix data in array form.Matrix3Intro.


Detailed Description

<Matrix3;Matrix3Intro

This matrix is not padding to produce an aligned structure, since it is most commonly used with a mass (single real) and two damping coefficients to make the 12-element characteristics array of a rigid body.


Constructor & Destructor Documentation

cyclone::Matrix3::Matrix3  )  [inline]
 

Creates a new matrix.

cyclone::Matrix3::Matrix3 const Vector3 compOne,
const Vector3 compTwo,
const Vector3 compThree
[inline]
 

Creates a new matrix with the given three vectors making up its columns.

cyclone::Matrix3::Matrix3 real  c0,
real  c1,
real  c2,
real  c3,
real  c4,
real  c5,
real  c6,
real  c7,
real  c8
[inline]
 

Creates a new matrix with explicit coefficients.


Member Function Documentation

Vector3 cyclone::Matrix3::getAxisVector int  i  )  const [inline]
 

Gets a vector representing one axis (i.e.

one column) in the matrix.

Parameters:
i The row to return.
Returns:
The vector.

Vector3 cyclone::Matrix3::getRowVector int  i  )  const [inline]
 

Gets a vector representing one row in the matrix.

Parameters:
i The row to return.

Matrix3 cyclone::Matrix3::inverse  )  const [inline]
 

Returns a new matrix containing the inverse of this matrix.

void cyclone::Matrix3::invert  )  [inline]
 

Inverts the matrix.Matrix3Inverse.

static Matrix3 cyclone::Matrix3::linearInterpolate const Matrix3 a,
const Matrix3 b,
real  prop
[static]
 

Interpolates a couple of matrices.

Matrix3 cyclone::Matrix3::operator * const Matrix3 o  )  const [inline]
 

Returns a matrix which is this matrix multiplied by the given other matrix.Matrix3MatrixMultiply.

Vector3 cyclone::Matrix3::operator * const Vector3 vector  )  const [inline]
 

Transform the given vector by this matrix.

Parameters:
vector The vector to transform.

void cyclone::Matrix3::operator *= const real  scalar  )  [inline]
 

Multiplies this matrix in place by the given scalar.

void cyclone::Matrix3::operator *= const Matrix3 o  )  [inline]
 

Multiplies this matrix in place by the given other matrix.

void cyclone::Matrix3::operator+= const Matrix3 o  )  [inline]
 

Does a component-wise addition of this matrix and the given matrix.

void cyclone::Matrix3::setBlockInertiaTensor const Vector3 halfSizes,
real  mass
[inline]
 

Sets the value of the matrix as an inertia tensor of a rectangular block aligned with the body's coordinate system with the given axis half-sizes and mass.

void cyclone::Matrix3::setComponents const Vector3 compOne,
const Vector3 compTwo,
const Vector3 compThree
[inline]
 

Sets the matrix values from the given three vector components.Matrix3SetComponents.

These are arranged as the three columns of the vector.

void cyclone::Matrix3::setDiagonal real  a,
real  b,
real  c
[inline]
 

Sets the matrix to be a diagonal matrix with the given values along the leading diagonal.

void cyclone::Matrix3::setInertiaTensorCoeffs real  ix,
real  iy,
real  iz,
real  ixy = 0,
real  ixz = 0,
real  iyz = 0
[inline]
 

Sets the value of the matrix from inertia tensor values.

void cyclone::Matrix3::setInverse const Matrix3 m  )  [inline]
 

Sets the matrix to be the inverse of the given matrix.

Parameters:
m The matrix to invert and use to set this.

void cyclone::Matrix3::setOrientation const Quaternion q  )  [inline]
 

Sets this matrix to be the rotation matrix corresponding to the given quaternion.

void cyclone::Matrix3::setSkewSymmetric const Vector3  vector  )  [inline]
 

Sets the matrix to be a skew symmetric matrix based on the given vector.Matrix3SetSkewSymmetric.

The skew symmetric matrix is the equivalent of the vector product. So if a,b are vectors. a x b = A_s b where A_s is the skew symmetric form of a.

void cyclone::Matrix3::setTranspose const Matrix3 m  )  [inline]
 

Sets the matrix to be the transpose of the given matrix.

Parameters:
m The matrix to transpose and use to set this.

Vector3 cyclone::Matrix3::transform const Vector3 vector  )  const [inline]
 

Transform the given vector by this matrix.

Parameters:
vector The vector to transform.

Vector3 cyclone::Matrix3::transformTranspose const Vector3 vector  )  const [inline]
 

Transform the given vector by the transpose of this matrix.

Parameters:
vector The vector to transform.

Matrix3 cyclone::Matrix3::transpose  )  const [inline]
 

Returns a new matrix containing the transpose of this matrix.Matrix3Transpose.


Member Data Documentation

real cyclone::Matrix3::data[9]
 

Holds the tensor matrix data in array form.Matrix3Intro.


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