FCDTRotation Class Reference
[COLLADA Document Object Model.]

A COLLADA angle-axis rotation. More...

#include <FCDTransform.h>

Inheritance diagram for FCDTRotation:

FCDTransform FCDObject FUObject List of all members.

Public Member Functions

 FCDTRotation (FCDocument *document, FCDSceneNode *parent)
 Constructor: do not use directly.
virtual ~FCDTRotation ()
 Destructor: do not use directly.
virtual Type GetType () const
 Retrieves the transformation class type for the rotation.
FMVector3GetAxis ()
 Retrieves the rotation axis.
const FMVector3GetAxis () const
 See above.
void SetAxis (const FMVector3 &_axis)
 Sets the rotation axis.
void SetAxis (float x, float y, float z)
 Sets the rotation axis.
float & GetAngle ()
 Retrieves the rotation angle.
const float & GetAngle () const
 See above.
void SetAngle (float a)
 Sets the rotation angle.
void SetRotation (const FMVector3 &_axis, float a)
 Sets the rotation components.
virtual FMMatrix44 ToMatrix () const
 Converts the rotation into a matrix.
virtual bool IsAnimated () const
 Retrieves whether the axis or the angle of the rotation are animated.
virtual FCDAnimatedGetAnimated ()
 Retrieves the animated element for the angle-axis rotation.
virtual bool IsInverse (const FCDTransform *transform) const
 Retrieves whether a given transform is the exact opposite of this rotation.
virtual FCDTransformClone (FCDSceneNode *newParent)
 Creates a copy of the angle-axis rotation.
virtual FUStatus LoadFromXML (xmlNode *rotationNode)
 [INTERNAL] Reads in the rotation from a given COLLADA XML tree node.
virtual xmlNode * WriteToXML (xmlNode *parentNode) const
 [INTERNAL] Writes out the rotation to the given COLLADA XML tree node.

Detailed Description

A COLLADA angle-axis rotation.

This rotation defines an axis around which the 3D points are rotated by a given angle.

Todo:
(clock-wise/counter-clock-wise?)


Constructor & Destructor Documentation

FCDTRotation::FCDTRotation FCDocument document,
FCDSceneNode parent
 

Constructor: do not use directly.

Instead, use the FCDSceneNode::AddTransform function with the transformation type: ROTATION.

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

virtual FCDTRotation::~FCDTRotation  )  [virtual]
 

Destructor: do not use directly.

Instead, use the FCDSceneNode::ReleaseTransform function.


Member Function Documentation

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

Creates a copy of the angle-axis rotation.

Parameters:
newParent The visual scene node that will contain the clone.
Returns:
The cloned angle-axis rotation.

Implements FCDTransform.

float& FCDTRotation::GetAngle  )  [inline]
 

Retrieves the rotation angle.

This angle may be animated.

Returns:
The rotation angle, in degrees.

virtual FCDAnimated* FCDTRotation::GetAnimated  )  [virtual]
 

Retrieves the animated element for the angle-axis rotation.

See also:
FCDAnimatedAngleAxis
Returns:
The animated element. This pointer will be NULL if the rotation is not animated.

Implements FCDTransform.

FMVector3& FCDTRotation::GetAxis  )  [inline]
 

Retrieves the rotation axis.

This 3D vector may be animated.

Returns:
The rotation axis.

virtual Type FCDTRotation::GetType  )  const [inline, virtual]
 

Retrieves the transformation class type for the rotation.

Returns:
The class type: ROTATION.

Implements FCDTransform.

virtual bool FCDTRotation::IsAnimated  )  const [virtual]
 

Retrieves whether the axis or the angle of the rotation are animated.

Returns:
Whether the rotation is animated.

Implements FCDTransform.

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

Retrieves whether a given transform is the exact opposite of this rotation.

The opposite of an angle-axis rotation has the same axis as this rotation but the angle is multiplied by -1.

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

Reimplemented from FCDTransform.

virtual FUStatus FCDTRotation::LoadFromXML xmlNode *  rotationNode  )  [virtual]
 

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

Parameters:
rotationNode 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 rotation.

Implements FCDTransform.

void FCDTRotation::SetAngle float  a  )  [inline]
 

Sets the rotation angle.

Parameters:
a The rotation angle, in degrees.

void FCDTRotation::SetAxis float  x,
float  y,
float  z
[inline]
 

Sets the rotation axis.

Parameters:
x The x-component of the rotation axis.
y The y-component of the rotation axis.
z The z-component of the rotation axis.

void FCDTRotation::SetAxis const FMVector3 _axis  )  [inline]
 

Sets the rotation axis.

Parameters:
_axis The rotation axis.

void FCDTRotation::SetRotation const FMVector3 _axis,
float  a
[inline]
 

Sets the rotation components.

Parameters:
_axis The rotation axis.
a The rotation angle, in degrees.

virtual FMMatrix44 FCDTRotation::ToMatrix  )  const [virtual]
 

Converts the rotation into a matrix.

Returns:
A matrix equivalent of the rotation.

Implements FCDTransform.

virtual xmlNode* FCDTRotation::WriteToXML xmlNode *  parentNode  )  const [virtual]
 

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

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

Implements FCDTransform.


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