|
MeshFactoryCreateLatheMesh(Vector3, Vector3, MeshFactoryLatheSection, Int32, Boolean, Boolean, Boolean, Single, Single, Boolean, NullableVector3, String) Method |
Create a 3D lathe mesh using a custom rotation. A lathe is a 3D shape obtained by rotating a pre-defined
control profile around an axis.
Namespace: Ab4d.SharpEngine.MeshesAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax public static StandardMesh CreateLatheMesh(
Vector3 startPosition,
Vector3 endPosition,
MeshFactoryLatheSection[] sections,
int segments,
bool isStartPositionClosed,
bool isEndPositionClosed,
bool generateTextureCoordinates,
float startAngle,
float endAngle,
bool isMeshClosed,
Vector3? startAngleVector = null,
string? name = null
)
Parameters
- startPosition Vector3
- Position of the starting point (the center of the bottom circle / first section).
- endPosition Vector3
- Position of the ending point (the center of the top circle / last section).
- sections MeshFactoryLatheSection
- Array of LatheSection objects that define control points on the shape profile.
- segments Int32
- Number of segments comprising the circles and the side surface.
- isStartPositionClosed Boolean
- Whether the start position is closed (i.e., the bottom circle is filled).
- isEndPositionClosed Boolean
- Whether the end position is closed (i.e., the top circle is filled).
- generateTextureCoordinates Boolean
- Generate texture coordinates for the mesh.
- startAngle Single
- The starting rotation angle.
- endAngle Single
- The ending rotation angle.
- isMeshClosed Boolean
- Whether the mesh should be closed (filled surface) in area not covered by rotation.
- startAngleVector NullableVector3 (Optional)
- Optional direction in which the segment with startAngle is facing.
- name String (Optional)
- Mesh name (for debug purposes).
Return Value
StandardMeshStandardMesh with filled vertices array and index array.
See Also