Gorilla.Viewport
Unit Gorilla.Viewport.pasClasses
- TGorillaRenderingCompare = class ( TRenderingCompare )
- TGorillaRenderingHelper = class ( TObject )
- TGorillaViewport = class ( TControl , IViewport3D )
Constants
- const GORILLA_FRAMERATE_FIXED_DEFAULT : Integer = $3C;
- const GORILLA_D3D_ROWPITCH_ALIGNMENT : Integer = $20;
TGorillaRenderingCompare
Ancestors
Members
Fields
- protected FRenderingList :
TList<FMX.Controls3D.TControl3D>
- protected FComputeCameraPos :
Boolean
- protected FCameraPos :
TPoint3D
- protected FCameraDir :
TPoint3D
Methods
- public constructor Create ( ARenderingList : TList<FMX.Controls3D.TControl3D> ) ;
- public destructor Destroy ( ) ;
- protected function DoInternalCompare ( const Left : TControl3D; const Right : TControl3D ) : Integer ;
- public function Compare ( const Left : TControl3D; const Right : TControl3D ) : Integer ; override;
TGorillaRenderingHelper
Ancestors
Members
Methods
- public function Renderable ( const ACtrl : TControl3D; const AFrustum : TGorillaFrustum; const AComponentState : TComponentState; var ASceneBounds : TBoundingBox; const AFrustumCulling : Boolean; const ACheckVisibility : Boolean ) : Boolean ; class;
- public procedure UpdateSceneBounds ( const ACtrl : TControl3D; const AComponentState : TComponentState; var ASceneBounds : TBoundingBox ) ; class;
TGorillaViewport
Ancestors
Implements Interfaces
- IViewport3D
Members
Fields
- class private FWatermark :
TBitmap
- class private FBitmap :
TBitmap
- class private FEditMode :
Boolean
- class private FDTIsMouseDown :
Boolean
- class private FDTMouseState :
TShiftState
- class private FDTMousePos :
TPointF
- class private FStoredUsingDesignCamera :
Boolean
- class private FStoredFrustumCulling :
Boolean
- class private FStoredOnMouseDown :
TMouseEvent
- class private FStoredOnMouseUp :
TMouseEvent
- class private FStoredOnMouseMove :
TMouseMoveEvent
- class private FStoredOnMouseWheel :
TMouseWheelEvent
- protected FRendererType :
TRendererType
- protected FRenderer :
TRenderer
- protected FCurrentRenderer :
TRenderer
- protected FCamera :
TCamera
- protected FDesignCamera :
TCamera
- protected FDesignCameraZ :
TDummy
- protected FDesignCameraX :
TDummy
- protected FDesignTimer :
TTimer
- protected FDesignPosition :
TPosition3D
- protected FDesignRotationAngle :
TPosition3D
- protected FFill :
TAlphaColor
- protected FMultisample :
TMultisample
- protected FUsingDesignCamera :
Boolean
- protected FDrawing :
Boolean
- protected FRenderingList :
TList<FMX.Controls3D.TControl3D>
- protected FShadowList :
TList<FMX.Controls3D.TControl3D>
- protected FScaleChangedId :
Integer
- protected FLights :
TList<FMX.Controls3D.TLight>
- protected FWinHandle :
TWindowHandle
- protected FDepthStencil :
Boolean
- protected FAutoRedisplay :
Boolean
- protected FInvalidated :
Boolean
- protected FRenderPasses :
TObjectList<System.Classes.TComponent>
- protected FTimerService :
IFMXTimerService
- protected FRenderTime :
Double
- protected FRenderCycles :
Integer
- protected FFPS :
Double
- protected FUseFixedFrameRate :
Boolean
- protected FFixedFrameRate :
Integer
- protected FFixedInterval :
TGorillaTimer
- protected FFrameRateStep :
Integer
- protected FFixedRendering :
Boolean
- protected FManualRendering :
Boolean
- protected FDoManualRender :
Boolean
- protected FHighRes :
Boolean
- protected FLockRendering :
Boolean
- protected FLock :
TCriticalSection
- protected FSceneBounds :
TBoundingBox
- protected FFrustum :
TGorillaFrustum
- protected FFrustumCulling :
Boolean
- protected FUpdateFrustum :
Boolean
- protected FFog :
TGorillaFogSettings
- protected FSaturation :
TPoint3D
- public ControlsOpen :
Cardinal
Methods
- public constructor Create ( AOwner : TComponent ) ;
- public destructor Destroy ( ) ;
- class private procedure RenderWatermark ( ) ;
- class private procedure DoOnDesignTimer ( ASender : TObject ) ;
- class private procedure DesignCameraTargetMouseDown ( Sender : TObject; Button : TMouseButton; Shift : TShiftState; X : Single; Y : Single; RayPos : TVector3D; RayDir : TVector3D ) ;
- class private procedure DesignCameraTargetMouseMove ( Sender : TObject; Shift : TShiftState; X : Single; Y : Single; RayPos : TVector3D; RayDir : TVector3D ) ;
- class private procedure DesignCameraTargetMouseUp ( Sender : TObject; Button : TMouseButton; Shift : TShiftState; X : Single; Y : Single; RayPos : TVector3D; RayDir : TVector3D ) ;
- class private procedure DoOnDesignTimeMouseDown ( ASender : TObject; AButton : TMouseButton; AShift : TShiftState; X : Single; Y : Single ) ;
- class private procedure DoOnDesignTimeMouseUp ( ASender : TObject; AButton : TMouseButton; AShift : TShiftState; X : Single; Y : Single ) ;
- class private procedure DoOnDesignTimeMouseMove ( ASender : TObject; AShiftState : TShiftState; X : Single; Y : Single ) ;
- class private procedure DoOnDesignTimeMouseWheel ( Sender : TObject; AShift : TShiftState; AWheelDelta : Integer; var AHandled : Boolean ) ;
- protected function DoGetUpdateRect ( ) : TRectF ; override;
- protected procedure DoOnFixedRendering ( ASender : TObject ) ;
- protected procedure DoCreateRenderer ( ) ;
- protected procedure SetRendererType ( const AValue : TRendererType ) ;
- protected function GetCurrentRenderer ( ) : TRenderer ;
- protected procedure SetCurrentRenderer ( const AValue : TRenderer ) ;
- protected function GetMainPassRenderer ( ) : TRenderer ;
- protected procedure SetUseFixedFrameRate ( const AValue : Boolean ) ; virtual;
- protected function GetFog ( ) : Boolean ; virtual;
- protected procedure SetFog ( const AValue : Boolean ) ; virtual;
- protected function GetFogMode ( ) : TGorillaFogMode ; virtual;
- protected procedure SetFogMode ( const AValue : TGorillaFogMode ) ; virtual;
- protected function GetFogDensity ( ) : Single ; virtual;
- protected procedure SetFogDensity ( const AValue : Single ) ; virtual;
- protected function GetFogStart ( ) : Single ; virtual;
- protected procedure SetFogStart ( const AValue : Single ) ; virtual;
- protected function GetFogEnd ( ) : Single ; virtual;
- protected procedure SetFogEnd ( const AValue : Single ) ; virtual;
- protected function GetFogColor ( ) : TAlphaColorF ; virtual;
- protected procedure SetFogColor ( AValue : TAlphaColorF ) ; virtual;
- protected function GetSaturation ( ) : TPoint3D ; virtual;
- protected procedure SetSaturation ( AValue : TPoint3D ) ; virtual;
- protected function GetSaturationPart ( AIndex : Integer ) : Single ; virtual;
- protected procedure SetSaturationPart ( AIndex : Integer; const AValue : Single ) ; virtual;
- protected procedure ApplyFogSettings
(
)
;
overload virtual;
Applies all fog settings to deferred composite pass
- protected procedure ApplyFogSettings ( AContext : TContext3D ) ; overload virtual;
- protected procedure ApplyMainRenderPassFogSettings ( ) ; virtual;
- protected procedure ApplyLightSettings ( AContext : TContext3D ) ; virtual;
- protected procedure ApplyMainRenderPassLightSettings ( ) ; virtual;
- protected procedure SetFixedFrameRate ( AValue : Integer ) ;
- protected function GetFPS ( ) : Double ;
- protected function GetFill ( ) : TAlphaColor ;
- protected procedure SetFill ( AValue : TAlphaColor ) ;
- protected procedure SetMultisample ( const Value : TMultisample ) ;
- protected function GetSmooth ( ) : Boolean ;
- protected procedure SetSmooth ( const AValue : Boolean ) ;
- protected procedure SetHighRes ( AValue : Boolean ) ;
- protected procedure SetUsingDesignCamera ( const Value : Boolean ) ;
- protected procedure ScaleChangedHandler ( const Sender : TObject; const Msg : TMessageBase ) ;
- protected function GetCurrentCamera ( ) : TCamera ;
- protected procedure CollectRenderingList ( ) ; virtual;
- protected procedure DoRunRenderingPipeline ( const ARenderContext : PRenderContext ) ; virtual;
- protected procedure DoRenderProc ( ) ; virtual;
- protected function CheckHitTest ( const AHitTest : Boolean ) : Boolean ; override;
- protected procedure DoUpdateEffects ( ) ; virtual;
- protected procedure Paint ( ) ; override;
- protected procedure Resize ( ) ; override;
- protected procedure Notification ( AComponent : TComponent; Operation : TOperation ) ; override;
- protected function FindTarget ( P : TPointF; const Data : TDragObject ) : IControl ; override;
- protected procedure DoAddObject ( const AObject : TFmxObject ) ; override;
- protected procedure DoRemoveObject ( const AObject : TFmxObject ) ; override;
- protected function GetObject ( ) : TFmxObject ;
- protected function GetContext ( ) : TContext3D ;
- protected procedure SetContext ( AValue : TContext3D ) ;
- protected function GetCamera ( ) : TCamera ;
- protected function GetLightCount ( ) : Integer ;
- protected function GetLight ( Index : Integer ) : TLight ;
- protected procedure AddLight ( const ALight : TLight ) ;
- protected procedure RemoveLight ( const ALight : TLight ) ;
- protected function GetUsingDesignCamera ( ) : Boolean ;
- protected function GetViewportScale ( ) : Single ;
- protected procedure SetCamera ( const ACamera : TCamera ) ;
- protected procedure NeedRender ( ) ;
- protected function GetEditMode ( ) : Boolean ;
- protected procedure SetEditMode ( AValue : Boolean ) ;
- protected procedure DesignMatrixChanged ( Sender : TObject ) ;
- protected procedure DesignRotationChanged ( Sender : TObject ) ;
- protected procedure DesignRotateXChanged ( Sender : TObject ) ;
- protected procedure DesignRotateYChanged ( Sender : TObject ) ;
- protected procedure DesignRotateZChanged ( Sender : TObject ) ;
- protected procedure ApplyEditMode ( ) ;
- protected procedure LockObjectsInEditMode ( ) ;
- protected procedure ToggleEditMode ( Sender : TObject ) ; virtual;
- protected procedure ResetEditMode ( Sender : TObject ) ; virtual;
- protected procedure DoScaleChanged ( ) ; virtual;
- public procedure Loaded ( ) ; override;
- public procedure BeginUpdate ( ) ; override;
- public procedure EndUpdate ( ) ; override;
- public procedure EndUpdateWithoutInvalidate ( ) ; virtual;
- public procedure Lock ( ) ; virtual;
- public procedure Unlock ( ) ; virtual;
- public procedure Invalidate ( ) ; virtual;
- public procedure ForceUpdateEffects ( ) ; virtual;
- public procedure RenderRenderList ( const ARenderContext : PRenderContext ) ;
- public procedure RenderRenderListByMode
(
AOpaque :
Boolean
)
;
Only render opaque (true) or translucent (false) elements. This rendering routine is used by weighted blended order independent transparency rendering.
- public procedure RenderManual ( ) ; virtual;
- public procedure RebuildRenderingList ( ) ; virtual;
- public procedure AddRenderPass ( const AController : TComponent ) ; virtual;
- public procedure RemoveRenderPass ( const AController : TComponent ) ; virtual;
- public procedure UpdateRenderPassesOnResize ( ) ; virtual;
- public procedure UpdateRenderPasses ( ) ; virtual;
- public function ScreenToWorld ( const APoint2D : TPointF ) : TPoint3D ; virtual;
- public function WorldToScreen ( const APoint3D : TPoint3D ) : TPointF ; virtual;
- public function ObjectAtPoint ( P : TPointF ) : IControl ; override;
- public function RayCastIntersect ( const P : TPointF ) : TControl3D ; virtual;
- public function GetDesignCamera ( ) : TCamera ;
- public function MakeScreenshot ( ) : TBitmap ;
Properties
- public Context : TContext3D
Get or set the current context. Do not change this value, until you know what you are doing.
read GetContext
write SetContext - public CurrentCamera : TCamera
- public FPS : Double
Returns the potentially frames per second count. This is not a value representing the real output FPS. This only measures the performances in delphi rendering mechanism.
read GetFPS - public ViewportScale : Single
- public Smooth : Boolean
- public SceneBounds : TBoundingBox
- public CurrentFrustum : TGorillaFrustum
- public Saturation : TPoint3D
Get or set saturation values applied while color merging. The 3D vector property contains of 3 parts for opaque, translucent and composite saturation. This allows you to fully control each part of the rendering. If value is zero no saturation algorithm will be applied to the specific part.
read GetSaturation
write SetSaturation - public LockRendering : Boolean
- public EditMode : Boolean
Activate/Deactivate edit mode at designtime. This option is also available at runtime.
read GetEditMode
write SetEditMode - public CurrentRenderer : TRenderer
- public MainPassRenderer : TRendererread GetMainPassRenderer
- published DesignPosition : TPosition3D
Get or set design camera target position. Necessary to publish this property for designtime usage.
read FDesignPosition
write FDesignPosition - published DesignRotationAngle : TPosition3D
Get or set design camera target rotation angle. Necessary to publish this property for designtime usage.
read FDesignRotationAngle
write FDesignRotationAngle - published RendererType : TRendererType
- published ManualRendering : Boolean
manual rendering is a more effective method than intuitive rendering intuive rendering will be performed on every change of a TControl3D by manual rendering we can decide when the viewport renders.
read FManualRendering
write FManualRendering - published UseFixedFrameRate : Boolean
Get or set if you want to use a fixed intended framerate.
read FUseFixedFrameRate
write SetUseFixedFrameRate - published FixedFrameRate : Integer
Get or set fixed frame rate value. Only affects rendering if UseFixedFrameRate is enabled.
read FFixedFrameRate
write SetFixedFrameRate - published FrustumCulling : Boolean
- published HighRes : Boolean
- published Fog : Boolean
- published FogMode : TGorillaFogMode
Get or set fog computation mode. Allowed modes are: linear, exp and exp2.
read GetFogMode
write SetFogMode - published FogDensity : Single
- published FogStart : Single
- published FogEnd : Single
- published FogColor : TAlphaColorF
- published OpaqueSaturation : Single
Get or set saturation of opaque object rendering. This will only affect rendering if RendererType is a Forward- or Deferred-Renderer. Legacy rendering will not be affected by this property.
read GetSaturationPart
write SetSaturationPart - published TranslucentSaturation : Single
Get or set saturation of translucent object rendering. This will only affect rendering if RendererType is a Forward- or Deferred-Renderer. Legacy rendering will not be affected by this property.
read GetSaturationPart
write SetSaturationPart - published CompositeSaturation : Single
Get or set saturation of final composition. This will only affect rendering if RendererType is a Forward- or Deferred-Renderer. Legacy rendering will not be affected by this property.
read GetSaturationPart
write SetSaturationPart - published Align : TAlignLayout
- published Anchors : TAnchors
- published Camera : TCamera
- published ClipChildren : Boolean
- published ClipParent : Boolean
- published Color : TAlphaColor
- published Cursor : TCursor
- published DragMode : TDragMode
- published EnableDragHighlight : Boolean
- published Enabled : Boolean
- published Height : Single
- published HitTest : Boolean
- published Locked : Boolean
- published Padding : TBounds
- published Multisample : TMultisample
- published Margins : TBounds
- published Opacity : Single
- published PopupMenu : TCustomPopupMenu
- published Position : TPosition
- published RotationAngle : Single
- published RotationCenter : TPosition
- published Scale : TPosition
- published Size : TControlSize
- published UsingDesignCamera : Boolean
- published Visible : Boolean
- published Width : Single