CameraControlBase

Description

abstract class Tinman.Engine.Components.CameraControlBase

Derived from

ICameraControl

Extended by

CameraControl sealed
CameraControlDrag sealed
CameraControlFree sealed

Abstract base class for ICameraControl implementations.

Public / Attributes

Is​Attached


public attribute IsAttached → (get)

value : bool

true if attached, false if not.

Is this camera control currently attached to an IInputState object?

Protected / Methods

Fix​Maximum​Distance


protected method FixMaximumDistance → (1)

lookCenterScale opt : float64 = 1

[>=0]
Controls how much the camera shall be adjusted to look towards the bounding sphere center. Set to 0 to disable centering. Values between 0 and 1 will cause earlier adjustment at smaller distances. Values greater than 1 will cause later adjustment at greater distances.

returns → bool

true if the camera has been modified, false if not.

Clamps the camera so that it maintains a maximum distance to the bounding sphere of the world and looks towards the bounding sphere center.

The maximum distance is chosen so that the bounding sphere fits the screen.

Rotate


protected static method Rotate → (3)

origin in : Vec3D

The rotation center.

first in : Vec3D

The point to rotate.

second in : Vec3D

The target point of the rotation.

returns → Mat4D

The rotation matrix.

Returns a rotation matrix that rotates first in around the given origin in so that origin in, first in and second in become co-linear.

Protected / Attributes

input


protected attribute input → (IInputState)

The current IInputState object.

Maximum​Distance


protected attribute MaximumDistance → (get)

value : float64

The maximum distance.

Returns the maximum distance that is used by FixMaximumDistance.

view


protected attribute view → (ICameraViewport)

The current ICameraViewport object.

Will​Fix​Maximum​Distance


protected attribute WillFixMaximumDistance → (get)

value : int32

Zero or more flags, indicating how the camera will be updated:
1 : Look towards bounding sphere center when approaching maximum distance.
2 : Clamp to maximum distance to bounding sphere center.

Checks if a call to FixMaximumDistance will update the camera.

world


protected attribute world → (ICameraWorld)

The current ICameraWorld object.