fastest 3D software for linux

Linux 3D
interactive ray-tracing

Index

 E3dNode_BranchNextNodeDepthFirst
 E3dNode_BranchGetLastNode
 E3dNode_BranchGetNodeAfter
 E3dNode_HrcIsDescendantOf
 E3dNode_HrcUpdateMaterialInheritance
 E3dNode_HrcUpdateChildAndNextSiblingLinks
 E3dNode_HrcUpdateConnections
 E3dNode_HrcUpdateMatrices
 E3dNode_HrcUpdateMatricesNoScaling
 E3dNode_ConnectChild
 E3dNode_AddChild
 E3dNode_DisconnectFromParent
 E3dNode_HrcRemoveComponents
 E3dNode_HrcFree
 E3dNode_HrcCollectObjects
 E3dNode_HrcCollectMaterials
 E3dNode_HrcSkeletonAssignSkin
 E3dNode_HrcsUpdateSkins
 E3dNode_HrcCollectIndependentBranches


E3dNode_BranchNextNodeDepthFirst

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

Syntax
E3dNode* E3dNode_BranchNextNodeDepthFirst(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.

E3dNode_BranchGetLastNode

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

Syntax
E3dNode* E3dNode_BranchGetLastNode(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.

E3dNode_BranchGetNodeAfter

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

Syntax
E3dNode* E3dNode_BranchGetNodeAfter(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).

E3dNode_HrcIsDescendantOf

Determine if PNode is a descendant of PANode

Syntax
EIndex E3dNode_HrcIsDescendantOf(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.

E3dNode_HrcUpdateMaterialInheritance

Refresh Material inheritances of a Node hierarchy

Syntax
void E3dNode_HrcUpdateMaterialInheritance(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.

E3dNode_HrcUpdateChildAndNextSiblingLinks

Create Child and NextSibling links from Parent links

Syntax
void E3dNode_HrcUpdateChildAndNextSiblingLinks(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
E3dNode_HrcUpdateConnections

E3dNode_HrcUpdateConnections

Update all links and other internal data of a hierarchy

Syntax
void E3dNode_HrcUpdateConnections(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
E3dNode_HrcUpdateMatrices

E3dNode_HrcUpdateMatrices

Compute transformation Matrices of a Node hierarchy

Syntax
void E3dNode_HrcUpdateMatrices(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
E3dNode_HrcUpdateMatricesNoScaling, E3dNode_HrcUpdateConnections

E3dNode_HrcUpdateMatricesNoScaling

Update the LocalToWorld Matrices of a Model hierarchy

Syntax
void E3dNode_HrcUpdateMatricesNoScaling(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. E3dNode_HrcUpdateMatricesNoScaling() 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 E3dNode_HrcUpdateMatrices(), but it only works correctly with Models that have "unit scaling" (1.0, 1.0, 1.0).

Return value
None.

See also
E3dNode_HrcUpdateMatrices, E3dNode_HrcUpdateConnections

E3dNode_ConnectChild

Add a child Node to a given Node

Syntax
void E3dNode_ConnectChild(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, E3dNode_HrcUpdateConnections, E3dNode_HrcUpdateMatrices and E3dNode_HrcUpdateMaterialInheritance 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_HrcUpdateConnections, E3dNode_HrcUpdateMatrices, E3dNode_HrcUpdateMaterialInheritance, E3dNode_DisconnectFromParent

E3dNode_AddChild

Add a child Node to a Node

Syntax
void E3dNode_AddChild(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.). When the hierachy is complete, you must call E3dNode_HrcUpdateConnections() with the root Node of the hierarchy.
To add children with a full update, use E3dNode_ConnectChild.

Return value
None.

See also
E3dNode_ConnectChild, E3dNode_HrcUpdateConnections()

E3dNode_DisconnectFromParent

Disconnect a Node Branch from its hierarchy (parent)

Syntax
E3dNode* E3dNode_DisconnectFromParent(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 E3dNode_HrcUpdateConnections, E3dNode_HrcUpdateMatrices and E3dNode_HrcUpdateMaterialInheritance, 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
E3dNode_HrcUpdateConnections, E3dNode_HrcUpdateMatrices, E3dNode_HrcUpdateMaterialInheritance, E3dNode_ConnectChild

E3dNode_HrcRemoveComponents

Remove all Node Component objects from a Node hierarchy

Syntax
int E3dNode_HrcRemoveComponents(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.

E3dNode_HrcFree

Free a Node hierarchy

Syntax
void E3dNode_HrcFree(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.

E3dNode_HrcCollectObjects

Collect Objects in a Hierarchy

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

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


Return value
None.

See also

E3dNode_HrcCollectMaterials

Collect Materials used in a hierarchy

Syntax
void E3dNode_HrcCollectMaterials(E3dNode* PRootNode, E3dMaterialPtrListA* PMaterials)

Arguments
E3dNode* PRootNode The root of the hierarchy E3dMaterialPtrListA* PMaterials Array for the result
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
E3dObject_CollectMaterials

E3dNode_HrcSkeletonAssignSkin

Assign skeleton to a Geometry

Syntax
void E3dNode_HrcSkeletonAssignSkin(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.

E3dNode_HrcsUpdateSkins

Update skinned Geometries after skeleton pose changes

Syntax
EChangeFlags E3dNode_HrcsUpdateSkins(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)

E3dNode_HrcCollectIndependentBranches

Collect independent branches from a list of Nodes

Syntax
EIndex E3dNode_HrcCollectIndependentBranches(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