|
[1 introduction] [2 overview] [3 reference] [4 GUI] IndexE3dPolygon_AddVertexNode E3dPolygon_FreeContents E3dPolygons_New E3dPolygon_InitVa E3dPolygon_InitAsTriangle E3dPolygon_SetAsTriangle E3dPolygon_InitAsQuad E3dPolygon_SetVa E3dPolygon_Triangulate E3dTriangleStrips_New E3dTriangleStrip_VertexNodesNew E3dPolygon_AddVertexNodeAdd one VertexNode to a PolygonSyntax Arguments Description This function adds a new VertexNode to the given Polygon.
The PWhere 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 PPolygon: E3dPolygon_AddVertexNode(PPolygon, 42, 5);Return value A pointer to the new VertexNode, or NULL in case of an error. See also E3dPolygon_FreeContentsFree contents of a PolygonSyntax Argument Description Frees memory for Polygon's VertexNodes and ITriangles Return value None. E3dPolygons_NewAllocate array of PolygonsSyntax Arguments Description 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 E3dPolygon_InitVaInitialize a Polygon's Flags and VertexNodesSyntax Arguments 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: "EIndex". 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: E3dPolygon_InitVa(0, PPolygon, PPolyGroup->VertexNodeSize, 0, 1, 2, 3, -1, 6, 5, 4);Return value TRUE if successful, FALSE in case of an error. See also E3dPolygon_InitAsTriangleInitialize Polygon as a triangleSyntax Arguments 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 PVtx0, PVtx1 and PVtx2 Return value TRUE or FALSE depending on whether the Polygon was successfully initialized or not. Use this function for newly allocated Polygons. See also E3dPolygon_SetAsTriangleMake a Polygon a triangleSyntax Arguments Description This function is similar to E3dPolygon_InitAsTriangle, except it first checks whether the number of VertexNodes currently allocated for this Polygon is exactly 3. If so, it uses the old VertexNode array, otherwise it (re)allocates the array before initializing it. Return value TRUE or FALSE depending on whether the Polygon was successfully initialized or not. See also E3dPolygon_InitAsQuadInitialize Polygon as a quadrangleSyntax Arguments Description Takes a pointer to a Polygon and initializes it as a quadrangle: - it sets the Polygon's flags, - allocates memory for 4 VertexNodes - initializes the Vertex indices of the VertexNodes, using PVtx0, PVtx1, PVtx2 and PVtx3 - creates ITriangles Return value E_SUCCESS if the Polygon was successfully initialized or not, otherwise an error code, such as E_NO_MEMORY. Use this function for newly allocated Polygons. See also E3dPolygon_SetVaChange a Polygon's VertexNodesSyntax Arguments Description This function is just like E3dPolygon_Init, except it fitst checks whether the number of VertexNodes currently allocated for this Polygon is exactly PCount. If so, it uses the old VertexNode array, otherwise it (re)allocates the array before initializing it. Return value TRUE if successful, FALSE in case of an error. See also E3dPolygon_TriangulateTriangulate a PolygonSyntax Arguments Description Triangulates a Polygon and stores the resulting triangles in the Polygon structure. The Polygon's normal must be correct before calling this function. Return value The number of resulting triangles, or anE_ error code if the triangulation was unsuccessful. See also E3dTriangleStrips_NewAllocate memory for triangle stripsSyntax Argument Description 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 E3dTriangleStrip_VertexNodesNewAllocate vertex nodes for a triangle stripSyntax Arguments Description 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 |