fastest 3D software for linux

Linux 3D
interactive ray-tracing
[1 introduction] [2 overview] [3 reference] [4 GUI]

Index

 E3dNode_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_SkeletonAssignSkin
 E3dNodeHrc_CollectIndependentBranches


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.

E3dNodeHrc_UpdateMaterialInheritance

Refresh Material inheritances of a Node hierarchy

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

E3dNodeHrc_UpdateChildAndNextSiblingLinks

Create Child and NextSibling links from Parent links

Syntax
void E3dNodeHrc_UpdateChildAndNextSiblingLinks(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
E3dNodeHrc_UpdateConnections

E3dNodeHrc_UpdateConnections

Update all links and other internal data of a hierarchy

Syntax
void E3dNodeHrc_UpdateConnections(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
E3dNodeHrc_UpdateMatrices

E3dNodeHrc_UpdateMatrices

Compute transformation Matrices of a Node hierarchy

Syntax
void E3dNodeHrc_UpdateMatrices(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
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_UpdateMatricesNoScaling, E3dNodeHrc_UpdateConnections

E3dNodeHrc_UpdateMatricesNoScaling

Update the LocalToWorld Matrices of a Model hierarchy

Syntax
void E3dNodeHrc_UpdateMatricesNoScaling(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. 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
E3dNodeHrc_UpdateMatrices, E3dNodeHrc_UpdateConnections

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, 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
E3dNodeHrc_UpdateConnections, E3dNodeHrc_UpdateMatrices, E3dNodeHrc_UpdateMaterialInheritance, 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 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_ConnectChild, E3dNodeHrc_UpdateConnections

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 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_UpdateConnections, E3dNodeHrc_UpdateMatrices, E3dNodeHrc_UpdateMaterialInheritance, E3dNode_ConnectChild

E3dNodeHrc_RemoveComponents

Remove all Node Component objects from a Node hierarchy

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

E3dNodeHrc_Free

Free a Node hierarchy

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

E3dNodeHrc_CollectObjects

Collect Objects in a Hierarchy

Syntax
void E3dNodeHrc_CollectObjects(E3dNode* PRootNode, const uint32_t PObjectTypeFlags, E3dObjectPtrListA* PObjects)

Arguments
E3dNode* PRootNode The root Node of the hierarchy const uint32_t PObjectTypeFlags E3dIdem... flags to specify what type of objects to include PObjectsP Pointer to an array of Object pointers
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:
  • E3dItemLIGHT
  • E3dItemCAMERA
  • E3dItemPOINTSET
  • E3dItemSPLINE
  • E3dItemFACE
  • E3dItemMESH
  • E3dItemALL : any type


  • Return value
    None.

    See also
    E3dNodeHrc_CollectMaterials

    E3dNodeHrc_CollectMaterials

    Collect Materials used in a Node hierarchy

    Syntax
    void E3dNodeHrc_CollectMaterials(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

    E3dNodeHrc_SkeletonAssignSkin

    Assign skeleton to a Geometry

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

    E3dNodeHrc_CollectIndependentBranches

    Collect independent branches from a list of Nodes

    Syntax
    EIndex E3dNodeHrc_CollectIndependentBranches(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.
    © 1996-2022 By Gabor Nagy