![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
![]()
|
IndexE3d_VerticesAllocate E3d_VerticesAdd E3d_MeshAddTriangleStrip E3d_MeshAddTriangleStrips E3d_MeshRemovePolyGroup E3d_MeshRemoveAndFreePolyGroup E3d_MeshDefault E3d_MeshAllocate E3d_MeshClone E3d_MeshFilterVertices E3d_MeshGetBoundingBox E3d_MeshGetTransformedBoundingBox E3d_MeshVertexGetConnectedVertices E3d_MeshVertexGetEdges E3d_MeshEdgeGetPolygons E3d_MeshUpdateForDisplay E3d_VerticesAllocateAllocate memory for an array of VerticesSyntax E3dVertex* E3d_VerticesAllocate(unsigned int LNumOfVertices, EBool LInitialize)Arguments unsigned int LNumOfVertices Number of Vertices to allocate EBool LInitialize Initialize the Vertex arrayDescription 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 E3d_MeshFreeVertices E3d_VerticesAddAdd new Vertices to an arraySyntax E3dVertex* E3d_VerticesAdd(E3dVertex* LOldVertices, unsigned int LNumOfOldVertices, unsigned int LNumOfNewVertices, EBool LInitialize)Arguments unsigned int LNumOfOldVertices Number of Vertices already in the array unsigned int LNumOfNewVertices Number of Vertices to add EBool LInitialize Initialize the Vertex arrayDescription 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 E3d_MeshFreeVertices E3d_MeshAddTriangleStripAdd a TriangleStrip to a MeshSyntax E3dTriangleStrip* E3d_MeshAddTriangleStrip(E3dMesh* LMesh, E3dPolyGroup* LPolyGroup)Arguments E3dMesh* LMesh Pointer to the E3dMesh E3dPolyGroup* LPolyGroup The PolyGroup to which the strip will be addedDescription 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, E3d_MeshAddTriangleStrips E3d_MeshAddTriangleStripsAdd TriangleStrips to a MeshSyntax E3dTriangleStrip* E3d_MeshAddTriangleStrips(E3dMesh* LMesh, E3dPolyGroup* LPolyGroup,
unsigned int LNumOfStrips)
ArgumentsE3dMesh* LMesh Pointer to the Mesh E3dPolyGroup* LPolyGroup The PolyGroup to which the strip will be added unsigned int LNumOfStrips Number of triangle strips to addDescription 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, E3d_MeshAddTriangleStrip E3d_MeshRemovePolyGroupRemove a PolyGroup from a MeshSyntax void E3d_MeshRemovePolyGroup(E3dMesh* LMesh, E3dPolyGroup* LPolyGroup)Arguments E3dMesh* LMesh Pointer to the Mesh E3dPolyGroup* LPolyGroup Pointer to the PolyGroupDescription Removes the given PolyGroup from the given Mesh's dynamically allocated PolyGroups array. Return value None. E3d_MeshRemoveAndFreePolyGroupRemove a PolyGroup from a Mesh and free itSyntax void E3d_MeshRemoveAndFreePolyGroup(E3dMesh* LMesh, E3dPolyGroup* LPolyGroup)Arguments E3dMesh* LMesh Pointer to the Mesh E3dPolyGroup* LPolyGroup Pointer to the PolyGroupDescription Removes the given PolyGroup from the given Mesh's dynamically allocated PolyGroups array and frees all memory assiciated with the PolyGroup. Return value None. E3d_MeshDefaultInitialize a MeshSyntax void E3d_MeshDefault(E3dMesh* LMesh)Argument E3dMesh* LMesh Pointer to the MeshDescription Initializes a Mesh structure. Return value None. See also E3d_MeshAllocate, E3d_MeshFree E3d_MeshAllocateAllocate memory for and initialize a MeshSyntax E3dMesh* E3d_MeshAllocate(void)Arguments None. Description Allocates memory for a new Mesh structure and initializes it. Return value A pointer to the new Mesh or NULL if unsuccessful. See also E3d_GeometryFree E3d_MeshCloneClone a MeshSyntax E3dMesh* E3d_MeshClone(E3dMesh* LMesh, int LFlags)Argument E3dMesh* LMesh Pointer to the Mesh structure to be cloned int LFlags Flags determining what to clone / shareDescription This function creates and exact copy of the given Mesh. If LFlags has the flag E3dCLONE_MATERIALS set, all the Materials of the PolyGroups will be cloned as well, otherwise the Materials will be shared between the original Mesh and the clone. Return value Pointer to the new Mesh structure, or NULL in case of an error See also E3d_MeshAllocate, E3d_MeshFree E3d_MeshFilterVerticesMark Vertices of a Mesh that pass the given filter criteriaSyntax unsigned int E3d_MeshFilterVertices(E3dMesh* LMesh, unsigned int LWhatToInclude)Argument E3dMesh* LMesh Pointer to the Mesh structure unsigned int LWhatToInclude The filter criteria (OR-ed together bits)Description This function examines the given Mesh and marks the Vertices that pass the given filter criteria by setting their E3dVTX_PASSED flag. Example E3d_MeshFilterVertices(LMesh, E3dBB_SELECTED_POLYGROUPS); < BR> 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 LMesh->NumOfVertices. Return value The number of Vertices that passed the test. See also E3d_MeshGetBoundingBox E3d_MeshGetBoundingBoxGet the local bounding box of a MeshSyntax EBool E3d_MeshGetBoundingBox(E3dMesh* LMesh,
E3d3DPosition* LBBMin, E3d3DPosition* LBBMax,
unsigned int LWhatToInclude)
ArgumentE3dMesh* LMesh Pointer to the Mesh structure E3d3DPosition* LBBMin Returned bounding box point 0 E3d3DPosition* LBBMax Returned bounding box point 1Description 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 E3d_MeshGetTransformedBoundingBox E3d_MeshGetTransformedBoundingBoxGet the bounding box of a Mesh aligned to an arbitrary coordinate systemSyntax EBool E3d_MeshGetTransformedBoundingBox(E3dMesh* LMesh,
E3dMatrix LMatrix,
E3d3DPosition* LBBMin, E3d3DPosition* LBBMax,
unsigned int LWhatToInclude)
ArgumentE3dMesh* LMesh Pointer to the Mesh structure E3dMatrix LMatrix The Matrix that defines the coordinate system E3d3DPosition* LBBMin Returned bounding box point 0 E3d3DPosition* LBBMax Returned bounding box point 1Description 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 E3d_MeshGetTransformedBoundingBox(LMesh, LModel->LocalToWorldMatrix, LBBMin, LBBMax); This will return the "world-aligned" bounding box of the LMesh (assuming that LMesh is a Geometry of LModel). Return value TRUE if successful, FALSE in case of an error. See also E3d_MeshGetBoundingBox E3d_MeshVertexGetConnectedVerticesCollect Vertices that a Vertex is connected to via EdgesSyntax int E3d_MeshVertexGetConnectedVertices(E3dMesh* LMesh, int LVertexIndex, int** LVertexIndicesPtr)Arguments E3dMesh* LMesh Pointer to the Mesh int LVertexIndex Index of the Vertex in question LEdgesPtr The list of Edges will be returned hereDescription Collects a list of Edges in a Mesh that share a given Vertex. Return value The number of Edges that share the given Vertex E3d_MeshVertexGetEdgesCollect Edges that share a VertexSyntax int E3d_MeshVertexGetEdges(E3dMesh* LMesh, int LVertexIndex, E3dEdge*** LEdgesPtr)Arguments E3dMesh* LMesh Pointer to the Mesh int LVertexIndex Index of the Vertex in question E3dEdge*** LEdgesPtr The list of Edges will be returned hereDescription Collects a list of Edges in a Mesh that share a given Vertex. Return value The number of Edges that share the given Vertex E3d_MeshEdgeGetPolygonsCollect Polygons that share an EdgeSyntax int E3d_MeshEdgeGetPolygons(E3dMesh* LMesh, E3dEdge* LEdge, E3dPolygon*** LPolygonsPtr, E3dPolyGroup*** LPolyGroupsPtr)Arguments E3dMesh* LMesh Pointer to the Mesh E3dEdge* LEdge The Edge to be tested E3dPolygon*** LPolygonsPtr Return pointer for the Polygons E3dPolyGroup*** LPolyGroupsPtr Return pointer for the PolyGroupsDescription Collects the Polygons that share an Edge within a Mesh. If successful, it will return the Polygons in LPolygonsPtr and the associated PolyGroups in LPolyGroupsPtr. Return value The number of Polygons that share LEdge E3d_MeshUpdateForDisplayUpdate a Geometry for drawingSyntax void E3d_MeshUpdateForDisplay(E3dMesh* LMesh, unsigned int LFlags)Arguments E3dMesh* LMesh The Mesh to update unsigned int LFlags OR-ed together flags, telling what to updateDescription This function updates the given Mesh for rendering (drawing). This is a platform-independent procedure that ensures that the given Mesh will be drawn correctly after changes to its components. Calling this function for a Mesh after change, with only the necessary flags set, helps EQUINOX-3D greatly improve performance by only updating things that really changed. For example, if the position of a few Vertices changed in a Mesh, use the E3dGF_SHAPE flag bit. Return value None. |