BASE::RCMatrix Class Reference

A 4x4 matrix. More...

Inherits BASE::RCStringValueInterface.

Inheritance diagram for BASE::RCMatrix:

Inheritance graph
[legend]
Collaboration diagram for BASE::RCMatrix:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 RCMatrix ()
 RCMatrix (const TReal *naSource, TBool b3x4=true)
 RCMatrix (TReal nElement00, TReal nElement11, TReal nElement22, TReal nElement33=1.0)
 RCMatrix (const RCQuaternion &Source)
 RCMatrix (const RCMatrix &Source)
const RCMatrixoperator= (const RCMatrix &Source)
const RCMatrixoperator= (const RCQuaternion &Source)
const TRealData () const
TRealoperator() (TInt nRow, TInt nCol)
const TRealoperator() (TInt nRow, TInt nCol) const
RCMatrix operator * (const RCMatrix &rhs) const
RCVector operator * (const RCVector &rhs) const
const RCMatrixoperator *= (const RCMatrix &rhs)
const RCMatrixTranspose ()
RCMatrix Transposed () const
RCVector Column (TInt nCol, TBool bDrop4th=true) const
RCVector Row (TInt nRow, TBool bDrop4th=true) const
virtual TBool FromString (const RCString &sValue)
virtual const RCStringToString () const

Public Attributes

TReal m_naData [4][4]

Static Public Attributes

static const RCMatrix IDENTITY

Detailed Description

A 4x4 matrix.

Author:
Patrik Stellmann
The data is stored as a 4x4 array of TReal row by row.


Constructor & Destructor Documentation

RCMatrix::RCMatrix  )  [inline]
 

Creates an identity matrix.

RCMatrix::RCMatrix const TReal naSource,
TBool  b3x4 = true
[inline, explicit]
 

Creates a matrix from an array of values. If b3x4 is true the specified array is expected to contain 3 rows of 4 values each and the 4th row is set to zero with a 1 in the last cell. Otherwise 16 values are copied from the array row by row.

RCMatrix::RCMatrix const RCQuaternion Source  )  [inline]
 

Creates a rotation matrix from the specified quaternion.

RCMatrix::RCMatrix const RCMatrix Source  )  [inline]
 

Creates a copy of the specified matrix.


Member Function Documentation

const TReal * RCMatrix::Data  )  const [inline]
 

Returns a constant pointer to the internally storred data which is a 4x4 array of TReal while the elements are stored row by row.

TBool RCMatrix::FromString const RCString sValue  )  [virtual]
 

  • 3 values -> diagonal matrix with these values
  • 9 values -> 3x3 matrix row by row
  • 12 values -> 3x4 matrix row by row
  • 16 values -> 4x4 matrix row by row

Implements BASE::RCStringValueInterface.

RCVector RCMatrix::operator * const RCVector rhs  )  const [inline]
 

Returns the result of the specified vector multiplied by this matrix from the left.

RCMatrix RCMatrix::operator * const RCMatrix rhs  )  const [inline]
 

Returns the result of specified matrix ,ultiplied by this one from the left.

const RCMatrix & RCMatrix::operator *= const RCMatrix rhs  ) 
 

Multiplies the specified matrix with this one from the left(!).

const TReal & RCMatrix::operator() TInt  nRow,
TInt  nCol
const [inline]
 

Returns a reference to the element specified by the arguments. The arguments must be both less than 4.

TReal & RCMatrix::operator() TInt  nRow,
TInt  nCol
[inline]
 

Returns a reference to the element specified by the arguments. The arguments must be both less than 4.

const RCMatrix & RCMatrix::operator= const RCQuaternion Source  ) 
 

Assigns the rotation matrix represented by the specified quaternion to this one.

const RCMatrix & RCMatrix::operator= const RCMatrix Source  )  [inline]
 

Assigns the specified matrix to this one.


The documentation for this class was generated from the following files:
Generated on Thu Feb 16 12:46:20 2006 for Simulator Bob by  doxygen 1.4.6-NO