fastest 3D software for linux

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

Index

 E3dVertexGeometry_VertexAttributeDelByIndex
 E3dVertexAttribute_Add
 E3dVertexGeometry_VertexAttributeAdd
 E3dMesh_VertexAttributeDel
 E3dVertices_New
 E3dVertices_Add
 E3dMesh_VerticesFree
 E3dMesh_FilterVertices
 E3dMesh_VerticesRemap
 E3dMesh_VertexGetConnectedVertices
 E3dMesh_VertexGetEdges
 E3dMesh_GetVertexUsageList
 E3d_EdgesNew
 E3dMesh_EdgesNew
 E3dMesh_EdgesAdd
 E3dMesh_EdgesFree
 E3dMesh_EdgesSorted
 E3d_EdgesSort
 E3dMesh_EdgesSort
 E3dMesh_CreateWingedEdgesFromEdges
 E3dMesh_CreateEdgesFromPolygons
 E3dMesh_GetEdgeNormals
 E3dMesh_EdgeGetPolygons
 E3dMesh_NumOfSelectedEdges
 E3dMesh_NumOfVisibleEdges
 E3dMesh_EdgeFlagsUpdate
 E3dMesh_PolyGroupsEdgesFromMeshEdges
 E3dMesh_AppendPolyGroup
 E3dMesh_PolyGroupAdd
 E3dMesh_PolyGroupDel
 E3dMesh_ChangePolygonFlags
 E3dMesh_PolyGroupAddTriangleStrip
 E3dMesh_PolyGroupAddTriangleStrips
 E3dMesh_RecomputePolygonNormals
 E3dMesh_RecomputeNormals
 E3dMesh_EdgesAndPolyGroupsRemapVertexIndices
 E3dMesh_NumOfSelectedPolygons
 E3dMesh_GetBoundingBox
 E3dMesh_GetTransformedBoundingBox
 E3dMesh_FreeCaches


E3dVertexGeometry_VertexAttributeDelByIndex

Remove a component from the Vertices of a Mesh's Vertices

Syntax
int E3dVertexGeometry_VertexAttributeDelByIndex(E3dVertexGeometry* PVertexGeometry, const EIndex PIndex)

Arguments
PMesh Pointer to the Mesh const EIndex PIndex Index of the attribute
Description
Removes a vertex attribute, such as deformer weights, from a Mesh.


Return value
E_SUCCESS if all went well, or an error code

See also
E3dMesh_VertexAttributeAdd, Return, value, E_SUCCESS, if, all, went, well, or, an, error, code

E3dVertexAttribute_Add

Add a Vertex attribute to a list

Syntax
int E3dVertexAttribute_Add(EResourceList* PList, const char* PSemantic, const char* PName, const uint16_t PType, const EIndex PCount, EResource** PVARet)

Arguments
EResourceList* PList Pointer to the list const char* PSemantic The semantic (meaning) string of the new attribute const char* PName The name of this attribute (there may be multiple attributes with the same semantic, but a different name) const uint16_t PType The type of the values. E.g. EResFLOAT32 const EIndex PCount Number of values in this attribute. E.g. 4 float values (PType = EResFLOAT32 and PCount = 4) EResource** PVARet Pointer to return the new attribute
Description
Adds a vertex attribute, such as deformer weight. The most common use is adding a vertex attribute to a Mesh. For example: E3dVertexAttribute_Add(&LMesh->VertexAttributes, _WeightSemanticString, EResFLOAT32, "CustomDeformerWeight"); PSemantic is not copied (to allow for pointing to constant strings), so caller should not free it. PName is copied.

Return value
E_SUCCESS if successful, E_NOTHING_TO_DO if the VertexAttribute already exists

See also
E3dMesh_VertexAttributeAdd

E3dVertexGeometry_VertexAttributeAdd

Add a new attribute to the VertexNodes of a PolyGroup's primitives

Syntax
int E3dVertexGeometry_VertexAttributeAdd(E3dVertexGeometry* PVertexGeometry, const char* PSemantic, const char* PName, const uint16_t PType, const EIndex PCount, EResource** PAttrRet)

