Class TCastleBackground

Unit

Declaration

type TCastleBackground = class(TCastleComponent)

Description

Background, a skybox with a color gradient to represent sky and ground behind.

See https://en.wikipedia.org/wiki/Cube_mapping#Skyboxes .

You can find numerous free skyboxes e.g. on https://opengameart.org/art-search?keys=skybox and http://www.humus.name/index.php?page=Textures .

Source: scene/castlescene_background.inc (line 27).

Hierarchy

Overview

Fields

Public nested const DefaultSmoothEquator = 0.025;

Methods

Protected procedure Loaded; override;
Public constructor Create(AOwner: TComponent); override;
Public destructor Destroy; override;
Public function PropertySections(const PropertyName: String): TPropertySections; override;
Public procedure SetEffects(const Value: array of TEffectNode);

Properties

Public property SkyTopColor: TCastleColorRGB read FSkyTopColor write SetSkyTopColor;
Public property SkyEquatorColor: TCastleColorRGB read FSkyEquatorColor write SetSkyEquatorColor;
Public property GroundBottomColor: TCastleColorRGB read FGroundBottomColor write SetGroundBottomColor;
Public property GroundEquatorColor: TCastleColorRGB read FGroundEquatorColor write SetGroundEquatorColor;
Public property Rotation: TVector4 read FRotation write SetRotation;
Published property TextureNegativeZ: String read FTextureNegativeZ write SetTextureNegativeZ;
Published property TexturePositiveZ: String read FTexturePositiveZ write SetTexturePositiveZ;
Published property TexturePositiveY: String read FTexturePositiveY write SetTexturePositiveY;
Published property TextureNegativeY: String read FTextureNegativeY write SetTextureNegativeY;
Published property TextureNegativeX: String read FTextureNegativeX write SetTextureNegativeX;
Published property TexturePositiveX: String read FTexturePositiveX write SetTexturePositiveX;
Published property SmoothEquator: Single read FSmoothEquator write SetSmoothEquator default DefaultSmoothEquator;
Published property SkyTopColorPersistent: TCastleColorRGBPersistent read FSkyTopColorPersistent ;
Published property SkyEquatorColorPersistent: TCastleColorRGBPersistent read FSkyEquatorColorPersistent ;
Published property GroundBottomColorPersistent: TCastleColorRGBPersistent read FGroundBottomColorPersistent ;
Published property GroundEquatorColorPersistent: TCastleColorRGBPersistent read FGroundEquatorColorPersistent ;
Published property RotationPersistent: TCastleVector4RotationPersistent read FRotationPersistent ;

Description

Fields

Public nested const DefaultSmoothEquator = 0.025;

This item has no description.

Source: scene/castlescene_background.inc (line 77).

Methods

Protected procedure Loaded; override;

This item has no description.

Source: scene/castlescene_background.inc (line 74).

Public constructor Create(AOwner: TComponent); override;

This item has no description.

Source: scene/castlescene_background.inc (line 79).

Public destructor Destroy; override;

This item has no description.

Source: scene/castlescene_background.inc (line 80).

Public function PropertySections(const PropertyName: String): TPropertySections; override;

This item has no description. Showing description inherited from TCastleComponent.PropertySections.

Section where to show property in the editor.

Source: scene/castlescene_background.inc (line 81).

Public procedure SetEffects(const Value: array of TEffectNode);

Add shader effects to configure how is the background rendered. See https://castle-engine.io/shaders for documentation how shader effects work in Castle Game Engine.

Source: scene/castlescene_background.inc (line 123).

Properties

Public property SkyTopColor: TCastleColorRGB read FSkyTopColor write SetSkyTopColor;

Sky color in the zenith. SkyTopColor and SkyEquatorColor are displayed as a gradient on the upper hemisphere around camera.

Source: scene/castlescene_background.inc (line 86).

Public property SkyEquatorColor: TCastleColorRGB read FSkyEquatorColor write SetSkyEquatorColor;

Sky color at the equator. SkyTopColor and SkyEquatorColor are displayed as a gradient on the upper hemisphere around camera.

Source: scene/castlescene_background.inc (line 91).

Public property GroundBottomColor: TCastleColorRGB read FGroundBottomColor write SetGroundBottomColor;

Ground color at nadir (direction looking straight down). GroundBottomColor and GroundEquatorColor are displayed as a gradient on lower hemisphere around camera.

Source: scene/castlescene_background.inc (line 96).

Public property GroundEquatorColor: TCastleColorRGB read FGroundEquatorColor write SetGroundEquatorColor;

