|
MeshFactoryCreateTubeMeshAlongPath Method |
Create a 3D mesh that consists of 3D tubes connecting the path between the given points.
Namespace: Ab4d.SharpEngine.MeshesAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax public static StandardMesh CreateTubeMeshAlongPath(
Vector3[] pathPositions,
float radius,
bool isTubeClosed,
bool isPathClosed,
int segments,
Vector2[]? pathPositionTextureCoordinates = null,
bool generateTextureCoordinates = true,
string? name = null
)
Parameters
- pathPositions Vector3
- Array of path positions.
- radius Single
- Tube radius.
- isTubeClosed Boolean
- Flag indicating whether the tube is closed, i.e., has filled the start and end circle surface.
- isPathClosed Boolean
- Flag indicating whether the path is closed, i.e., the last point is automatically connected to the first one.
- segments Int32
- Number of segments comprising the tube's side surface.
- pathPositionTextureCoordinates Vector2 (Optional)
- Optional array of texture coordinates corresponding to given path positions. If not specified, the texture is evenly divided among path segments. If fewer texture coordinates are given than there are path points, the last texture coordinate is replicated.
- generateTextureCoordinates Boolean (Optional)
- Generate texture coordinates. Automatically considered true if pathPositionTextureCoordinates is valid.
- name String (Optional)
- Mesh name (for debug purposes).
Return Value
StandardMeshStandardMesh with filled vertices array and index array.
See Also