Index

 E3d_NodeHrcFree
 E3d_NodeHrcMap2DTextures
 E3d_NodeHrcUpdateConnections
 E3d_NodeHrcRefreshMatrices
 E3d_NodeHrcRefreshMatricesNoScaling
 E3d_NodeHrcFreezeScaling
 E3d_HrcSkeletonAssignSkin
 E3d_HrcSkeletonSetDefaultTransform
 E3d_NodeHrcBranchGetLastNode
 E3d_NodeHrcBranchGetNodeAfter


E3d_NodeHrcFree

Free a Node hierarchy

Syntax
 void E3d_NodeHrcFree(E3dNode* LRootNode, EBool LAllTypes)
Argument
 E3dNode* LRootNode     Pointer to the Root of the hierarchy to be freed
Description
This function parses through the given hierarchy and frees the memory associated with each node and its Geometries.

Return value
None.

E3d_NodeHrcMap2DTextures

(Re)Map 2DTextures of Model hierarchy

Syntax
 void E3d_NodeHrcMap2DTextures(E3dNode* LRootNode)
Argument
 LRootModel     Pointer to the Root of the hierarchy
Description
This function parses through the given hierarchy and recomputes the 2DTexture coordinates (S and T) based on the mapping-method and parameters.

Return value
None.

E3d_NodeHrcUpdateConnections

Update all links and other internal data of a hierarchy

Syntax
 void E3d_NodeHrcUpdateConnections(E3dNode* LRootNode)
Argument
 LRootModel     Pointer to the Root of the hierarchy
Description
This function prepares a hierarchy for efficient parsing and rendering: it walks through the Models of the hierarchy and updates the Prev, Next and PrevSibling link fields and other internal information on each Model, using only the Parent, Child and NextSibling links.
The Prev and Next links will follow the "depth-first" order, and only apply within that hierarchy.
See the diagram below:


Note that hierarchies are NOT linked in any way, but a Scene keeps an array of its hierarchies.
When creating a new hierarchy, or changing the links in an existing one (topology change), the application only has to set the Parent, Child and NextSibling links of the Models, and then call this function with the root Model of the hierarchy.

Return value
None.

See also
E3d_NodeHrcRefreshMatrices

E3d_NodeHrcRefreshMatrices

Compute transformation Matrices of a Model hierarchy

Syntax
 void E3d_NodeHrcRefreshMatrices(E3dNode* LBranchRootNode)
Argument
 LBranchRootModel     Pointer to the Root of the tree or branch
Description
Parses through the given hierarchy and recomputes the LocalToWorldMatrix and LocalToWorldNormalMatrix on each node, using the transformation values of that Model node. This function should be called on a hierarchy after a changing local transformation values (Scaling, Rotation, Translation) on the Nodes.

Return value
None.

See also
E3d_NodeHrcRefreshMatricesNoScaling, E3d_NodeHrcUpdateConnections

E3d_NodeHrcRefreshMatricesNoScaling

Update the LocalToWorld Matrices of a Model hierarchy

Syntax
 void E3d_NodeHrcRefreshMatricesNoScaling(E3dNode* LRootNode)
Argument
 LModel         Pointer to the root Model of the hierarchy
Description
This function walks through the given hierarchy following the Parent, Child and NextSibling links (depth-first) and refreshes the local-to-world matrix field (LocalToWorldMatrix) of the Model nodes. E3d_NodeHrcRefreshMatricesNoScaling() should be called on a hierarchy after a change in local transformation values (Scaling, Rotation, Translation) on the Model nodes. This function ignores the Scaling values of the Model nodes, so it is much faster than E3d_NodeHrcRefreshMatrices(), but it only works correctly with Models that have "unit scaling" (1.0, 1.0, 1.0).

Return value
None.

See also
E3d_NodeHrcRefreshMatrices, E3d_NodeHrcUpdateConnections

E3d_NodeHrcFreezeScaling

Freeze scaling on a hierarchy or a branch (sub-tree of a hierarchy)

Syntax
 int E3d_NodeHrcFreezeScaling(E3dNode* LBranchRootNode)
Argument
 LBranchRootModel   Pointer to the Root of the branch
Description
This function performs the scaling on the geometries of each node in the tgiven hierarchy or branch, then sets the scaling values to 1.0.

Return value
None.

E3d_HrcSkeletonAssignSkin

Assign skeleton to a Geometry

Syntax
 void E3d_HrcSkeletonAssignSkin(E3dNode* LSkeletonRoot, E3dGeometry* LGeometry)
Argument
 LModel         Root Model of the skeleton hierarchy
 E3dGeometry* LGeometry      The Geometry to be skin-animated
Description


Return value
None.

See also
E3d_SkinMeshBindPose

E3d_HrcSkeletonSetDefaultTransform

Make the current "pose" of a JointNode hierarchy its default pose

Syntax
 void E3d_HrcSkeletonSetDefaultTransform(E3dNode* LNode)
Argument
 LModel         Root Model of the skeleton hierarchy
Description
Makes the current pose of the Skeleton hierarchy its default pose by setting the WorldToDefaultMatrix of each Model to the inverse of the Model's LocalToWorldMatrix

Return value
None.

See also
E3d_SkinMeshBindPose

E3d_NodeHrcBranchGetLastNode

Get the last Node of a Branch (sub-tree of a hierarchy)

Syntax
 E3dNode* E3d_NodeHrcBranchGetLastNode(E3dNode* LBranchRootNode)
Argument
 E3dNode* LBranchRootNode   Pointer to the Root of the branch
Description
Parses through the given branch (in depth-first order) and gets the last Node that belongs to this branch (that is: it is still a descendant of LBranchRootNode).

Return value
The last Node of the given branch, or NULL in case of an error.

E3d_NodeHrcBranchGetNodeAfter

Get to the Node that follows a Branch (sub-tree of a hierarchy)

Syntax
 E3dNode* E3d_NodeHrcBranchGetNodeAfter(E3dNode* LBranchRootNode)
Argument
 E3dNode* LBranchRootNode     Pointer to the Root of the branch
Description
Parses through the given branch (in depth-first order) and gets the Node that comes after the last node of the given branch (the next one after the last descendant of LBranchRootNode).

Return value
The Node following the given branch (can be NULL).