FCDTransform Class Reference
[COLLADA Document Object Model.]

A COLLADA transform. More...

#include <FCDTransform.h>

Inheritance diagram for FCDTransform:

FCDObject FUObject FCDTLookAt FCDTMatrix FCDTRotation FCDTScale FCDTSkew FCDTTranslation List of all members.

Public Types

enum  Type {
  TRANSLATION, ROTATION, SCALE, MATRIX,
  LOOKAT, SKEW
}
 The COLLADA transform types. More...

Public Member Functions

 FCDTransform (FCDocument *document, FCDSceneNode *parent)
 Constructor: do not use directly.
virtual ~FCDTransform ()
 Destructor: do not use directly.
FCDSceneNodeGetParent ()
 Retrieves the visual scene node that contains this transformation.
const FCDSceneNodeGetParent () const
 See above.
virtual FCDTransformClone (FCDSceneNode *newParent)=0
 Creates a copy of a transformation.
virtual Type GetType () const =0
 Retrieves the class type of the transformation.
virtual FMMatrix44 ToMatrix () const =0
 Converts the transformation into a matrix.
virtual bool IsAnimated () const =0
 Retrieves whether this transformation has an animation tied to its values.
virtual FCDAnimatedGetAnimated ()=0
 Retrieves the animated element for the transformation.
virtual bool IsInverse (const FCDTransform *transform) const
 Retrieves whether a given transformation is the exact opposite of this transformation.
virtual FUStatus LoadFromXML (xmlNode *transformNode)=0
 [INTERNAL] Reads in the transformation from a given COLLADA XML tree node.
virtual xmlNode * WriteToXML (xmlNode *parentNode) const =0
 [INTERNAL] Writes out the transformation to the given COLLADA XML tree node.

Detailed Description

A COLLADA transform.

COLLADA supports six transformation types: translations(FCDTTranslation), rotations(FCDTRotation), scales(FCDTScale), matrices(FCDTMatrix), skews(FCDTSkew) and the 'look-at' transform(FCDTLookAt).


Member Enumeration Documentation

enum FCDTransform::Type
 

The COLLADA transform types.

Enumerator:
TRANSLATION  A translation(FCDTTranslation).
ROTATION  A rotation(FCDTRotation).
SCALE  A non-uniform scale(FCDTScale).
MATRIX  A matrix multiplication(FCDTMatrix).
LOOKAT  A targeted, 'look-at' transformation(FCDTLookAt).
SKEW  A skew(FCDTSkew).


Constructor & Destructor Documentation

FCDTransform::FCDTransform FCDocument document,
FCDSceneNode parent
 

Constructor: do not use directly.

Instead, use the FCDSceneNode::AddTransform function.

Parameters:
document The COLLADA document that owns the transform.
parent The visual scene node that contains the transform. Set this pointer to NULL if this transform is not owned by a visual scene node.

virtual FCDTransform::~FCDTransform  )  [virtual]
 

Destructor: do not use directly.

Instead, use the FCDSceneNode::ReleaseTransform function.


Member Function Documentation

virtual FCDTransform* FCDTransform::Clone FCDSceneNode newParent  )  [pure virtual]
 

Creates a copy of a transformation.

Parameters:
newParent The visual scene node that will contain the clone.
Returns:
The cloned transformation.

Implemented in FCDTTranslation, FCDTScale, FCDTRotation, FCDTMatrix, FCDTLookAt, and FCDTSkew.

virtual FCDAnimated* FCDTransform::GetAnimated  )  [pure virtual]
 

Retrieves the animated element for the transformation.

Returns:
The animated element. This pointer will be NULL if the transformation is not animated.

Implemented in FCDTTranslation, FCDTScale, FCDTRotation, FCDTMatrix, FCDTLookAt, and FCDTSkew.

FCDSceneNode* FCDTransform::GetParent  )  [inline]
 

Retrieves the visual scene node that contains this transformation.

Returns:
The parent visual scene node. This pointer will be NULL if the transformation is not contained by a visual scene node.

virtual Type FCDTransform::GetType  )  const [pure virtual]
 

Retrieves the class type of the transformation.

The class type should be used to up-case the transformation pointer.

Returns:
The class type.

Implemented in FCDTTranslation, FCDTScale, FCDTRotation, FCDTMatrix, FCDTLookAt, and FCDTSkew.

virtual bool FCDTransform::IsAnimated  )  const [pure virtual]
 

Retrieves whether this transformation has an animation tied to its values.

Returns:
Whether the transformation is animated.

Implemented in FCDTTranslation, FCDTScale, FCDTRotation, FCDTMatrix, FCDTLookAt, and FCDTSkew.

virtual bool FCDTransform::IsInverse const FCDTransform transform  )  const [virtual]
 

Retrieves whether a given transformation is the exact opposite of this transformation.

Executing two opposite transformations, one after the other will not give any resulting transformation. This function is useful to detect pivots within the transform stack.

Parameters:
transform A second transformation.
Returns:
Whether the two transformations are opposites.

Reimplemented in FCDTTranslation, and FCDTRotation.

virtual FUStatus FCDTransform::LoadFromXML xmlNode *  transformNode  )  [pure virtual]
 

[INTERNAL] Reads in the transformation from a given COLLADA XML tree node.

Parameters:
transformNode The COLLADA XML tree node.
Returns:
The status of the import. If the status is not successful, it may be dangerous to extract information from the transformation.

Implemented in FCDTTranslation, FCDTScale, FCDTRotation, FCDTMatrix, FCDTLookAt, and FCDTSkew.

virtual FMMatrix44 FCDTransform::ToMatrix  )  const [pure virtual]
 

Converts the transformation into a matrix.

Useful for visual scene nodes with a weird transformation stack.

Returns:
A matrix equivalent of the transformation.

Implemented in FCDTTranslation, FCDTScale, FCDTRotation, FCDTMatrix, FCDTLookAt, and FCDTSkew.

virtual xmlNode* FCDTransform::WriteToXML xmlNode *  parentNode  )  const [pure virtual]
 

[INTERNAL] Writes out the transformation to the given COLLADA XML tree node.

Parameters:
parentNode The COLLADA XML parent node in which to insert the transformation.
Returns:
The created XML tree node.

Implemented in FCDTTranslation, FCDTScale, FCDTRotation, FCDTMatrix, FCDTLookAt, and FCDTSkew.


The documentation for this class was generated from the following file:
Generated on Fri May 12 16:44:44 2006 for FCollada by  doxygen 1.4.6-NO