Gorilla.SkyBox
Unit Gorilla.SkyBox.pasClasses
- TGorillaSkyBoxMaterial = class ( TCustomMaterial )
- TGorillaSkyBoxMaterialSource = class ( TMaterialSource )
- TGorillaSkyBox = class ( TGorillaCube )
TGorillaSkyBoxMaterial
Ancestors
Members
Fields
- protected FSource :
TGorillaSkyBoxMaterialSource
- protected FCubeMap :
TTexture
- protected FAllowFog :
Boolean
Methods
- public constructor Create ( const ASource : TGorillaSkyBoxMaterialSource ) ;
- public destructor Destroy ( ) ;
- protected procedure SetCubeMap ( const Value : TTexture ) ;
- protected procedure DoApply ( const Context : TContext3D ) ; override;
- protected procedure DoInitialize ( ) ; override;
Properties
TGorillaSkyBoxMaterialSource
Ancestors
Members
Fields
Methods
- public constructor Create ( AOwner : TComponent ) ;
- public destructor Destroy ( ) ;
- protected function CreateMaterial ( ) : TMaterial ; override;
- protected procedure DoCubeMapChanged ( Sender : TObject ) ;
- protected procedure ContextResetHandlerOverride ( const Sender : TObject; const Msg : TMessageBase ) ;
- protected function GetCubeMap ( ) : TGorillaTextureBitmap ;
- protected procedure SetCubeMap ( AValue : TGorillaTextureBitmap ) ;
- protected function GetAllowFog ( ) : Boolean ;
- protected procedure SetAllowFog ( AValue : Boolean ) ;
Properties
TGorillaSkyBox
Custom skybox component which can be used to display a sky or an environment rendered from texture.
Remarks
The component DO NOT use CubeMap technology yet. This is a feature for future releases and should remove tiny border spaces during rendering. At the moment 6 planes are generated and rendered with a single texture for each side.Ancestors
Members
Fields
- protected FDoUpdateCubeMap :
Boolean
- protected FTextures :
- protected FMaterial :
TGorillaSkyBoxMaterialSource
Methods
- public constructor Create ( AOwner : TComponent ) ;
- public destructor Destroy ( ) ;
- protected function GetSize ( ) : TPoint3D ;
- protected procedure SetSize ( const AValue : TPoint3D ) ;
- protected function GetTexture ( AIndex : TGorillaCubeMapFace ) : TBitmap ;
- protected procedure SetTexture ( AIndex : TGorillaCubeMapFace; const AValue : TBitmap ) ;
- protected function GetAllowFog ( ) : Boolean ;
- protected procedure SetAllowFog ( AValue : Boolean ) ;
- protected procedure DoCubeMapChanged ( Sender : TObject ) ;
- protected procedure CreateTextures ( ) ; virtual;
- protected procedure DestroyTextures ( ) ; virtual;
- protected procedure DoUpdateCubeMap ( ) ; virtual;
- protected procedure Render
(
)
;
override;
Override the internal render method to initialize planes and materials.
- public procedure LoadCubeMapFacesFromPath
(
APath :
string; AFileExt :
string
)
;
Automatically load a cubemap defined by its path to the texture sides of the skybox.
Properties
- public Size : TPoint3D
- public Textures[Index] : TBitmap
Indiced texture array property for applying a texture to a single side of the skybox.
read GetTexture
write SetTexture - published AllowFog : Boolean
- published FrontSide : TBitmap
Get or set the front side image of the skybox. Alternatively set bitmap by Textures[TGorillaCubeMapFace.NegativeZ].
read GetTexture
write SetTexture - published BackSide : TBitmap
Get or set the back side image of the skybox. Alternatively set bitmap by Textures[TGorillaCubeMapFace.PositiveZ].
read GetTexture
write SetTexture - published TopSide : TBitmap
Get or set the top side image of the skybox. Alternatively set bitmap by Textures[TGorillaCubeMapFace.PositiveY].
read GetTexture
write SetTexture - published BottomSide : TBitmap
Get or set the bottom side image of the skybox. Alternatively set bitmap by Textures[TGorillaCubeMapFace.NegativeY].
read GetTexture
write SetTexture - published LeftSide : TBitmap
Get or set the left side image of the skybox. Alternatively set bitmap by Textures[TGorillaCubeMapFace.NegativeX].
read GetTexture
write SetTexture - published RightSide : TBitmap
Get or set the right side image of the skybox. Alternatively set bitmap by Textures[TGorillaCubeMapFace.PositiveX].
read GetTexture
write SetTexture