TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class Picking in Tinman.Terrain.Meshing

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

sealed class Picking implements IMeshBoundMinRadius
  extends MeshTraversal

Remarks

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 / Attributes

FilterIn

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

public property FilterIn { get set }
type MeshTreeFilter
value The filter or null.
inherited MeshTraversal.FilterIn

Remarks:

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

See also:

MeshTree.GetRoot
MeshTree.GetChild
MeshTree.GetDown

FilterOut

The mesh tree output filter to use for performing sector culling and marking.

public property FilterOut { get set }
type MeshTreeFilter
value The mesh tree filter object.
inherited MeshTraversal.FilterOut

Remarks:

This MeshTreeFilter is not reset automatically. The application is responsible to call Reset.

The default value is null (i.e. the input filter is used in that case).

See also:

MeshTree.SectorCull
MeshTree.SectorMark
MeshTree.SectorMarkRoots

HasMesh

Has this object been bound to an IMesh object?

public property HasMesh { get }
type bool
value true if this object is currently bound to an IMesh, false if not.
inherited MeshBoundBase.HasMesh

Mesh

The CLOD mesh this object is currently bound to.

public property Mesh { get }
type IMesh
value The CLOD mesh or null.
inherited MeshBoundBase.Mesh

MinRadius

The mesh sector quadtree is traversed until the bounding sphere radius of a mesh sector falls below this limit.

public property MinRadius { get set }
type float32
value [>=0] The minimum bounding sphere radius, in terrain-space.
implements IMeshBoundMinRadius.MinRadius

Remarks:

The default value is 0 (i.e. the entire mesh is traversed).

Tree

The filtered MeshTree of this mesh traversal object.

public property Tree { get }
type MeshTree
value [not-null] The filtered MeshTree object or null if this object is not bound.
inherited MeshTraversal.Tree

Public / Methods

MeshBind

Binds this object to the given IMesh.

public override method MeshBind (IMesh mesh)
params mesh The mesh object.
overrides MeshTraversal.MeshBind

MeshUnbind

Unbinds this object from its current IMesh.

public override method MeshUnbind ()
overrides MeshBoundBase.MeshUnbind

PickCoords

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

public method PickCoords (Vec3D coords, PointInfo pointInfo, PointInfoFlags flags = PointInfoFlags.All)
type bool
params coords Heightmap coordinates (relative to MaxSize) of a point on the ray.
  pointInfo [not-null] The output picking sample.
  flags The PointInfoFlags.
returns true if an intersection has been found, false if no intersection has been found.

Remarks:

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


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

public method PickCoords (float64 coordsX, float64 coordsY, float64 coordsZ, PointInfo pointInfo, PointInfoFlags flags = PointInfoFlags.All)
type bool
params coordsX Heightmap X-coordinate (relative to MaxSize) of a point on the ray.
  coordsY Heightmap Y-coordinate (relative to MaxSize) of a point on the ray.
  coordsZ Heightmap Z-coordinate (relative to MaxSize) of a point on the ray.
  pointInfo [not-null] The output picking sample.
  flags The PointInfoFlags.
returns true if an intersection has been found, false if no intersection has been found.

Remarks:

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

PickPoint

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

public method PickPoint (Vec3D point, PointInfo pointInfo, PointInfoFlags flags = PointInfoFlags.All)
type bool
params point A point on the ray.
  pointInfo [not-null] The output picking sample.
  flags The PointInfoFlags.
returns true if an intersection has been found, false if no intersection has been found.

Remarks:

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


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

public method PickPoint (float64 pointX, float64 pointY, float64 pointZ, PointInfo pointInfo, PointInfoFlags flags = PointInfoFlags.All)
type bool
params pointX X-coordinate of a point on the ray.
  pointY Y-coordinate of a point on the ray.
  pointZ Z-coordinate of a point on the ray.
  pointInfo [not-null] The output picking sample.
  flags The PointInfoFlags.
returns true if an intersection has been found, false if no intersection has been found.

Remarks:

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

PickRay

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

public method PickRay (Vec3D point, Vec3D direction, PointInfo pointInfo, PointInfoFlags flags = PointInfoFlags.All)
type bool
params point Coordinates of ray origin.
  direction Ray direction.
  pointInfo [not-null] The output picking sample.
  flags The PointInfoFlags.
returns true if an intersection has been found, false if no intersection has been found.

Remarks:

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


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

public method PickRay (float64 pointX, float64 pointY, float64 pointZ, float64 directionX, float64 directionY, float64 directionZ, PointInfo pointInfo, PointInfoFlags flags = PointInfoFlags.All)
type bool
params pointX X-coordinate of ray origin.
  pointY Y-coordinate of ray origin.
  pointZ Z-coordinate of ray origin.
  directionX X-component of ray direction.
  directionY Y-component of ray direction.
  directionZ Z-component of ray direction.
  pointInfo [not-null] The output picking sample.
  flags The PointInfoFlags.
returns true if an intersection has been found, false if no intersection has been found.

Remarks:

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

VisitFaces

Visits the given mesh root sectors.

public method VisitFaces (CubemapFace meshFace = CubemapFace.All)
params meshFace The mesh face to traverse. Defaults to All.
inherited MeshTraversal.VisitFaces

VisitQuadrant

Visits a quadrant of the given mesh sector on the current face, assuming that the corresponding child mesh sector does not exist.

public override method VisitQuadrant (int32 sector, int32 childIdx)
params sector Index of center vertex of sector to visit.
  childIdx Index of non-existing child sector in sector.
implements MeshTraversal.VisitQuadrant

Remarks:

The quadtree data structure for visiting the given sector can be obtained by getting the Tree property of the current mesh (see MeshBind.

VisitSector

Visits the given mesh sector on the current face.

public override method VisitSector (int32 sector)
params sector Index of center vertex of sector to visit.
implements MeshTraversal.VisitSector

Remarks:

The quadtree data structure for visiting the given sector can be obtained by getting the Tree property of the current mesh (see MeshBind.