Picking

Description

sealed class Tinman.Terrain.Meshing.Picking

Derived from

MeshTraversal abstract
IMeshBoundMinRadius

The Picking class traverses the filtered mesh (see IMeshFilters.FilterIn) and computes the intersection of the given geometric primitive with the terrain surface.

The Picking class can be used to pick individual points, vertices and/or triangles from a CLOD mesh.

The following vertex data semantics are used by this class:

Public / Constructors

Picking


public constructor Picking → ()

Creates a new instance of Picking.

Public / Methods

Pick​Coords

4 overloads


[Pure]
public method PickCoords1 → (1)

coords in : Vec3D

Heightmap coordinates (relative to HeightmapsUtil.MaxSize) of a point on the ray.

returns → Vec3D

The position of the found intersection or Vec3D.Undefined if no intersection has been found.

Computes the intersection of the given ray with the terrain surface.

The ray direction is parallel to the terrain up-vector (see IGeometry.ComputeUp).


[Pure]
public method PickCoords2 → (3)

coordsX in : float64

Heightmap X-coordinate (relative to HeightmapsUtil.MaxSize) of a point on the ray.

coordsY in : float64

Heightmap Y-coordinate (relative to HeightmapsUtil.MaxSize) of a point on the ray.

coordsZ in : float64

Heightmap Z-coordinate (relative to HeightmapsUtil.MaxSize) of a point on the ray.

returns → Vec3D

The position of the found intersection or Vec3D.Undefined if no intersection has been found.

Computes the intersection of the given ray with the terrain surface.

The ray direction is parallel to the terrain up-vector (see IGeometry.ComputeUp).


public method PickCoords3 → (2)

coords in : Vec3D

Heightmap coordinates (relative to HeightmapsUtil.MaxSize) of a point on the ray.

flags in : PointInfoFlags

The PointInfoFlags.

returns → PointInfo

A PointInfo object that describes the found intersection (valid until next call to Pick*) or null if no intersection has been found.

Computes the intersection of the given ray with the terrain surface.

The ray direction is parallel to the terrain up-vector (see IGeometry.ComputeUp).


public method PickCoords4 → (4)

coordsX in : float64

Heightmap X-coordinate (relative to HeightmapsUtil.MaxSize) of a point on the ray.

coordsY in : float64

Heightmap Y-coordinate (relative to HeightmapsUtil.MaxSize) of a point on the ray.

coordsZ in : float64

Heightmap Z-coordinate (relative to HeightmapsUtil.MaxSize) of a point on the ray.

flags in : PointInfoFlags

The PointInfoFlags.

returns → PointInfo

A PointInfo object that describes the found intersection (valid until next call to Pick*) or null if no intersection has been found.

Computes the intersection of the given ray with the terrain surface.

The ray direction is parallel to the terrain up-vector (see IGeometry.ComputeUp).

Pick​Point

4 overloads


[Pure]
public method PickPoint1 → (1)

point in : Vec3D

A point on the ray.

returns → Vec3D

The position of the found intersection or Vec3D.Undefined if no intersection has been found.

Computes the intersection of the given ray with the terrain surface.

The ray direction is parallel to the terrain up-vector (see IGeometry.ComputeUp).


[Pure]
public method PickPoint2 → (3)

pointX in : float64

X-coordinate of a point on the ray.

pointY in : float64

Y-coordinate of a point on the ray.

pointZ in : float64

Z-coordinate of a point on the ray.

returns → Vec3D

The position of the found intersection or Vec3D.Undefined if no intersection has been found.

Computes the intersection of the given ray with the terrain surface.

The ray direction is parallel to the terrain up-vector (see IGeometry.ComputeUp).


public method PickPoint3 → (2)

point in : Vec3D

A point on the ray.

flags in : PointInfoFlags

The PointInfoFlags.

returns → PointInfo

A PointInfo object that describes the found intersection (valid until next call to Pick*) or null if no intersection has been found.

Computes the intersection of the given ray with the terrain surface.

The ray direction is parallel to the terrain up-vector (see IGeometry.ComputeUp).


public method PickPoint4 → (4)

pointX in : float64

X-coordinate of a point on the ray.

pointY in : float64

Y-coordinate of a point on the ray.

pointZ in : float64

Z-coordinate of a point on the ray.

flags in : PointInfoFlags

The PointInfoFlags.

returns → PointInfo

A PointInfo object that describes the found intersection (valid until next call to Pick*) or null if no intersection has been found.

Computes the intersection of the given ray with the terrain surface.

The ray direction is parallel to the terrain up-vector (see IGeometry.ComputeUp).

Pick​Ray

2 overloads


public method PickRay1 → (2)

ray in : Ray

The ray.

flags opt : PointInfoFlags = PointInfoFlags.All

The PointInfoFlags.

returns → PointInfo

A PointInfo object that describes the found intersection (valid until next call to Pick*) or null if no intersection has been found.

Computes the intersection of the given ray with the terrain surface.

Intersections behind the ray origin are not reported by this method.


public method PickRay2 → (7)

pointX in : float64

X-coordinate of ray origin.

pointY in : float64

Y-coordinate of ray origin.

pointZ in : float64

Z-coordinate of ray origin.

directionX in : float64

X-component of ray direction.

directionY in : float64

Y-component of ray direction.

directionZ in : float64

Z-component of ray direction.

flags opt : PointInfoFlags = PointInfoFlags.All

The PointInfoFlags.

returns → PointInfo

A PointInfo object that describes the found intersection (valid until next call to Pick*) or null if no intersection has been found.

Computes the intersection of the given ray with the terrain surface.

Intersections behind the ray origin are not reported by this method.

Public / Attributes

Filter​In


public attribute FilterIn → (get,set)

value : MeshTreeFilter

The filter or null.

The mesh tree input filter to use for querying sector culling and marks.

The default value is null (i.e. all mesh sectors are visited).