Represents local information about a point on the terrain-surface.
class
|
PointInfo
|
See also:
PickingThe terrain-space elevation.
public
property
|
Elevation
{
get
set
}
|
||
type
|
float32
|
||
value
|
The
elevation
value
or
0
if
not
present
(see
Elevation).
|
Remarks:
If the given value is not a number (see IsNumber), the corresponding point info flag flag will be cleared.
See also:
Semantic.ElevationThe cubemap face of the triangle that contains the point (derived from Heightmap and Vertices).
public
property
|
Face
{
get
}
|
||
type
|
CubemapFace
|
||
value
|
The cubemap face. |
Unit-length terrain-space tangent vector that corresponds to the cubemap face X-axis.
public
property
|
FaceTangentX
{
get
set
}
|
||
type
|
Vec3F
|
||
value
|
The tangent vector or Zero if not present (see FaceTangentX). |
Remarks:
If the given value is undefined (see IsUndefined ), the corresponding point info flag flag will be cleared.
For rectangular terrains (see Rect), TangentX and FaceTangentX are equivalent.
Unit-length terrain-space tangent vector that corresponds to the cubemap face Y-axis.
public
property
|
FaceTangentY
{
get
set
}
|
||
type
|
Vec3F
|
||
value
|
The tangent vector or Zero if not present (see FaceTangentY). |
Remarks:
If the given value is undefined (see IsUndefined ), the corresponding point info flag flag will be cleared.
For rectangular terrains (see Rect), TangentY and FaceTangentY are equivalent.
A bitmask that indicates which values have been computed and are thus valid.
public
property
|
Flags
{
get
}
|
||
type
|
PointInfoFlags
|
||
value
|
The point info flags. |
Heightmap coordinates of the picked point, relative to MaxSize.
public
property
|
Heightmap
{
get
set
}
|
||
type
|
Vec3D
|
||
value
|
The heightmap coordinates or Zero if not present (see Heightmap). |
Remarks:
If the given value is undefined (see IsUndefined), the corresponding point info flag flag will be cleared.
Unit-length terrain-space normal vector.
public
property
|
Normal
{
get
set
}
|
||
type
|
Vec3F
|
||
value
|
The normal vector or Zero if not present (see Normal). |
The point position, in terrain-space.
public
property
|
Position
{
get
set
}
|
||
type
|
Vec3D
|
||
value
|
The point coordinates or Zero if not present (see Position). |
Unit-length terrain-space tangent vector that corresponds to the heightmap space X-axis.
public
property
|
TangentX
{
get
set
}
|
||
type
|
Vec3F
|
||
value
|
The tangent vector or Zero if not present (see TangentX). |
Remarks:
If the given value is undefined (see IsUndefined ), the corresponding point info flag flag will be cleared.
For rectangular terrains (see Rect), TangentX and FaceTangentX are equivalent.
Unit-length terrain-space tangent vector that corresponds to the heightmap space Y-axis.
public
property
|
TangentY
{
get
set
}
|
||
type
|
Vec3F
|
||
value
|
The tangent vector or Zero if not present (see TangentY). |
Remarks:
If the given value is undefined (see IsUndefined ), the corresponding point info flag flag will be cleared.
For rectangular terrains (see Rect), TangentY and FaceTangentY are equivalent.
Unit-length terrain-space tangent vector that corresponds to the heightmap space Z-axis.
public
property
|
TangentZ
{
get
set
}
|
||
type
|
Vec3F
|
||
value
|
The tangent vector or Zero if not present (see TangentZ). |
Remarks:
If the given value is undefined (see IsUndefined), the corresponding point info flag flag will be cleared.
Indices of vertices of picked triangle.
public
property
|
Vertices
{
get
set
}
|
||
type
|
Vec3I
|
||
value
|
The vertex indices or Zero if not present (see Vertices). |
Remarks:
The
vertices
of
the
picked
triangle
are
oriented
so
that
the
vector
cross(Y-X,
Z-X)
points
into
the
direction
of
the
triangle
face
normal.
The
barycentric
coordinates
(range
[0..1]
)
of
picked
point
in
picked
triangle.
public
property
|
Weights
{
get
set
}
|
||
type
|
Vec3D
|
||
value
|
The barycentric weights or Zero if not present (see Weights). |
Remarks:
If the given value is undefined (see IsUndefined ), the corresponding point info flag flag will be cleared.
The picked point can be expressed using barycentric coordinates as follows:
p = A * w1 + B * w2 + C * w3where
The
sum
of
the
barycentric
coordinates
is
always
1.0
(i.e.
w1
+
w2
+
w3
=
1
).
Creates a new instance of PointInfo.
public
constructor
|
PointInfo
()
|
Clears all flags of this point info object and resets all values.
public
method
|
Clear
()
|
See also:
FlagsComputes missing point info values based on the available input data.
public
method
|
Compute
(Int3 coords,
Float1 elevation,
Double3 position,
Float3 normal,
Float3 tangentX,
Float3 tangentY,
Float3 tangentZ,
PointInfoFlags flags = PointInfoFlags.All)
|
||
params
|
coords
|
The
heightmap
coordinate
vertex
array
(see
HeightmapCoords)
or
null .
|
|
elevation
|
The
elevation
vertex
array
(see
Elevation)
or
null .
|
||
position
|
The
vertex
position
vertex
array
(see
Position)
or
null .
|
||
normal
|
The
normal
vector
vertex
array
(see
Normal)
or
null .
|
||
tangentX
|
The
tangent
vector
vertex
array
(see
TangentX)
or
null .
|
||
tangentY
|
The
tangent
vector
vertex
array
(see
TangentY)
or
null .
|
||
tangentZ
|
The
tangent
vector
vertex
array
(see
TangentZ)
or
null .
|
||
flags
|
The point info flags of the values to compute. |