|
[1 introduction] [2 overview] [3 reference] [4 GUI] IndexE3dVertexGeometry_VertexAttributeAdd E3dVertexGeometry_VertexAttributeDelByIndex E3dVertexGeometry_VerticesFree E3dVertices_New E3dVertices_Add E3dVertexAttribute_Add E3dMesh_VertexAttributeDel E3dMesh_VerticesFree E3dMesh_NumOfSelectedVertices E3dMesh_FilterVertices E3dMesh_VerticesRemap E3dMesh_VertexGetConnectedVertices E3dMesh_VertexGetEdges E3dMesh_GetVertexLinksNew E3dEdges_New E3dEdges_Sort E3dMesh_EdgesNew E3dMesh_EdgesAdd E3dMesh_EdgesFree E3dMesh_EdgesSorted 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 E3dMesh_FromBBox E3dVertexGeometry_VertexAttributeAddAdd a new attribute to the VertexNodes of a PolyGroup's primitivesSyntax Arguments 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 E3dVertexGeometry_VertexAttributeDelByIndexRemove a component from the Vertices of a Mesh's VerticesSyntax Arguments Description Removes a vertex attribute from a Mesh. Return value E_SUCCESS if all went well, or an error code See also E3dVertexGeometry_VerticesFreeFree Vertices of a VertexGeometrySyntax Argument Description Frees the Vertex array of a VertexGeometry. Return value None. E3dVertices_NewAllocate memory for an array of VerticesSyntax Arguments 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 E3dVertices_AddAdd Vertices to an arraySyntax Arguments 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 E3dVertexAttribute_AddAdd a Vertex attribute to a listSyntax Arguments 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_VertexAttributeDelRemove a component from the Vertices of a Mesh's VerticesSyntax Arguments 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_VerticesFreeFree Vertices of a MeshSyntax Argument Description Frees the Vertex array of a Mesh. Return value None. E3dMesh_NumOfSelectedVerticesCount selected Vertices on a MeshSyntax Arguments Description Returns the number of selected Vertices in a Mesh. If PNSoftSelectedVertices is not NULL, the number of soft-selected Vertices (E3dVtxAttribute_SoftSelection value > 0.005) will be returned there. Return value Total number of selected Vertices (hard + soft) E3dMesh_FilterVerticesMark Vertices of a Mesh that pass the given filter criteriaSyntax Argument 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 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_VerticesRemapAdd / remove or reorder Mesh VerticesSyntax Arguments 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_VertexGetConnectedVerticesCollect Vertices that a Vertex is connected to via EdgesSyntax Arguments 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_VertexGetEdgesCollect Edges that share a VertexSyntax Arguments 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_GetVertexLinksNewCollect information on which Polygon VertexNodes use each Vertex of the given Mesh.Syntax Arguments Description Builds array of E3dVertexLinksNew 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 E3dVertexLinksNew and E3dVertexLinkPolys for more details. Return value Pointer to the array, or NULL, in case of an error. E3dEdges_NewAllocate array of independent Edges (line segments)Syntax Argument 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. E3dEdges_SortSort a list of EdgesSyntax Argument 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_EdgesNewAllocate array of independent Edges (line segments)Syntax Argument 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_EdgesAddAdd Edges to a MeshSyntax Arguments Description Adds the given number of Edges to PMesh. Return value Pointer to the first newly added Edge. E3dMesh_EdgesFreeFree Edges of a MeshSyntax Argument Description Frees the VertexLinks, WingedEdges, PolyGroup Edge index lists, and finally the Edge array of a Mesh. Return value None. E3dMesh_EdgesSortedCheck if the Edges of a Mesh are sortedSyntax Argument 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. E3dMesh_EdgesSortSort Edges of a MeshSyntax Argument 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_CreateWingedEdgesFromEdgesCreate WingedEdge list and VertexLinks for the given Mesh from its Edge listSyntax Arguments 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_CreateEdgesFromPolygonsCreate Edge list for the given Mesh from its Polygon and Triangle strip dataSyntax Arguments Description Generates Mesh and PolyGroup Edge information from the Polygon data on a Mesh. Return value None. See also E3dMesh_GetEdgeNormalsGenerate normals for the Edges of a MeshSyntax Argument 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_EdgeGetPolygonsCollect Polygons that share an EdgeSyntax Arguments 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_NumOfSelectedEdgesCount selected Edges in a MeshSyntax Argument Description Returns the number of selected Edges in the given Mesh. Return value The number of selected Edges. E3dMesh_NumOfVisibleEdgesCount visible Edges in a MeshSyntax Argument Description Returns the number of visible Edges in the given Mesh. Return value The number of visible Edges. E3dMesh_EdgeFlagsUpdateUpdate a Mesh after Edge parameters changeSyntax Argument 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_PolyGroupsEdgesFromMeshEdgesCreate PolyGroup Edges for PMesh's PolyGroups (if there's more than 1 PolyGroup)Syntax Arguments Description If PMesh has more than 1 PolyGroup, it creates PolyGroup Edge lists from the Edge list of the Mesh. Return value None. E3dMesh_AppendPolyGroupAppend an existing PolyGroup to a MeshSyntax Arguments Description Adds an existing PolyGroup to PMesh. Return value E_SUCCESS on success, or E_ALREADY_EXISTS, if PPolyGroup is already on PMesh. E3dMesh_PolyGroupAddAllocate a new PolygGroup and add it to a MeshSyntax Arguments 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_PolyGroupDelRemove a PolyGroup from a Mesh and free itSyntax Arguments 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_ChangePolygonFlagsChange flags on Polygons of a MeshSyntax Arguments 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_PolyGroupAddTriangleStripAdd a TriangleStrip to a MeshSyntax Arguments 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 E3dMesh_PolyGroupAddTriangleStripsAdd TriangleStrips to a MeshSyntax Arguments 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 E3dMesh_RecomputePolygonNormalsRecalculate Polygon normals of a MeshSyntax Arguments Description Recomputes the normals of the Polygons of all PolyGroups in PMesh. Return value None. E3dMesh_RecomputeNormalsRecompute Polygon and Vertex normals of a MeshSyntax Arguments 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_EdgesAndPolyGroupsRemapVertexIndicesRe-map Vertex indices of Edges and Polygons in a Mesh, according to a tableSyntax Arguments 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_NumOfSelectedPolygonsCount selected Polygons in a MeshSyntax Argument Description Returns the number of selected Polygons in the given Mesh. Return value The number of selected Polygons. E3dMesh_GetBoundingBoxGet the local bounding box of a MeshSyntax Arguments Description Returns the bounding box of the given Mesh. Accepted flags in PWhatToInclude: E3dBB_SELECTED_GEOMETRY E3dBB_SHADOW_CASTERS E3dBB_SHADOW_RECEIVERS E3dBB_ALL Return value TRUE if successful, FALSE in case of an error, such as the Mesh having no Vertices. See also E3dMesh_GetTransformedBoundingBoxGet the bounding box of a Mesh aligned to an arbitrary coordinate systemSyntax Argument 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 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_FreeCachesFree VertexUsageList etc. of a MeshSyntax Argument 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. E3dMesh_FromBBoxCreate a Mesh from a bounding-boxSyntax Arguments Description Used for visualizing bounding boxes/ Return value None. |