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

class MeshCameraWorld in Tinman.AddOns.Meshing

sealed class MeshCameraWorld implements ICameraWorld
  extends MeshBoundBase

Public / Attributes

BoundingSphere

Returns the bounding sphere that contains all world features.

public property BoundingSphere { get }
type Sphere
value The bounding sphere.
implements ICameraWorld.BoundingSphere

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

IsPlanetary

Is this a planetary world?

public property IsPlanetary { get }
type bool
value true if this world is planetary (e.g. based on an ellipsoid),
false if this world has somt other base geometry (e.g. a rectangular patch).
implements ICameraWorld.IsPlanetary

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

MinimumDistance

The minimum distance to keep to the terrain surface.

public property MinimumDistance { get set }
type float64
value [>=0] The minimum distance to the terrain.

Remarks:

Defaults to 0.

Public / Constructors

MeshCameraWorld

Creates a new instance of MeshCameraWorld.

public constructor MeshCameraWorld (float64 minimumDistance = 0)
params minimumDistance The minimum distance to keep to the terrain surface. Defaults to 0.

Public / Methods

Clamp

Ensures that the given point has a minimum distance to the world.

public method Clamp (Vec3D point, float64 distance)
type Vec3D
params point The point in world-space.
  distance The minimum distance, in world-space. Defaults to 0.
returns The updated point.
implements ICameraWorld.Clamp

Remarks:

The implementing method is free to choose a minimum distance that is larger then the given distance parameter.

Distance

Computes the distance to the given point.

public method Distance (Vec3D point)
type float64
params point The point in world-space.
returns The distance from point to the nearest world feature or 0 if the world is empty.
implements ICameraWorld.Distance

MeshBind

Binds this object to the given IMesh.

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

MeshUnbind

Unbinds this object from its current IMesh.

public override method MeshUnbind ()
overrides MeshBoundBase.MeshUnbind

Pick

Picks the nearest feature in world-space that intersects with the given ray.

public method Pick (Vec3D origin, Vec3D direction, out Vec3D point, out Vec3D up, out Vec3D normal)
type bool
params origin Origin of ray.
  direction Direction of ray.
  point Output for picked point.
  up Output for world-specific up-direction at point.
  normal Output for surface normal vector at point.
returns true if a point has been picked, false if not (point, up and normal will be Undefined in this case).
implements ICameraWorld.Pick