fastest 3D software for linux

Linux 3D
interactive ray-tracing

Index

 E3d_NodeBranchNextNodeDepthFirst
 E3d_NodeBranchGetLastNode
 E3d_NodeBranchGetNodeAfter
 E3d_NodeHrcIsDescendantOf
 E3d_NodeHrcUpdateMaterialInheritance
 E3d_NodeHrcUpdateChildAndNextSiblingLinks
 E3d_NodeHrcUpdateConnections
 E3d_NodeHrcUpdateMatrices
 E3d_NodeHrcUpdateMatricesNoScaling
 E3d_NodeHrcConnectChild
 E3d_NodeHrcAddChild
 E3d_NodeHrcBranchDisconnectFromParent
 E3d_NodeHrcRemoveComponents
 E3d_NodeHrcFree
 E3d_NodeHrcCollectObjects
 E3d_NodeHrcSkeletonAssignSkin
 E3d_NodeHrcsUpdateSkins
 E3d_NodeHrcCollectIndependentBranches


E3d_NodeBranchNextNodeDepthFirst

Get the next Node of a branch (sub-tree of a hierarchy) in in depth-first order

Syntax
E3dNode* E3d_NodeBranchNextNodeDepthFirst(E3dNode* PNode, E3dNode* PBranchRootNode)

Argument
E3dNode* PNode The input Node E3dNode* PBranchRootNode The root Node of the branch
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.

E3d_NodeBranchGetLastNode

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

Syntax
E3dNode* E3d_NodeBranchGetLastNode(E3dNode* PBranchRootNode)

Argument
E3dNode* PBranchRootNode 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 PBranchRootNode).

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

E3d_NodeBranchGetNodeAfter

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

Syntax
E3dNode* E3d_NodeBranchGetNodeAfter(const E3dNode* PBranchRootNode)

Argument
const E3dNode* PBranchRootNode Pointer to the Root of the branch
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).

E3d_NodeHrcIsDescendantOf

Determine if PNode is a descendant of PANode

Syntax
EIndex E3d_NodeHrcIsDescendantOf(const E3dNode* PNode, const E3dNode* PANode)

Argument
const E3dNode* PNode Pointer to the Node to be tested as a descendant const E3dNode* PANode Pointer to the Node to be tested as ancestor
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.

E3d_NodeHrcUpdateMaterialInheritance

Refresh Material inheritances of a Node hierarchy

Syntax
void E3d_NodeHrcUpdateMaterialInheritance(E3dNode* PNode)

Argument
E3dNode* PNode The root of the hierarchy
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.

E3d_NodeHrcUpdateChildAndNextSiblingLinks

Create Child and NextSibling links from Parent links

Syntax
void E3d_NodeHrcUpdateChildAndNextSiblingLinks(E3dNode** PNodes, const EIndex PNNodes)

Arguments
E3dNode** PNodes Array of Nodes in a hierarchy const EIndex PNNodes Number of Nodes in the array
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
E3d_NodeHrcUpdateConnections

E3d_NodeHrcUpdateConnections

Update all links and other internal data of a hierarchy

Syntax
void E3d_NodeHrcUpdateConnections(E3dNode* PRootNode)

Argument
E3dNode* PRootNode Pointer to the Root of the hierarchy
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
E3d_NodeHrcUpdateMatrices

E3d_NodeHrcUpdateMatrices

Compute transformation Matrices of a Node hierarchy

Syntax
void E3d_NodeHrcUpdateMatrices(E3dNode* PBranchRootNode, const EBool PInheritTransformFromAbove)

Argument
E3dNode* PBranchRootNode Pointer to the Root of the tree or branch const EBool PInheritTransformFromAbove If PBranchRootNode has a parent, inherit that parent's transforms
Description
Parses through the given hierarchy or brach and recomputes the LocalToWorldMatrix and LocalToWorldNormalLocalToWorldMatrix 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. If PInheritTransformFromAbove is FALSE, the transforms will start from PBranchRootNode, even if PBranchRootNode has a parent.

Return value
None.

See also
E3d_NodeHrcUpdateMatricesNoScaling, E3d_NodeHrcUpdateConnections

E3d_NodeHrcUpdateMatricesNoScaling

Update the LocalToWorld Matrices of a Model hierarchy

Syntax
void E3d_NodeHrcUpdateMatricesNoScaling(E3dNode* PBranchRootNode)

Argument
E3dNode* PBranchRootNode Pointer to the root Model of the hierarchy or branch
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_NodeHrcUpdateMatricesNoScaling() 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_NodeHrcUpdateMatrices(), but it only works correctly with Models that have "unit scaling" (1.0, 1.0, 1.0).

Return value
None.

See also
E3d_NodeHrcUpdateMatrices, E3d_NodeHrcUpdateConnections

E3d_NodeHrcConnectChild

