Gizmo3D

gzFrameTransform Class Reference

Key frame based transform. More...

#include <gzTransform.h>

Inheritance diagram for gzFrameTransform:

gzTransform gzGroup gzNode gzBoundary gzNodeActionProvider gzNameInterface gzDebugInterface gzIntersectMask gzUpdateIDInterface gzCullMask gzObject gzUserData gzReference gzSerializeData gzSharedMemory gzTypeInterface List of all members.

Public Member Functions

 gzFrameTransform (const gzString &name=GZ_EMPTY_STRING)
 Default constructor.
virtual ~gzFrameTransform ()
 Destructor.
 GZ_DECLARE_TYPE_INTERFACE_EXPORT (1)
 gzFrameTransform (const gzFrameTransform &copy)
 Copy constructor.
gzFrameTransformoperator= (const gzFrameTransform &copy)
 Assignment operator.
virtual gzVoid updateNode ()
 Updates the boundary for the frame transform.
virtual gzReferenceclone () const
 Clone interface.
virtual gzVoid preTraverseAction (gzTraverseAction *actionclass, gzContext *context)
 Called by the traversal process.
gzULong getStartFrame ()
 Returns the start frame of the key animation.
gzULong getLastFrame ()
 Returns the last frame of the key animation.
gzBool hasFrames ()
 Returns true if there are active key frames.
gzMatrix4 getFrameTransform (gzULong frame)
 Returns the transform for the frame transform.
gzVoid setFrameTranslation (gzULong frame, gzReal x, gzReal y, gzReal z)
 Sets translation for a specific frame to x, y, z.
gzVoid setFrameScale (gzULong frame, gzReal sx, gzReal sy, gzReal sz)
 Scales a specific frame to sx, sy, sz.
gzVoid setFrameRotation (gzULong frame, const gzVec3 &vector, gzReal angle)
 Rotates a specific frame angle degrees around the vector.
gzVoid setFrameHPR (gzULong frame, gzReal heading, gzReal pitch, gzReal roll, const gzVec3 &base=GZ_ONE_VEC3)
 Sets the heading, pitch roll for the frame.
gzVoid setFrameRotateTransform (gzULong frame, const gzMatrix4 &transform)
 Reset the transform for a specific fram to a user defined transform.
gzBool getFrameTranslation (gzULong frame, gzReal &x, gzReal &y, gzReal &z)
 Returns TRUE if frame value is found.
gzBool getFrameScale (gzULong frame, gzReal &x, gzReal &y, gzReal &z)
 Returns TRUE if frame value is found.
gzBool getFrameRotation (gzULong frame, gzVec3 &vector, gzReal &angle)
 Returns TRUE if frame value is found.
gzULong getStartTranslationFrame ()
 Returns the index of the start translation frame.
gzULong getLastTranslationFrame ()
 Returns the index of the last translation frame.
gzBool hasTranslationFrames ()
 Returns TRUE if translation frames exist, otherwise FALSE:.
gzULong getStartScaleFrame ()
 Returns the index of the start scaling frame.
gzULong getLastScaleFrame ()
 Returns the index of the last scaling frame.
gzBool hasScaleFrames ()
 Returns TRUE if scaling frames exist, otherwise FALSE.
gzULong getStartRotationFrame ()
 Returns the index of the start rotation frame.
gzULong getLastRotationFrame ()
 Returns the index of the last rotation frame.
gzBool hasRotationFrames ()
 Returns TRUE if rotation frames exist, otherwise FALSE.
gzVoid calculateRotations ()
 Must be called to update boundary if setFrameRotation is used.
gzVoid setAccumulativeRotations (gzBool on=TRUE)
 Enable/disable accumulated rotations.
gzVoid enableFrameUpdates (gzBool on=TRUE)
 Enable/Disable frame control.

Detailed Description

Key frame based transform.

The gzFrameTransform class interpolates a gzTransform from a set om key frame parameters such as scale, rotation and translation.

Definition at line 555 of file gzTransform.h.


Constructor & Destructor Documentation

gzFrameTransform::gzFrameTransform const gzString name = GZ_EMPTY_STRING  ) 
 

Default constructor.

The frame transform is used to setup key framed transforms. The frame transforms interpolates between two frames and calculates the correct transform based on quaternions.

If is possible to set a name for the frame transform.

virtual gzFrameTransform::~gzFrameTransform  )  [inline, virtual]
 

Destructor.

Definition at line 568 of file gzTransform.h.

gzFrameTransform::gzFrameTransform const gzFrameTransform copy  ) 
 

Copy constructor.


Member Function Documentation

gzVoid gzFrameTransform::calculateRotations  ) 
 

