LLMatrix4 Class Reference

#include <m4math.h>

List of all members.

Public Member Functions

 LLMatrix4 ()
 LLMatrix4 (const F32 *mat)
 LLMatrix4 (const LLMatrix3 &mat)
 LLMatrix4 (const LLQuaternion &q)
 LLMatrix4 (const LLMatrix3 &mat, const LLVector4 &pos)
 LLMatrix4 (const LLQuaternion &q, const LLVector4 &pos)
 LLMatrix4 (F32 angle, const LLVector4 &vec, const LLVector4 &pos)
 LLMatrix4 (F32 angle, const LLVector4 &vec)
 LLMatrix4 (const F32 roll, const F32 pitch, const F32 yaw, const LLVector4 &pos)
 LLMatrix4 (const F32 roll, const F32 pitch, const F32 yaw)
 ~LLMatrix4 (void)
void initRows (const LLVector4 &row0, const LLVector4 &row1, const LLVector4 &row2, const LLVector4 &row3)
const LLMatrix4 & identity ()
const LLMatrix4 & zero ()
const LLMatrix4 & initRotation (const F32 angle, const F32 x, const F32 y, const F32 z)
const LLMatrix4 & initRotation (const F32 angle, const LLVector4 &axis)
const LLMatrix4 & initRotation (const F32 roll, const F32 pitch, const F32 yaw)
const LLMatrix4 & initRotation (const LLQuaternion &q)
const LLMatrix4 & initMatrix (const LLMatrix3 &mat)
const LLMatrix4 & initMatrix (const LLMatrix3 &mat, const LLVector4 &translation)
const LLMatrix4 & initRotTrans (const F32 angle, const F32 rx, const F32 ry, const F32 rz, const F32 px, const F32 py, const F32 pz)
const LLMatrix4 & initRotTrans (const F32 angle, const LLVector3 &axis, const LLVector3 &translation)
const LLMatrix4 & initRotTrans (const F32 roll, const F32 pitch, const F32 yaw, const LLVector4 &pos)
const LLMatrix4 & initRotTrans (const LLQuaternion &q, const LLVector4 &pos)
const LLMatrix4 & initAll (const LLVector3 &scale, const LLQuaternion &q, const LLVector3 &pos)
const LLMatrix4 & setTranslation (const F32 x, const F32 y, const F32 z)
void setFwdRow (const LLVector3 &row)
void setLeftRow (const LLVector3 &row)
void setUpRow (const LLVector3 &row)
void setFwdCol (const LLVector3 &col)
void setLeftCol (const LLVector3 &col)
void setUpCol (const LLVector3 &col)
const LLMatrix4 & setTranslation (const LLVector4 &translation)
const LLMatrix4 & setTranslation (const LLVector3 &translation)
F32 determinant (void) const
LLQuaternion quaternion (void) const
LLVector4 getFwdRow4 () const
LLVector4 getLeftRow4 () const
LLVector4 getUpRow4 () const
LLMatrix3 getMat3 () const
const LLVector3 & getTranslation () const
const LLMatrix4 & transpose ()
const LLMatrix4 & invert ()
const LLMatrix4 & rotate (const F32 angle, const F32 x, const F32 y, const F32 z)
const LLMatrix4 & rotate (const F32 angle, const LLVector4 &vec)
const LLMatrix4 & rotate (const F32 roll, const F32 pitch, const F32 yaw)
const LLMatrix4 & rotate (const LLQuaternion &q)
const LLMatrix4 & translate (const LLVector3 &vec)

Public Attributes

F32 mMatrix [NUM_VALUES_IN_MAT4][NUM_VALUES_IN_MAT4]

Friends

