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

Basic type: Compound linear transformation. More...

Public Member Functions

 GfTransform ()
 The default constructor sets the component values to the identity transformation. More...
 
 GfTransform (const GfVec3d &scale, const GfRotation &pivotOrientation, const GfRotation &rotation, const GfVec3d &pivotPosition, const GfVec3d &translation)
 This constructor initializes the transformation from all component values. More...
 
 GfTransform (const GfVec3d &translation, const GfRotation &rotation, const GfVec3d &scale, const GfVec3d &pivotPosition, const GfRotation &pivotOrientation)
 This constructor initializes the transformation from all component values. More...
 
 GfTransform (const GfMatrix4d &m)
 This constructor initializes the transformation with a matrix. More...
 
GF_API GfTransformSet (const GfVec3d &scale, const GfRotation &pivotOrientation, const GfRotation &rotation, const GfVec3d &pivotPosition, const GfVec3d &translation)
 Sets the transformation from all component values. More...
 
GfTransformSet (const GfVec3d &translation, const GfRotation &rotation, const GfVec3d &scale, const GfVec3d &pivotPosition, const GfRotation &pivotOrientation)
 Sets the transformation from all component values. More...
 
GF_API GfTransformSetMatrix (const GfMatrix4d &m)
 Sets the transform components to implement the transformation represented by matrix m , ignoring any projection. More...
 
GF_API GfTransformSetIdentity ()
 Sets the transformation to the identity transformation. More...
 
void SetScale (const GfVec3d &scale)
 Sets the scale component, leaving all others untouched. More...
 
void SetPivotOrientation (const GfRotation &pivotOrient)
 Sets the pivot orientation component, leaving all others untouched. More...
 
void SetScaleOrientation (const GfRotation &pivotOrient)
 Sets the pivot orientation component, leaving all others untouched. More...
 
void SetRotation (const GfRotation &rotation)
 Sets the rotation component, leaving all others untouched. More...
 
void SetPivotPosition (const GfVec3d &pivPos)
 Sets the pivot position component, leaving all others untouched. More...
 
void SetCenter (const GfVec3d &pivPos)
 Sets the pivot position component, leaving all others untouched. More...
 
void SetTranslation (const GfVec3d &translation)
 Sets the translation component, leaving all others untouched. More...
 
const GfVec3dGetScale () const
 Returns the scale component. More...
 
const GfRotationGetPivotOrientation () const
 Returns the pivot orientation component. More...
 
const GfRotationGetScaleOrientation () const
 Returns the scale orientation component. More...
 
const GfRotationGetRotation () const
 Returns the rotation component. More...
 
const GfVec3dGetPivotPosition () const
 Returns the pivot position component. More...
 
const GfVec3dGetCenter () const
 Returns the pivot position component. More...
 
const GfVec3dGetTranslation () const
 Returns the translation component. More...
 
GF_API GfMatrix4d GetMatrix () const
 Returns a GfMatrix4d that implements the cumulative transformation. More...
 
GF_API bool operator== (const GfTransform &xf) const
 Component-wise transform equality test. More...
 
bool operator!= (const GfTransform &xf) const
 Component-wise transform inequality test. More...
 
GF_API GfTransformoperator*= (const GfTransform &xf)
 Post-multiplies transform xf into this transform. More...
 

Friends

GfTransform operator* (const GfTransform &xf1, const GfTransform &xf2)
 Returns the product of transforms xf1 and xf2. More...
 

Detailed Description

Basic type: Compound linear transformation.

This class represents a linear transformation specified as a series of individual components: a translation, a rotation, a scale, a pivotPosition, and a pivotOrientation. When applied to a point, the point will be transformed as follows (in order):

  • Scaled by the scale with respect to pivotPosition and the orientation specified by the pivotOrientation.
  • Rotated by the rotation about pivotPosition.
  • Translated by Translation

That is, the cumulative matrix that this represents looks like this.

* M = -P * -O * S * O * R * P * T
*

where

  • T is the translation matrix
  • P is the matrix that translates by pivotPosition
  • R is the rotation matrix
  • O is the matrix that rotates to pivotOrientation
  • S is the scale matrix

Definition at line 69 of file transform.h.

Constructor & Destructor Documentation

GfTransform ( )
inline

The default constructor sets the component values to the identity transformation.

Definition at line 75 of file transform.h.

