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
 E3dScene_CollectTransformPoints
 E3dScene_WalkObjects
 E3dObject_CustomNew
 E3dSpline_GetTransforms

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
PScene Pointer to the Scene structure PSelectedItem Selected Item to be returned PTarget Type of item to look for (E3dItemALL etc.) 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, const EBool PAddReferences, E3dNodePtrListA* PNodes)

Arguments
PScene Pointer to the Scene structure PAddReferences Create references to the collected Nodes PNodes Pointer to the list for Node pointers to be returned
Description
Parses the hierarchies in a 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, const uint32_t PSelectionTypes, const EBool PAddReferences, E3dNodePtrListA* PNodes)

Arguments
PScene Pointer to the Scene structure PSelectionTypes Type of selection to look for PAddReferences Create references to the collected Nodes PNodes Pointer to the list of Node pointers to be returned. If NULL, only the count will be returned
Description
Parses the hierarchies in a Scene and collects 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 EList_ObjectsFreeA_s() on the array (vs EList_PointersFreeA_s()), or E_Delete on individual entries in the array. Examples: E3dScene_GetSelectedNodes(MyScene, E3dNodeSelNODE, TRUE, &Global_NodeList); E3dScene_GetSelectedNodes(MyScene, E3dNodeSelNODE, FALSE, &LNodes); Where LNodes is the type of E3dNode** and LNumOfNodes is type EIndex.

Example
E3dScene_GetSelectedNodes(MyScene, E3dNodeSelNODE, TRUE, &Global_NodeList); E3dScene_GetSelectedNodes(MyScene, E3dNodeSelNODE, FALSE, &LNodes); 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).

E3dScene_CollectTransformPoints

Collect points of Geometries

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

Arguments
PScene The Scene PNumOfShapeSnapshotsRet Number of ShapeSnapshots collected PAllPoints Return all points, or just tagged ones
Description
Collects points from the Scene into a list of 'ShapeSnapshots' for shape transforming. ShapeSnapshots allow for modifying Mesh Vertices, Spline CVs etc. with undo/redo support.

Return value
Pointer to the E3dShapeSnapshot array, or NULL

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
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.

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 uint16_t PAddMode, const EBool PCreateUniqueName, E3dModel** PNewModelP)

Arguments
PScene Pointer to the Scene structure POrigModel Reference Model (see below) PNewModelName Name of the new Model, or NULL for auto-generated name PInfoTemplate ObjectComponent to be used as a template PUpdateFlags What to update on the new Object 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

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
PSpline The Spline. PMatrix Transform the points of the Spline by this Matrix before processing PUs Array of normalized U positions along the Spline (arc-length) or NULL. PUs_Count Number of positions requested, or the constant E3dSplineAT_CVs PNormalSource How to get the curve normal vector: E3dSplineNormalAUTO, E3dSplineNormalCV or E3dSplineNormalFIXED PNormal The fixed Normal, or NULL PMatrices A 4x3 transformation Matrix will be returned here, for each position along PSpline. PMatrices_CountAllocated Pointer to Matrix elements allocated in PMatrices. This allows for reusing memory between calls to this function. PPositionsP Return 3D positions along the Spline here, if not NULL. PTangentsP Return 3D tangent vectors along the Spline here, if not NULL. PNormalsP Return 3D normal vectors along the Spline here, if not NULL. 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.
© 1996-2024 By Gabor Nagy