fastest 3D software for linux

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

Index

 E3dScene_GetSingleSelection
 E3dScene_GetNodes
 E3dScene_GetSelectedNodes
 E3dSpline_GetTransforms
 E3dScene_CollectTransformPoints
 E3dObject_CustomNew
 E3dScene_WalkObjects


E3dScene_GetSingleSelection

Get a single selection from the given Scene

Syntax
int E3dScene_GetSingleSelection(E3dScene* PScene, void* PSelectedItem, const int PTarget, const E3dItemFlags PFlags)

Arguments
E3dScene* PScene Pointer to the Scene structure void* PSelectedItem Selected Item to be returned const int PTarget Type of item to look for (E3dItemALL etc.) const E3dItemFlags PFlags Option flags OR-ed values of E3dVISIBLE and E3dHIDDEN
Description
Parses the hierarchies in the given Scene and gets the first selected object. This can be anything from a Model, Geometry, PolyGroup, Polygon etc. to an Edge or a Vertex. If PFlags is 0, or E3dVISIBLE|E3dHIDDEN, both visible and hidden objects may be returned. If it's E3dVISIBLE, only visible ones will pass and vice versa.

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

E3dScene_GetNodes

Collect selected Nodes in a Scene

Syntax
EIndex E3dScene_GetNodes(E3dScene* PScene, E3dNode*** PNodesRet, const EBool PAddReferences)

Arguments
E3dScene* PScene Pointer to the Scene structure E3dNode*** PNodesRet Pointer to the array of Node pointers to be returned const EBool PAddReferences Create references to the collected Nodes
Description
Parses the hierarchies in the given Scene and collects all the Nodes into a dynamically allocated array of pointers. If PAddReferences is TRUE, the Nodes will be reference-tracked in the array, so they won't be physically deleted elsewhere. In this case you should call ELst_ObjectsFree() on the array (vs ELst_PointersFree), or E_Delete on individual entries in the array. This array has to be freed by the application after use. Example: LNumOfNodes = E3dScene_GetNodes(MyScene, &LNodes, FALSE); Where LNodes is the type of E3dNode**

Example
LNumOfNodes = E3dScene_GetNodes(MyScene, &LNodes, FALSE); Where LNodes is the type of E3dNode**

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

E3dScene_GetSelectedNodes

Collect selected Nodes in a Scene

Syntax
EIndex E3dScene_GetSelectedNodes(E3dScene* PScene, E3dNode*** PNodesRet, EIndex* PNumOfNodesRet, const int PSelectionTypes, const EBool PAddReferences)

Arguments
E3dScene* PScene Pointer to the Scene structure E3dNode*** PNodesRet Pointer to the array of Node pointers to be returned. Must be non-NULL EIndex* PNumOfNodesRet Pointer to the number of entries in the array const int PSelectionTypes Type of selection to look for const EBool PAddReferences Create references to the collected Nodes
Description
Parses the hierarchies in the given Scene and collect the selected Nodes into a dynamically allocated array of pointers. This array has to be freed by the application after use. If PAddReferences is TRUE, the Nodes will be reference-tracked in the array, so they won't be physically deleted elsewhere. In this case you should call ELst_ObjectsFree() on the array (vs ELst_PointersFree), or E_Delete on individual entries in the array. If PNumOfNodesRet is not NULL, the PNodesRet/PNumOfNodesRet array will be cleared first. Examples: E3dScene_GetSelectedNodes(MyScene, &Global_NodeList, &Global_NodeCount, E3dNodeSelNODE, TRUE); E3dScene_GetSelectedNodes(MyScene, &LNodes, NULL, E3dNodeSelNODE, FALSE); Where LNodes is the type of E3dNode** and LNumOfNodes is type EIndex.

Example
E3dScene_GetSelectedNodes(MyScene, &Global_NodeList, &Global_NodeCount, E3dNodeSelNODE, TRUE); E3dScene_GetSelectedNodes(MyScene, &LNodes, NULL, E3dNodeSelNODE, FALSE); Where LNodes is the type of E3dNode** and LNumOfNodes is type EIndex.

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

E3dSpline_GetTransforms

Generate transform matrices along a Spline, given a set of U parameters

Syntax
int E3dSpline_GetTransforms(E3dSpline* PSpline, const E3dCoordinate* PMatrix, const E3dCoordinate* PUs, const EIndex PUs_Count, const uint8_t PNormalSource, const E3dCoord3* PNormal, E3dCoordinate** PMatrices, EIndex* PMatrices_CountAllocated, E3dCoord3** PPositionsP, E3dCoord3** PTangentsP, E3dCoord3** PNormalsP, E3dCoordinate** PAngleCosinesP)