LLVector4 operator * (const LLVector4 &a, const LLMatrix4 &b)
LLVector3 operator * (const LLVector3 &a, const LLMatrix4 &b)
LLVector4 rotate_vector (const LLVector4 &a, const LLMatrix4 &b)
LLVector3 rotate_vector (const LLVector3 &a, const LLMatrix4 &b)
bool operator== (const LLMatrix4 &a, const LLMatrix4 &b)
bool operator!= (const LLMatrix4 &a, const LLMatrix4 &b)
const LLMatrix4 & operator+= (LLMatrix4 &a, const LLMatrix4 &b)
const LLMatrix4 & operator-= (LLMatrix4 &a, const LLMatrix4 &b)
const LLMatrix4 & operator *= (LLMatrix4 &a, const LLMatrix4 &b)
const LLMatrix4 & operator *= (LLMatrix4 &a, const F32 &b)
std::ostream & operator<< (std::ostream &s, const LLMatrix4 &a)


Detailed Description

Definition at line 99 of file m4math.h.


Constructor & Destructor Documentation

LLMatrix4::LLMatrix4 (  )  [inline]

Definition at line 244 of file m4math.h.

References identity().

LLMatrix4::LLMatrix4 ( const F32 *  mat  )  [explicit]

Definition at line 49 of file m4math.cpp.

References mMatrix.

LLMatrix4::LLMatrix4 ( const LLMatrix3 &  mat  )  [explicit]

Definition at line 95 of file m4math.cpp.

References LLMatrix3::mMatrix, and mMatrix.

LLMatrix4::LLMatrix4 ( const LLQuaternion &  q  )  [explicit]

Definition at line 118 of file m4math.cpp.

References initRotation().

LLMatrix4::LLMatrix4 ( const LLMatrix3 &  mat,
const LLVector4 &  pos 
)

Definition at line 72 of file m4math.cpp.

References LLMatrix3::mMatrix, mMatrix, and LLVector4::mV.

LLMatrix4::LLMatrix4 ( const LLQuaternion &  q,
const LLVector4 &  pos 
)

Definition at line 123 of file m4math.cpp.

References initRotTrans().

LLMatrix4::LLMatrix4 ( F32  angle,
const LLVector4 &  vec,
const LLVector4 &  pos 
)

Definition at line 128 of file m4math.cpp.

References initRotTrans().

LLMatrix4::LLMatrix4 ( F32  angle,
const LLVector4 &  vec 
)

Definition at line 133 of file m4math.cpp.

References initRotation(), and mMatrix.

LLMatrix4::LLMatrix4 ( const F32  roll,
const F32  pitch,
const F32  yaw,
const LLVector4 &  pos 
)

Definition at line 143 of file m4math.cpp.

References initRotTrans().

LLMatrix4::LLMatrix4 ( const F32  roll,
const F32  pitch,
const F32  yaw 
)

Definition at line 149 of file m4math.cpp.

References initRotation(), and mMatrix.

LLMatrix4::~LLMatrix4 ( void   ) 

Definition at line 160 of file m4math.cpp.


Member Function Documentation

F32 LLMatrix4::determinant ( void   )  const

Definition at line 221 of file m4math.cpp.

References llendl, and llerrs.

LLVector4 LLMatrix4::getFwdRow4 (  )  const

Definition at line 257 of file m4math.cpp.

References mMatrix, VW, VX, VY, and VZ.

Referenced by LLAgent::calcFocusOffset(), LLKeyframeStandMotion::onUpdate(), and LLVOAvatar::updateCharacter().

LLVector4 LLMatrix4::getLeftRow4 (  )  const

Definition at line 262 of file m4math.cpp.

References mMatrix, VW, VX, VY, and VZ.

Referenced by LLAgent::calcFocusOffset().

LLMatrix3 LLMatrix4::getMat3 (  )  const

Definition at line 581 of file m4math.cpp.

References mMatrix, and LLMatrix3::mMatrix.

Referenced by LLDrawPoolWater::render(), LLDrawPoolWater::renderShaderSimple(), and LLPipeline::setupAvatarLights().

const LLVector3& LLMatrix4::getTranslation (  )  const [inline]

Definition at line 194 of file m4math.h.

References mMatrix.

LLVector4 LLMatrix4::getUpRow4 (  )  const

