Castle Game Engine: CastleCameras: Class TExamineCamera

# Class TExamineCamera
Description | Hierarchy | Fields | Methods | Properties
## 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 displayed around MoveAmount 3D point, it's rotated by Rotations and scaled by ScaleFactor (scaled around MoveAmount point). ## Hierarchy TComponent TInputListener TCamera TExamineCamera ## Overview ### Fields
| `internal const DefaultRotationAccelerationSpeed = 5.0;`
| `internal const DefaultRotationSpeed = 2.0;`
### Methods
| `constructor Create(AOwner: TComponent); override;`
| `destructor Destroy; override;`
| `function Matrix: TMatrix4Single; override;`
| `function MatrixInverse: TMatrix4Single;`
| `function RotationMatrix: TMatrix4Single; 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);`
| `procedure Move(coord: integer; const MoveDistance: Single);`
| `procedure GetView(out APos, ADir, AUp: TVector3Single); override;`
| `procedure GetView(out APos, ADir, AUp, AGravityUp: TVector3Single); override;`
| `function GetPosition: TVector3Single; override;`
| `function GetGravityUp: TVector3Single; override;`
| `procedure SetView(const APos, ADir, AUp: TVector3Single; const AdjustUp: boolean = true); override;`
| `procedure SetView(const APos, ADir, AUp, AGravityUp: TVector3Single; const AdjustUp: boolean = true); override;`
| `procedure VisibleChange; override;`
| `function GetNavigationType: TNavigationType; override;`
### Properties
| `property Rotations: TQuaternion read FRotations write SetRotations;`
| `property RotationsAnim: TVector3Single read FRotationsAnim write SetRotationsAnim;`
| `property MoveAmount: TVector3Single read FMoveAmount write SetMoveAmount;`
| `property CenterOfRotation: TVector3Single read FCenterOfRotation write SetCenterOfRotation;`
| `property Turntable: boolean read FTurntable write FTurntable default false;`
| `property ScaleFactor: Single read FScaleFactor write SetScaleFactor default 1;`
| `property ModelBox: TBox3D read FModelBox write SetModelBox;`
| `property Inputs_Move: T3BoolInputs read FInputs_Move;`
| `property Inputs_Rotate: T3BoolInputs read FInputs_Rotate;`
| `property Input_MoveXInc: TInputShortcut read GetInput_MoveXInc;`
| `property Input_MoveXDec: TInputShortcut read GetInput_MoveXDec;`
| `property Input_MoveYInc: TInputShortcut read GetInput_MoveYInc;`
| `property Input_MoveYDec: TInputShortcut read GetInput_MoveYDec;`
| `property Input_MoveZInc: TInputShortcut read GetInput_MoveZInc;`
| `property Input_MoveZDec: TInputShortcut read GetInput_MoveZDec;`
| `property Input_RotateXInc: TInputShortcut read GetInput_RotateXInc;`
| `property Input_RotateXDec: TInputShortcut read GetInput_RotateXDec;`
| `property Input_RotateYInc: TInputShortcut read GetInput_RotateYInc;`
| `property Input_RotateYDec: TInputShortcut read GetInput_RotateYDec;`
| `property Input_RotateZInc: TInputShortcut read GetInput_RotateZInc;`
| `property Input_RotateZDec: TInputShortcut read GetInput_RotateZDec;`
| `property Input_ScaleLarger: TInputShortcut read FInput_ScaleLarger;`
| `property Input_ScaleSmaller: TInputShortcut read FInput_ScaleSmaller;`
| `property Input_Home: TInputShortcut read FInput_Home;`
| `property Input_StopRotating: TInputShortcut read FInput_StopRotating;`
| `property MouseNavigation: boolean read GetMouseNavigation write SetMouseNavigation default true; deprecated;`
| `property RotationAccelerate: boolean read FRotationAccelerate write SetRotationAccelerate default true;`
| `property RotationAccelerationSpeed: Single read FRotationAccelerationSpeed write FRotationAccelerationSpeed default DefaultRotationAccelerationSpeed;`
| `property RotationSpeed: Single read FRotationSpeed write FRotationSpeed default DefaultRotationSpeed;`
## Description ### Fields
| `internal const DefaultRotationAccelerationSpeed = 5.0;`
| `internal const DefaultRotationSpeed = 2.0;`
### Methods
| `constructor Create(AOwner: TComponent); override;`
| `destructor Destroy; override;`
| `function Matrix: TMatrix4Single; override;`
| `function MatrixInverse: TMatrix4Single;`
| `function RotationMatrix: TMatrix4Single; 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);`
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);`
| `procedure Move(coord: integer; const MoveDistance: Single);`
| `procedure GetView(out APos, ADir, AUp: TVector3Single); override;`
| `procedure GetView(out APos, ADir, AUp, AGravityUp: TVector3Single); override;`
| `function GetPosition: TVector3Single; override;`
| `function GetGravityUp: TVector3Single; override;`
| `procedure SetView(const APos, ADir, AUp: TVector3Single; const AdjustUp: boolean = true); override;`
| `procedure SetView(const APos, ADir, AUp, AGravityUp: TVector3Single; const AdjustUp: boolean = true); override;`
| `procedure VisibleChange; override;`
| `function GetNavigationType: TNavigationType; override;`
### Properties
| `property Rotations: TQuaternion read FRotations write SetRotations;`
Current rotation of the model. Rotation is done around ModelBox middle (with MoveAmount added).
| `property RotationsAnim: TVector3Single read FRotationsAnim write SetRotationsAnim;`
Continous rotation animation, applied each Update to Rotations.
| `property MoveAmount: TVector3Single read FMoveAmount write SetMoveAmount;`
`MoveAmount` says how to translate the model. It's always added to the middle of ModelBox, this is usually comfortable. The default value of this is zero vector. If you want to just see the whole model, you may want to set this to something like
    MoveAmount := Middle of ModelBox + (0, 0, -2 * ModelSize)
Actually, Init method does the above for you.
| `property CenterOfRotation: TVector3Single read FCenterOfRotation write SetCenterOfRotation;`
| `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. Scaling is done around MoveAmount added to the middle of ModelBox. May never be zero (or too near zero).
| `property ModelBox: TBox3D read FModelBox write SetModelBox;`
The aproximate size of 3D model that will be viewed. This is the crucial property of this class that you have to set, to make the navigation work best. Setting this sets also CenterOfRotation to the middle of the box. The idea is that usually this is the only property that you have to set. ScaleFactor, MoveAmount, RotationsAnim will be almost directly controlled by user (through Press and other events). Rotations will be automatically modified by Update. So often you only need to set `ModelBox`, once, and everything else will work smoothly. Initially this is EmptyBox3D.
| `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 Inputs_Rotate: T3BoolInputs read FInputs_Rotate;`
| `property Input_MoveXInc: TInputShortcut read GetInput_MoveXInc;`
| `property Input_MoveXDec: TInputShortcut read GetInput_MoveXDec;`
| `property Input_MoveYInc: TInputShortcut read GetInput_MoveYInc;`
| `property Input_MoveYDec: TInputShortcut read GetInput_MoveYDec;`
| `property Input_MoveZInc: TInputShortcut read GetInput_MoveZInc;`
| `property Input_MoveZDec: TInputShortcut read GetInput_MoveZDec;`
| `property Input_RotateXInc: TInputShortcut read GetInput_RotateXInc;`
| `property Input_RotateXDec: TInputShortcut read GetInput_RotateXDec;`
| `property Input_RotateYInc: TInputShortcut read GetInput_RotateYInc;`
| `property Input_RotateYDec: TInputShortcut read GetInput_RotateYDec;`
| `property Input_RotateZInc: TInputShortcut read GetInput_RotateZInc;`
| `property Input_RotateZDec: TInputShortcut read GetInput_RotateZDec;`
| `property Input_ScaleLarger: TInputShortcut read FInput_ScaleLarger;`
| `property Input_ScaleSmaller: TInputShortcut read FInput_ScaleSmaller;`
| `property Input_Home: TInputShortcut read FInput_Home;`
| `property Input_StopRotating: TInputShortcut read FInput_StopRotating;`
| `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.
| `property RotationAccelerationSpeed: Single read FRotationAccelerationSpeed write FRotationAccelerationSpeed default DefaultRotationAccelerationSpeed;`
Speed to change the rotation acceleration, used when RotationAccelerate = `True`.
| `property RotationSpeed: Single read FRotationSpeed write FRotationSpeed default DefaultRotationSpeed;`
Speed to change the rotation, used when RotationAccelerate = `False`.
Generated by PasDoc 0.13.0 on 2015-06-15 04:43:09