Click or drag to resize
Ab4d.SharpEngine logo

GraphTriangulatorTriangulate(Single, Single, Single, Single) Method

Triangulate method creates triangles under the graph defined by graphValues.

Namespace: Ab4d.SharpEngine.Utilities
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 5.0.1075+bc537c8d217949260b11f66ee86aefa6456ac517
Syntax
C#
public static (Vector2[] , int[] ) Triangulate(
	float[] graphValues,
	float xStart = 0f,
	float xStep = 1f,
	float yBaseline = 0f
)

Parameters

graphValues  Single
Array of y values in the graph
xStart  Single  (Optional)
Defines the start X value of the graph (default value is 0)
xStep  Single  (Optional)
Defines the space between two graph values on the X axis (default value is 1)
yBaseline  Single  (Optional)
Defines the Y position of the graph baseline (default value is 0)

Return Value

ValueTupleVector2, Int32
Tuple with triangle positions and triangle indices
See Also