Definition at line 267 of file m4math.cpp.

References mMatrix, VW, VX, VY, and VZ.

Referenced by LLAgent::calcFocusOffset().

const LLMatrix4 & LLMatrix4::identity (  )  [inline]

Definition at line 249 of file m4math.h.

References mMatrix.

Referenced by LLVOVolume::animateTextures(), LLXformMatrix::init(), LLMatrix4(), and LLVOVolume::LLVOVolume().

const LLMatrix4 & LLMatrix4::initAll ( const LLVector3 &  scale,
const LLQuaternion &  q,
const LLVector3 &  pos 
)

Definition at line 430 of file m4math.cpp.

References mMatrix, LLQuaternion::mQ, LLVector3::mV, VW, VX, VY, and VZ.

Referenced by LLVOVolume::animateTextures(), LLXform::getLocalMat4(), LLManipTranslate::highlightManipulators(), LLManipScale::highlightManipulators(), LLXformMatrix::updateMatrix(), and LLVOVolume::writeCAL3D().

const LLMatrix4 & LLMatrix4::initMatrix ( const LLMatrix3 &  mat,
const LLVector4 &  translation 
)

Definition at line 624 of file m4math.cpp.

References LLMatrix3::mMatrix, mMatrix, and LLVector4::mV.

const LLMatrix4 & LLMatrix4::initMatrix ( const LLMatrix3 &  mat  ) 

Definition at line 600 of file m4math.cpp.

References LLMatrix3::mMatrix, and mMatrix.

Referenced by initRotation(), and initRotTrans().

const LLMatrix4 & LLMatrix4::initRotation ( const LLQuaternion &  q  ) 

Definition at line 375 of file m4math.cpp.

References initMatrix().

const LLMatrix4 & LLMatrix4::initRotation ( const F32  roll,
const F32  pitch,
const F32  yaw 
)

Definition at line 368 of file m4math.cpp.

References initMatrix().

const LLMatrix4 & LLMatrix4::initRotation ( const F32  angle,
const LLVector4 &  axis 
)

Definition at line 361 of file m4math.cpp.

References initMatrix().

const LLMatrix4 & LLMatrix4::initRotation ( const F32  angle,
const F32  x,
const F32  y,
const F32  z 
)

Definition at line 354 of file m4math.cpp.

References initMatrix().

Referenced by LLMatrix4().

const LLMatrix4 & LLMatrix4::initRotTrans ( const LLQuaternion &  q,
const LLVector4 &  pos 
)

Definition at line 422 of file m4math.cpp.

References initMatrix(), and setTranslation().

const LLMatrix4 & LLMatrix4::initRotTrans ( const F32  roll,
const F32  pitch,
const F32  yaw,
const LLVector4 &  pos 
)

Definition at line 401 of file m4math.cpp.

References initMatrix(), and setTranslation().

const LLMatrix4 & LLMatrix4::initRotTrans ( const F32  angle,
const LLVector3 &  axis,
const LLVector3 &  translation 
)

Definition at line 393 of file m4math.cpp.

References initMatrix(), and setTranslation().

const LLMatrix4 & LLMatrix4::initRotTrans ( const F32  angle,
const F32  rx,
const F32  ry,
const F32  rz,
const F32  px,
const F32  py,
const F32  pz 
)

Definition at line 383 of file m4math.cpp.

References initMatrix(), and setTranslation().

Referenced by LLManipTranslate::highlightManipulators(), LLManipScale::highlightManipulators(), and LLMatrix4().

void LLMatrix4::initRows ( const LLVector4 &  row0,
const LLVector4 &  row1,
const LLVector4 &  row2,
const LLVector4 &  row3 
)

Definition at line 327 of file m4math.cpp.

References mMatrix, and LLVector4::mV.

Referenced by LLDrawPoolBump::beginShiny(), LLVolumeImplFlexible::doFlexibleUpdate(), LLDrawPoolAvatar::getModelView(), LLManipRotate::render(), LLVOVolume::updateRelativeXform(), and LLVolumeImplFlexible::updateRelativeXform().

