Instances of the Semantic class are used as handles for vertex data container semantics (vertex position, normal vectors, etc.).
sealed class
|
Semantic
|
The Semantic class defines default semantic handles for common vertex data containers. Applications are free to instantiate additional semantic handles as needed.
See also:
VertexArraysTerrain-space vertex displacement amount, along base vertex normal vector.
public
static
readonly
field
|
Displacement
|
||
type
|
Semantic
|
Remarks:
Name:
'Displacement'
Tuple
size:
1
Tuple
type:
Float
Terrain-space vertex elevation values.
public
static
readonly
field
|
Elevation
|
||
type
|
Semantic
|
Remarks:
Name:
'Elevation'
Tuple
size:
1
Tuple
type:
Float
See also:
HeightmapLayer.ElevationHolds minimum (see X) and maximum (see Y) elevation values per mesh sector.
public
static
readonly
field
|
ElevationMinMax
|
||
type
|
Semantic
|
Remarks:
Name:
'ElevationMinMax'
Tuple
size:
2
Tuple
type:
Float
See also:
ElevationEnables the static per-vertex error term based on material tokens that describe the terrain surface (see Material).
public
static
readonly
field
|
ErrorMaterial
|
||
type
|
Semantic
|
Remarks:
Name:
'ErrorMaterial'
Tuple
size:
1
Tuple
type:
Float
The error term is given in squared terrain-space.
A static per-vertex error term based on the curvature of the terrain surface (see Normal).
public
static
readonly
field
|
ErrorNormal
|
||
type
|
Semantic
|
Remarks:
Name:
'ErrorNormal'
Tuple
size:
1
Tuple
type:
Float
The error term is given in squared terrain-space.
Enables the static per-vertex error term based on the terrain geometry (see Position).
public
static
readonly
field
|
ErrorPosition
|
||
type
|
Semantic
|
Remarks:
Name:
'ErrorGeometry'
Tuple
size:
1
Tuple
type:
Float
The error term is given in squared terrain-space.
A static per-vertex error term based on diffuse colors that describe the terrain surface (see Texture.
public
static
readonly
field
|
ErrorTexture
|
||
type
|
Semantic
|
Remarks:
Name:
'ErrorTexture'
Tuple
size:
1
Tuple
type:
Float
The error term is given in squared terrain-space.
Geographic latitude (within [-90..90]°, stored in Y) and longitude (within[-180..180]°, stored in X).
public
static
readonly
field
|
Geographic
|
||
type
|
Semantic
|
Remarks:
Name:
'Geographic'
Tuple
size:
2
Tuple
type:
Double
Ellipsoid height can be obtained from the Elevation array.
Vertex heightmap coordinates.
public
static
readonly
field
|
HeightmapCoords
|
||
type
|
Semantic
|
Remarks:
Name:
'HeightmapCoords'
Tuple
size:
3
Tuple
type:
Int
Heightmap coordinates are stored with respect to a heightmap of size MaxSize. Use bit-shifting to translate coordinates to smaller heightmap sizes (see ComputeShiftToMaxSize).
Per-vertex horizon.
public
static
readonly
field
|
Horizon
|
||
type
|
Semantic
|
Remarks:
Name:
'Horizon'
Tuple
size:
1
Tuple
type:
Long
When this vertex array and Elevation are present, an ambient occlusion term into will be put into the alpha channel of the diffuse colors in Texture.
Per-vertex level-of-detail values.
public
static
readonly
field
|
LevelOfDetail
|
||
type
|
Semantic
|
Remarks:
Name:
'LevelOfDetail'
Tuple
size:
2
Tuple
type:
Float
Each tuple stores a terrain-space area, having the following meaning:
#0
:
area
of
mesh
sector
of
vertex
#1
:
area
of
mesh
neighbourhood
of
vertex
See also:
XDagMaterial tokens for the terrain surface (see MaterialToken).
public
static
readonly
field
|
Material
|
||
type
|
Semantic
|
Remarks:
Name:
'Material'
Tuple
size:
1
Tuple
type:
Long
See also:
MaterialMaskNested bitflags of material tokens for the terrain surface.
public
static
readonly
field
|
MaterialMask
|
||
type
|
Semantic
|
Remarks:
Name:
'MaterialMask'
Tuple
size:
1
Tuple
type:
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:
MaterialNested material weights for the terrain surface.
public
static
readonly
field
|
MaterialRange
|
||
type
|
Semantic
|
Remarks:
Name:
'MaterialRange'
Tuple
size:
1
Tuple
type:
Int
Please refer to Range for details on how to interpret the bits of a material weight range value.
Vertex normal vectors.
public
static
readonly
field
|
Normal
|
||
type
|
Semantic
|
Remarks:
Name:
'Normal'
Tuple
size:
3
Tuple
type:
Float
See also:
ErrorNormal
public
static
readonly
field
|
NormalBase
|
||
type
|
Semantic
|
Vertex positions.
public
static
readonly
field
|
Position
|
||
type
|
Semantic
|
Remarks:
Name:
'Position'
Tuple
size:
3
Tuple
type:
Double
See also:
ErrorPositionVertex bounding sphere radii.
public
static
readonly
field
|
Radius
|
||
type
|
Semantic
|
Remarks:
Name:
'Radius'
Tuple
size:
1
Tuple
type:
Float
The bounding sphere of a mesh sector contains all bounding spheres of its child mesh sectors (see GetChild.
Vertex tangent vectors along the heightmap space X-axis.
public
static
readonly
field
|
TangentX
|
||
type
|
Semantic
|
Remarks:
Name:
'TangentX'
Tuple
size:
3
Tuple
type:
Float
For rectangular heightmaps, these vectors correspond to the usual tangent vectors.
Vertex tangent vectors along the heightmap space Y-axis.
public
static
readonly
field
|
TangentY
|
||
type
|
Semantic
|
Remarks:
Name:
'TangentY'
Tuple
size:
3
Tuple
type:
Float
For rectangular heightmaps, these vectors correspond to the usual bitangent vectors.
Vertex tangent vectors along the heightmap space Z-axis.
public
static
readonly
field
|
TangentZ
|
||
type
|
Semantic
|
Remarks:
Name:
'TangentZ'
Tuple
size:
3
Tuple
type:
Float
These vectors are only used for cubemap heightmaps. In order to avoid distortions at the edges of the cubemap, it is necessary to combine the tangent vectors for the heightmap space X-, Y- and Z-axes separately for each cubemap face during rendering.
Diffuse colors for terrain texture.
public
static
readonly
field
|
Texture
|
||
type
|
Semantic
|
Remarks:
Name:
'Texture'
Tuple
size:
1
Tuple
type:
Long
See also:
ErrorTextureCustom vertex texture coordinates.
public
static
readonly
field
|
TextureCoords
|
||
type
|
Semantic
|
Remarks:
Name:
'TextureCoords'
Tuple
size:
2
Tuple
type:
Float
Version counter that indicates structural changes of each terrain mesh sector.
public
static
readonly
field
|
Version
|
||
type
|
Semantic
|
Remarks:
Name:
'Version'
Tuple
size:
1
Tuple
type:
Int
The version of a vertex is incremented if one of the following happens inside of its mesh sector:
Returns all existing Semantic objects.
public
static
property
|
All
{
get
}
|
||
type
|
Semantic[]
|
||
value
|
|
A list of all Semantic objects. |
The ID of this semantic object.
public
property
|
Id
{
get
}
|
||
type
|
int32
|
||
value
|
|
The unique identifier of this semantic object. |
The name of this vertex data container semantic.
public
property
|
Name
{
get
}
|
||
type
|
string
|
||
value
|
|
The semantic name. |
The tuple size.
public
property
|
TupleSize
{
get
}
|
||
type
|
int32
|
||
value
|
|
The tuple size. |
The tuple element type.
public
property
|
TupleType
{
get
}
|
||
type
|
TupleType
|
||
value
|
The tuple type. |
Creates a new instance of Semantic.
public
constructor
|
Semantic
(string name,
int32 tupleSize,
TupleType tupleType)
|
||
params
|
name
|
[not-null]
|
The name of the semantic object. |
tupleSize
|
[1..4]
|
The tuple size. | |
tupleType
|
The tuple type. |
Remarks:
The
maximum
number
of
Semantic
objects
that
may
be
created
is
256
.
Creates a new vertex data container for this semantic.
public
method
|
CreateVertexData
(int32 capacity)
|
||
type
|
IVertexArray
|
||
params
|
capacity
|
[>0]
|
The capacity of the container, in vertices. |
returns
|
|
The created container. |
public
override
method
|
ToString
()
|
||
type
|
string
|