| HeightFieldGetTriangle Method |
Gets a triangle representing a part of a height field cell.
Namespace: DigitalRune.Geometry.ShapesAssembly: DigitalRune.Geometry (in DigitalRune.Geometry.dll) Version: 1.18.0.0 (1.18.2.14427)
Syntax public Triangle GetTriangle(
int indexX,
int indexZ,
bool second
)
Public Function GetTriangle (
indexX As Integer,
indexZ As Integer,
second As Boolean
) As Triangle
public:
Triangle GetTriangle(
int indexX,
int indexZ,
bool second
)
member GetTriangle :
indexX : int *
indexZ : int *
second : bool -> Triangle
Parameters
- indexX
- Type: SystemInt32
The cell index along WidthX. - indexZ
- Type: SystemInt32
The cell index along WidthZ. - second
- Type: SystemBoolean
If set to the triangle for the second cell half is returned;
otherwise the triangle for the first cell half is returned.
Return Value
Type:
TriangleA triangle.
Exceptions Remarks
Each cell of the height field array is approximated with 2 triangles.
second decides which triangle is returned.
The cell indices start at (0, 0) for the first cell. The last cell has the indices
(m-2, n-2) when the height field array is a float[m, n] array.
See Also