Castle Game EngineIntroduction Units Class Hierarchy Classes, Interfaces, Objects and Records Types Variables Constants Functions and Procedures Identifiers
|
Class TExamineCamera
Unit
CastleCameras
Declaration
type TExamineCamera = class(TCamera)
Description
Navigate the 3D model in examine mode, like you would hold a box with the model inside. The model is moved by Translation, rotated by Rotations and scaled by ScaleFactor.
Hierarchy
Overview
Fields
Methods
 |
function GetPositionInternal: TVector3; override; |
 |
procedure SetPosition(const Value: TVector3); override; |
 |
constructor Create(AOwner: TComponent); override; |
 |
destructor Destroy; override; |
 |
function Matrix: TMatrix4; override; |
 |
function MatrixInverse: TMatrix4; |
 |
function RotationMatrix: TMatrix4; override; |
 |
procedure Update(const SecondsPassed: Single; var HandleInput: boolean); override; |
 |
function AllowSuspendForInput: boolean; override; |
 |
function Press(const Event: TInputPressRelease): boolean; override; |
 |
function Motion(const Event: TInputMotion): boolean; override; |
 |
function SensorTranslation(const X, Y, Z, Length: Double; const SecondsPassed: Single): boolean; override; |
 |
function SensorRotation(const X, Y, Z, Angle: Double; const SecondsPassed: Single): boolean; override; |
 |
procedure Init(const AModelBox: TBox3D; const ARadius: Single); |
 |
function StopRotating: boolean; |
 |
procedure Scale(const ScaleBy: Single); deprecated 'set ScaleFactor instead of using this method'; |
 |
procedure Move(coord: integer; const MoveDistance: Single); deprecated 'set Translation instead of using this method'; |
 |
procedure GetView(out APos, ADir, AUp: TVector3); override; |
 |
procedure SetView(const APos, ADir, AUp: TVector3; const AdjustUp: boolean = true); override; |
 |
procedure VisibleChange(const RectOrCursorChanged: boolean = false); override; |
 |
function GetNavigationType: TNavigationType; override; |
Properties
Description
Fields
 |
internal const DefaultRotationAccelerationSpeed = 5.0; |
|
 |
internal const DefaultRotationSpeed = 2.0; |
|
Methods
 |
function GetPositionInternal: TVector3; override; |
|
 |
procedure SetPosition(const Value: TVector3); override; |
|
 |
constructor Create(AOwner: TComponent); override; |
|
 |
destructor Destroy; override; |
|
 |
function RotationMatrix: TMatrix4; override; |
|
 |
procedure Update(const SecondsPassed: Single; var HandleInput: boolean); override; |
|
 |
function AllowSuspendForInput: boolean; override; |
|
 |
function Motion(const Event: TInputMotion): boolean; override; |
|
 |
function SensorTranslation(const X, Y, Z, Length: Double; const SecondsPassed: Single): boolean; override; |
|
 |
function SensorRotation(const X, Y, Z, Angle: Double; const SecondsPassed: Single): boolean; override; |
|
 |
procedure Init(const AModelBox: TBox3D; const ARadius: Single); |
Initialize most important properties of this class: sets ModelBox and goes to a nice view over the entire scene.
In other words, this is just a shortcut to setting ModelBox, setting suitable initial view by SetInitialView, and then going to initial view by GoToInitial.
|
 |
function StopRotating: boolean; |
Sets RotationsAnim to zero, stopping the rotation of the model.
|
 |
procedure Scale(const ScaleBy: Single); deprecated 'set ScaleFactor instead of using this method'; |
Warning: this symbol is deprecated: set ScaleFactor instead of using this method |
 |
procedure Move(coord: integer; const MoveDistance: Single); deprecated 'set Translation instead of using this method'; |
Warning: this symbol is deprecated: set Translation instead of using this method |
 |
procedure GetView(out APos, ADir, AUp: TVector3); override; |
|
 |
procedure SetView(const APos, ADir, AUp: TVector3; const AdjustUp: boolean = true); override; |
|
 |
procedure VisibleChange(const RectOrCursorChanged: boolean = false); override; |
|
Properties
 |
property Rotations: TQuaternion read FRotations write SetRotations; |
Current rotation of the model. Rotation is done around ModelBox middle (with Translation added).
|
 |
property RotationsAnim: TVector3 read FRotationsAnim write SetRotationsAnim; |
Continous rotation animation, applied each Update to Rotations.
|
 |
property DragMoveSpeed: Single read FDragMoveSpeed write FDragMoveSpeed default 1.0; |
How fast user moves the scene by mouse/touch dragging.
|
 |
property KeysMoveSpeed: Single read FKeysMoveSpeed write FKeysMoveSpeed default 1.0; |
How fast user moves the scene by pressing keys.
|
 |
property MoveAmount: TVector3 read FTranslation write SetTranslation; deprecated 'use Translation'; |
Warning: this symbol is deprecated: use Translation |
 |
property Translation: TVector3 read FTranslation write SetTranslation; |
How much to move the model. By default, zero.
|
 |
property Turntable: boolean
read FTurntable write FTurntable default false; |
Turntable rotates the scene around its Y axis instead of current camera axis.
|
 |
property ScaleFactor: Single
read FScaleFactor write SetScaleFactor default 1; |
How the model is scaled. This property may never be zero (or close to zero).
|
 |
property Inputs_Move: T3BoolInputs read FInputs_Move; |
Alternative ways to access Input_Move/Rotate(X|Y|Z)(Inc|Dec). Index the array (2nd index true means increase) instead of having to use the full identifier.
|
 |
property MouseNavigation: boolean
read GetMouseNavigation write SetMouseNavigation default true; deprecated; |
Warning: this symbol is deprecated.
Include/exclude ciMouseDragging from Input instead.
|
 |
property RotationAccelerate: boolean
read FRotationAccelerate write SetRotationAccelerate default true; |
When True , rotation keys make the rotation faster, and the model keeps rotating even when you don't hold any keys. When False , you have to hold rotation keys to rotate.
|
Generated by PasDoc 0.15.0.
|