![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
![]()
|
IndexE3d_PolygonVertexNodesAllocate E3d_PolygonAddVertexNode E3d_PolygonDefault E3d_PolygonsAllocate E3d_PolyGroupAddPolygon E3d_PolygonInit E3d_PolygonInitAsTriangle E3d_PolygonSet E3d_PolygonSetAsTriangle E3d_TriangleStripsAllocate E3d_TriangleStripVertexNodesAllocate E3d_PolygonVertexNodesAllocateAllocate VertexNodes for a PolygonSyntax E3dVertexNode* E3d_PolygonVertexNodesAllocate(E3dPolygon* LPolygon, unsigned int LVertexNodeSize,
unsigned int LNumOfVertexNodes)
ArgumentsE3dPolygon* LPolygon Pointer to the Polygon structure unsigned int LNumOfVertexNodes The number of VertexNodes to allocateDescription Allocates VertexNodes for the given Polygon and initializes these fields: LPolygon->NumOfVertices = 0; // Number of VertexNodes minus contour separators LPolygon->NumOfExteriorVertices = 0; // Number of Vertices in the exterior contour LPolygon->NumOfVertexNodes = LNumOfVertexNodes; // Total number of VertexNodes Return value A pointer to the allocated array of VertexNodes or NULL in case of an error See also E3d_PolygonAddVertexNode E3d_PolygonAddVertexNodeAdd one VertexNode to a PolygonSyntax E3dVertexNode* E3d_PolygonAddVertexNode(E3dPolygon* LPolygon, unsigned int LVertexNodeSize,
int LVIdx,
int LWhere)
ArgumentsE3dPolygon* LPolygon Pointer to the E3dPolygon structure int LVIdx Vertex index int LWhere Where to add the new VertexNode ... List of vertex indices (int)Description This function adds a new VertexNode to the given Polygon.
The LWhere argument is the index of the VertexNode BEFORE which the the new one should be
inserted. Example This call inserts a VertexNode that uses the #42 Vertex of the Mesh, before the #5 VertexNode of LPolygon: E3d_PolygonAddVertexNode(LPolygon, 42, 5); Return value A pointer to the new VertexNode, or NULL in case of an error. See also E3d_PolygonsAllocate, E3d_PolygonInit, E3d_PolygonInitAsTriangle E3d_PolygonDefaultDefault a PolygonSyntax void E3d_PolygonDefault(E3dPolygon* LPolygon)Argument E3dPolygon* LPolygon Pointer to the PolygonDescription Initializes a Polygon structure Return value None. E3d_PolygonsAllocateAllocate array of PolygonsSyntax E3dPolygon* E3d_PolygonsAllocate(unsigned int LNumOfPolys)Arguments unsigned int LNumOfPolys Number of Polygons to AllocateDescription This function allocates memory for an array of Polygons and initializes each Polygon in this array. Return value A pointer to the newly allocated array of Polygons, or NULL in case of an error. See also E3d_PolygonInit, E3d_PolygonInitAsTriangle E3d_PolyGroupAddPolygonAdd one Polygon to a PolyGroupSyntax E3dPolygon* E3d_PolyGroupAddPolygon(E3dPolyGroup* LPolyGroup)Arguments E3dPolyGroup* LPolyGroup Pointer to the PolyGroup structureDescription This function adds a new Polygon to the given PolyGroup. Return value A pointer to the new Polygon, or NULL in case of an error. See also E3d_PolygonsAllocate, E3d_PolygonInit, E3d_PolygonInitAsTriangle E3d_PolygonInitInitialize a Polygon's Flags and VertexNodesSyntax EBool E3d_PolygonInit(E3dPolygon* LPolygon, unsigned int LVertexNodeSize, unsigned int LNumOfVertexNodes, ...)Arguments E3dPolygon* LPolygon Pointer to the E3dPolygon structure unsigned int LNumOfVertexNodes Number of vertex nodes ... List of vertex indices (int)Description This function initializes the given Polygon by allocating VertexNodes for it, initializing them and setting the Polygon's Flags. The argument "..." is a variable length vertex index list. The vertex indices are of type: "int". These indices refer to the Vertex array on the E3dMesh the given E3dPolygon belongs to. Example This call defines a rectangle of vertices: 0, 1, 2 and 3 with a triangle hole: 6, 5, 4: E3d_PolygonInit(0, LPolygon, 0, 1, 2, 3, -1, 6, 5, 4); Return value TRUE if successful, FALSE in case of an error. See also E3d_PolygonAllocate, E3d_PolygonsAllocate, E3d_PolygonInitAsTriangle, E3d_PolygonSet, E3d_PolygonSetAsTriangle E3d_PolygonInitAsTriangleInitialize Polygon as a triangleSyntax EBool E3d_PolygonInitAsTriangle(E3dPolygon* LPolygon, unsigned int LVertexNodeSize, int LVtx0, int LVtx1, int LVtx2)Arguments E3dPolygon* LPolygon The E3dPolygon to be initialized int LVtx0, LVtx1, LVtx2 Vertex indices (from the Mesh)Description Takes a pointer to a Polygon and initializes it as a triangle: - it sets the Polygon's flags, - allocates memory for 3 VertexNodes - initializes the Vertex indices of the VertexNodes, using LVtx0, LVtx1 and LVtx2 Return value TRUE or FALSE depending on whether the Polygon was successfully initialized or not. See also E3d_PolygonInit, E3d_PolygonSet, E3d_PolygonSetAsTriangle E3d_PolygonSetChange a Polygon's VertexNodesSyntax EBool E3d_PolygonSet(E3dPolygon* LPolygon, unsigned int LVertexNodeSize, unsigned int LNumOfVertexNodes, ...)Arguments E3dPolygon* LPolygon Pointer to the E3dPolygon structure unsigned int LNumOfVertexNodes Number of vertex nodes ... List of vertex indices (int)Description This function is just like E3d_PolygonInit, except it fitst checks whether VertexNodes are already allocated for this Polygon. If yes and the number of VertexNodes allocated were equal to LNumOfVertexNodes, it uses the old VertexNode array, otherwise it (re)allocates the VertexNodes before initializing them. Return value TRUE if successful, FALSE in case of an error. See also E3d_PolygonAllocate, E3d_PolygonsAllocate, E3d_PolygonInit, E3d_PolygonInitAsTriangle E3d_PolygonSetAsTriangleMake a Polygon a triangleSyntax EBool E3d_PolygonSetAsTriangle(E3dPolygon* LPolygon, unsigned int LVertexNodeSize, int LVtx0, int LVtx1, int LVtx2)Arguments E3dPolygon* LPolygon The E3dPolygon to be initialized int LVtx0, LVtx1, LVtx2 Vertex indices (from the Mesh)Description This function is just like E3d_PolygonInitAsTriangle, except it fitst checks whether VertexNodes are already allocated for this Polygon. If yes and the and the number of VertexNodes allocated were 3, it uses that VertexNode array, otherwise it (re)allocates the VertexNodes before initializing them. Return value TRUE or FALSE depending on whether the Polygon was successfully initialized or not. See also E3d_PolygonInit, E3d_PolygonInitAsTriangle, E3d_PolygonSet E3d_TriangleStripsAllocateAllocate memory for triangle stripsSyntax E3dTriangleStrip* E3d_TriangleStripsAllocate(unsigned int LNumOfStrips)Argument unsigned int LNumOfStrips Number of strips to allocateDescription Allocates memory for the specified number of triangle strips and initializes them. Return value A pointer to the allocated array of triangle strips or NULL in case of an error See also E3d_PolyGroupFreeTriangleStrips E3d_TriangleStripVertexNodesAllocateAllocate vertex nodes for a triangle stripSyntax E3dVertexNode* E3d_TriangleStripVertexNodesAllocate(E3dTriangleStrip* LTriangleStrip, unsigned int LVertexNodeSize,
int LNumOfVertices)
ArgumentsE3dTriangleStrip* LTriangleStrip Pointer to the Polygon structure LNumOfVertexNodes Number of vertex nodes to allocateDescription This function allocates a number of E3dVertexNode structures in an array and initializes them. Return value Pointer to the array of allocated vertex nodes or NULL in case of an error. See also E3d_TriangleStripsAllocate |