Click or drag to resize
Ab4d.SharpEngine logo

HeightMapContoursNodeCreateContourLine(Vector3, Int32, Single, Single) Method

Returns a list of positions that represents the contour line segments at the specified height for the mesh specified by the positions and triangleIndices.

Namespace: Ab4d.SharpEngine.SceneNodes
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.0.9584+ba1aaa26d4181dd3fa8ed7b6398391d1affa36c8
Syntax
C#
public static List<Vector3>? CreateContourLine(
	Vector3[] positions,
	int[] triangleIndices,
	float contourLineHeight,
	float contourOffset
)

Parameters

positions  Vector3
An array of position defined as Vector3. 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.
contourLineHeight  Single
Y-coordinate value at which contour lines are to be generated. The value specifies a horizontal plane where contour is 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

ListVector3
A list of positions that represents the contour line segments. If no segments are found for a given height, then null is returned.
Remarks
The method processes each triangle in the mesh and determines where the specified contour height intersect the triangle. The resulting segment is offset vertically by the specified amount. The returned list contains the contour for that contour height.
See Also