SetXFormPacket Class Reference

#include <control.h>

Class Description

See also
Class Control, Class Matrix3, Class Quat, Class AngAxis, Class Point3.

Description:
This class is used to allow a transform (Matrix3) controller to know that it is being specifically moved, rotated, or scaled.

When SetValue() is called on a controller, the val pointer is passed in for a certain data type. For a transform (Matrix3) controller SetValue() passes in a pointer to an instance of this. This provides higher level information to the transform controller than what is provided by passing a matrix. For example, if rotation is taking place, the XFORM_ROTATE command would be used. In this way the PRS transform controller would not make position or scale keys since it knows only rotation is taking place. Typically one of the different constructors is used depending on the command needed. All methods of this class are implemented by the system.
Data Members:
SetXFormCommand command;

The command. The transform controller takes the val pointer and casts it to an instance of this class and looks at this data member to see which operation is being performed.

One of the following values:

XFORM_MOVE

The move command. An incremental move is being applied to the matrix.

XFORM_ROTATE

The rotate command. An incremental rotation is being applied to the matrix.

XFORM_SCALE

The scale command. An incremental scaling is being applied to the matrix.

XFORM_SET

To just set the matrix without telling the controller any other higher level information this command may be used. This just sets the value of the matrix (it is not incremental). Any time a node modifies a Matrix3 controller, it will set the method to get CTRL_RELATIVE, and the packet command is set to XFORM_SET.

Matrix3 tmParent;

The parent matrix.

Matrix3 tmAxis;

This usually represents the coordinate system one is moving, rotating, or scaling in. However, if the command is XFORM_SET, then tmAxis is the actual matrix being set.

Point3 p;

If the command is XFORM_MOVE or XFORM_SCALE, then this contains the amount of the move or scale.

Quat q;

If the command is XFORM_ROTATE then this contains the amount of the rotation.

AngAxis aa;

If the command is XFORM_ROTATE this will also contain the amount of the rotation. This form can represent multiple revolutions however (as opposed to Quat q).

BOOL localOrigin;

Indicates the local axis is being used. If TRUE it is; otherwise it is not. If the rotation or scaling is occurring about the pivot point this is TRUE.
+ Inheritance diagram for SetXFormPacket:

Public Member Functions

 SetXFormPacket (const Matrix3 &mat, const Matrix3 &par=Matrix3(1))
 
 SetXFormPacket (Point3 pt, const Matrix3 &par=Matrix3(1), const Matrix3 &a=Matrix3(1))
 
 SetXFormPacket (Quat qt, BOOL l, const Matrix3 &par=Matrix3(1), const Matrix3 &a=Matrix3(1))
 
 SetXFormPacket (AngAxis aA, BOOL l, const Matrix3 &par=Matrix3(1), const Matrix3 &a=Matrix3(1))
 
 SetXFormPacket (Point3 pt, BOOL l, const Matrix3 &par=Matrix3(1), const Matrix3 &a=Matrix3(1))
 
 SetXFormPacket ()
 

Public Attributes

SetXFormCommand command
 
Matrix3 tmParent
 
Matrix3 tmAxis
 
Point3 p
 
Quat q
 
AngAxis aa
 
BOOL localOrigin
 

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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 

Constructor & Destructor Documentation

SetXFormPacket ( const Matrix3 mat,
const Matrix3 par = Matrix3(1) 
)
inline
Remarks
Constructor. The XFORM_SET command.
Parameters:
const Matrix3& mat

The tmAxis value.

const Matrix3& par=Matrix3(1)

The tmParent value.
2663  {command=XFORM_SET,tmParent=par,tmAxis=mat;}
Matrix3 tmAxis
Definition: control.h:2649
Matrix3 tmParent
Definition: control.h:2648
SetXFormCommand command
Definition: control.h:2647
Definition: control.h:2591
SetXFormPacket ( Point3  pt,
const Matrix3 par = Matrix3(1),
const Matrix3 a = Matrix3(1) 
)
inline
Remarks
Constructor. The XFORM_MOVE command.
Parameters:
Point3 pt

The p value.

const Matrix3& par=Matrix3(1)

The tmParent value.

const Matrix3& a=Matrix3(1)

The tmAxis value.
2676  {command=XFORM_MOVE;tmParent=par;tmAxis=a;p=pt;localOrigin=FALSE;}
Matrix3 tmAxis
Definition: control.h:2649
BOOL localOrigin
Definition: control.h:2653
Matrix3 tmParent
Definition: control.h:2648
SetXFormCommand command
Definition: control.h:2647
Point3 p
Definition: control.h:2650
Definition: control.h:2591
SetXFormPacket ( Quat  qt,
BOOL  l,
const Matrix3 par = Matrix3(1),
const Matrix3 a = Matrix3(1) 
)
inline
Remarks
Constructor. The XFORM_ROTATE command.
Parameters:
Quat qt

The q value.

BOOL l

The localOrigin value.

const Matrix3& par=Matrix3(1)

The tmParent value.

const Matrix3& a=Matrix3(1)

The tmAxis value.
Matrix3 tmAxis
Definition: control.h:2649
BOOL localOrigin
Definition: control.h:2653
Quat q
Definition: control.h:2651
Matrix3 tmParent
Definition: control.h:2648
SetXFormCommand command
Definition: control.h:2647
Definition: quat.h:40
AngAxis aa
Definition: control.h:2652
Definition: control.h:2591
SetXFormPacket ( AngAxis  aA,
BOOL  l,
const Matrix3 par = Matrix3(1),
const Matrix3 a = Matrix3(1) 
)
inline
Remarks
Constructor. The XFORM_ROTATE command.
Parameters:
AngAxis aA

The aa value.

BOOL l

The localOrigin value.

const Matrix3& par=Matrix3(1)

The tmParent value.

const Matrix3& a=Matrix3(1)

The tmAxis value.
Matrix3 tmAxis
Definition: control.h:2649
Definition: quat.h:146
BOOL localOrigin
Definition: control.h:2653
Quat q
Definition: control.h:2651
Matrix3 tmParent
Definition: control.h:2648
SetXFormCommand command
Definition: control.h:2647
AngAxis aa
Definition: control.h:2652
Definition: control.h:2591
SetXFormPacket ( Point3  pt,
BOOL  l,
const Matrix3 par = Matrix3(1),
const Matrix3 a = Matrix3(1) 
)
inline
Remarks
Constructor. The XFORM_SCALE command.
Parameters:
Point3 pt

The p value.

BOOL l

The localOrigin value.

const Matrix3& par=Matrix3(1)

The tmParent value.

const Matrix3& a=Matrix3(1)

The tmAxis value.
Matrix3 tmAxis
Definition: control.h:2649
BOOL localOrigin
Definition: control.h:2653
Matrix3 tmParent
Definition: control.h:2648
SetXFormCommand command
Definition: control.h:2647
Point3 p
Definition: control.h:2650
Definition: control.h:2591
SetXFormPacket ( )
inline
Remarks
Constructor. This constructor is provided in case you want to set the data members yourself.
2724 {};

Member Data Documentation

SetXFormCommand command
Matrix3 tmParent
Matrix3 tmAxis
Point3 p
Quat q
AngAxis aa
BOOL localOrigin