Add a child Node to a given Node

Syntax
void E3d_NodeHrcConnectChild(E3dNode* PParent, E3dNode* PNewChild, const EIndex PChildIndex, const EBool PCompensateTransform, const EBool PUpdate)

Arguments
E3dNode* PParent The Node to become the parent. E3dNode* PNewChild The Node to become the child. const EIndex PChildIndex Position where the child is to be added the constant ELstEND means "add to the end". const EBool PCompensateTransform Modify the child's transform values to compensate for the parent's transform. const EBool PUpdate Call necessary update functions
Description
Connects PNewChild to PParent. After a hierarchy is modified, E3d_NodeHrcUpdateConnections, E3d_NodeHrcUpdateMatrices and E3d_NodeHrcUpdateMaterialInheritance 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
E3d_NodeHrcUpdateConnections, E3d_NodeHrcUpdateMatrices, E3d_NodeHrcUpdateMaterialInheritance, E3d_NodeHrcBranchDisconnectFromParent

E3d_NodeHrcAddChild

Add a child Node to a Node

Syntax
void E3d_NodeHrcAddChild(E3dNode* PParent, E3dNode* PChild)

Arguments
E3dNode* PParent The parent E3dNode* PChild The new child
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.). So, when the hierachy is complete, you must call E3d_NodeHrcUpdateConnections() with the root Node of the hierarchy.
To add children with a full update, use E3d_NodeHrcConnectChild.

Return value
None.

See also
E3d_NodeHrcConnectChild, E3d_NodeHrcUpdateConnections()

E3d_NodeHrcBranchDisconnectFromParent

Disconnect a Node Branch from its hierarchy (parent)

Syntax
E3dNode* E3d_NodeHrcBranchDisconnectFromParent(E3dNode* PNode, const EBool PCompensateForTransforms)

Arguments
E3dNode* PNode The Node to disconnect const EBool PCompensateForTransforms Transform compensation
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 E3d_NodeHrcUpdateConnections, E3d_NodeHrcUpdateMatrices and E3d_NodeHrcUpdateMaterialInheritance, 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
E3d_NodeHrcUpdateConnections, E3d_NodeHrcUpdateMatrices, E3d_NodeHrcUpdateMaterialInheritance, E3d_NodeHrcConnectChild

E3d_NodeHrcRemoveComponents

Remove all Node Component objects from a Node hierarchy

Syntax
int E3d_NodeHrcRemoveComponents(E3dNode* PRootNode)

Argument
E3dNode* PRootNode The root Node of the hierarchy
Description
Walks through the hierarchy and removes all Node Component objects.

Return value
None.

E3d_NodeHrcFree

Free a Node hierarchy

Syntax
void E3d_NodeHrcFree(E3dNode* PRootNode)

Argument
E3dNode* PRootNode The root Node of the hierarchy
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.

E3d_NodeHrcCollectObjects

Collect Objects in a Hierarchy

Syntax
void E3d_NodeHrcCollectObjects(E3dNode* PNode, E3dObjectPtrListA* PObjects)

Arguments
E3dNode* PNode The Node PObjectsP Pointer to an array of Object pointers PNumOfAllObjectsP
Description


Return value
None.

See also

E3d_NodeHrcSkeletonAssignSkin

Assign skeleton to a Geometry

Syntax
void E3d_NodeHrcSkeletonAssignSkin(E3dNode* PSkeletonRoot, E3dGeometry* PGeometry)

Argument
E3dNode* PSkeletonRoot Root Node of the skeleton hierarchy E3dGeometry* PGeometry The Geometry to be skin-animated
Description
Assigns a Geometry to be deformed by a given skeleton (Node hierarchy).

Return value
None.

E3d_NodeHrcsUpdateSkins

Update skinned Geometries after skeleton pose changes

Syntax
EChangeFlags E3d_NodeHrcsUpdateSkins(E3dNode** PRootNodes, const EIndex PNumOfRootNodes)

Arguments
E3dNode** PRootNodes Root Nodes of the skeleton hierarchies const EIndex PNumOfRootNodes The number of skeletons (hierarchies)
Description
Perform deformation of all Geometries affected by the given skeleton hierarchies.

Return value
Flags, indentifying changes triggered by this update (for example E3dChgMESHSHAPE)

E3d_NodeHrcCollectIndependentBranches

Collect independent branches from a list of Nodes

Syntax
EIndex E3d_NodeHrcCollectIndependentBranches(E3dNode** PNodes, const EIndex PNodes_Count, E3dNode*** PBranchesP)

Argument
E3dNode** PNodes List of Nodes const EIndex PNodes_Count Number of Nodes E3dNode*** PBranchesP List of root Nodes of resulting independent branches, or NULL
Description
Collect a list of independent branches from a list of Nodes.

Return value
Number of independent branches.
© 1992-2017 By Gabor Nagy