Ground color at equator. GroundBottomColor and GroundEquatorColor are displayed as a gradient on lower hemisphere around camera.

Source: scene/castlescene_background.inc (line 101).

Public property Rotation: TVector4 read FRotation write SetRotation;

Rotate the background around any axis easily. By default this is (0, 1, 0, 0) and often you will want to just change the 4th rotation component, angle, to rotate around the Y axis.

Set it like this:

MyBackground.Rotation := Vector4(0, 1, 0, Pi / 4);

Source: scene/castlescene_background.inc (line 111).

Published property TextureNegativeZ: String read FTextureNegativeZ write SetTextureNegativeZ;

Back (-Z) background texture. Orientation should match X3D Background node.

Source: scene/castlescene_background.inc (line 127).

Published property TexturePositiveZ: String read FTexturePositiveZ write SetTexturePositiveZ;

Front (+Z) background texture. Orientation should match X3D Background node.

Source: scene/castlescene_background.inc (line 131).

Published property TexturePositiveY: String read FTexturePositiveY write SetTexturePositiveY;

Top (+Y) background texture. Orientation should match X3D Background node.

Source: scene/castlescene_background.inc (line 135).

Published property TextureNegativeY: String read FTextureNegativeY write SetTextureNegativeY;

Bottom (-Y) background texture. Orientation should match X3D Background node.

Source: scene/castlescene_background.inc (line 139).

Published property TextureNegativeX: String read FTextureNegativeX write SetTextureNegativeX;

Left (-X) background texture. Orientation should match X3D Background node.

Source: scene/castlescene_background.inc (line 143).

Published property TexturePositiveX: String read FTexturePositiveX write SetTexturePositiveX;

Right (+X) background texture. Orientation should match X3D Background node.

Source: scene/castlescene_background.inc (line 147).

Published property SmoothEquator: Single read FSmoothEquator write SetSmoothEquator default DefaultSmoothEquator;

Make color transition from sky to ground less abrupt, adding a gradient from GroundEquatorColor to SkyEquatorColor. This property determines gradient size, in radians – angle along the sky sphere.

Source: scene/castlescene_background.inc (line 152).

Published property SkyTopColorPersistent: TCastleColorRGBPersistent read FSkyTopColorPersistent ;

SkyTopColor that can be visually edited in Castle Game Engine Editor, Lazarus and Delphi. Normal user code does not need to deal with this, instead read or write SkyTopColor directly.

See also
SkyTopColor
Sky color in the zenith.

Source: scene/auto_generated_persistent_vectors/tcastlebackground_persistent_vectors.inc (line 37).

Published property SkyEquatorColorPersistent: TCastleColorRGBPersistent read FSkyEquatorColorPersistent ;

SkyEquatorColor that can be visually edited in Castle Game Engine Editor, Lazarus and Delphi. Normal user code does not need to deal with this, instead read or write SkyEquatorColor directly.

See also
SkyEquatorColor
Sky color at the equator.

Source: scene/auto_generated_persistent_vectors/tcastlebackground_persistent_vectors.inc (line 105).

Published property GroundBottomColorPersistent: TCastleColorRGBPersistent read FGroundBottomColorPersistent ;

GroundBottomColor that can be visually edited in Castle Game Engine Editor, Lazarus and Delphi. Normal user code does not need to deal with this, instead read or write GroundBottomColor directly.

See also
GroundBottomColor
Ground color at nadir (direction looking straight down).

Source: scene/auto_generated_persistent_vectors/tcastlebackground_persistent_vectors.inc (line 173).

Published property GroundEquatorColorPersistent: TCastleColorRGBPersistent read FGroundEquatorColorPersistent ;

GroundEquatorColor that can be visually edited in Castle Game Engine Editor, Lazarus and Delphi. Normal user code does not need to deal with this, instead read or write GroundEquatorColor directly.

See also
GroundEquatorColor
Ground color at equator.

Source: scene/auto_generated_persistent_vectors/tcastlebackground_persistent_vectors.inc (line 241).

Published property RotationPersistent: TCastleVector4RotationPersistent read FRotationPersistent ;

Rotation that can be visually edited in Castle Game Engine Editor, Lazarus and Delphi. Normal user code does not need to deal with this, instead read or write Rotation directly.

See also
Rotation
Rotate the background around any axis easily.

Source: scene/auto_generated_persistent_vectors/tcastlebackground_persistent_vectors.inc (line 309).


Generated by PasDoc 0.17.0.snapshot.