Arguments
PMesh Pointer to the Mesh const char* PSemantic The semantic (meaning) string of the new attribute const char* PName The name of this attribute (there may be multiple attributes with the same semantic, but a different name) const uint16_t PType The type of the values. E.g. EResFLOAT32 const EIndex PCount Number of values in this attribute. E.g. 4 float values (PType = EResFLOAT32 and PCount = 4) EResource** PAttrRet If not NULL, return a pointer to the new attribute here
Description
Adds a vertex attribute, such as normals, or texture coordinates, to a PolyGroup.
PIndex = -1 means: do not check whether this component already exists.
PSemantic is a string, such as E3dVtxAttribute_Normal, E3dVtxAttribute_Color, E3dVtxAttribute_ST etc.

Return value
E_SUCCESS if all went well, or an error code

See also
E3dVertexAttribute_Add, E3dMes_VertexAttributeDel, Return, value, E_SUCCESS, if, all, went, well, or, an, error, code

E3dMesh_VertexAttributeDel

Remove a component from the Vertices of a Mesh's Vertices

Syntax
int E3dMesh_VertexAttributeDel(E3dMesh* PMesh, const char* PSemantic, const EIndex PIndex)

Arguments
E3dMesh* PMesh Pointer to the Mesh const char* PSemantic The semantic string of the new attribute const EIndex PIndex Index of the new attribute. Only applies to texture coordinates (ST 0, 1 ...)
Description
Removes a vertex attribute, such as deformer weights, from a Mesh.


Return value
E_SUCCESS if all went well, or an error code

See also
E3dMesh_VertexAttributeAdd, Return, value, E_SUCCESS, if, all, went, well, or, an, error, code

E3dVertices_New

Allocate memory for an array of Vertices

Syntax
E3dVertex* E3dVertices_New(const E3dVertexSize PVertexSize, const EIndex PNVertices, const EBool PInitialize)

Arguments
PNumOfVertices Number of Vertices to allocate const E3dVertexSize PVertexSize The size of a Vertex in bytes const EBool PInitialize If TRUE, initialize the Vertex Flags via E3dM_VertexInit
Description
Allocates memory for the specified number of Vertices.

Return value
A pointer to the allocated array, or NULL in case of an error.

See also
E3dMesh_VerticesFree, E3dVertices_Free

E3dVertices_Add

Add Vertices to an array

Syntax
E3dVertex* E3dVertices_Add(E3dVertex* PVertices, const E3dVertexSize PVertexSize, const EIndex POldNumOfVertices, EIndex PNumOfNewVertices, const EBool PInitialize)

Arguments
E3dVertex* PVertices Pointer to the array const EIndex POldNumOfVertices Number of Vertices already in the array EIndex PNumOfNewVertices Number of Vertices to add const EBool PInitialize Initialize the Vertex array
Description
Allocates memory for the specified number of Vertices.

Return value
A pointer to the allocated array, or NULL in case of an error.

See also
E3dMesh_VerticesFree

E3dMesh_VerticesFree

Free Vertices of a Mesh

Syntax
void E3dMesh_VerticesFree(E3dMesh* PMesh)

Argument
E3dMesh* PMesh Pointer to the Mesh
Description
Frees the Vertex array of a Mesh.

Return value
None.

E3dMesh_FilterVertices

Mark Vertices of a Mesh that pass the given filter criteria

Syntax
EIndex E3dMesh_FilterVertices(const E3dMesh* PMesh, const unsigned int PWhatToInclude)

Argument
const E3dMesh* PMesh Pointer to the Mesh structure const unsigned int PWhatToInclude The filter criteria (OR-ed together bits)
Description
Examines the given Mesh and marks the Vertices that pass z given filter criteria, by setting their E3dVtxMARK0 flag. PWhatToInclude flags: E3dBB_SELECTED_GEOMETRY E3dBB_SHADOW_CASTERS E3dBB_SHADOW_RECEIVERS E3dBB_ALL

Example
E3dMesh_FilterVertices(PMesh, E3dBB_SELECTED_POLYGROUPS);
This will mark the Vertices PASSED, that are referenced from the selected PolyGroups of the Mesh. For improved efficiency, if all the Vertices pass, no Vertex flags are set, but the returned value will be equal to PMesh->Vertices_Count.

