Index

 E3d_SceneDefault
 E3d_SceneAllocate
 E3d_SceneAddNodeHrc
 E3d_SceneRemoveNodeHrc
 E3d_SceneMaterialClone
 E3d_SceneNodeHrcRead2DTextures
 E3d_SceneGetSingleSelection
 E3d_SceneGetNodes
 E3d_SceneGetSelectedNodes
 E3d_SceneGetGeometries
 E3d_SceneGetSelectedGeometries
 E3d_SceneWalkGeometries
 E3d_SceneCollectTransformPoints
 E3d_SceneCollectNodeNames
 E3d_SceneAppendAnimation
 E3d_SceneAddAnimation
 E3d_SceneRemoveAnimation


E3d_SceneDefault

Initialize a 3D Scene

Syntax
 void E3d_SceneDefault(E3dScene* LScene)
Argument
 E3dScene* LScene       Pointer to the Scene structure
Description
This function initializes the given E3dScene structure.

Return value
None.

See also
E3d_SceneAllocate, E3d_SceneFree

E3d_SceneAllocate

Allocate and initialize a 3D Scene

Syntax
 E3dScene* E3d_SceneAllocate(char* LName)
Argument
 char* LName        The name of the new Scene
Description
This function allocates memory for and initializes an E3dScene structure.

Return value
Pointer to the allocated E3dScene structure or NULL in case of an error.

See also
E3d_SceneFree

E3d_SceneAddNodeHrc

Add a Node-hierarchy to a Scene

Syntax
 EBool E3d_SceneAddNodeHrc(E3dScene* LScene, E3dNode* LRootNode)
Arguments
 E3dScene* LScene        Pointer to the Scene structure
 E3dNode*  LRootNode     Pointer to the Root node of the hierarchy
Description
Checks if the given hierarchy is in the given Scene. If not, adds it to the array: Scene->RootModels.

Return value
None.

See also
E3d_SceneRemoveNodeHrc

E3d_SceneRemoveNodeHrc

Remove Node-hierarchy from a Scene

Syntax
 EBool E3d_SceneRemoveNodeHrc(E3dScene* LScene, E3dNode* LRootNode)
Arguments
 E3dScene* LScene        Pointer to the Scene structure
 E3dNode*  LRootNode     Pointer to the Root of the hierarchy
