 |
HeightMapContoursNodeCreateContourLines(PositionNormalTextureVertex, Int32, Single, Single) Method |
Generates contour line segments for a mesh based on multiple contour heights.
Namespace: Ab4d.SharpEngine.SceneNodesAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.0.9584+ba1aaa26d4181dd3fa8ed7b6398391d1affa36c8
Syntaxpublic static List<Vector3>?[] CreateContourLines(
PositionNormalTextureVertex[] vertices,
int[] triangleIndices,
float[] contourLineHeights,
float contourOffset
)
Parameters
- vertices PositionNormalTextureVertex
- An array of mesh vertices, each containing position, normal, and texture data. The Y component of each
vertex's position is used to determine contour intersections.
- triangleIndices Int32
- An array of indices defining the mesh triangles. Each group of three consecutive indices represents a
triangle in the mesh.
- contourLineHeights Single
- An array of Y-coordinate values at which contour lines are to be generated. Each value specifies a
horizontal plane where contours are computed.
- contourOffset Single
- The vertical offset to apply to each generated contour line segment. This value is added to the Y component
of each contour point.
Return Value
ListVector3An array of lists, where each list contains the contour line segment endpoints for the corresponding contour
height. If no segments are found for a given height, the array element is null.
RemarksThe method processes
each triangle in the mesh and determines where the specified contour heights intersect the triangle. The
resulting segments are offset vertically by the specified amount. The returned array has the same length as
the contourLineHeights array, and each element contains the segments for that contour height.
See Also