3ds Max C++ API Reference
Loading...
Searching...
No Matches
DelayedMatrix3 Class Reference

#include <control.h>

+ Inheritance diagram for DelayedMatrix3:

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 Matrix3IndirectClone () const
 
const Matrix3operator() () const
 
void PreTranslate (const Point3 &p)
 
void PreRotateX (float x)
 
void PreRotateY (float y)
 
void PreRotateZ (float z)
 
void PreRotate (const Quat &q)
 
- Public Member Functions inherited from Matrix3Indirect
 Matrix3Indirect ()
 
 Matrix3Indirect (const Matrix3 &m)
 
virtual ~Matrix3Indirect ()
 
virtual const Matrix3operator() () const
 
virtual void Set (const Matrix3 &m)
 
virtual CoreExport Matrix3IndirectClone () const
 
virtual void PreTranslate (const Point3 &p)
 
virtual void PreRotateX (float x)
 
virtual void PreRotateY (float y)
 
virtual void PreRotateZ (float z)
 
virtual void PreRotate (const Quat &q)
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects.
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator.
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator.
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary.
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary.
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc.
 
- Protected Attributes inherited from Matrix3Indirect
Matrix3 mat
 

Member Typedef Documentation

◆ BaseClass

Constructor & Destructor Documentation

◆ DelayedMatrix3() [1/2]

DelayedMatrix3 ( )
inline
329 , mMatInitialized(false)
330 , mOpQueue()
331 {}
Matrix3Indirect()
Definition: control.h:223

◆ DelayedMatrix3() [2/2]

DelayedMatrix3 ( const DelayedMatrix3 src)
inline
333 : Matrix3Indirect(src.mat)
334 , mMatInitialized(src.mMatInitialized) {
335 mOpQueue = src.mOpQueue; }
Matrix3 mat
Definition: control.h:284

Member Function Documentation

◆ EvalMat() [1/2]

void EvalMat ( )
inline
337 {
338 if (!mMatInitialized) {
340 mMatInitialized = true;
341 }
342 while (mOpQueue.QCount() > 0) {
343 DelayedOp& op = mOpQueue.Shift();
344 switch (op.code) {
346 mat.PreTranslate(op.arg.Vector());
347 break;
349 mat.PreRotateX(op.arg.x);
350 break;
352 mat.PreRotateY(op.arg.y);
353 break;
355 mat.PreRotateZ(op.arg.z);
356 break;
358 PreRotateMatrix(mat, op.arg);
359 break;
360 }
361 }
362 return; }
virtual void InitializeMat()
Definition: control.h:365
void PreRotateX(float angle)
void PreRotateZ(float angle)
void PreTranslate(const Point3 &p)
void PreRotateY(float angle)
void PreRotateMatrix(Matrix3 &mat, const Quat &q)
@ kPreRotateX
Definition: control.h:293
@ kPreRotateY
Definition: control.h:294
@ kPreRotate
Definition: control.h:296
@ kPreTrans
Definition: control.h:292
@ kPreRotateZ
Definition: control.h:295
int QCount() const
Definition: control.h:322
DelayedOp & Shift()
Definition: control.h:323

◆ EvalMat() [2/2]

void EvalMat ( ) const
inline
363{ const_cast<DelayedMatrix3*>(this)->EvalMat(); }
Definition: control.h:287
void EvalMat()
Definition: control.h:337

◆ PendingOps()

size_t PendingOps ( ) const
inline
364{ return mOpQueue.QCount(); }

◆ InitializeMat()

virtual void InitializeMat ( )
inlinevirtual

Reimplemented in DelayedNodeMat.

365 {
367 mMatInitialized = true; };
void IdentityMatrix()

◆ Set()

void Set ( const Matrix3 m)
inlinevirtual
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.

370 {
371 mat = m;
372 mMatInitialized = true;
373 mOpQueue.Clear(); }
void Clear()
Definition: control.h:321

◆ Clone()

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.

◆ operator()()

const Matrix3 & operator() ( ) const
inlinevirtual
Remarks
Assignment operator.
Default Implementation:
{ return mat; }

Reimplemented from Matrix3Indirect.

375{ EvalMat(); return mat; }

◆ PreTranslate()

void PreTranslate ( const Point3 p)
inlinevirtual
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.

376{ DelayedOp op(p); mOpQueue.Push(op); }
void Push(DelayedOp &op)
Definition: control.h:324

◆ PreRotateX()

void PreRotateX ( float  x)
inlinevirtual
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.

377{ DelayedOp op(x); mOpQueue.Push(op); }
controller mat max min numsubs x z controller keys x z controller keys x
Definition: generics.inl:212

◆ PreRotateY()

void PreRotateY ( float  y)
inlinevirtual
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.

378{ DelayedOp op(0, y); mOpQueue.Push(op); }

◆ PreRotateZ()

void PreRotateZ ( float  z)
inlinevirtual
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.

379{ DelayedOp op(0, 0, z); mOpQueue.Push(op); }
controller mat max min numsubs x z controller keys x z controller keys x z
Definition: generics.inl:214

◆ PreRotate()

void PreRotate ( const Quat q)
inlinevirtual
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.

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