|
MeshBuilder C++ API 0.0.20261017
Mesh building
|
Mesh Builder Interface. More...
#include <MeshBuilder.h>
Public Member Functions | |
| virtual | ~IMeshBuilder ()=default |
| Virtual destructor. | |
| virtual int | ReserveVertexElements (const int count)=0 |
| virtual int | AddVertexElement (const double x, const double y, const double z)=0 |
| virtual int | ModifyVertexElement (const int index, const double x, const double y, const double z)=0 |
| virtual int | ScaleVertexElements (const double scaleX, const double scaleY, const double scaleZ, const double originX=0.0f, const double originY=0.0f, const double originZ=0.0f, const int vertexElementSet=-1)=0 |
| virtual int | ScaleVertexElements (const double scaleX, const double scaleY, const double scaleZ, const double originX, const double originY, const double originZ, const int *vertexIndices, const int count)=0 |
| virtual int | TranslateVertexElements (const double translateX, const double translateY, const double translateZ, const int *vertexIndices, const int count)=0 |
| virtual int | RotateVertexElements (const double axisPointX, const double axisPointY, const double axisPointZ, const double axisDirX, const double axisDirY, const double axisDirZ, const double angle, const int *vertexIndices, const int count)=0 |
| virtual int | MirrorVertexElements (const double planeOriginX, const double planeOriginY, const double planeOriginZ, const double planeNormalX, const double planeNormalY, const double planeNormalZ, const int *vertexIndices, const int count)=0 |
| virtual int | MergeCoincidentVertexElements (const double mergeDistance, const int vertexElementSetIndex=-1, int *outOldToNew=nullptr, const int outOldToNewCapacity=0)=0 |
| virtual int | GetNumberOfVertexElements () const =0 |
| virtual const double * | GetVertexElementsDefinition () const =0 |
| virtual int | GetNumberOfVertexElementSets () const =0 |
| virtual int | GetNumberOfVertexElementsInSet (const int setIndex) const =0 |
| virtual const int * | GetVertexElementSetElements (const int setIndex) const =0 |
| virtual int | CreateVertexElementSet (const int *vertexIndices=nullptr, const int count=0)=0 |
| virtual int | SetVertexElementSetElements (const int setIndex, const int *vertexIndices, const int count)=0 |
| virtual int | CopyVertexElementSet (const int setIndex)=0 |
| virtual int | MergeVertexElementSets (const int numVertexSets, const int *vertexSets)=0 |
| virtual int | GetNumberOfVertexElementsFromLineElementSet (const int setIndex) const =0 |
| virtual int | GetVertexElementsFromLineElementSet (int setIndex, int *outVertexElements, int maxCount) const =0 |
| virtual int | GetVertexElementSetsForVertex (const int vertexIndex, const int **outSetIndices, int *outCount) const =0 |
| virtual int | GetVertexToSetsMap (const int **outOffsets, const int **outData) const =0 |
| virtual int | DeleteVertexElements (const int setIndex=-1)=0 |
| virtual int | DeleteVertexElementsByIndex (const int *vertexIndices, const int count)=0 |
| virtual int | ReserveLineElements (const int count)=0 |
| virtual int | AddLineElement (const int i0, const int i1)=0 |
| virtual int | CreateLineElementSetFromVertexExtrusion (const int vertexIndex, const double dir[3], const double length, const int divisions, const DistributionType distribution=DistributionType::Uniform, const double ratio=1.0)=0 |
| virtual int | CreateLineElementSetFromVertexSweep (const int vertexIndex, const int numControlPoints, const double *controlPoints, const int numLines, const DistributionType distribution=DistributionType::Uniform, const double ratio=1.0, const int startAxis=-1, const double startValue=0.0, const int endAxis=-1, const double endValue=0.0, const int segmentIndex=0)=0 |
| virtual int | CreateLineElementSetBetweenVertices (const int startVertexIndex, const int endVertexIndex, const int divisions, const DistributionType distribution=DistributionType::Uniform, const double ratio=1.0)=0 |
| virtual int | CreateLineElementSetFromCircle (const double centerPoint[3], const double radius, const int segments, const double normal[3], const double startDirection[3], const double startAngle=0.0, const double endAngle=0.0, const DistributionType distribution=DistributionType::Uniform, const double ratio=1.0)=0 |
| virtual int | CopyLineElementSet (const int setIndex)=0 |
| virtual int | MergeLineElementSets (const int numLineSets, const int *lineSets)=0 |
| virtual int | GetNumberOfLineElements () const =0 |
| virtual const int * | GetLineElementsDefinition () const =0 |
| Returns const reference to line elements definition (constituting vertex index pairs array). | |
| virtual const int * | GetLineElementDefinition (const int elemIndex) const =0 |
| virtual int | GetNumberOfLineElementSets () const =0 |
| virtual int | GetNumberOfLineElementsInSet (const int setIndex) const =0 |
| virtual const int * | GetLineElementSetElements (const int setIndex) const =0 |
| virtual int | CreateLineElementSet (const int *lineIndices=nullptr, const int count=0)=0 |
| virtual int | SetLineElementSetElements (const int setIndex, const int *lineIndices, const int count)=0 |
| virtual int | GetLineElementSetsForLine (const int lineIndex, const int **outSetIndices, int *outCount) const =0 |
| virtual int | GetLineToSetsMap (const int **outOffsets, const int **outData) const =0 |
| virtual int | DeleteLineElements (const int setIndex=-1)=0 |
| virtual int | DeleteLineElementsByIndex (const int *lineIndices, const int count)=0 |
| virtual int | ReserveSurfaceElements (const int count)=0 |
| virtual int | AddTriaSurfaceElement (const int i0, const int i1, const int i2)=0 |
| virtual int | AddQuadSurfaceElement (const int i0, const int i1, const int i2, const int i3)=0 |
| virtual int | CreateSurfaceElementSetFromLineExtrusion (const int lineSetIndex, const double dir[3], const double length, const int divisions, const DistributionType distribution=DistributionType::Uniform, const double ratio=1.0f)=0 |
| virtual int | CreateSurfaceElementSetFromLoft (const int lineSetA, const int lineSetB, const int rows, const bool flipB=false, const DistributionType distribution=DistributionType::Uniform, const double ratio=1.0)=0 |
| virtual int | CreateSurfaceElementSetFromFan (const int sideSetA, const int sideSetB, const int outerSet)=0 |
| virtual int | CopySurfaceElementSet (const int setIndex)=0 |
| virtual int | MirrorSurfaceElementSet (const int setIndex, const double planeOriginX, const double planeOriginY, const double planeOriginZ, const double planeNormalX, const double planeNormalY, const double planeNormalZ)=0 |
| virtual int | MergeSurfaceElementSets (const int numSurfaceSets, const int *surfaceSets)=0 |
| virtual int | GetNumberOfSurfaceElements () const =0 |
| virtual SurfaceElementType | GetSurfaceElementType (const int elemIndex) const =0 |
| virtual const int * | GetSurfaceElementDefinition (const int elemIndex) const =0 |
| virtual int | GetNumberOfSurfaceElementSets () const =0 |
| virtual int | GetNumberOfSurfaceElementsInSet (const int setIndex) const =0 |
| virtual const int * | GetSurfaceElementSetElements (const int setIndex) const =0 |
| virtual int | CreateSurfaceElementSet (const int *surfaceIndices=nullptr, const int count=0)=0 |
| virtual int | SetSurfaceElementSetElements (const int setIndex, const int *surfaceIndices, const int count)=0 |
| virtual int | GetNumberOfVertexElementsInSurfaceElementSet (const int setIndex) const =0 |
| virtual int | GetVertexElementsFromSurfaceElementSet (int setIndex, int *outVertexElements, int maxCount) const =0 |
| virtual int | DeleteSurfaceElements (const int setIndex=-1)=0 |
| virtual int | DeleteSurfaceElementsByIndex (const int *surfaceIndices, const int count)=0 |
| virtual int | ReserveVolumeElements (const int count)=0 |
| virtual int | AddBrickVolumeElement (const int n0, const int n1, const int n2, const int n3, const int n4, const int n5, const int n6, const int n7)=0 |
| virtual int | AddWedgeVolumeElement (const int n0, const int n1, const int n2, const int n3, const int n4, const int n5)=0 |
| virtual int | AddTetraVolumeElement (const int n0, const int n1, const int n2, const int n3)=0 |
| virtual int | CreateVolumeElementSetFromSurfaceExtrusion (const int surfaceSetIndex, const double dir[3], const double length, const int divisions, const DistributionType distribution=DistributionType::Uniform, const double ratio=1.0)=0 |
| virtual int | CopyVolumeElementSet (const int setIndex)=0 |
| virtual int | MirrorVolumeElementSet (const int setIndex, const double planeOriginX, const double planeOriginY, const double planeOriginZ, const double planeNormalX, const double planeNormalY, const double planeNormalZ)=0 |
| virtual int | MergeVolumeElementSets (const int numVolumeSets, const int *volumeSets)=0 |
| virtual int | GetNumberOfVolumeElements () const =0 |
| virtual VolumeElementType | GetVolumeElementType (const int elemIndex) const =0 |
| virtual const int * | GetVolumeElementDefinition (const int elemIndex) const =0 |
| virtual int | GetNumberOfVolumeElementSets () const =0 |
| virtual int | GetNumberOfVolumeElementsInSet (const int setIndex) const =0 |
| virtual const int * | GetVolumeElementSetElements (const int setIndex) const =0 |
| virtual int | CreateVolumeElementSet (const int *volumeIndices=nullptr, const int count=0)=0 |
| virtual int | SetVolumeElementSetElements (const int setIndex, const int *volumeIndices, const int count)=0 |
| virtual int | GetNumberOfVertexElementsInVolumeElementSet (const int setIndex) const =0 |
| virtual int | GetVertexElementsFromVolumeElementSet (int setIndex, int *outVertexElements, int maxCount) const =0 |
| virtual int | DeleteVolumeElements (const int setIndex=-1)=0 |
| virtual int | DeleteVolumeElementsByIndex (const int *volumeIndices, const int count)=0 |
| virtual int | CreateFaceSet ()=0 |
| virtual int | GetNumberOfFaceSets () const =0 |
| virtual int | GetNumberOfFacesInSet (const int setIndex) const =0 |
| virtual FACE_ITEM_SOURCE | GetFaceSetElemSource (const int setIndex, const int faceIndex) const =0 |
| virtual int | GetFaceSetElemIndex (const int setIndex, const int faceIndex) const =0 |
| virtual int | GetFaceSetFaceIndex (const int setIndex, const int faceIndex) const =0 |
| virtual int | AddFaceToSet (const int setIndex, const FACE_ITEM_SOURCE elementSource, const int elementIndex, const int faceIndex)=0 |
| virtual int | RemoveFaceFromSet (const int setIndex, const FACE_ITEM_SOURCE elementSource, const int elementIndex, const int faceIndex)=0 |
| virtual int | ClearFaceSet (const int setIndex)=0 |
| virtual int | RebuildElementSetMaps ()=0 |
| virtual void | Clear ()=0 |
| Clears all mesh elements. | |
| virtual int | ExportToOBJ (const char *filename) const =0 |
| virtual const char * | GetErrorMessage () const =0 |
| virtual IMeshBuilder * | Clone () const =0 |
Mesh Builder Interface.
|
virtualdefault |
Virtual destructor.
|
pure virtual |
Reserves memory for given number of vertex elements (this will speed-up any subsequent vertex element adding)
| count | - Number of vertex elements to reserve memory for |
|
pure virtual |
Adds new vertex element. Newly created vertex element is the last element in the vertex element array.
| x | - X coordinate |
| y | - Y coordinate |
| z | - Z coordinate |
|
pure virtual |
Modifies existing vertex element at given index
| index | - Index of the vertex element to modify |
| x | - New X coordinate |
| y | - New Y coordinate |
| z | - New Z coordinate |
|
pure virtual |
Scales vertex elements (all or just given set) about given origin
| scaleX | - Scaling factor along X axis |
| scaleY | - Scaling factor along Y axis |
| scaleZ | - Scaling factor along Z axis |
| originX | - X coordinate of the scaling origin |
| originY | - Y coordinate of the scaling origin |
| originZ | - Z coordinate of the scaling origin |
| vertexElementSet | - Optional vertex element set index of set to scale; if not given or -1, all vertices are scaled |
|
pure virtual |
Scales the given vertex elements about given origin, in place (elements referencing them follow). A vertex listed more than once is scaled once.
| scaleX | - Scaling factor along X axis |
| scaleY | - Scaling factor along Y axis |
| scaleZ | - Scaling factor along Z axis |
| originX | - X coordinate of the scaling origin |
| originY | - Y coordinate of the scaling origin |
| originZ | - Z coordinate of the scaling origin |
| vertexIndices | - Indices of the vertex elements to scale |
| count | - Number of indices |
|
pure virtual |
Translates the given vertex elements, in place (elements referencing them follow). A vertex listed more than once is translated once.
| translateX | - Translation distance in X direction |
| translateY | - Translation distance in Y direction |
| translateZ | - Translation distance in Z direction |
| vertexIndices | - Indices of the vertex elements to translate |
| count | - Number of indices |
|
pure virtual |
Rotates the given vertex elements about an axis, in place (elements referencing them follow). A vertex listed more than once is rotated once. Positive angles rotate counter-clockwise looking against the axis direction (right-hand rule).
| axisPointX | - X coordinate of a point on the rotation axis |
| axisPointY | - Y coordinate of a point on the rotation axis |
| axisPointZ | - Z coordinate of a point on the rotation axis |
| axisDirX | - X component of the rotation axis direction |
| axisDirY | - Y component of the rotation axis direction |
| axisDirZ | - Z component of the rotation axis direction |
| angle | - Rotation angle in degrees |
| vertexIndices | - Indices of the vertex elements to rotate |
| count | - Number of indices |
|
pure virtual |
Mirrors the given vertex elements across a plane, in place. Only vertex positions change: surface and volume elements referencing them end up with reversed orientation, so mirror surface and volume element sets with MirrorSurfaceElementSet / MirrorVolumeElementSet instead. A vertex listed more than once is mirrored once.
| planeOriginX | - X coordinate of a point on the mirror plane |
| planeOriginY | - Y coordinate of a point on the mirror plane |
| planeOriginZ | - Z coordinate of a point on the mirror plane |
| planeNormalX | - X component of the mirror plane normal vector |
| planeNormalY | - Y component of the mirror plane normal vector |
| planeNormalZ | - Z component of the mirror plane normal vector |
| vertexIndices | - Indices of the vertex elements to mirror |
| count | - Number of indices |
|
pure virtual |
Merges vertices that are closer than mergeDistance, replacing them with their average position. Updates all referencing line, surface, and volume elements to use the merged vertex indices. Vertices connected by line elements are never merged to preserve topology.
| mergeDistance | - Maximum distance for vertices to be considered coincident |
| vertexElementSetIndex | - Optional index of vertex set to restrict merging (default: -1 = all vertices) |
| outOldToNew | - Optional output array (size >= GetNumberOfVertexElements() as it was before this call) receiving, for each old vertex index, its new index (never -1 — every vertex either survives standalone or as part of a merged group's single surviving vertex). Lets a caller that keeps its own parallel per-vertex data (e.g. a user-visible ID array) remap it correctly instead of assuming positions never move. Pass nullptr to skip. |
| outOldToNewCapacity | - Number of entries available in outOldToNew (ignored if outOldToNew is nullptr) |
|
pure virtual |
Returns number of vertex elements
|
pure virtual |
Returns const reference to vertex elements definition (coordinates array)
|
pure virtual |
Returns number of vertex element sets
|
pure virtual |
Returns number of vertex elements in requested vertex element set
| setIndex | - Index of the vertex element set |
|
pure virtual |
Returns const reference to a vertex element set elements array
| setIndex | - Index of the vertex element set |
|
pure virtual |
Creates a new vertex element set, optionally populated with initial data.
| vertexIndices | - Optional array of vertex element indices to populate the set (nullptr for empty set) |
| count | - Number of elements in the array (0 for empty set) |
|
pure virtual |
Replaces the contents of an existing vertex element set.
| setIndex | - Index of the vertex element set to modify |
| vertexIndices | - Array of vertex element indices (nullptr to clear) |
| count | - Number of elements in the array (0 to clear) |
|
pure virtual |
Copies a vertex element set: every vertex of the set is duplicated and the duplicates are stored as a new vertex element set (last in the vertex set array). Use the in-place operations (translate, rotate, scale, mirror) on the copy to place it.
| setIndex | - Index of the vertex element set to copy |
|
pure virtual |
Merges multiple vertex element sets into one, removing duplicates. The merged set is stored as a new vertex element set (last in the array).
| numVertexSets | - Number of vertex element sets to merge |
| vertexSets | - Array of vertex element set indices to merge |
|
pure virtual |
Returns number of unique vertex indices used by the given line element set
| setIndex | - Index of the line element set |
|
pure virtual |
Returns unique vertex indices used by the given line element set. Caller must provide an array of sufficient size (at least as large as the value returned by GetNumberOfVertexElementsFromLineElementSet) to receive the vertex indices.
| setIndex | - Index of the line element set |
| outVertexElements | - Output array to receive unique vertex indices |
| maxCount | - Maximum number of vertex indices to write to output array (should be >= value returned by GetNumberOfVertexElementsFromLineElementSet) |
|
pure virtual |
Retrieves the array of set indices that contain the specified vertex element.
| vertexIndex | - Index of the vertex element |
| outSetIndices | - Output pointer to contiguous array of set indices |
| outCount | - Output pointer to receive the count of sets |
|
pure virtual |
Retrieves the full CSR arrays for vertex-to-set mappings.
| outOffsets | - Output pointer to offset array (size = GetNumberOfVertexElements() + 1) |
| outData | - Output pointer to contiguous set indices buffer |
|
pure virtual |
Deletes vertex elements (all, or those in the given set) that are not referenced by any line, surface, or volume element — a vertex still in use is always kept, never deleted, so referencing elements can't be left with a dangling vertex index. Vertex element sets (including the given one) are updated in place; a set's index is never removed or renumbered, even if it ends up empty.
| setIndex | - Index of the vertex element set (if -1, all vertex elements are considered) |
|
pure virtual |
Deletes the vertex elements given by their indices, like DeleteVertexElements with a set holding them, but without leaving such a set behind. A vertex still used by a line, surface or volume element is kept, as by DeleteVertexElements.
| vertexIndices | - Indices of the vertex elements to delete |
| count | - Number of indices (0: nothing is deleted) |
|
pure virtual |
Reserves memory for given number of line elements (this will speed-up any subsequent line element adding)
| count | - Number of line elements to reserve memory for |
|
pure virtual |
Adds new line element. Newly created line element is the last element in the line element array.
| i0 | - Index of the first vertex of the line |
| i1 | - Index of the second vertex of the line |
|
pure virtual |
Creates a line element set by extruding a vertex element along a given direction. Created line elements are stored in a new line element set which is last set in the line element set array.
| vertexIndex | - Index of the vertex element to extrude |
| dir | - Direction vector for extrusion |
| length | - Length of extrusion |
| divisions | - Number of divisions (line elements) to create |
| distribution | - Distribution type for extrusion divisions (default: Uniform) |
| ratio | - Distribution ratio parameter (default: 1.0) |
|
pure virtual |
Creates a line element set by sweeping a vertex element along a cubic B-spline curve segment defined by control points. Created line elements are stored in a new line element set which is last set in the line element set array.
| vertexIndex | - Index of the anchor vertex element (sweep point of origin) |
| numControlPoints | - Number of control points (must be >= 2) |
| controlPoints | - Array of control point coordinates (size: numControlPoints * 3, in x,y,z order) |
| numLines | - Number of line elements to create along the segment (>=1) |
| distribution | - Point spacing law along the chosen segment (default: Uniform) |
| ratio | - Distribution ratio parameter (default: 1.0) |
| startAxis | - Axis index (0=X, 1=Y, 2=Z) for start coordinate constraint (default -1 = none) |
| startValue | - Coordinate value at segment start along startAxis (default 0.0) |
| endAxis | - Axis index (0=X, 1=Y, 2=Z) for end coordinate constraint (default -1 = none) |
| endValue | - Coordinate value at segment end along endAxis (default 0.0) |
| segmentIndex | - Index of segment candidate of interest between requested crossing (default 0) |
|
pure virtual |
Creates a line element set between two vertex elements. Created line elements are stored in a new line element set which is last set in the line element set array.
| startVertexIndex | - Index of the starting vertex element |
| endVertexIndex | - Index of the ending vertex element |
| divisions | - Number of divisions (line elements) to create |
| distribution | - Distribution type for extrusion divisions (default: Uniform) |
| ratio | - Distribution ratio parameter (default: 1.0) |
|
pure virtual |
Creates a line element set forming a circle (or arc) in 3D space defined by a center point, radius, normal vector, and start direction. Created line elements are stored in a new line element set which is last set in the line element set array. The chain is always open: segments + 1 vertices, so a full circle ends in a vertex coincident with (but not merged into) its first vertex; merge them with MergeCoincidentVertexElements if a closed ring is needed.
| centerPoint | - Center point coordinates [x, y, z] |
| radius | - Circle radius (must be > 0) |
| segments | - Number of line segments (min 3 for full circle, min 1 for arc) |
| normal | - Normal vector defining the plane of the circle |
| startDirection | - Direction vector defining the 0-degree reference direction |
| startAngle | - Start angle in radians (default: 0.0) |
| endAngle | - End angle in radians (default: 0.0 for full circle) |
| distribution | - Distribution type for angular spacing |
| ratio | - Distribution ratio parameter |
|
pure virtual |
Copies a line element set: its vertices are duplicated (each once) and new line elements reference the duplicates. The new line elements are stored as a new line element set (last in the line set array); no vertex set is created. Use the in-place operations (translate, rotate, scale, mirror) on the copy's vertices to place it.
| setIndex | - Index of the line element set to copy |
|
pure virtual |
Merges multiple line element sets into one, removing duplicates
| numLineSets | - Number of line element sets to merge |
| lineSets | - Array of line element set indices to merge |
|
pure virtual |
Returns number of line elements
|
pure virtual |
Returns const reference to line elements definition (constituting vertex index pairs array).
|
pure virtual |
Returns the vertex indices for a given line element
| elemIndex | - Index of the line element |
|
pure virtual |
Returns number of line element sets
|
pure virtual |
Returns number of line elements in requested line element set
| setIndex | - Index of the line element set |
|
pure virtual |
Returns const reference to a line element set elements array
| setIndex | - Index of the line element set |
|
pure virtual |
Creates a new line element set, optionally populated with initial data.
| lineIndices | - Optional array of line element indices (nullptr for empty set) |
| count | - Number of elements in the array (0 for empty set) |
|
pure virtual |
Replaces the contents of an existing line element set.
| setIndex | - Index of the line element set to modify |
| lineIndices | - Array of line element indices (nullptr to clear) |
| count | - Number of elements in the array (0 to clear) |
|
pure virtual |
Retrieves the array of set indices that contain the specified line element.
| lineIndex | - Index of the line element |
| outSetIndices | - Output pointer to contiguous array of set indices |
| outCount | - Output pointer to receive the count of sets |
|
pure virtual |
Retrieves the full CSR arrays for line-to-set mappings.
| outOffsets | - Output pointer to offset array (size = GetNumberOfLineElements() + 1) |
| outData | - Output pointer to contiguous set indices buffer |
|
pure virtual |
Deletes line elements (all, or those in the given set) unconditionally — nothing else references a line element, so there's no "still in use" concern. Line element sets (including the given one) are updated in place; a set's index is never removed or renumbered, even if it ends up empty.
| setIndex | - Index of the line element set (if -1, all line elements are considered) |
|
pure virtual |
Deletes the line elements given by their indices, like DeleteLineElements with a set holding them, but without leaving such a set behind.
| lineIndices | - Indices of the line elements to delete |
| count | - Number of indices (0: nothing is deleted) |
|
pure virtual |
Reserves memory for given number of surface elements (this will speed-up any subsequent surface element adding)
| count | - Number of surface elements to reserve memory for |
|
pure virtual |
Adds new triangle surface element. Newly created triangle surface element is the last element in the surface element array.
| i0,i1,i2 | - Indices of the constituting vertex elements (triangle) |
|
pure virtual |
Adds new quadrangle surface element. Newly created quad surface element is the last element in the surface element array.
| i0,i1,i2,i3 | - Indices of the constituting vertex elements (quad) |
|
pure virtual |
Creates a surface element set by extruding a line element set along a direction. Created surface elements are stored in a new surface element set which is last set in the surface element set array. Process will also create additional line element sets, in this order: the edge opposite to the starting line set, then one side edge per free end of the starting line set. A free end is a vertex used by exactly one of its line elements, taken in the order the ends appear in the set: a closed loop has no side edges, an open chain two (start end first for a chain in order), several disconnected chains two each, and branch points none. The number of side edge sets therefore varies; compare the line set count before and after.
| lineSetIndex | - Index of the line element set to extrude |
| dir | - Direction vector for extrusion |
| length | - Length of extrusion |
| divisions | - Number of divisions (layers) to create |
| distribution | - Distribution type for extrusion layers (default: Uniform) |
| ratio | - Distribution ratio parameter (default: 1.0f) |
|
pure virtual |
Creates a quad surface mesh between two line element sets with optional multiple interpolation rows. The two input line sets may be anywhere in space.
Assumptions:
| lineSetA | - Index of first line element set (polyline) |
| lineSetB | - Index of second line element set (polyline) |
| rows | - Number of quad layers between the two polylines (>=1) rows=1: single band of quads directly connecting A to B rows=N: N bands, inserting (rows-1) intermediate vertex rows |
| flipB | - If true, reverses the vertex order of lineSetB to untwist the lofted surface if needed (default: false) |
| distribution | - Spacing law for interpolation parameter t in [0,1] |
| ratio | - Distribution ratio parameter |
Vertex handling:
|
pure virtual |
Creates a structured fan-shaped surface mesh from an apex vertex radiating outward to an arc. The three input line sets define the radial boundaries and outer arc.
Geometry assumptions:
Structured layout:
Bilinear interpolation:
| sideSetA | - Index of first radial side line set |
| sideSetB | - Index of second radial side line set |
| outerSet | - Index of outer boundary arc line set |
|
pure virtual |
Copies a surface element set: its vertices are duplicated (each once) and new surface elements reference the duplicates. The new surface elements are stored as a new surface element set (last in the surface set array); no vertex set is created. Use the in-place operations (translate, rotate, scale, MirrorSurfaceElementSet) on the copy to place it.
| setIndex | - Index of the surface element set to copy |
|
pure virtual |
Mirrors a surface element set across a plane, in place: its vertices are mirrored and the node order of its elements is reversed, so the mirrored elements keep a consistent normal orientation. Elements outside the set that share its vertices are moved along but not reordered.
| setIndex | - Index of the surface element set to mirror |
| planeOriginX | - X coordinate of a point on the mirror plane |
| planeOriginY | - Y coordinate of a point on the mirror plane |
| planeOriginZ | - Z coordinate of a point on the mirror plane |
| planeNormalX | - X component of the mirror plane normal vector |
| planeNormalY | - Y component of the mirror plane normal vector |
| planeNormalZ | - Z component of the mirror plane normal vector |
|
pure virtual |
Merges multiple surface element sets into one, removing duplicates
| numSurfaceSets | - Number of surface element sets to merge |
| surfaceSets | - Array of surface element set indices to merge |
|
pure virtual |
Returns number of surface elements
|
pure virtual |
Returns the type of a given surface element
| elemIndex | - Index of the surface element |
|
pure virtual |
Returns the vertex indices for a given surface element
| elemIndex | - Index of the surface element |
|
pure virtual |
Returns number of surface element sets
|
pure virtual |
Returns number of surface elements in requested surface element set
| setIndex | - Index of the surface element set |
|
pure virtual |
Returns const reference to a surface element set elements array
| setIndex | - Index of the surface element set |
|
pure virtual |
Creates a new surface element set, optionally populated with initial data.
| surfaceIndices | - Optional array of surface element indices (nullptr for empty set) |
| count | - Number of elements in the array (0 for empty set) |
|
pure virtual |
Replaces the contents of an existing surface element set.
| setIndex | - Index of the surface element set to modify |
| surfaceIndices | - Array of surface element indices (nullptr to clear) |
| count | - Number of elements in the array (0 to clear) |
|
pure virtual |
Returns number of unique vertex indices used by the given surface element set
| setIndex | - Index of the surface element set |
|
pure virtual |
Returns unique vertex indices used by the given surface element set. Caller must provide an array of sufficient size (at least as large as the value returned by GetNumberOfVertexElementsInSurfaceElementSet) to receive the vertex indices.
| setIndex | - Index of the surface element set |
| outVertexElements | - Output array to receive unique vertex indices |
| maxCount | - Maximum number of vertex indices to write to output array (should be >= value returned by GetNumberOfVertexElementsInSurfaceElementSet) |
|
pure virtual |
Deletes surface elements (all, or those in the given set) unconditionally — nothing else references a surface element via a set indirection, so there's no "still in use" concern. Surface element sets (including the given one) are updated in place; a set's index is never removed or renumbered, even if it ends up empty. Face sets are fixed up too: entries for a deleted surface element are removed, entries for a surviving one are remapped to its new index.
|
pure virtual |
Deletes the surface elements given by their indices, like DeleteSurfaceElements with a set holding them, but without leaving such a set behind.
| surfaceIndices | - Indices of the surface elements to delete |
| count | - Number of indices (0: nothing is deleted) |
|
pure virtual |
Reserves memory for given number of volume elements (this will speed-up any subsequent volume element adding)
| count | - Number of volume elements to reserve memory for |
|
pure virtual |
Adds new brick volume element and returns its index in volume element array
| n0,n1,n2,n3,n4,n5,n6,n7 | - Node (vertex) indices defining the brick element Brick node ordering (standard hexahedron): Bottom face (z-): n0, n1, n2, n3 (counter-clockwise) Top face (z+): n4, n5, n6, n7 (counter-clockwise) |
|
pure virtual |
Adds new wedge volume element and returns its index in volume element array
| n0,n1,n2,n3,n4,n5 | - Node (vertex) indices defining the wedge element Wedge node ordering (triangular prism): Bottom face (triangle): n0, n1, n2 (counter-clockwise) Top face (triangle): n3, n4, n5 (counter-clockwise) |
|
pure virtual |
Adds new tetrahedral volume element and returns its index in volume element array
| n0,n1,n2,n3 | - Node (vertex) indices defining the tetra element Tetra node ordering (standard tetrahedron): Base face (triangle): n0, n1, n2 (counter-clockwise) Apex: n3 |
|
pure virtual |
Extrudes a surface element set along a direction into a volume element set Created volume elements are stored in a new volume element set which in turn is last set in the volume element set array. Process will also create additional surface element sets; face opposite to starting surface set (last created - 2) and side surface element set.
| surfaceSetIndex | - Index of the surface element set to extrude |
| dir | - Direction vector for extrusion |
| length | - Length of extrusion |
| divisions | - Number of divisions (layers of volume elements) to create |
| distribution | - Distribution type for extrusion |
| ratio | - Distribution ratio parameter |
|
pure virtual |
Copies a volume element set: its vertices are duplicated (each once) and new volume elements reference the duplicates. The new volume elements are stored as a new volume element set (last in the volume set array); no vertex set is created. Use the in-place operations (translate, rotate, scale, MirrorVolumeElementSet) on the copy to place it.
| setIndex | - Index of the volume element set to copy |
|
pure virtual |
Mirrors a volume element set across a plane, in place: its vertices are mirrored and the node order of its elements is changed (bottom and top faces swapped for bricks and wedges, two nodes swapped for tetras), so the mirrored elements keep a positive volume. Elements outside the set that share its vertices are moved along but not reordered. Face sets referring to faces of the mirrored elements are renumbered so they keep referring to the same (mirrored) faces.
| setIndex | - Index of the volume element set to mirror |
| planeOriginX | - X coordinate of a point on the mirror plane |
| planeOriginY | - Y coordinate of a point on the mirror plane |
| planeOriginZ | - Z coordinate of a point on the mirror plane |
| planeNormalX | - X component of the mirror plane normal vector |
| planeNormalY | - Y component of the mirror plane normal vector |
| planeNormalZ | - Z component of the mirror plane normal vector |
|
pure virtual |
Merges multiple volume element sets into one, removing duplicates. The merged set is stored as a new volume element set (last in the array).
| numVolumeSets | - Number of volume element sets to merge |
| volumeSets | - Array of volume element set indices to merge |
|
pure virtual |
Returns number of volume elements
|
pure virtual |
Returns the type of a given volume element
| elemIndex | - Index of the volume element |
|
pure virtual |
Returns the vertex indices for a given volume element
| elemIndex | - Index of the volume element |
|
pure virtual |
Returns number of volume element sets
|
pure virtual |
Returns the number of volume elements in a volume element set
| setIndex | - Index of the volume element set |
|
pure virtual |
Returns pointer to array of volume element indices in a volume element set
| setIndex | - Index of the volume element set |
|
pure virtual |
Creates a new volume element set, optionally populated with initial data.
| volumeIndices | - Optional array of volume element indices (nullptr for empty set) |
| count | - Number of elements in the array (0 for empty set) |
|
pure virtual |
Replaces the contents of an existing volume element set.
| setIndex | - Index of the volume element set to modify |
| volumeIndices | - Array of volume element indices (nullptr to clear) |
| count | - Number of elements in the array (0 to clear) |
|
pure virtual |
Returns the number of unique vertex elements in a volume element set
| setIndex | - Index of the volume element set |
|
pure virtual |
Extracts unique vertex elements from a volume element set
| setIndex | - Index of the volume element set |
| outVertexElements | - Output buffer for vertex element indices |
| maxCount | - Maximum number of vertices to write |
|
pure virtual |
Deletes volume elements (all, or those in the given set) unconditionally — nothing else references a volume element via a set indirection, so there's no "still in use" concern. Volume element sets (including the given one) are updated in place; a set's index is never removed or renumbered, even if it ends up empty. Face sets are fixed up too: entries for a deleted volume element are removed, entries for a surviving one are remapped to its new index.
|
pure virtual |
Deletes the volume elements given by their indices, like DeleteVolumeElements with a set holding them, but without leaving such a set behind.
| volumeIndices | - Indices of the volume elements to delete |
| count | - Number of indices (0: nothing is deleted) |
|
pure virtual |
Creates a new empty face set.
|
pure virtual |
Returns number of face sets
|
pure virtual |
Returns number of faces in requested face set
| setIndex | - Index of the face set |
|
pure virtual |
Returns the element source of a face in a face set
| setIndex | - Index of the face set |
| faceIndex | - Index of the face within the set |
|
pure virtual |
Returns the element index of a face in a face set
| setIndex | - Index of the face set |
| faceIndex | - Index of the face within the set |
|
pure virtual |
Returns the local face number of a face in a face set
| setIndex | - Index of the face set |
| faceIndex | - Index of the face within the set |
|
pure virtual |
Adds a face to a face set (sorted, no duplicates)
| setIndex | - Index of the face set |
| elementSource | - Element source |
| elementIndex | - Element index |
| faceIndex | - Local face number (1-based) |
|
pure virtual |
Removes a face from a face set
| setIndex | - Index of the face set |
| elementSource | - Element source |
| elementIndex | - Element index |
| faceIndex | - Local face number (1-based) |
|
pure virtual |
Clears all faces from a face set
| setIndex | - Index of the face set |
|
pure virtual |
Rebuilds CSR maps for vertex-to-sets and line-to-sets associations. Should be called after modifying vertex/line set definitions.
|
pure virtual |
Clears all mesh elements.
|
pure virtual |
Exports mesh to OBJ file format
Exports vertex elements, line elements, and surface elements to Wavefront OBJ format. Volume elements are not supported by OBJ format.
| filename | - Path to the output OBJ file |
|
pure virtual |
Returns the last error message (if any)
|
pure virtual |
Clones the builder, generating an exact copy of the underlying structures.