CameraBase

Description

abstract class Tinman.Engine.Scenes.Entities.CameraBase

Derived from

SceneEntityView<ISceneView3D> abstract
ILocalSpaceProperty
ICameraFocus

Extended by

CameraCenter abstract

Abstract base class for scene entity views that place the camera in the coordinate system of an arbitrary local-space.

The default implementation of ICameraFocus.FocusAngle adjusts Zoom and the one of ICameraFocus.FocusCenter uses ITerrainTransform.ModifyOrigin.

Public / Attributes

Clamp


public attribute Clamp → (get,set)

value : float64

The minimum height above the terrain (VerticalType.HeightMesh) to maintain, see remarks. If negative, height clamping will be disabled.

The clamp distance to use for keeping the camera above the terrain.

Height clamping is performed by UpdateCamera, which is called automatically whenever the changed state of this CameraBase object is applied, see ISceneObject.UpdateState. First, the camera position in terrain-space is computed. Then, the ICameraWorld.Clamp method of IScene.World is used to adjust the computed camera position, so that it maintains the given minimum height. Typically, this will move the camera straight up, if necessary.

Defaults to 1.

Zoom


public attribute Zoom → (get,set)

value : float64

The camera zoom, which will be clamped to ZoomRange.

The camera zoom.

When setting the value and the range in one go, make sure to set the range first. Otherwise, the new value might get clamped to the old range. Defaults to 1.

See also

Camera.Zoom

Zoom​Range


public attribute ZoomRange → (get,set)

value : RangeD

The camera zoom range, which will be used to clamp Zoom.

The allowed camera zoom value range.

Defaults to [1..1].

Protected / Constructors

Camera​Base


protected constructor CameraBase → (1)

Creates a new instance of CameraBase.

Protected / Methods

Update​Camera


protected method UpdateCamera → (3)

center in : Vec3D

The camera position.

target in : Vec3D

The camera look-at target.

up in : Vec3D

The camera up-vector.

Updates the camera, in the local coordinate system.