TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class Triangulator in Tinman.Terrain.Kernel

The Triangulator class performs triangulation of terrain meshes.

sealed class Triangulator  

See also:

IMesh.Triangulator

Public / Methods

Begin

Begins a new triangulation cycle.

public method Begin (TriangulationBuffer triangulationBuffer)
params triangulationBuffer [not-null] The output triangulation buffer to use.

See also:

Sector
SectorLeaf
End

End

Ends the current triangulation cycle.

public method End ()

See also:

Begin

Fan

Generates a triangle fan that covers the given mesh sector.

public method Fan (int32 sector, [] int32[] triangleFanIndices)
type int32
params sector The mesh sector.
  triangleFanIndices [not-null] Output array for generated vertex indices.
returns [6..10] The number of vertex indices that have been written to triangleFanIndices

Remarks:

Triangle fans can be generated at any time. It is not necessary to call Begin first.

FanLeaf

Generates a triangle fan for a quadrant of the given mesh sector, assuming that it is a leaf (i.e. it has no child sectors).

public method FanLeaf (int32 sector, int32 childIdx)
type Vec4I
params sector The mesh sector.
  childIdx Child index of the non-existent sector in sector which area shall be triangulated.
returns The vertex indices of the triangle fan, to be processed in this order: X, Y, Z, W.
The resulting counter-clockwise triangles are thus defined as:
<X, Y, Z >
<X, Z, W >
The second triangle can be degenerated, in which case W will be equal to X. The missing area will then be covered by the triangle fan of an adjacent quadrant.

Remarks:

Triangle fans can be generated at any time. It is not necessary to call Begin first.

Mark

Marks the current end of the triangulation and returns an offset that can be used to render all subsequent triangles.

public method Mark ()
type int32
returns [>=0] The number of generated vertex indices so far.

See also:

Begin
End

Sector

Generates triangles that cover the given mesh sector.

public method Sector (int32 sector)
params sector The mesh sector.

See also:

Begin
End

SectorLeaf

Generates triangles that cover a quadrant of the given mesh sector, assuming that it is a leaf (i.e. it has no child sectors).

public method SectorLeaf (int32 sector, int32 childIdx)
params sector Index of center vertex of sector to visit.
  childIdx Child index of the non-existent sector in sector which area shall be triangulated.

See also:

Begin
End