|
MeshFactoryCreateExtrudedMeshAlongPath(Vector2, Int32, Vector3, Vector3, Boolean, Boolean, Boolean, String) Method |
Generate a mesh extruded from a 2D shape along the defined path in the 3D.
Namespace: Ab4d.SharpEngine.MeshesAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax public static StandardMesh CreateExtrudedMeshAlongPath(
Vector2[] shapePositions,
int[]? shapeTriangleIndices,
Vector3[] extrudePathPositions,
Vector3 shapeYVector3D,
bool isClosed = true,
bool isSmooth = false,
bool flipNormals = false,
string? name = null
)
Parameters
- shapePositions Vector2
- Array of 2D positions that define the base shape polygon.
- shapeTriangleIndices Int32
- Optional array of indices that define triangles that define the base surface from positions. Must be provided when isClosed is true.
- extrudePathPositions Vector3
- Array of 3D positions that define the path of extrusion.
- shapeYVector3D Vector3
- A 3D vector that defines the 3D direction along the 2D shape surface (i.e., the Y axis of the base 2D shape).
- isClosed Boolean (Optional)
- Close the mesh, i.e., generate triangles that close the first and the last shape.
- isSmooth Boolean (Optional)
- If true, the mesh appears smooth, otherwise the edges are sharp.
- flipNormals Boolean (Optional)
- Flip the normals. Use when base shape triangles are defined in the counter-clockwise direction.
- name String (Optional)
- Mesh name (for debug purposes).
Return Value
StandardMeshStandardMesh with filled vertices array and index array.
Exceptions See Also