Semantic
Description
Instances of the Semantic class are used as handles for vertex data container semantics (vertex position, normal vectors, etc.).
The Semantic class defines default semantic handles for common vertex data containers. Applications are free to instantiate additional semantic handles as needed.
- See also
Public / Constants
Area
Per-sector terrain-space area values.
Name: 'Area'
Tuple size: 2
Tuple type: TupleType.Float
Default usage: VertexElementUsage.TextureCoords
Each tuple stores two terrain-space areas, having the following meaning:
-
#0
: area of mesh sector of vertex
This is the area of the triangles spanned between the center vertex and the left parent, right parent, grand parent and ancestor vertices. -
#1
: area of mesh neighbourhood of vertex
This is the area of the triangles spanned between the center vertex and the nearest vertices (according to the current mesh structure) towards the left parent, right parent, grand parent and ancestor vertices.
In addition to level-of-detail computations, the actual mesh sector areas of this semantic can be used instead of approximating them using the bounding sphere radii (see IMeshBoundMinSize, for example).
- See also
CoverageFlags
Coverage flags per vertex.
Name: 'CoverageFlags'
Tuple size: 1
Tuple type: TupleType.Int
The following coverage flags are defined for this semantic:
-
4
:
The vertex is solid, i.e. it has been created for a heightmap sample with full coverage. If not preset, the vertex is void, i.e. it represents a heightmap sample with zero coverage. See HeightmapSample.Coverage. -
2
:
The vertex is the center of a mesh sector and there is at least one void vertex in the mesh sector. See CoverageFlags.NotSolid. -
1
:
The vertex is the center of a mesh sector and there is at least one solid vertex in the mesh sector. See CoverageFlags.NotEmpty.
Displacement
Terrain-space vertex displacement amount, along base vertex normal vector.
Name: 'Displacement'
Tuple size: 1
Tuple type: TupleType.Float
DisplacementMinMax
Holds minimum (see TupleComponent.X) and maximum (see TupleComponent.Y) terrain-space displacement values per mesh sector.
Name: 'DisplacementMinMax'
Tuple size: 2
Tuple type: TupleType.Float
- See also
Elevation
Terrain-space vertex elevation values.
Name: 'Elevation'
Tuple size: 1
Tuple type: TupleType.Float
ElevationMinMax
Holds minimum (see TupleComponent.X) and maximum (see TupleComponent.Y) terrain-space elevation values per mesh sector.
Name: 'ElevationMinMax'
Tuple size: 2
Tuple type: TupleType.Float
- See also
ErrorMaterial
Enables the static per-vertex error term based on material tokens that describe the terrain surface (see Material).
Name: 'ErrorMaterial'
Tuple size: 1
Tuple type: TupleType.Float
The error term is given in squared terrain-space.
ErrorNormal
A static per-vertex error term based on the curvature of the terrain surface (see Normal).
Name: 'ErrorNormal'
Tuple size: 1
Tuple type: TupleType.Float
The error term is given in squared terrain-space.
ErrorPosition
Enables the static per-vertex error term based on the terrain geometry (see Position).
Name: 'ErrorGeometry'
Tuple size: 1
Tuple type: TupleType.Float
The error term is given in squared terrain-space.
ErrorTexture
A static per-vertex error term based on diffuse colors that describe the terrain surface (see Texture).
Name: 'ErrorTexture'
Tuple size: 1
Tuple type: TupleType.Float
The error term is given in squared terrain-space.
Geographic
Geographic latitude (within [-90..90]°, stored in TupleComponent.Y) and longitude (within[-180..180]°, stored in TupleComponent.X).
Name: 'Geographic'
Tuple size: 2
Tuple type: TupleType.Double
Ellipsoid height can be obtained from the Elevation array.
- See also
HeightmapCoords
Vertex heightmap coordinates.
Name: 'HeightmapCoords'
Tuple size: 3
Tuple type: TupleType.Int
Default usage: VertexElementUsage.TextureCoords
Heightmap coordinates are stored with respect to a heightmap of size HeightmapsUtil.MaxSize. Use bit-shifting to translate coordinates to smaller heightmap sizes (see HeightmapsUtil.ComputeShiftToMaxSize).
Material
Material tokens for the terrain surface (see MaterialToken).
Name: 'Material'
Tuple size: 1
Tuple type: TupleType.Long
MaterialMask
Nested bitflags of material tokens for the terrain surface.
Name: 'MaterialMask'
Tuple size: 1
Tuple type: TupleType.Long
For each material ID m
in the range [0..63], the flag bit 2^m
will be set in the bitflag of a vertex iff the material is present somewhere in its mesh sector.
- See also
MaterialRange
Nested material weights for the terrain surface.
Name: 'MaterialRange'
Tuple size: 1
Tuple type: TupleType.Int
Please refer to MaterialToken.Range for details on how to interpret the bits of a material weight range value.
Normal
Vertex normal vectors.
Name: 'Normal'
Tuple size: 3
Tuple type: TupleType.Float
Default usage: VertexElementUsage.Normal
- See also
NormalBase
Vertex base normal vectors.
Name: 'NormalBase'
Tuple size: 3
Tuple type: TupleType.Float
Default usage: VertexElementUsage.Normal
During rendering, an application may choose to interpolate between actual normal vectors and base normal vectors, according to Area, in order to avoid visual aliasing artefacts when zooming out from a highly detailed mesh.
- See also
Position
Vertex positions.
Name: 'Position'
Tuple size: 3
Tuple type: TupleType.Double
Default usage: VertexElementUsage.Position
- See also
Projected
Projected coordinates, stored in TupleComponent.X (easting resp. westing) and TupleComponent.Y (northing resp. southing).
Name: 'Projected'
Tuple size: 2
Tuple type: TupleType.Double
- See also
Radius
Vertex bounding sphere radii.
Name: 'Radius'
Tuple size: 1
Tuple type: TupleType.Float
The bounding sphere of a mesh sector contains all bounding spheres of its child mesh sectors (see MeshTree.GetChild.
TangentX
Vertex tangent vectors along the texture U-axis, not used by terrain meshes.
Name: 'TangentX'
Tuple size: 3
Tuple type: TupleType.Float
Default usage: VertexElementUsage.Tangent
TangentY
Vertex tangent vectors along the texture V-axis, not used by terrain meshes.
Name: 'TangentY'
Tuple size: 3
Tuple type: TupleType.Float
Default usage: VertexElementUsage.Tangent
Texture
Diffuse colors for terrain texture.
Name: 'Texture'
Tuple size: 1
Tuple type: TupleType.Long
- See also
TextureCoords
Primary vertex texture coordinates.
Name: 'TextureCoords'
Tuple size: 2
Tuple type: TupleType.Float
Default usage: VertexElementUsage.TextureCoords
TextureCoordsExtra
Secondary vertex texture coordinates.
Name: 'TextureCoords'
Tuple size: 2
Tuple type: TupleType.Float
Default usage: VertexElementUsage.TextureCoords
Version
Version counter that indicates structural changes of each terrain mesh sector.
Name: 'Version'
Tuple size: 1
Tuple type: TupleType.Int
The version of a vertex is incremented if one of the following happens inside of its mesh sector:
-
A new vertex is added.
-
An existing vertex is updated.