Must be called to update boundary if setFrameRotation is used.

virtual gzReference* gzFrameTransform::clone  )  const [virtual]
 

Clone interface.

Reimplemented from gzTransform.

gzVoid gzFrameTransform::enableFrameUpdates gzBool  on = TRUE  ) 
 

Enable/Disable frame control.

gzBool gzFrameTransform::getFrameRotation gzULong  frame,
gzVec3 vector,
gzReal angle
 

Returns TRUE if frame value is found.

gzBool gzFrameTransform::getFrameScale gzULong  frame,
gzReal x,
gzReal y,
gzReal z
 

Returns TRUE if frame value is found.

gzMatrix4 gzFrameTransform::getFrameTransform gzULong  frame  ) 
 

Returns the transform for the frame transform.

If the frame transform is missing it returns the transform of the previous defined transform.

gzBool gzFrameTransform::getFrameTranslation gzULong  frame,
gzReal x,
gzReal y,
gzReal z
 

Returns TRUE if frame value is found.

gzULong gzFrameTransform::getLastFrame  ) 
 

Returns the last frame of the key animation.

gzULong gzFrameTransform::getLastRotationFrame  ) 
 

Returns the index of the last rotation frame.

gzULong gzFrameTransform::getLastScaleFrame  ) 
 

Returns the index of the last scaling frame.

gzULong gzFrameTransform::getLastTranslationFrame  ) 
 

Returns the index of the last translation frame.

gzULong gzFrameTransform::getStartFrame  ) 
 

Returns the start frame of the key animation.

gzULong gzFrameTransform::getStartRotationFrame  ) 
 

Returns the index of the start rotation frame.

gzULong gzFrameTransform::getStartScaleFrame  ) 
 

Returns the index of the start scaling frame.

gzULong gzFrameTransform::getStartTranslationFrame  ) 
 

Returns the index of the start translation frame.

gzFrameTransform::GZ_DECLARE_TYPE_INTERFACE_EXPORT  ) 
 

Reimplemented from gzTransform.

gzBool gzFrameTransform::hasFrames  ) 
 

Returns true if there are active key frames.

gzBool gzFrameTransform::hasRotationFrames  ) 
 

Returns TRUE if rotation frames exist, otherwise FALSE.

gzBool gzFrameTransform::hasScaleFrames  ) 
 

Returns TRUE if scaling frames exist, otherwise FALSE.

gzBool gzFrameTransform::hasTranslationFrames  ) 
 

Returns TRUE if translation frames exist, otherwise FALSE:.

gzFrameTransform& gzFrameTransform::operator= const gzFrameTransform copy  ) 
 

Assignment operator.

virtual gzVoid gzFrameTransform::preTraverseAction gzTraverseAction actionclass,
gzContext context
[virtual]
 

Called by the traversal process.

Reimplemented from gzTransform.

gzVoid gzFrameTransform::setAccumulativeRotations gzBool  on = TRUE  ) 
 

Enable/disable accumulated rotations.

Default behavior is to accumulate the rotations.

gzVoid gzFrameTransform::setFrameHPR gzULong  frame,
gzReal  heading,
gzReal  pitch,
gzReal  roll,
const gzVec3 base = GZ_ONE_VEC3
 

Sets the heading, pitch roll for the frame.

Sets the transform with a rotation around the Y axis in heading degress clockwise, elevates the z axis in pitch degrees and tilts the head roll degrees.

XXX The base vector is used for ?

gzVoid gzFrameTransform::setFrameRotateTransform gzULong  frame,
const gzMatrix4 transform
 

Reset the transform for a specific fram to a user defined transform.

Replaces all previous setFrameXXX commands.

gzVoid gzFrameTransform::setFrameRotation gzULong  frame,
const gzVec3 vector,
gzReal  angle
 

Rotates a specific frame angle degrees around the vector.

gzVoid gzFrameTransform::setFrameScale gzULong  frame,
gzReal  sx,
gzReal  sy,
gzReal  sz
 

Scales a specific frame to sx, sy, sz.

gzVoid gzFrameTransform::setFrameTranslation gzULong  frame,
gzReal  x,
gzReal  y,
gzReal  z
 

Sets translation for a specific frame to x, y, z.

virtual gzVoid gzFrameTransform::updateNode  )  [virtual]
 

Updates the boundary for the frame transform.

The boundary surrounds the frame transform and all its children. It is usually called by the system when the scene graph needs an update.

Reimplemented from gzTransform.


The documentation for this class was generated from the following file:
Documentation for Gizmo3D generated at Wed Feb 20 11:54:17 2008 by   Saab Training Systems AB, ¸ (c) 2003-and beyond