Description
Checks if the given Hierarchy is in the Scene (it's in RootModels array of the Scene). If it is, it removes it from that array.

Return value
None.

See also
E3d_SceneAddNodeHrc

E3d_SceneMaterialClone

Clone a Material

Syntax
 E3dMaterial* E3d_SceneMaterialClone(E3dScene* LScene, E3dMaterial* LMaterial)
Arguments
 E3dMaterial* LMaterial     The Material to clone
 E3dScene*    LScene        Scene for unique Material names
Description
Creates a duplicate of the given Material. If the LScene argument is not NULL, this function makes sure that the name of the new Material will be unique among the Materials in that Scene. For example, if the name of LMaterial is "Iron" and LScene already has a Material called "Iron", the new Material will be called "Iron-1".

Return value
Pointer to the new Material, or NULL in case of an error.

See also
E3d_MaterialFree, E3d_MaterialDefault

E3d_SceneNodeHrcRead2DTextures

(Re)read 2DTexture images for a Model hierarchy

Syntax
 void E3d_SceneNodeHrcRead2DTextures(E3dScene* LScene, E3dNode* LNode, char* LPath, EBool LForceReRead, EBool LSetUpForDisplay)
Argument
 LRootModel      Pointer to the Root of the hierarchy
 EBool     LForceReRead    Re-read images if they are already loaded
Description
This function parses through the given hierarchy and (re)reads the texture images for all the 2DTextures on the Geometries.

Return value
None.

E3d_SceneGetSingleSelection

Find out what is selected in the given Scene and return it

Syntax
 int E3d_SceneGetSingleSelection(E3dScene* LScene, void* LSelectedItem, int LTarget)
Arguments
 LModelsRet      Pointer to the Scene structure
 void*     LSelectedItem   Selected Item to be returned
Description
This function parses the hierarchies in the given Scene and gets the first selected "Item". This can be anything from a Model, Geometry, PolyGroup, Polygon etc to an Edge or a Vertex.

Return value
The type of Item selected. E.g.: E3dITEM_POLYGROUP

E3d_SceneGetNodes

Collect selected Nodes in a Scene

Syntax
 int E3d_SceneGetNodes(E3dScene* LScene, E3dNode*** LNodesRet)
Arguments
 E3dScene*  LScene           Pointer to the Scene structure
 E3dNode*** LNodesRet        Pointer to the array of Node pointers to be returned
Description
This function parses the hierarchies in the given Scene and collects all the Nodes into a dynamically allocated array of pointers. This array has to be freed by the application after use. Example: LNumOfNodes = E3d_SceneGetNodes(E3d_Scene, &LNodes); Where LNodes is the type of E3dNode**

Example
LNumOfNodes = E3d_SceneGetNodes(E3d_Scene, &LNodes); Where LNodes is the type of E3dNode**

Return value
The number of E3dNode pointers in the array (the nuber of Nodes found).

E3d_SceneGetSelectedNodes

Collect selected Nodes in a Scene

Syntax
 int E3d_SceneGetSelectedNodes(E3dScene* LScene, E3dNode*** LNodesRet, unsigned int LSelectionTypes)
Arguments
 E3dScene*    LScene           Pointer to the Scene structure
 E3dNode***   LNodesRet        Pointer to the array of Node pointers to be returned
 LBranchesAsOne   Selected branches are returned as single selection
Description
This function parses the hierarchies in the given Scene and collects the selected Nodes into a dynamically allocated array of pointers. This array has to be freed by the application after use. Example: LNumOfNodes = E3d_SceneGetSelectedNodes(E3d_Scene, &LNodes, TRUE); Where LNodes is the type of E3dNode**

Example
LNumOfNodes = E3d_SceneGetSelectedNodes(E3d_Scene, &LNodes, TRUE); Where LNodes is the type of E3dNode**

Return value
The number of E3dNode pointers in the array (the nuber of selected Nodes found).

E3d_SceneGetGeometries

Collect Geometries in a Scene

Syntax
 int E3d_SceneGetGeometries(E3dScene* LScene, E3dGeometry*** LGeometriesRet, int LGeoType, unsigned int LFlags)
Arguments
 E3dScene*      LScene           Pointer to the Scene structure
 E3dGeometry*** LGeometriesRet   Pointer to the array of Geometry pointers to be returned
 LType            Type of the Geometry to look for, or E3dGEO_ANY
 unsigned int   LFlags           Flags, describing the operation
Description
This function parses the hierarchies in the given Scene and collects the Geometries into a dynamically allocated array of pointers. This array has to be freed by the application after use. This example collects all selected Meshes: LNumOfGeometries = E3d_SceneGetGeometries(E3d_Scene, &LGeometries, E3dITEM_MESH, E3dSELECTED); Where LGeometries is the type of E3dGeometry** This example collects all the Geometries, regardless of their type, or wheter they are selected or not: LNumOfGeometries = E3d_SceneGetGeometries(E3d_Scene, &LGeometries, E3dITEM_ANY, E3dSELECTED|E3dUNSELECTED);

Return value
The number of E3dGeometry pointers in the array (the number of matching Geometries found).

E3d_SceneGetSelectedGeometries

Collect selected Geometries in a Scene

Syntax
 int E3d_SceneGetSelectedGeometries(E3dScene* LScene, void* LGeometriesRet, int LGeoType)
Arguments
 E3dScene* LScene           Pointer to the Scene structure
 void*     LGeometriesRet   Pointer to the array of Model pointers to be returned
Description
This function parses the hierarchies in the given Scene and collects the selected Geometries into a dynamically allocated array of pointers. This array has to be freed by the application after use. This example collects all the selected Meshes: LNumOfGeometries = E3d_SceneGetSelectedGeometries(E3d_Scene, &LGeometries, E3dGEO_MESH); Where LGeometries is the type of E3dGeometry** This example collects all the selected Geometries, regardless of their type: LNumOfGeometries = E3d_SceneGetSelectedGeometries(E3d_Scene, &LGeometries, E3dGEO_ANY);

Return value
The number of E3dGeometry pointers in the array (the nuber of selected Geometries found).

E3d_SceneWalkGeometries

Walk through the Geometries of Models in a Scene and call a function

Syntax
 void E3d_SceneWalkGeometries(E3dScene* LScene, void (*LFunct)(E3dModel*, E3dGeometry*))
Arguments
 E3dScene* LScene   The Scene
 LFunct   The function to call with the current Model and Geometry
Description
Walk through the Geometries of Models in a Scene and calls LFunct.

Return value
None.

E3d_SceneCollectTransformPoints

Collect points of Geometries

Syntax
 E3dShapeSnapshot* E3d_SceneCollectTransformPoints(E3dScene* LScene, unsigned int* LNumOfShapeSnapshotsRet, EBool LAllPoints)
Arguments
 E3dScene*     LScene                   The Scene
 unsigned int* LNumOfShapeSnapshotsRet  Number of ShapeSnapshots collected
 EBool         LAllPoints               Return all points, or just tagged ones
Description
Collects points from the Scene into a list of 'ShapeSnapshots' for shape transforming.

Return value
Pointer to the E3dShapeSnapshot array, or NULL

E3d_SceneCollectNodeNames

Collect the names of all Models in a Scene into an array

Syntax
 int E3d_SceneCollectNodeNames(E3dScene* LScene, char*** LNamesRet)
Arguments
 E3dScene* LScene       Pointer to the Scene structure
 char***   LNamesRet    Pointer to the array of strings for the return value
Description
This function parses the hierarchies in the given Scene and collects the names of all Models into a dynamically allocated array of strings.

Return value
The number of items in the array (the nuber of Models found).

E3d_SceneAppendAnimation

Append an Animation to a Scene

Syntax
 EBool E3d_SceneAppendAnimation(E3dScene* LScene, E3dAnimation* LAnimation)
Arguments
 E3dScene*     LScene         Pointer to the Scene structure
 E3dAnimation* LAnimation     Pointer to the new Animation structure
Description
Checks if the given Animation is in the given Scene. If not, adds it to the array: Scene->Animations.

Return value
None.

See also
E3d_SceneRemoveAnimation

E3d_SceneAddAnimation

Allocate and append an Animation to a Scene

Syntax
 E3dAnimation* E3d_SceneAddAnimation(E3dScene* LScene, E3dAnimationClass* LClass)
Arguments
 E3dScene*          LScene         Pointer to the Scene structure
 LAnimation     Pointer to the new Animation structure
Description
Allocate an Animation of the given Class, initialize it and add it to the array: Scene->Animations.

Return value
None.

See also
E3d_SceneRemoveAnimation

E3d_SceneRemoveAnimation

Remove an Animation from a Scene

Syntax
 void E3d_SceneRemoveAnimation(E3dScene* LScene, E3dAnimation* LAnimation)
Arguments
 E3dScene*     LScene       Pointer to the Scene structure
 E3dAnimation* LAnimation   Pointer to the Root of the hierarchy
Description
Checks if the given hierarchy is in the Scene (it's in Animations array of the Scene). If it is, it removes it from that array.

Return value
None.

See also
E3d_SceneAddAnimationHrc