const LLMatrix4 & LLMatrix4::invert (  ) 

Definition at line 228 of file m4math.cpp.

References j, mMatrix, VW, VX, VY, and VZ.

Referenced by LLDrawPoolWater::render(), LLDrawPoolWater::renderShaderSimple(), LLPipeline::setupAvatarLights(), LLJoint::setWorldPosition(), and LLJoint::setWorldRotation().

LLQuaternion LLMatrix4::quaternion ( void   )  const

Definition at line 277 of file m4math.cpp.

References f, i, j, mMatrix, LLQuaternion::mQ, s, LLQuaternion::setQuat(), VS, VX, VY, and VZ.

Referenced by LLQuaternion::LLQuaternion(), LLQuaternion::setQuat(), and LLVOAvatar::updateCharacter().

const LLMatrix4 & LLMatrix4::rotate ( const LLQuaternion &  q  ) 

Definition at line 495 of file m4math.cpp.

const LLMatrix4 & LLMatrix4::rotate ( const F32  roll,
const F32  pitch,
const F32  yaw 
)

Definition at line 488 of file m4math.cpp.

const LLMatrix4 & LLMatrix4::rotate ( const F32  angle,
const LLVector4 &  vec 
)

Definition at line 481 of file m4math.cpp.

const LLMatrix4 & LLMatrix4::rotate ( const F32  angle,
const F32  x,
const F32  y,
const F32  z 
)

Definition at line 473 of file m4math.cpp.

Referenced by LLVOVolume::animateTextures().

void LLMatrix4::setFwdCol ( const LLVector3 &  col  ) 

Definition at line 534 of file m4math.cpp.

References mMatrix, LLVector3::mV, VX, VY, and VZ.

Referenced by LLCoordFrame::getMatrixToLocal().

void LLMatrix4::setFwdRow ( const LLVector3 &  row  ) 

Definition at line 512 of file m4math.cpp.

References mMatrix, LLVector3::mV, VX, VY, and VZ.

Referenced by LLViewerJoint::drawBone(), and LLCoordFrame::getRotMatrixToParent().

void LLMatrix4::setLeftCol ( const LLVector3 &  col  ) 

Definition at line 541 of file m4math.cpp.

References mMatrix, LLVector3::mV, VX, VY, and VZ.

Referenced by LLCoordFrame::getMatrixToLocal().

void LLMatrix4::setLeftRow ( const LLVector3 &  row  ) 

Definition at line 519 of file m4math.cpp.

References mMatrix, LLVector3::mV, VX, VY, and VZ.

Referenced by LLViewerJoint::drawBone(), and LLCoordFrame::getRotMatrixToParent().

const LLMatrix4 & LLMatrix4::setTranslation ( const LLVector3 &  translation  ) 

Definition at line 564 of file m4math.cpp.

References mMatrix, LLVector3::mV, VW, VX, VY, and VZ.

const LLMatrix4 & LLMatrix4::setTranslation ( const LLVector4 &  translation  ) 

Definition at line 572 of file m4math.cpp.

References mMatrix, LLVector4::mV, VW, VX, VY, and VZ.

const LLMatrix4 & LLMatrix4::setTranslation ( const F32  x,
const F32  y,
const F32  z 
)

Definition at line 556 of file m4math.cpp.

References mMatrix, VW, VX, VY, and VZ.

Referenced by initRotTrans().

void LLMatrix4::setUpCol ( const LLVector3 &  col  ) 

Definition at line 548 of file m4math.cpp.

References mMatrix, LLVector3::mV, VX, VY, and VZ.

Referenced by LLCoordFrame::getMatrixToLocal().

void LLMatrix4::setUpRow ( const LLVector3 &  row  ) 

Definition at line 526 of file m4math.cpp.

References mMatrix, LLVector3::mV, VX, VY, and VZ.