GfTransform ( const GfVec3d scale,
const GfRotation pivotOrientation,
const GfRotation rotation,
const GfVec3d pivotPosition,
const GfVec3d translation 
)
inline

This constructor initializes the transformation from all component values.

This is the constructor used by 2x code.

Definition at line 81 of file transform.h.

GfTransform ( const GfVec3d translation,
const GfRotation rotation,
const GfVec3d scale,
const GfVec3d pivotPosition,
const GfRotation pivotOrientation 
)
inline

This constructor initializes the transformation from all component values.

This is the constructor used by 3x code.

Definition at line 91 of file transform.h.

GfTransform ( const GfMatrix4d m)
inline

This constructor initializes the transformation with a matrix.

See SetMatrix() for more information.

Definition at line 101 of file transform.h.

Member Function Documentation

const GfVec3d& GetCenter ( ) const
inline

Returns the pivot position component.

Definition at line 197 of file transform.h.

GF_API GfMatrix4d GetMatrix ( ) const

Returns a GfMatrix4d that implements the cumulative transformation.

const GfRotation& GetPivotOrientation ( ) const
inline

Returns the pivot orientation component.

Definition at line 177 of file transform.h.

const GfVec3d& GetPivotPosition ( ) const
inline

Returns the pivot position component.

Definition at line 192 of file transform.h.

const GfRotation& GetRotation ( ) const
inline

Returns the rotation component.

Definition at line 187 of file transform.h.

const GfVec3d& GetScale ( ) const
inline

Returns the scale component.

Definition at line 172 of file transform.h.

const GfRotation& GetScaleOrientation ( ) const
inline

Returns the scale orientation component.

Definition at line 182 of file transform.h.

const GfVec3d& GetTranslation ( ) const
inline

Returns the translation component.

Definition at line 202 of file transform.h.

bool operator!= ( const GfTransform xf) const
inline

Component-wise transform inequality test.

All components must match exactly for transforms to be considered equal.

Definition at line 217 of file transform.h.

GF_API GfTransform& operator*= ( const GfTransform xf)

Post-multiplies transform xf into this transform.

GF_API bool operator== ( const GfTransform xf) const

Component-wise transform equality test.

All components must match exactly for transforms to be considered equal.

GF_API GfTransform& Set ( const GfVec3d scale,
const GfRotation pivotOrientation,
const GfRotation rotation,
const GfVec3d pivotPosition,
const GfVec3d translation 
)

Sets the transformation from all component values.

This constructor orders its arguments the way that 2x expects.

GfTransform& Set ( const GfVec3d translation,
const GfRotation rotation,
const GfVec3d scale,
const GfVec3d pivotPosition,
const GfRotation pivotOrientation 
)
inline

Sets the transformation from all component values.

This constructor orders its arguments the way that 3x expects.

Definition at line 117 of file transform.h.

void SetCenter ( const GfVec3d pivPos)
inline

Sets the pivot position component, leaving all others untouched.

Definition at line 162 of file transform.h.

GF_API GfTransform& SetIdentity ( )

Sets the transformation to the identity transformation.

GF_API GfTransform& SetMatrix ( const GfMatrix4d m)

Sets the transform components to implement the transformation represented by matrix m , ignoring any projection.

This tries to leave the current center unchanged.

void SetPivotOrientation ( const GfRotation pivotOrient)
inline

Sets the pivot orientation component, leaving all others untouched.

Definition at line 142 of file transform.h.

void SetPivotPosition ( const GfVec3d pivPos)
inline

Sets the pivot position component, leaving all others untouched.

Definition at line 157 of file transform.h.

void SetRotation ( const GfRotation rotation)
inline

Sets the rotation component, leaving all others untouched.

Definition at line 152 of file transform.h.

void SetScale ( const GfVec3d scale)
inline

Sets the scale component, leaving all others untouched.

Definition at line 137 of file transform.h.

void SetScaleOrientation ( const GfRotation pivotOrient)
inline

Sets the pivot orientation component, leaving all others untouched.

Definition at line 147 of file transform.h.

void SetTranslation ( const GfVec3d translation)
inline

Sets the translation component, leaving all others untouched.

Definition at line 167 of file transform.h.

Friends And Related Function Documentation

GfTransform operator* ( const GfTransform xf1,
const GfTransform xf2 
)
friend

Returns the product of transforms xf1 and xf2.

Definition at line 226 of file transform.h.


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