Gorilla.Controller.Passes.Reflection
Unit Gorilla.Controller.Passes.Reflection.pasClasses
- TGorillaRenderPassReflection = class ( TGorillaRenderPassController )
TGorillaRenderPassReflection
Ancestors
Members
Fields
- protected FPassCamera :
TGorillaCamera
- protected FOrigCamera :
TCamera
- protected FTarget :
TControl3D
- protected FAngleOfView :
Single
- protected FMirrorPosition :
TPosition3D
- protected FMirrorNormal :
TPosition3D
- protected FMirrorSize :
Single
Methods
- public constructor Create ( AOwner : TComponent; const AId : string = Reflection ) ;
- public destructor Destroy ( ) ;
- protected function CreateMaterialSource ( ) : TGorillaRenderPassMaterialSource ; override;
- protected procedure Notification ( AComponent : TComponent; Operation : TOperation ) ; override;
- protected function GetCamera ( ) : TCamera ;
- protected procedure SetCamera ( AValue : TCamera ) ;
- protected procedure SetMirrorPosition ( const AValue : TPosition3D ) ;
- protected procedure SetMirrorNormal ( const AValue : TPosition3D ) ;
- protected procedure DoSetupTexturesByViewport ( const AContext : TContext3D; const AWidth : Integer; const AHeight : Integer ) ; override;
- protected procedure DoOnBeginRenderPassSetup ( const ACount : Integer; const APass : TRenderPass ) ; override;
- protected procedure DoOnEndRenderPassSetup ( const ACount : Integer; const APass : TRenderPass ) ; override;
- protected function CalcMirrorMatrix ( const AContext : TContext3D; const AEyePos : TPoint3D; const AEyeDir : TPoint3D; const AMirrorPos : TPoint3D; const AMirrorNormal : TPoint3D; const AMirrorSize : Single; out AProjMat : TMatrix3D; out AViewMat : TMatrix3D; out AReflectedPos : TPoint3D ) : Boolean ;
- protected procedure DefineProperties ( Filer : TFiler ) ; override;
- protected procedure ReadMirrorPosition ( Reader : TReader ) ;
- protected procedure ReadMirrorNormal ( Reader : TReader ) ;
- public procedure AfterConstruction ( ) ; override;
- public function GetCurrentModelViewProjectionMatrix ( ) : TMatrix3D ; override;
- public function GetProjectionMatrix ( const AContext : TContext3D ) : TMatrix3D ; overload override;
- public function GetViewMatrix ( const AContext : TContext3D ) : TMatrix3D ; overload override;
- public procedure SetupMatrices ( const AContext : TContext3D ) ; virtual;
- public function GetTextureMatrix ( AContext : TContext3D; const AUseBias : Boolean = False ) : TMatrix3D ; override;
- public function GetOutputTexture ( ) : TTexture ; override;
Properties
- published Camera : TCamera
- published Target : TControl3D
Get or set a target to attach the reflection rendering to. Because rendering onto a surface needs a mirror-surface position. You can update this position by the MirrorPosition property manually, or link the render pass controller to a Control3D component. On each render cycle the controller will automatically fetch the position of the linked target and update the MirrorPosition property.
read FTarget
write FTarget - published MirrorPosition : TPosition3D
Get or set position of mirror surface. This value is stored as "MirrorPositionPoint" in DFM.
read FMirrorPosition
write SetMirrorPosition - published MirrorNormal : TPosition3D
Get or set normal vector of mirror surface. The normal vector is the direction of the computed reflection. This value is stored as "MirrorNormalVector" in DFM.
read FMirrorNormal
write SetMirrorNormal - published MirrorSize : Single