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

interface ICameraWorld in Tinman.AddOns.Components

Provides information about a 3D world for a camera control object (see ICameraControl).

interface ICameraWorld base of MeshCameraWorld
  ModelCameraWorld

Attributes

BoundingSphere

Returns the bounding sphere that contains all world features.

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

IsPlanetary

Is this a planetary world?

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).

Methods

Clamp

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

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

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.

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.

Pick

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

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).