Return value
The number of Vertices that passed the test.

See also
E3dMesh_GetBoundingBox

E3dMesh_VerticesRemap

Add / remove or reorder Mesh Vertices

Syntax
void E3dMesh_VerticesRemap(E3dMesh* PMesh, const EIndex* PNewToOldVertexTable, const EIndex PNumOfVertices)

Arguments
E3dMesh* PMesh Pointer to the Mesh const EIndex* PNewToOldVertexTable Indices to the original Vertex for each new Vertex const EIndex PNumOfVertices The new number of Vertices
Description
Copies the Vertex list of a Mesh to a new one, based on a remapping table (potentially doing one-to-many mapping).
This function should be used to add or remove Vertices from a Mesh, so those changes are propagated to the Mesh's runtime-typed components.
PNewToOldVertexTable should have PNumOfVertices entries. One for each Vertex in the new Vertex list.
The values should be indices to the original Vertex to be copied to a given new Vertex.
PNumOfVertices may be less than PMesh->Vertices_Count (removing Vertices), greater (adding / duplicating Vertices) or equal (reordering).
More than one new Vertex may be derived from each original Vertex.
An index value of -1 means that no original Vertex will be copied to the corresponding new Vertex.
It is the caller's responsibility to properly initialize such new Vertices.

Return value
None.

See also
E3dMesh_EdgesAndPolyGroupsRemapVertexIndices

E3dMesh_VertexGetConnectedVertices

Collect Vertices that a Vertex is connected to via Edges

Syntax
EIndex E3dMesh_VertexGetConnectedVertices(const E3dMesh* PMesh, const EIndex PVertexIndex, EIndex** PVertexIndicesP)

Arguments
const E3dMesh* PMesh Pointer to the Mesh const EIndex PVertexIndex Index of the Vertex in question EIndex** PVertexIndicesP The list of Vertex indices will be returned here
Description
Collects a list of Edges in a Mesh that share a given Vertex.

Return value
The number of Edges that share the given Vertex

E3dMesh_VertexGetEdges

Collect Edges that share a Vertex

Syntax
EIndex E3dMesh_VertexGetEdges(const E3dMesh* PMesh, const EIndex PVertexIndex, E3dEdge*** PEdgesPtr)

Arguments
const E3dMesh* PMesh Pointer to the Mesh const EIndex PVertexIndex Index of the Vertex in question E3dEdge*** PEdgesPtr The list of Edges will be returned here
Description
Collects a list of Edges in a Mesh that share a given Vertex.

Return value
The number of Edges that share the given Vertex

E3dMesh_GetVertexUsageList

Collect information on which Polygon VertexNodes use each Vertex of the given Mesh.

Syntax
E3dVertexUsage* E3dMesh_GetVertexUsageList(E3dMesh* PMesh, const EBool PGetPolyGroups, const EBool PGetEdges)

Arguments
E3dMesh* PMesh Pointer to the Mesh const EBool PGetPolyGroups Fill in PolyGroups fields const EBool PGetEdges Fill in EdgeEnds fields
Description
Builds array of E3dVertexUsage structs for PMesh (one entry per Mesh Vertex). Each entry will show: - Which Polygon VertexNodes use that Vertex. If PGetPolyGroups is TRUE, it will also show which PolyGroups those Polygons belong to. - The other end (Vertex) of each Edge that connects to this Vertex. See the definition of E3dVertexUsage for more details.

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

E3d_EdgesNew

Allocate array of independent Edges (line segments)

Syntax
E3dEdge* E3d_EdgesNew(const EIndex PEdgeNum)

Argument
const EIndex PEdgeNum Number of Edges to allocate
Description
Allocates memory for an array of Edges and initializes all the Edges.

Return value
Pointer to the array of Edges or NULL in case of an error.

E3dMesh_EdgesNew

Allocate array of independent Edges (line segments)

Syntax
E3dEdge* E3dMesh_EdgesNew(E3dMesh* PMesh, const EIndex PCount, const EBool PInitialize)

Argument
E3dMesh* PMesh Pointer to the Mesh Count Number of Edges to allocate
Description
Reallocates the Edge array of PMesh and initializes all the Edges.

