TerrainVertexData
Description
Full source code is included in the Tinman 3D SDK download. |
Enumeration of vertex data elements.
- See also
Public / Constants
Position
Vertex positions, in the local coordinate system of the terrain mesh chunk.
data[N * 3 + 0] = X-coordinate of vertex position data[N * 3 + 1] = Y-coordinate of vertex position data[N * 3 + 2] = Z-coordinate of vertex position
where N
is the zero-based index of the vertex.
Normal
Unit-length vertex normal vectors, in the local coordinate system of the terrain mesh chunk:
data[N * 3 + 0] = X-component of normal vector data[N * 3 + 1] = Y-component of normal vector data[N * 3 + 2] = Z-component of normal vector
where N
is the zero-based index of the vertex.
Tangent
Unit-length vertex tangent vectors, in the local coordinate system of the terrain mesh chunk:
data[N * 3 + 0] = X-component of tangent vector data[N * 3 + 1] = Y-component of tangent vector data[N * 3 + 2] = Z-component of tangent vector
where N
is the zero-based index of the vertex.
Bitangent
Unit-length vertex bitangent vectors, in the local coordinate system of the terrain mesh chunk:
data[N * 3 + 0] = X-component of bitangent vector data[N * 3 + 1] = Y-component of bitangent vector data[N * 3 + 2] = Z-component of bitangent vector
where N
is the zero-based index of the vertex.
Albedo
Surface albedo (linear sRGB):
data[N * 3 + 0] = red channel intensity data[N * 3 + 1] = green channel intensity data[N * 3 + 2] = blue channel intensity
where N
is the zero-based index of the vertex.
Occlusion
Ambient occlusion (linear, 0 := full ambient occlusion, 1 := no ambient occlusion):
data[N] = ambient occlusion factor
where N
is the zero-based index of the vertex.
TextureCoordinates
Texture coordinates:
data[N * 2 + 0] = U-component of texture coordinates data[N * 2 + 1] = V-component of texture coordinates
where N
is the zero-based index of the vertex.