Referenced by LLViewerJoint::drawBone(), and LLCoordFrame::getRotMatrixToParent().

const LLMatrix4 & LLMatrix4::translate ( const LLVector3 &  vec  ) 

Definition at line 503 of file m4math.cpp.

References mMatrix, and LLVector3::mV.

Referenced by LLVOVolume::animateTextures(), and LLViewerJointMesh::uploadJointMatrices().

const LLMatrix4 & LLMatrix4::transpose (  ) 

Definition at line 193 of file m4math.cpp.

References mMatrix.

Referenced by LLCubeMap::setMatrix().

const LLMatrix4 & LLMatrix4::zero (  ) 

Definition at line 166 of file m4math.cpp.

References mMatrix.

Referenced by LLViewerCamera::calcProjection().


Friends And Related Function Documentation

LLVector3 operator * ( const LLVector3 &  a,
const LLMatrix4 &  b 
) [friend]

Definition at line 685 of file m4math.cpp.

LLVector4 operator * ( const LLVector4 &  a,
const LLMatrix4 &  b 
) [friend]

Definition at line 707 of file m4math.cpp.

const LLMatrix4& operator *= ( LLMatrix4 &  a,
const F32 &  b 
) [friend]

Definition at line 312 of file m4math.h.

const LLMatrix4& operator *= ( LLMatrix4 &  a,
const LLMatrix4 &  b 
) [friend]

Definition at line 294 of file m4math.h.

bool operator!= ( const LLMatrix4 &  a,
const LLMatrix4 &  b 
) [friend]

Definition at line 788 of file m4math.cpp.

const LLMatrix4& operator+= ( LLMatrix4 &  a,
const LLMatrix4 &  b 
) [friend]

Definition at line 327 of file m4math.h.

const LLMatrix4& operator-= ( LLMatrix4 &  a,
const LLMatrix4 &  b 
) [friend]

Definition at line 342 of file m4math.h.

std::ostream& operator<< ( std::ostream &  s,
const LLMatrix4 &  a 
) [friend]

Definition at line 815 of file m4math.cpp.

bool operator== ( const LLMatrix4 &  a,
const LLMatrix4 &  b 
) [friend]

Definition at line 774 of file m4math.cpp.

LLVector3 rotate_vector ( const LLVector3 &  a,
const LLMatrix4 &  b 
) [friend]

Definition at line 755 of file m4math.cpp.

LLVector4 rotate_vector ( const LLVector4 &  a,
const LLMatrix4 &  b 
) [friend]

Definition at line 731 of file m4math.cpp.


Member Data Documentation

F32 LLMatrix4::mMatrix[NUM_VALUES_IN_MAT4][NUM_VALUES_IN_MAT4]

Definition at line 102 of file m4math.h.

Referenced by LLViewerCamera::calcProjection(), LLGLState::checkTextureChannels(), LLViewerJoint::drawBone(), LLViewerJointMesh::drawShape(), getFwdRow4(), getLeftRow4(), getMat3(), LLQuaternion::getMatrix4(), LLCoordFrame::getMatrixToLocal(), getTranslation(), getUpRow4(), identity(), initAll(), initMatrix(), initRows(), invert(), LLMatrix4(), operator *=(), operator+=(), operator-=(), quaternion(), LLViewerJointCollisionVolume::render(), LLManipRotate::render(), LLDrawPoolAlpha::renderAlpha(), LLDrawPoolAlpha::renderAlphaHighlight(), LLSelectNode::renderOneSilhouette(), setFwdCol(), setFwdRow(), setLeftCol(), setLeftRow(), LLCubeMap::setMatrix(), setTranslation(), setUpCol(), setUpRow(), LLJoint::setWorldMatrix(), LLJoint::setWorldPosition(), LLJoint::setWorldRotation(), translate(), transpose(), LLViewerJointMesh::updateGeometryOriginal(), LLXformMatrix::updateMatrix(), and zero().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:30 2010 for Second Life Viewer by  doxygen 1.4.7