Return value
Pointer to the array of Edges or NULL in case of an error.

E3dMesh_EdgesAdd

Add Edges to a Mesh

Syntax
E3dEdge* E3dMesh_EdgesAdd(E3dMesh* PMesh, const EIndex PCount, const EBool PInitialize)

Arguments
E3dMesh* PMesh Pointer to the Mesh const EIndex PCount The number of Edges to add const EBool PInitialize If TRUE, initialize the new Edges
Description
Adds the given number of Edges to PMesh.

Return value
Pointer to the first newly added Edge.

E3dMesh_EdgesFree

Free Edges of a Mesh

Syntax
void E3dMesh_EdgesFree(E3dMesh* PMesh)

Argument
E3dMesh* PMesh Pointer to the Mesh
Description
Frees the VertexUsageList, VertexLinks, WingedEdges, PolyGroup Edge index lists, and finally the Edge array of a Mesh.

Return value
None.

E3dMesh_EdgesSorted

Check if the Edges of a Mesh are sorted

Syntax
int E3dMesh_EdgesSorted(E3dMesh* PMesh)

Argument
E3dMesh* PMesh The Mesh
Description
Check if the Edges of a Mesh are sorted by Start and End Vertex index.

Return value
E_YES if the Edges are sorted. E_NO, if the Edges are not sorted. E_CORRUPT_DATA if one or more Edges have Start > End. E_NO_DATA if the Mesh has no Edges.

E3d_EdgesSort

Sort a list of Edges

Syntax
int E3d_EdgesSort(E3dEdge* PEdges, const EIndex PCount)

Argument
E3dEdge* PEdges The array of Edges const EIndex PCount Number of Edges in the array
Description
Ensures that the "Start" field of each Edge is lower than the "End" field, then sorts the Edges in ascending order, by their "Start" field. This allows for much more efficient Edge manipulation, faster lookups etc.

Return value
E_SUCCESS if successful, E_NO_DATA if the array is empty and E_CORRUPT_DATA, if one or more of the Edges have Start == End

E3dMesh_EdgesSort

Sort Edges of a Mesh

Syntax
int E3dMesh_EdgesSort(E3dMesh* PMesh, const EBool PCheckIfSorted)

Argument
E3dMesh* PMesh The Mesh const EBool PCheckIfSorted If TRUE, check if the Edges are already properly sorted
Description
- For each Edge, ensures that the Start Vertex index is < End. - Sorts Edges by Start first, then by End. If PMesh has more than one PolyGroup, this function must be called before calling E3dMesh_PolyGroupsEdgesFromMeshEdges(). Otherwise the PolyGroup Edge indices will be wrong!

Return value
E_SUCCESS if the operation was successful. E_NO_DATA if the Mesh has no Edges E_NOTHING_TO_DO if PCheckIfSorted was TRUE and the Edges are already sorted.

E3dMesh_CreateWingedEdgesFromEdges

Create WingedEdge list and VertexLinks for the given Mesh from its Edge list

Syntax
void E3dMesh_CreateWingedEdgesFromEdges(E3dMesh* PMesh, const EBool PKeepVertexLinks, const EBool PRepair)

Arguments
E3dMesh* PMesh Pointer to the Mesh const EBool PKeepVertexLinks Keep Mesh->VertexLinks data const EBool PRepair Add missing Edges, if any
Description
Builds WidgedEdges data for a Mesh, from the Edges array. Unlike E3dMesh_CreateEdgesFromPolygons, this function leaves the Mesh's Edges intact, so Edge selection etc. information will be preserved. This function is also responsible for adding Edge index information to Polygon VertexNodes in the PolyGroups of the Mesh, so you need to call it, if you need that info.

Return value
None.

E3dMesh_CreateEdgesFromPolygons

Create Edge list for the given Mesh from its Polygon and Triangle strip data

Syntax
void E3dMesh_CreateEdgesFromPolygons(E3dMesh* PMesh, E3dPolyGroup* PJustThisPolyGroup, const EBool PUpdateWingedEdges, const EBool PKeepVertexLinks)

