C4 Engine
C4 Engine API Documentation

Model::GetAnimatedTransformNodeCount

Defined in:  C4Models.h
Returns the number of nodes with animated transforms in a model.
Prototype

int32 GetAnimatedTransformNodeCount(voidconst;

Description
The GetAnimatedTransformNodeCount function returns the number of nodes in a model that can have animated transforms. When a model is preprocessed, this number is calculated by examining the nodes in the model's subtree to determine whether each one can have an animated transform and whether the nodes in its own subtree are eligible for animation.

If a model's subtree contains other model nodes, then those nodes and their entire subtrees are not eligible for transform animation directly within the owning model and do not count toward the number of animated nodes.

If a particular subnode of the model has the kNodeAnimationInhibit flag set, then it is not counted as a node with an animated transform. In this case, if the kNodeAnimateSubtree flag is not set for the same node, then the entire subtree is not elgible for animation and is not counted. Otherwise, if the kNodeAnimateSubtree flag is set, then nodes in the subtree are counted if they are not disqualified from transform animation by any other rule.

The table of pointers to the nodes with animated transforms in a model can be retrieved by calling the Model::GetAnimatedTransformNodeTable function.
See Also

Model::GetAnimatedTransformNodeTable

Model::GetTransformAnimationIndex

Model::GetRootAnimator

Model::SetRootAnimator

Model::AnimateModel

Animator