Castle Game Engine: CastleRenderingCamera: Class TRenderingCamera

# Class TRenderingCamera
Description | Hierarchy | Fields | Methods | Properties
## Unit CastleRenderingCamera ## Declaration `type TRenderingCamera = class(TObject)` ## Description Current camera used for rendering. ## Hierarchy TObject TRenderingCamera ## Overview ### Fields
| `Matrix: TMatrix4Single;`
| `InverseMatrix: TMatrix4Single;`
| `InverseMatrixDone: boolean;`
| `RotationMatrix: TMatrix4Single;`
| `RotationInverseMatrix: TMatrix4Single;`
| `RotationInverseMatrixDone: boolean;`
| `Frustum: TFrustum;`
### Methods
| `constructor Create;`
| `destructor Destroy; override;`
| `procedure InverseMatrixNeeded;`
| `procedure RotationInverseMatrixNeeded;`
| `function RotationMatrix3: TMatrix3Single;`
| `function RotationInverseMatrix3: TMatrix3Single;`
| `procedure FromCameraObject(const ACamera: TCamera; const Viewpoint: TAbstractViewpointNode);`
| `procedure FromMatrix(const AMatrix, ARotationMatrix, ProjectionMatrix: TMatrix4Single; const Viewpoint: TAbstractViewpointNode);`
| `procedure Changed(const Viewpoint: TAbstractViewpointNode);`
### Properties
| `property Target: TRenderTarget read FTarget write FTarget;`
| `property OnChanged: TCameraChangedEventList read FOnChanged;`
## Description ### Fields
| `Matrix: TMatrix4Single;`
Current camera matrix. Transforms from world space (normal 3D space) to camera space (camera space is the space where you're always standing on zero point, looking in -Z, and so on). This is needed for various things, like TextureCoordinateGenerator.mode = "WORLDSPACE*" or generating Viewpoint.camera[Inverse]Matrix event. Always after changing this, change also all other camera fields, and then call Changed.
| `InverseMatrix: TMatrix4Single;`
Inverse of Matrix. Always call InverseMatrixNeeded before using it, InverseMatrixNeeded will check InverseMatrixDone and eventually will calculate inverse and set InverseMatrixDone to `True`.
| `InverseMatrixDone: boolean;`
| `RotationMatrix: TMatrix4Single;`
Camera rotation matrix. That is, this is like Matrix but it doesn't move the camera, only rotates it. It's guaranteed that this is actually only 3x3 matrix, the 4th row and 4th column are all zero except the lowest right item which is 1.0.
| `RotationInverseMatrix: TMatrix4Single;`
Inverse of RotationMatrix. Always call RotationInverseMatrixNeeded before using it, RotationInverseMatrixNeeded will check RotationInverseMatrixDone and eventually will calculate inverse and set RotationInverseMatrixDone to `True`.
| `RotationInverseMatrixDone: boolean;`
| `Frustum: TFrustum;`
### Methods
| `constructor Create;`
| `destructor Destroy; override;`
| `procedure InverseMatrixNeeded;`
| `procedure RotationInverseMatrixNeeded;`
| `function RotationMatrix3: TMatrix3Single;`
Camera rotation matrix, as a 3x3 matrix.
| `function RotationInverseMatrix3: TMatrix3Single;`
| `procedure FromCameraObject(const ACamera: TCamera; const Viewpoint: TAbstractViewpointNode);`
Set all properties (except Target) from TCamera instance in ACamera. See FromMatrix for comments about Target property and Viewpoint parameter.
| `procedure FromMatrix(const AMatrix, ARotationMatrix, ProjectionMatrix: TMatrix4Single; const Viewpoint: TAbstractViewpointNode);`
Set all properties (except Target) from explict matrices. ProjectionMatrix is needed to calculate frustum. Remember that Target must be already set correctly when calling this, registered OnChanged callbacks may read it. Viewpoint is only passed to the Changed and OnChanged. It should be non-nil to indicate that the view comes from non-standard (not currently bound) VRML/X3D Viewpoint node.
| `procedure Changed(const Viewpoint: TAbstractViewpointNode);`
Always called after camera changed. This will call all registered OnChanged events. Remember that Target must be already set correctly when calling this, registered OnChanged callbacks may read it.
### Properties
| `property Target: TRenderTarget read FTarget write FTarget;`
| `property OnChanged: TCameraChangedEventList read FOnChanged;`
Generated by PasDoc 0.13.0 on 2013-08-17 21:27:13