Arguments
E3dSpline* PSpline The Spline. const E3dCoordinate* PMatrix Transform the points of the Spline by this Matrix before processing const E3dCoordinate* PUs Array of normalized U positions along the Spline (arc-length) or NULL. const EIndex PUs_Count Number of positions requested, or the constant E3dSplineAT_CVs const uint8_t PNormalSource How to get the curve normal vector: E3dSplineNormalAUTO, E3dSplineNormalCV or E3dSplineNormalFIXED const E3dCoord3* PNormal The fixed Normal, or NULL E3dCoordinate** PMatrices A 4x3 transformation Matrix will be returned here, for each position along PSpline. EIndex* PMatrices_CountAllocated Pointer to Matrix elements allocated in PMatrices. This allows for reusing memory between calls to this function. E3dCoord3** PPositionsP Return 3D positions along the Spline here, if not NULL. E3dCoord3** PTangentsP Return 3D tangent vectors along the Spline here, if not NULL. E3dCoord3** PNormalsP Return 3D normal vectors along the Spline here, if not NULL. E3dCoordinate** PAngleCosinesP Return the cosines of the angles between adjacent Spline segments.
Description
U values may be provided by the caller, to determine where the samples should be on the Spline. U = 0.0 and 1.0 correspond to the beginning and the end of the Spline.
If PUs_Count is a positive integer and PUs is not NULL, the U values in PUs will be used. If PUs_Count is E3dSplineAT_CVs, the transforms will be computed at the CVs of the Spline.
If PUs is NULL, the visual tesselation of the Spline (DrawSteps) is used.
If PMatrices, PPositionsP, PTangentsP or PNormalsP is NULL, or PUs_Count is E3dSplineAT_CVs, sufficient storage will be allocated. In this case, it's the caller's responsibility to free such storage.

Return value
E_SUCCESS, if successful, or an error code, such as E_NO_MEMORY.

E3dScene_CollectTransformPoints

Collect points of Geometries

Syntax
E3dShapeSnapshot** E3dScene_CollectTransformPoints(E3dScene* PScene, EIndex* PNumOfShapeSnapshotsRet, const EBool PAllPoints, const EBool PVisibleOnly)

Arguments
E3dScene* PScene The Scene EIndex* PNumOfShapeSnapshotsRet Number of ShapeSnapshots collected const EBool PAllPoints 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

E3dObject_CustomNew

Create an Object with a given type of ObjectComponent

Syntax
E3dObject* E3dObject_CustomNew(E3dScene* PScene, E3dNode* PParent, E3dModel* POrigModel, const char* PNewModelName, E3dObjectComponent* PComponentTemplate, const EUpdateFlags PUpdateFlags, const char PAddMode, const EBool PCreateUniqueName, E3dModel** PNewModelP)

Arguments
E3dScene* PScene Pointer to the Scene structure E3dModel* POrigModel Reference Model (see below) const char* PNewModelName Name of the new Model, or NULL for auto-generated name PInfoTemplate ObjectComponent to be used as a template const EUpdateFlags PUpdateFlags What to update on the new Object const char PAddMode How to add the new Object to the Scene
Description
Creates a new Object and adds it to the Scene, depending on PAddMode: - E3dNEW_INSTANCE : add Object to POrigModel. - E3dNEW_MODEL : create new Model with Object. If PParent is NULL, add the new Model to the parent of POrigModel after POrigModel, otherwise add it to PParent as the last child. - E3dNEW_HRC : create new Model with Object and add to the Scene. If PParent is NULL and POrigModel is NULL, PAddMode will be forced to E3dNEW_HRC. If PParent is not NULL, but POrigModel is NULL, PAddMode will be forced to E3dNEW_MODEL. It's important to note that PInfoTemplate is a template, used to intitialize the actual ObjectComponent that will be added to the new E3dObject. It will not be added to the new E3dObject.

Return value
None.

See also
E3dModel_CustomObjectNewInit, E3dModel_CustomObjectNewInit

E3dScene_WalkObjects

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

Syntax
void E3dScene_WalkObjects(E3dScene* PScene, void (*LFunct)(E3dModel*, E3dObject*, EPointer), EPointer PClientData)

Arguments
E3dScene* PScene The Scene LFunct The function to call with the current Model and Geometry
Description
Walk through the Objects of Models in a Scene and calls LFunct.

Return value
None.
© 1996-2022 By Gabor Nagy