Classes | Public Types | Public Member Functions

DelayedMatrix3 Class Reference

Search for all occurrences

#include <control.h>

Inheritance diagram for DelayedMatrix3:
Inheritance graph
[legend]

List of all members.

Classes

struct   DelayedOp
struct   OpQueue

Public Types

typedef Matrix3Indirect  BaseClass

Public Member Functions

  DelayedMatrix3 ()
  DelayedMatrix3 (const DelayedMatrix3 &src)
void  EvalMat ()
void  EvalMat () const
size_t  PendingOps () const
virtual void  InitializeMat ()
void  Set (const Matrix3 &m)
CoreExport Matrix3Indirect Clone () const
const Matrix3 operator() () const
void  PreTranslate (const Point3 &p)
void  PreRotateX (float x)
void  PreRotateY (float y)
void  PreRotateZ (float z)
void  PreRotate (const Quat &q)

Member Typedef Documentation


Constructor & Destructor Documentation

DelayedMatrix3 ( ) [inline]
      : Matrix3Indirect()
      , mMatInitialized(false)
      , mOpQueue()
      {}
DelayedMatrix3 ( const DelayedMatrix3 src ) [inline]
      : Matrix3Indirect(src.mat)
      , mMatInitialized(src.mMatInitialized) {
      mOpQueue = src.mOpQueue; }

Member Function Documentation

void EvalMat ( ) [inline]
                  {
      if (!mMatInitialized) {
         InitializeMat();
         mMatInitialized = true;
      }
      while (mOpQueue.QCount() > 0) {
         DelayedOp& op = mOpQueue.Shift();
         switch (op.code) {
         case DelayedOp::kPreTrans:
            mat.PreTranslate(op.arg.Vector());
            break;
         case DelayedOp::kPreRotateX:
            mat.PreRotateX(op.arg.x);
            break;
         case DelayedOp::kPreRotateY:
            mat.PreRotateY(op.arg.y);
            break;
         case DelayedOp::kPreRotateZ:
            mat.PreRotateZ(op.arg.z);
            break;
         case DelayedOp::kPreRotate:
            PreRotateMatrix(mat, op.arg);
            break;
         }
      }
      return; }
void EvalMat ( ) const [inline]
size_t PendingOps ( ) const [inline]
{ return mOpQueue.QCount(); }
virtual void InitializeMat ( ) [inline, virtual]

Reimplemented in DelayedNodeMat.

                                {
      mat.IdentityMatrix();
      mMatInitialized = true; };
void Set ( const Matrix3 m ) [inline, virtual]
Remarks:
Set the matrix to the specified matrix.
Parameters:
const Matrix3& m

The matrix to set.
Default Implementation:
{ mat = m; }

Reimplemented from Matrix3Indirect.

Reimplemented in DelayedNodeMat.

                              {
      mat = m;
      mMatInitialized = true;
      mOpQueue.Clear(); }
CoreExport Matrix3Indirect* Clone ( ) const [virtual]
Remarks:
Clone the matrix.
Returns:
A pointer to a new clone of the matrix.
Default Implementation:
{return new Matrix3Indirect(mat);}

Reimplemented from Matrix3Indirect.

Reimplemented in DelayedNodeMat.

const Matrix3& operator() ( ) const [inline, virtual]
Remarks:
Assignment operator.
Default Implementation:
{ return mat; }

Reimplemented from Matrix3Indirect.

{ EvalMat(); return mat; }
void PreTranslate ( const Point3 p ) [inline, virtual]
Remarks:
Pre-translate the matrix by the specified coordinate.
Parameters:
const Point3& p

The coordinate to pre-translate by.
Default Implementation:
{ mat.PreTranslate(p);}

Reimplemented from Matrix3Indirect.

{ DelayedOp op(p); mOpQueue.Push(op); }
void PreRotateX ( float  x ) [inline, virtual]
Remarks:
Pre-rotate the X axis by the specified amount.
Parameters:
float x

The amount of rotation.
Default Implementation:
{ mat.PreRotateX(x); }

Reimplemented from Matrix3Indirect.

{ DelayedOp op(x); mOpQueue.Push(op); }
void PreRotateY ( float  y ) [inline, virtual]
Remarks:
Pre-rotate the Y axis by the specified amount.
Parameters:
float y

The amount of rotation.
Default Implementation:
{ mat.PreRotateY(y); }

Reimplemented from Matrix3Indirect.

{ DelayedOp op(0, y); mOpQueue.Push(op); }
void PreRotateZ ( float  z ) [inline, virtual]
Remarks:
Pre-rotate the Z axis by the specified amount.
Parameters:
float z

The amount of rotation.
Default Implementation:
{ mat.PreRotateZ(z); }

Reimplemented from Matrix3Indirect.

{ DelayedOp op(0, 0, z); mOpQueue.Push(op); }
void PreRotate ( const Quat q ) [inline, virtual]
Remarks:
Pre-rotate the matrix by the specified quaternion.
Parameters:
const Quat& q

The quaternion to pre-rotate by.
Default Implementation:
{PreRotateMatrix(mat,q);}

Reimplemented from Matrix3Indirect.

{ DelayedOp op(q); mOpQueue.Push(op); }

DelayedMatrix3 DelayedMatrix3 DelayedMatrix3 DelayedMatrix3 DelayedMatrix3 DelayedMatrix3 DelayedMatrix3 DelayedMatrix3 DelayedMatrix3 DelayedMatrix3
DelayedMatrix3 DelayedMatrix3 DelayedMatrix3 DelayedMatrix3 DelayedMatrix3 DelayedMatrix3 DelayedMatrix3 DelayedMatrix3 DelayedMatrix3 DelayedMatrix3