Class TCamera
Unit
Cast2
Declaration
type TCamera = class(TProcessing)
Description
CameraHierarchy
TProcessing > TBaseProcessing > TItem > TBaseItemFields
Methods
Overview
 | constructor Create(AManager: TItemsManager); override; |
 | destructor Destroy; override; |
 | procedure AddProperties(const Result: Props.TProperties); override; |
 | procedure ComputeViewMatrix; virtual; |
 | function GetPickRay(ScreenX, ScreenY: Single): TVector3s; virtual; |
 | function GetPickRayInWorld(ScreenX, ScreenY: Single): TVector3s; virtual; |
 | procedure InitProjMatrix(AZNear, AZFar, AHFoV, AAspectRatio: Single); virtual; |
 | procedure InvalidateTransform; override; |
 | function IsSpehereVisible(const Center: TVector3s; Radius: Single): TFrustumCheckResult; |
 | procedure Move(XD, YD, ZD: Single); virtual; |
 | procedure OnApply(const OldCamera: TCamera); virtual; |
 | function Project(const Vec: TVector3s): TVector4s; |
 | procedure Rotate(XA, YA, ZA: Single); virtual; |
 | procedure SetClearState(AClearFlags: TClearFlagsSet; AClearColor: BaseTypes.TColor; AClearZ: Single; AClearStencil: Cardinal); virtual; |
 | procedure SetProperties(Properties: Props.TProperties); override; |
 | procedure SetScreenDimensions(Width, Height: Integer); |
Description
This procedure is called (by editor for example) to retrieve a list of item's properties and their values. Any TItem descendant class should override this method in order to add its own properties.
Returns not normalized direction of a ray in view space which starts from the camera and passes through the given point on screen
Returns not normalized direction of a ray in world space which starts from the camera and passes through the given point on screen
Sets up the camera's projection matrix with the given near and far Z planes, horizontal field of view and aspect ratio
Calling this method will tell the engine that FTransform became invalid and should be recomputed before next use
Performs a frustrum visibility check against a sphere with the given center and radius
Moves the camera by the specified distance in camera space
Renderer calls this event right before the camera apply
Returns the given vector after projection with the camera
Rotates the camera by the specified angles
Sets the ClearSettings
This procedure is called (by editor for example) to set values of item's properties. Any TItem descendant class should override this method to allow its own properties to be set.
Sets render dimensions and recalculates projection matrix. Normally called by renderer when render window size changes.
Properties
Overview
Description
Initial aspect ratio. Can change
Current aspect ratio
Horizontal field of view in radians
Inverse view matrix
View direction of the camera in world space
Projection matrix
Current render height
Current render width
Right direction of the camera in world space
Color format which will be used in case of use of this camera as a texture
Depth format which will be used in case of use of this camera as a texture
View * projection matrix
Up direction of the camera in world space
View matrix
Position of the camera's view point in world space
Far Z plane distance
Near Z plane distance
|
Last modified: 4 Jul, 2008
Copyright (C) 2006-2008, casteng.com
|