Arguments
E3dMesh* PMesh Pointer to the Mesh E3dPolyGroup* PJustThisPolyGroup If not NULL, only consider the Polygons of this PolyGroup const EBool PUpdateWingedEdges Build WingedEdges as well const EBool PKeepVertexLinks Keep VertexUsage information after completion
Description
Generates Mesh and PolyGroup Edge information from the Polygon data on a Mesh.

Return value
None.

See also
E3dMesh_PolyGroupsEdgesFromMeshEdges

E3dMesh_GetEdgeNormals

Generate normals for the Edges of a Mesh

Syntax
E3dCoord3Sum* E3dMesh_GetEdgeNormals(const E3dMesh* PMesh)

Argument
const E3dMesh* PMesh Pointer to the Mesh
Description
Generates normal vectors for the Edges of a Mesh. The Mesh must have up-to-date WingedEdges.

Return value
Pointer to the normal vectors (one for each Edge), as an array of E3dCoord3Sum structs, or NULL, in case of an error.

See also
E3dMesh_CreateWingedEdgesFromEdges

E3dMesh_EdgeGetPolygons

Collect Polygons that share an Edge

Syntax
EIndex E3dMesh_EdgeGetPolygons(const E3dMesh* PMesh, const E3dEdge* PEdge, E3dEdgePolygonInfo** PDescriptorsP, unsigned int* PDescriptionP)

Arguments
const E3dMesh* PMesh Pointer to the Mesh const E3dEdge* PEdge The Edge to be tested E3dEdgePolygonInfo** PDescriptorsP Results pointer unsigned int* PDescriptionP Flags, providing some details
Description
Description Collects the Polygons that share an Edge within a Mesh. If successful, it will return an array of E3dEdgePolygonInfo structs. If PEdge is part of a Polygon's hole contour, the flag E3dPolyEDGE_IS_IN_HOLE_CONTOUR will be set in PDescriptionP.

Return value
The number of Polygons that share PEdge

E3dMesh_NumOfSelectedEdges

Count selected Edges in a Mesh

Syntax
EIndex E3dMesh_NumOfSelectedEdges(const E3dMesh* PMesh)

Argument
const E3dMesh* PMesh Pointer to the E3dMesh structure
Description
Returns the number of selected Edges in the given Mesh.

Return value
The number of selected Edges.

E3dMesh_NumOfVisibleEdges

Count visible Edges in a Mesh

Syntax
EIndex E3dMesh_NumOfVisibleEdges(const E3dMesh* PMesh)

Argument
const E3dMesh* PMesh Pointer to the E3dMesh structure
Description
Returns the number of visible Edges in the given Mesh.

Return value
The number of visible Edges.

E3dMesh_EdgeFlagsUpdate

Update a Mesh after Edge parameters change

Syntax
void E3dMesh_EdgeFlagsUpdate(E3dMesh* PMesh)

Argument
E3dMesh* PMesh Pointer to the Mesh
Description
This function must be called after changing the E3dSELECTED_EDGES, E3dACTIVE_EDGES and E3dHARD_EDGES flags, or the Hardness value of a Mesh's Edges. Otherwise, the changes will not be visible. This is because of performance optimiziations. If a Mesh has none of those flags set and all its Edge Hardness values are 0.0: - its wireframe can be drawn much faster, in a single OpenGL call - the Edge flags don't need to be saved, potentially resulting in significan file size reduction, with large Meshes

Return value
None.

E3dMesh_PolyGroupsEdgesFromMeshEdges

Create PolyGroup Edges for PMesh's PolyGroups (if there's more than 1 PolyGroup)

Syntax
int E3dMesh_PolyGroupsEdgesFromMeshEdges(E3dMesh* PMesh, const EBool PKeepEdgeCaches, const EBool PRepair)

Arguments
E3dMesh* PMesh Pointer to the Mesh const EBool PKeepEdgeCaches If TRUE, WingedEdges and VertexLinks won't be freed const EBool PRepair Add missing Edges, if any
Description
If PMesh has more than 1 PolyGroup, it creates PolyGroup Edge lists from the Edge list of the Mesh.

Return value
None.

E3dMesh_AppendPolyGroup

Append an existing PolyGroup to a Mesh

