FCDAnimation Class Reference
[COLLADA Document Object Model.]

A COLLADA animation entity. More...

#include <FCDAnimation.h>

Inheritance diagram for FCDAnimation:

FCDEntity FCDObjectWithId FCDObject FUObject List of all members.

Public Member Functions

 FCDAnimation (FCDocument *document)
 Constructor: do not use directly.
virtual ~FCDAnimation ()
 Destructor: do not use directly.
virtual Type GetType () const
 Retrieves the entity class type.
virtual FCDEntityFindDaeId (const string &daeId)
 Retrieves the entity with the given COLLADA id.
size_t GetChildCount () const
 Retrieves the number of animation entity sub-trees contained by this animation entity tree.
FCDAnimationGetChild (size_t index)
 Retrieves an animation entity sub-tree contained by this animation entity tree.
const FCDAnimationGetChild (size_t index) const
 See above.
FCDAnimationAddChild ()
 Creates a new animation entity sub-tree contained within this animation entity tree.
void ReleaseChild (FCDAnimation *animation)
 Releases an animation entity sub-tree contained by this animation entity tree.
void FindAnimationChannels (const string &pointer, FCDAnimationChannelList &targetChannels)
 Retrieves the animation channels that target the given COLLADA target pointer.
size_t GetChannelCount () const
 Retrieves the number of animation channels at this level within the animation tree.
FCDAnimationChannelGetChannel (size_t index)
 Retrieves an animation channel contained by this animation entity.
const FCDAnimationChannelGetChannel (size_t index) const
 See above.
FCDAnimationChannelAddChannel ()
 Adds a new animation channel to this animation entity.
void ReleaseChannel (FCDAnimationChannel *channel)
 Releases an animation channel contained within this animation entity.
void GetCurves (FCDAnimationCurveList &curves)
 Retrieves all the curves created in the subtree of this animation element.
FUStatus Link ()
 [INTERNAL] Links the animation sub-tree with the other entities within the document.
virtual FUStatus LoadFromXML (xmlNode *animationNode)
 [INTERNAL] Reads in the animation entity from a given COLLADA XML tree node.
virtual xmlNode * WriteToXML (xmlNode *parentNode) const
 [INTERNAL] Writes out the <animation> element to the given COLLADA XML tree node.
xmlNode * FindChildById (const string &id)
 [INTERNAL] Retrieves the child source or sampler.
bool LinkDriver (FCDAnimated *animated)
 [INTERNAL] Links a possible driver with the animation curves contained within the subtree of this animation element.

Detailed Description

A COLLADA animation entity.

An animation entity contains a list of child animation entities, in order to form a tree of animation entities. It also hold a list of animation channels, which hold the information to generate animation curves.

In other words, the animation entity is a structural class used to group animation channels hierarchically.


Constructor & Destructor Documentation

FCDAnimation::FCDAnimation FCDocument document  ) 
 

Constructor: do not use directly.

Instead, use the FCDLibrary::AddEntity function or the AddChild function, depending on the hierarchical level of the animation entity.

Parameters:
document The COLLADA document that owns the animation entity.

virtual FCDAnimation::~FCDAnimation  )  [virtual]
 

Destructor: do not use directly.

Instead, use the FCDLibrary::ReleaseEntity function or the ReleaseChild function, depending on the hierarchical level of the animation entity.


Member Function Documentation

FCDAnimationChannel* FCDAnimation::AddChannel  ) 
 

Adds a new animation channel to this animation entity.

Returns:
The new animation channel.

FCDAnimation* FCDAnimation::AddChild  )  [inline]
 

Creates a new animation entity sub-tree contained within this animation entity tree.

Returns:
The new animation sub-tree.

void FCDAnimation::FindAnimationChannels const string &  pointer,
FCDAnimationChannelList targetChannels
 

Retrieves the animation channels that target the given COLLADA target pointer.

Parameters:
pointer A COLLADA target pointer.
targetChannels A list of animation channels to fill in. This list is not cleared.

xmlNode* FCDAnimation::FindChildById const string &  id  ) 
 

[INTERNAL] Retrieves the child source or sampler.

This function should only be used by the FCDAnimationChannel class during the import of a COLLADA document.

Parameters:
id The COLLADA id of a sampler or a source.
Returns:
The XML node tree for the sampler or the source. This pointer will be NULL if there are no child nodes for the given id.

virtual FCDEntity* FCDAnimation::FindDaeId const string &  daeId  )  [virtual]
 

Retrieves the entity with the given COLLADA id.

This function will look through the local sub-tree of animations for the given COLLADA id.

Parameters:
daeId A COLLADA id.
Returns:
The animation entity that matches the COLLADA id. This pointer will be NULL if there are no animation entities that matches the COLLADA id.

Reimplemented from FCDEntity.

FCDAnimationChannel* FCDAnimation::GetChannel size_t  index  )  [inline]
 

Retrieves an animation channel contained by this animation entity.

Parameters:
index The index of the channel.
Returns:
The channel at the given index. This pointer will be NULL if the index is out-of-bounds.

size_t FCDAnimation::GetChannelCount  )  const [inline]
 

Retrieves the number of animation channels at this level within the animation tree.

Returns:
The number of animation channels.

FCDAnimation* FCDAnimation::GetChild size_t  index  )  [inline]
 

Retrieves an animation entity sub-tree contained by this animation entity tree.

Parameters:
index The index of the sub-tree.
Returns:
The animation entity sub-tree at the given index. This pointer will be NULL if the index is out-of-bounds.

size_t FCDAnimation::GetChildCount  )  const [inline]
 

Retrieves the number of animation entity sub-trees contained by this animation entity tree.

Returns:
The number of animation entity sub-trees.

void FCDAnimation::GetCurves FCDAnimationCurveList curves  ) 
 

Retrieves all the curves created in the subtree of this animation element.

Parameters:
curves A list of animation curves to fill in. This list is not cleared.

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

Retrieves the entity class type.

This function is a part of the FCDEntity interface.

Returns:
The entity class type: ANIMATION.

Reimplemented from FCDEntity.

FUStatus FCDAnimation::Link  ) 
 

[INTERNAL] Links the animation sub-tree with the other entities within the document.

This function is used at the end of the import of a document to verify that all the necessary drivers were found.

Returns:
The status of the linkage.

bool FCDAnimation::LinkDriver FCDAnimated animated  ) 
 

[INTERNAL] Links a possible driver with the animation curves contained within the subtree of this animation element.

This function is used during the import of a COLLADA document.

Parameters:
animated The driver animated value.
Returns:
Whether any linkage was done.

virtual FUStatus FCDAnimation::LoadFromXML xmlNode *  animationNode  )  [virtual]
 

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

Parameters:
animationNode 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 animation.

Reimplemented from FCDEntity.

void FCDAnimation::ReleaseChannel FCDAnimationChannel channel  ) 
 

Releases an animation channel contained within this animation entity.

Parameters:
channel The animation channel to release.

void FCDAnimation::ReleaseChild FCDAnimation animation  )  [inline]
 

Releases an animation entity sub-tree contained by this animation entity tree.

Parameters:
animation The animation entity the release.

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

[INTERNAL] Writes out the <animation> element to the given COLLADA XML tree node.

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

Reimplemented from FCDEntity.


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