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 FBitmap :
TBitmap
- class private FEditMode :
Boolean
- class private FStoredUsingDesignCamera :
Boolean
- class private FStoredFrustumCulling :
Boolean
- protected FRendererType :
TRendererType
- protected FRenderer :
TRenderer
- protected FCurrentRenderer :
TRenderer
- protected FCamera :
TCamera
- protected FDesignCamera :
TCamera
- protected FDesignCameraX :
TGorillaSmoothCameraController
- 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
- protected FEmissiveBlur :
Integer
- protected FGlobalIllumDetail :
Integer
- protected FGlobalIllumSoftness :
Single
- protected FShadowStrength :
Single
- protected FReflectionStrength :
Single
- protected FXAASteps :
Integer
- public ControlsOpen :
Cardinal
Methods
- public constructor Create ( AOwner : TComponent ) ;
- public destructor Destroy ( ) ;
- class private procedure DoOnDesignTimer ( ASender : TObject ) ;
- 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 ( ) : TAlphaColor ; virtual;
- protected procedure SetFogColor ( AValue : TAlphaColor ) ; virtual;
- protected function GetFogColorF ( ) : TAlphaColorF ; virtual;
- protected procedure SetFogColorF ( 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 function GetEmissiveBlur ( ) : Integer ; virtual;
- protected procedure SetEmissiveBlur ( AValue : Integer ) ; virtual;
- protected function GetGlobalIllumDetail ( ) : Integer ; virtual;
- protected procedure SetGlobalIllumDetail ( AValue : Integer ) ; virtual;
- protected function GetGlobalIllumSoftness ( ) : Single ; virtual;
- protected procedure SetGlobalIllumSoftness ( AValue : Single ) ; virtual;
- protected function GetShadowStrength ( ) : Single ; virtual;
- protected procedure SetShadowStrength ( AValue : Single ) ; virtual;
- protected function GetReflectionStrength ( ) : Single ; virtual;
- protected procedure SetReflectionStrength ( AValue : Single ) ; virtual;
- protected function GetFXAA ( ) : Integer ; virtual;
- protected procedure SetFXAA ( AValue : Integer ) ; virtual;
- protected procedure ApplyFogSettings
(
)
;
overload virtual;
Applies all fog settings to deferred composite pass
- protected procedure ApplyMainRenderPassFogSettings ( ) ; 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 AfterConstruction ( ) ; override;
- 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 procedure CleanupRenderPasses ( const AController : TComponent ) ; 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 ; virtual;
- public function GetDesignCameraController ( ) : TGorillaSmoothCameraController ; virtual;
- public function MakeScreenshot ( ) : TBitmap ;
- public procedure ApplyFogSettings ( AContext : TContext3D ) ; overload virtual;
- public procedure ApplyLightSettings ( AContext : TContext3D ) ; virtual;
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 FogColorF : TAlphaColorF
- published FogColor : TAlphaColor
- 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 EmissiveBlur : Integer
Get or set emissive rendering blurring intensity. This value has massive influence on performance. It controls the number of blurring iterations and the wideness of blurring. Setting this value to zero deactivates emissive blurring.
read GetEmissiveBlur
write SetEmissiveBlur - published GlobalIllumDetail : Integer
Defines the detail of rendering global illumination. You can set values between 0 (off) and 7 (highest). Setting this value will automatically adjust internal rendering settings for global illumination. Global illumination feature is only available in GAME_PACKAGE.
read GetGlobalIllumDetail
write SetGlobalIllumDetail - published GlobalIllumSoftness : Single
Get or set the softness of global illumination rendering including shadows and reflections. The higher the value is the more soften the rendering becomes. Values between 0.0 and 5.0 are allowed.
read GetGlobalIllumSoftness
write SetGlobalIllumSoftness - published ShadowStrength : Single
Get or set the strength / darkness of shadows rendered by global illumination rendering pipeline. The higher the value is the darker shadows will become. Values between 0.0 and 10.0 are allowed.
read GetShadowStrength
write SetShadowStrength - published ReflectionStrength : Single
Get or set the strength / intensity of reflections rendered by global illumination rendering pipeline. The higher the value is the more visible reflections will become. Values between 0.0 and 10.0 are allowed.
read GetReflectionStrength
write SetReflectionStrength - published FXAA : Integer
Get or set the number of FXAA steps (anti aliased rendering). The higher the values is the more iterations on the final render image will be done, and the softer the edges become. But take care, because this may cost some performance. Values between 0 (off) and 8 are allowed.
read GetFXAA
write SetFXAA - 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