Syntax
int E3dMesh_AppendPolyGroup(E3dMesh* PMesh, E3dPolyGroup* PPolyGroup)

Arguments
E3dMesh* PMesh Pointer to the Mesh E3dPolyGroup* PPolyGroup Pointer to the PolyGroup
Description
Adds an existing PolyGroup to PMesh.

Return value
E_SUCCESS on success, or E_ALREADY_EXISTS, if PPolyGroup is already on PMesh.

E3dMesh_PolyGroupAdd

Allocate a new PolygGroup and add it to a Mesh

Syntax
E3dPolyGroup* E3dMesh_PolyGroupAdd(E3dMesh* PMesh)

Arguments
E3dMesh* PMesh Pointer to the Mesh
Description
Creates a new PolyGroup and adds it to PMesh.

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

E3dMesh_PolyGroupDel

Remove a PolyGroup from a Mesh and free it

Syntax
int E3dMesh_PolyGroupDel(E3dMesh* PMesh, E3dPolyGroup* PPolyGroup)

Arguments
E3dMesh* PMesh Pointer to the Mesh E3dPolyGroup* PPolyGroup Pointer to the PolyGroup
Description
Removes the given PolyGroup from the given Mesh's dynamically allocated PolyGroups array and frees all memory assiciated with the PolyGroup.

Return value
E_SUCCESS on success, or E_NOT_FOUND, if PPolyGroup is not on PMesh.

E3dMesh_ChangePolygonFlags

Change flags on Polygons of a Mesh

Syntax
void E3dMesh_ChangePolygonFlags(E3dMesh* PMesh, const E3dPolygonFlags PFlags, const int PAction)

Arguments
E3dMesh* PMesh Pointer to the Mesh const E3dPolygonFlags PFlags The flags to change const int PAction The action to take: E_SET, E_CLEAR or E_COPY
Description
Set, clear, or copy the flags given in PFlags in the Flags field of each Polygon of each PolyGroup in PMesh.

Return value
None.

E3dMesh_PolyGroupAddTriangleStrip

Add a TriangleStrip to a Mesh

Syntax
E3dTriangleStrip* E3dMesh_PolyGroupAddTriangleStrip(E3dMesh* PMesh, E3dPolyGroup* PPolyGroup)

Arguments
E3dMesh* PMesh Pointer to the E3dMesh E3dPolyGroup* PPolyGroup The PolyGroup to which the strip will be added
Description
Allocates space for and initializes a new TriangleStrip in the given Mesh and PolyGroup.

Return value
A pointer to the new strip or NULL, if unsuccessful.

See also
E3d_TriangleStripsAllocate, E3dMesh_PolyGroupAddTriangleStrips

E3dMesh_PolyGroupAddTriangleStrips

Add TriangleStrips to a Mesh

Syntax
E3dTriangleStrip* E3dMesh_PolyGroupAddTriangleStrips(E3dMesh* PMesh, E3dPolyGroup* PPolyGroup, EIndex PNumOfNewStrips)

Arguments
E3dMesh* PMesh Pointer to the Mesh E3dPolyGroup* PPolyGroup The PolyGroup to which the strip will be added EIndex PNumOfNewStrips Number of triangle strips to add
Description
Allocates space for and initializes the specified number of TriangleStrips in the given Mesh and PolyGroup.

Return value
A pointer to the new strips or NULL, if unsuccessful.

See also
E3d_TriangleStripsAllocate, E3dMesh_PolyGroupAddTriangleStrip

E3dMesh_RecomputePolygonNormals

Recalculate Polygon normals of a Mesh

Syntax
void E3dMesh_RecomputePolygonNormals(E3dMesh* PMesh)

Arguments
E3dMesh* PMesh Pointer to the Mesh
Description
Recomputes the normals of the Polygons of all PolyGroups in PMesh.

Return value
None.

E3dMesh_RecomputeNormals

Recompute Polygon and Vertex normals of a Mesh

Syntax
void E3dMesh_RecomputeNormals(E3dMesh* PMesh, const EBool PRefreshPolygonNormals)

