ICameraWorld

Description

interface Tinman.Engine.Components.ICameraWorld

Extended by

MeshCameraWorld sealed
ModelCameraWorld sealed

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

Public / Methods

Clamp


public method Clamp → (2)

point in : Vec3D

The point in world-space.

distance opt : float64 = 0

The minimum distance, in world-space.

returns → Vec3D

The updated point.

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

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

Distance


public method Distance → (1)

point in : Vec3D

The point in world-space.

returns → float64

The distance from point in to the nearest world feature or 0 if the world is empty.

Computes the distance to the given point.

Pick​Ray


public method PickRay → (4)

ray in : Ray

The picking ray.

point out : Vec3D

Output for picked point.

up out : Vec3D

Output for world-specific up-direction at point out.

normal out : Vec3D

Output for surface normal vector at point out.

returns → bool

true if a point has been picked, false if not (point out, up out and normal out will be Vec3D.Undefined in this case).

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

Pick​Up


public method PickUp → (2)

point in : Vec3D

The point in world-space.

up out : Vec3D

Output for the unit-length up-vector, in world-space.

returns → bool

true if a point has been picked, false if not (up out will be Vec3D.Undefined in this case).

Returns the world up-vector at the given point.

Public / Attributes

Bounding​Sphere


public attribute BoundingSphere → (get)

value : Sphere

The bounding sphere.

Returns the bounding sphere that contains all world features.

Is​Planetary


public attribute IsPlanetary → (get)

value : bool

true if this world is planetary (e.g. based on an ellipsoid),
false if this world has some other base geometry (e.g. a rectangular patch).

Is this a planetary world?

Unit


public attribute Unit → (get)

value : UnitOfMeasure

[not-null]
The world-space units.

The unit of measure of world-space.

Extensions

Pick​Smooth


[Pure]
public static method PickSmooth → (6)

view in : ICameraViewport

[not-null]
The camera viewport to use.

screen in : Vec2F

The screen coordinates of the pick ray.

radius in : float64

Radius around screen in to use for casting additional rays.

point out : Vec3D

The smoothed picked point.

up out : Vec3D

The up-vector at point out.

normal out : Vec3D

The normal vector at point out.

returns → bool

true if a pick result has found, false if there is no pick result.

Performs a series of screen-space picks and returns the smoothed result.