|
[1 introduction] [2 overview] [3 reference] [4 GUI] IndexE3dNode_BranchNextNodeDepthFirst E3dNode_BranchGetLastNode E3dNode_BranchGetNodeAfter E3dNode_HrcIsDescendantOf E3dNodeHrc_UpdateMaterialInheritance E3dNodeHrc_UpdateChildAndNextSiblingLinks E3dNodeHrc_UpdateConnections E3dNodeHrc_UpdateMatrices E3dNodeHrc_UpdateMatricesNoScaling E3dNode_ConnectChild E3dNode_AddChild E3dNode_DisconnectFromParent E3dNodeHrc_RemoveComponents E3dNodeHrc_Free E3dNodeHrc_CollectObjects E3dNodeHrc_CollectMaterials E3dNodeHrc_CollectIndependentBranches E3dNode_BranchNextNodeDepthFirstGet the next Node of a branch (sub-tree of a hierarchy) in in depth-first orderSyntax Argument Description Returns the next Node in the given branch (in depth-first order). This function will not traverse past the branch, rooted by PBranchRootNode! Return value The next Node of the given branch, or NULL if LNode was the last Node of the branch. E3dNode_BranchGetLastNodeGet the last Node of a Branch (sub-tree of a hierarchy)Syntax Argument 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 PBranchRootNode). Return value The last Node of the given branch, or NULL in case of an error. E3dNode_BranchGetNodeAfterGet the Node that follows a Branch (sub-tree of a hierarchy)Syntax Argument Description Walks 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 PBranchRootNode). Return value The Node following the given branch (may be NULL). E3dNode_HrcIsDescendantOfDetermine if PNode is a descendant of PANodeSyntax Argument Description If PNode is a descendant of PANode, returns number of levels PANode is above PNode: 0 = PNode equals to PANode, 1 = PANode is the parent of PNode etc. If PNode is a descendant of PANode, returns the enum value E_NOT_CONNECTED. Return value The number of levels PANode is above PNode, or E_NOT_CONNECTED. E3dNodeHrc_UpdateMaterialInheritanceRefresh Material inheritances of a Node hierarchySyntax Argument Description Geometries that have no Material specified, will inherit the Material from their closest ancestor. When a hierarchy is modified, this function must be called with the root Node of that hierarchy. Return value None. E3dNodeHrc_UpdateChildAndNextSiblingLinksCreate Child and NextSibling links from Parent linksSyntax Arguments Description Updates the Child and NextSibling links from Parent links of each Node. This function is used when reading a hierarchy from a file. This allows only storing references to the parents of Nodes, in files. This function assumes that the Nodes in PNodes are in depth-first order (PNodes[0] is the root, etc.). Return value None. See also E3dNodeHrc_UpdateConnectionsUpdate all links and other internal data of a hierarchySyntax Argument Description Prepares a hierarchy for efficient parsing and rendering: it walks through the Nodes of the hierarchy and updates the Prev, Next and PrevSibling link fields and other internal information on each Node, 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 Nodes, and then call this function with the root Node of the hierarchy. Return value None. See also E3dNodeHrc_UpdateMatricesCompute transformation Matrices of a Node hierarchySyntax Argument Description Walks through the given Node hierarchy, or brach and recomputes the LocalToWorldMatrix and LocalToWorldUnitVectorMatrix on each Node, using the transformation values of that Node. This function should be called on a hierarchy after a changing transformation values (Scaling, Rotation, Translation) on the Nodes. If PInheritTransformFromAbove is FALSE, the transforms will originate from PBranchRootNode, even if it has a parent. Return value None. See also E3dNodeHrc_UpdateMatricesNoScalingUpdate the LocalToWorld Matrices of a Model hierarchySyntax Argument 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. E3dNodeHrc_UpdateMatricesNoScaling() 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 E3dNodeHrc_UpdateMatrices(), but it only works correctly with Models that have "unit scaling" (1.0, 1.0, 1.0). Return value None. See also E3dNode_ConnectChildAdd a child Node to a given NodeSyntax Arguments Description Connects PNewChild to PParent. After a hierarchy is modified, E3dNodeHrc_UpdateConnections, E3dNodeHrc_UpdateMatrices and E3dNodeHrc_UpdateMaterialInheritance must be called with the root Node of that hierarchy. If PUpdate is TRUE, those functions will be called here. Return value None. See also E3dNode_AddChildAdd a child Node to a NodeSyntax Arguments Description Sets the Child and NextSibling members with E_AssignToMember calls. This function is to be used when building up a new hierearchy. E.g. when loading a file. It's more efficient to use for new hierarchies, as it does not update all hierarchy links (Next etc.). When the hierachy is complete, you must call E3dNodeHrc_UpdateConnections() with the root Node of the hierarchy. To add children with a full update, use E3dNode_ConnectChild. Return value None. See also E3dNode_DisconnectFromParentDisconnect a Node Branch from its hierarchy (parent)Syntax Arguments Description Disconnects PNode from its parent Node, if any. If PCompensateTransform is TRUE, adjusts the transform values of PNode and its descendants to compensate for the (former) parent's transform. After a hierarchy is modified, you must call E3dNodeHrc_UpdateConnections, E3dNodeHrc_UpdateMatrices and E3dNodeHrc_UpdateMaterialInheritance, with the root Node of that hierarchy. Return value The next Node in the original hierarchy followed after the branch, starting at PNode. See also E3dNodeHrc_RemoveComponentsRemove all Node Component objects from a Node hierarchySyntax Argument Description Walks through the hierarchy and removes all Node Component objects. Return value None. E3dNodeHrc_FreeFree a Node hierarchySyntax Argument Description Walks through the hierarchy, removes all connections between Nodes and frees all Nodes. If PRootNode has a parent, PRootNode will be dieconnected from that parent first. Return value None. E3dNodeHrc_CollectObjectsCollect Objects in a HierarchySyntax Arguments Description Collect instanced Objects from a Node hierarchy, into an array. PObjectTypeFlags is an OR-ed set of flags that specify what type of objects to include: Return value None. See also E3dNodeHrc_CollectMaterialsCollect Materials used in a Node hierarchySyntax Arguments Description Collects Materials used in a hierarchy. The list must be initialized by the caller, and this function may be called, to collect Materials from multiple hierarchies. Return value None. See also E3dNodeHrc_CollectIndependentBranchesCollect independent branches from a list of NodesSyntax Argument Description Collect a list of independent branches from a list of Nodes. Return value Number of independent branches. |