HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GT_Transform Class Reference

A simple interface to provide multiple-segments of transforms. More...

#include <GT_Transform.h>

+ Inheritance diagram for GT_Transform:

Public Member Functions

 GT_Transform ()
 Default c-tor. More...
 
 GT_Transform (const GT_Transform &src)
 Copy c-tor. More...
 
 GT_Transform (const UT_Matrix4F *xforms, int nsegments)
 Initialize with single precision transforms. More...
 
 GT_Transform (const UT_Matrix4D *xforms, int nsegments)
 Initialize with double precision transforms. More...
 
 ~GT_Transform ()
 
GT_Transformoperator= (const GT_Transform &m)
 Assignment operator. More...
 
bool operator== (const GT_Transform &other) const
 Equality operation. More...
 
bool operator!= (const GT_Transform &other) const
 
void computeInverse ()
 
int64 getMemoryUsage () const
 Return approximate memory usage. More...
 
int getSegments () const
 Return motion segments. More...
 
GT_TransformHandle invert () const
 Return the inverse transform. More...
 
bool isIdentity () const
 Test whether the transform is an identity matrix. More...
 
bool save (UT_JSONWriter &w) const
 Save to a JSON stream/value. More...
 
void dump (const char *msg="") const
 Save the transform to stdout. More...
 
void alloc (int nsegments)
 
void setMatrix (const UT_Matrix4F &xform, int segment)
 
void setMatrix (const UT_Matrix4D &xform, int segment)
 
GT_TransformpreMultiply (const UT_Matrix4D &xform) const
 
GT_Transformmultiply (const UT_Matrix4D &xform) const
 
GT_TransformpreMultiply (const UT_Matrix4F &xform) const
 
GT_Transformmultiply (const UT_Matrix4F &xform) const
 
GT_TransformHandle preMultiply (const GT_Transform &x) const
 
GT_TransformHandle multiply (const GT_Transform &x) const
 
GT_TransformpreMultiply (const UT_Matrix3D &xform) const
 
GT_Transformmultiply (const UT_Matrix3D &xform) const
 
GT_TransformpreMultiply (const UT_Matrix3F &xform) const
 
GT_Transformmultiply (const UT_Matrix3F &xform) const
 
void getMatrix (UT_Matrix4F &xform, int segment=0) const
 
void getMatrix (UT_Matrix4D &xform, int segment=0) const
 
void getInverse (UT_Matrix4F &xform, int segment=0) const
 
void getInverse (UT_Matrix4D &xform, int segment=0) const
 
GT_DataArrayHandle transform (const GT_DataArrayHandle &src, int segment=0) const
 
- Public Member Functions inherited from UT_IntrusiveRefCounter< GT_Transform >
SYS_FORCE_INLINE UT_IntrusiveRefCounter () noexcept
 Default constructor: Sets counter to 0. More...
 
SYS_FORCE_INLINE UT_IntrusiveRefCounter (const UT_IntrusiveRefCounter &) noexcept
 Copy constructor: Sets counter to 0. More...
 
UT_IntrusiveRefCounteroperator= (const UT_IntrusiveRefCounter &) noexcept
 Assignment operator: Does not modify counter. More...
 
SYS_FORCE_INLINE uint32 use_count () const noexcept
 Return current counter. More...
 
SYS_FORCE_INLINE bool conditionalAddRef () noexcept
 

Static Public Member Functions

static const GT_TransformHandleidentity ()
 Get the identity transform (as a handle) More...
 
static bool load (GT_TransformHandle &x, UT_JSONParser &p)
 Load from a JSON stream/value. More...
 

Additional Inherited Members

- Protected Member Functions inherited from UT_IntrusiveRefCounter< GT_Transform >
SYS_FORCE_INLINE ~UT_IntrusiveRefCounter ()
 Destructor: Only derived classes can destruct this. More...
 

Detailed Description

A simple interface to provide multiple-segments of transforms.

Definition at line 22 of file GT_Transform.h.

Constructor & Destructor Documentation

GT_Transform::GT_Transform ( )

Default c-tor.

GT_Transform::GT_Transform ( const GT_Transform src)

Copy c-tor.