Arguments
E3dMesh* PMesh Pointer to the Mesh
Description
Recomputes the vertex normals of the Polygons of all PolyGroups in PMesh. If PRefreshPolygonNormals is TRUE, the Polygon normals will be recomputed first.

Return value
None.

E3dMesh_EdgesAndPolyGroupsRemapVertexIndices

Re-map Vertex indices of Edges and Polygons in a Mesh, according to a table

Syntax
void E3dMesh_EdgesAndPolyGroupsRemapVertexIndices(E3dMesh* PMesh, const EIndex* POldToNewVertexTable)

Arguments
E3dMesh* PMesh Pointer to the Mesh const EIndex* POldToNewVertexTable Indices to the original Vertex for each new Vertex
Description
Adjusts the Vertex indices of each VertexNode on the PolyGroups of a Mesh, based on a remapping table.
This function is usually used in conjunction with E3dMesh_VerticesRemap.
Note that, as the name indicates, the remapping table for this function is the opposite of the one passed to E3dMesh_VerticesRemap.
POldToNewVertexTable tells, for each original Vertex, which new Vertex it should be replaced with.
This function does not modify the Vertex array of PMesh, so it does not require a number of Vertices argument.

Return value
None.

See also
E3dMesh_VerticesRemap

E3dMesh_NumOfSelectedPolygons

Count selected Polygons in a Mesh

Syntax
EIndex E3dMesh_NumOfSelectedPolygons(const E3dMesh* PMesh)

Argument
Mesh Pointer to the E3dMes structure
Description
Returns the number of selected Polygons in the given Mesh.

Return value
The number of selected Polygons.

E3dMesh_GetBoundingBox

Get the local bounding box of a Mesh

Syntax
EBool E3dMesh_GetBoundingBox(const E3dMesh* PMesh, const unsigned int PWhatToInclude, E3dCoord3* PBBMin, E3dCoord3* PBBMax)

Argument
const E3dMesh* PMesh Pointer to the Mesh structure const unsigned int PWhatToInclude OR-ed flags E3dCoord3* PBBMin Returned bounding box point 0 E3dCoord3* PBBMax Returned bounding box point 1
Description
This function returns the minimum and maximum XYZ values of the bounding box of the given Mesh.

Return value
TRUE if successful, FALSE in case of an error.

See also
E3dMesh_GetTransformedBoundingBox

E3dMesh_GetTransformedBoundingBox

Get the bounding box of a Mesh aligned to an arbitrary coordinate system

Syntax
EBool E3dMesh_GetTransformedBoundingBox(const E3dMesh* PMesh, const E3dMatrix PMatrix, const unsigned int PWhatToInclude, E3dCoord3* PBBMin, E3dCoord3* PBBMax)

Argument
const E3dMesh* PMesh Pointer to the Mesh structure const E3dMatrix PMatrix The Matrix that defines the coordinate system E3dCoord3* PBBMin Returned bounding box point 0 E3dCoord3* PBBMax Returned bounding box point 1
Description
This function transforms each Vertex of the given Mesh with the given Matrix and returns the minimum and maximum XYZ values of the resulting bounding box.

Example
E3dMesh_GetTransformedBoundingBox(PMesh, LModel->LocalToWorldMatrix, PBBMin, PBBMax);
This will return the "world-aligned" bounding box of the PMesh (assuming that PMesh is a Geometry of LModel).

Return value
TRUE if successful, FALSE in case of an error.

See also
E3dMesh_GetBoundingBox

E3dMesh_FreeCaches

Free VertexUsageList etc. of a Mesh

Syntax
void E3dMesh_FreeCaches(E3dMesh* PMesh)

Argument
E3dMesh* PMesh Pointer to the Mesh
Description
Frees the render data, VertexUsageList, VertexLinks, WingedEdges and PolyGroup Edge lists of a Mesh. These caches can greatly accelerate operations on a Mesh, but they use memory and cost time to build, so they are only rebuilt as needed. This function must be called after changes to a Mesh (except when only changing Vertex positions etc.), to ensure that these data caches are valid. Trying to operate on a Mesh with invalid cached data, may cause crashes (e.g. a WidgedEdge may try to access a no longer existing PolyGroup).

Return value
None.
© 1996-2022 By Gabor Nagy