GT_Transform::GT_Transform ( const UT_Matrix4F xforms,
int  nsegments 
)

Initialize with single precision transforms.

GT_Transform::GT_Transform ( const UT_Matrix4D xforms,
int  nsegments 
)

Initialize with double precision transforms.

GT_Transform::~GT_Transform ( )

Member Function Documentation

void GT_Transform::alloc ( int  nsegments)

Initialize the matrix

void GT_Transform::computeInverse ( )

Compute inverse transforms. This will be done lazily when getting inverse transforms.

void GT_Transform::dump ( const char *  msg = "") const

Save the transform to stdout.

void GT_Transform::getInverse ( UT_Matrix4F xform,
int  segment = 0 
) const

Extract a matrix

void GT_Transform::getInverse ( UT_Matrix4D xform,
int  segment = 0 
) const

Extract a matrix

void GT_Transform::getMatrix ( UT_Matrix4F xform,
int  segment = 0 
) const

Extract a matrix

void GT_Transform::getMatrix ( UT_Matrix4D xform,
int  segment = 0 
) const

Extract a matrix

int64 GT_Transform::getMemoryUsage ( ) const

Return approximate memory usage.

int GT_Transform::getSegments ( ) const
inline

Return motion segments.

Definition at line 81 of file GT_Transform.h.

static const GT_TransformHandle& GT_Transform::identity ( )
static

Get the identity transform (as a handle)

GT_TransformHandle GT_Transform::invert ( ) const

Return the inverse transform.

bool GT_Transform::isIdentity ( ) const
inline

Test whether the transform is an identity matrix.

Definition at line 104 of file GT_Transform.h.

static bool GT_Transform::load ( GT_TransformHandle x,
UT_JSONParser p 
)
static

Load from a JSON stream/value.

GT_Transform* GT_Transform::multiply ( const UT_Matrix4D xform) const

Multiply this transform by a single matrix. This applies the matrix to all the embedded transforms.

GT_Transform* GT_Transform::multiply ( const UT_Matrix4F xform) const

Multiply this transform by a single matrix. This applies the matrix to all the embedded transforms.

GT_TransformHandle GT_Transform::multiply ( const GT_Transform x) const

Multiply this transform by a single matrix. This applies the matrix to all the embedded transforms.

GT_Transform* GT_Transform::multiply ( const UT_Matrix3D xform) const

Multiply by the 3x3 transform (not including translates)

GT_Transform* GT_Transform::multiply ( const UT_Matrix3F xform) const

Multiply by the 3x3 transform (not including translates)

bool GT_Transform::operator!= ( const GT_Transform other) const
inline

Definition at line 41 of file GT_Transform.h.

GT_Transform& GT_Transform::operator= ( const GT_Transform m)

Assignment operator.

bool GT_Transform::operator== ( const GT_Transform other) const

Equality operation.

GT_Transform* GT_Transform::preMultiply ( const UT_Matrix4D xform) const

Multiply this transform by a single matrix. This applies the matrix to all the embedded transforms.

GT_Transform* GT_Transform::preMultiply ( const UT_Matrix4F xform) const

Multiply this transform by a single matrix. This applies the matrix to all the embedded transforms.

GT_TransformHandle GT_Transform::preMultiply ( const GT_Transform x) const

Multiply this transform by a single matrix. This applies the matrix to all the embedded transforms.

GT_Transform* GT_Transform::preMultiply ( const UT_Matrix3D xform) const

Multiply by the 3x3 transform (not including translates)

GT_Transform* GT_Transform::preMultiply ( const UT_Matrix3F xform) const

Multiply by the 3x3 transform (not including translates)

bool GT_Transform::save ( UT_JSONWriter w) const

Save to a JSON stream/value.

void GT_Transform::setMatrix ( const UT_Matrix4F xform,
int  segment 
)

Initialize the matrix

void GT_Transform::setMatrix ( const UT_Matrix4D xform,
int  segment 
)

Initialize the matrix

GT_DataArrayHandle GT_Transform::transform ( const GT_DataArrayHandle src,
int  segment = 0 
) const

Transform a data array (using the type info on the array)


The documentation for this class was generated from the following file: