Class TSkybox

Unit

Declaration

type TSkybox = class(TModel3D)

Description

Defines a skybox.

The texture is a bitmap with the 6 sides compacted as follow:

+--------+-------+------+
| front  | right | back |
+--------+-------+------+
| bottom | left  | top  |
+--------+-------+------+

Look at the image "map.png" at the envmap directory for more info.

Hierarchy

Overview

Methods

Public constructor Create; override; overload;
Public CONSTRUCTOR Create (FileName: STRING); OVERLOAD;
Public DESTRUCTOR Destroy; OVERRIDE;
Public PROCEDURE Render (CONST aObject: TObject3D); OVERRIDE;

Properties

Public property OwnsTexture: Boolean read fOwnsTexture write fOwnsTexture;
Public property Texture: ALLEGRO_BITMAPptr read fTexture write SetTexture;

Description

Methods

Public constructor Create; override; overload;

Constructor.

Public CONSTRUCTOR Create (FileName: STRING); OVERLOAD;

Creates the skybox loading the texture map from the image file.

Public DESTRUCTOR Destroy; OVERRIDE;

Releases resources.

Public PROCEDURE Render (CONST aObject: TObject3D); OVERRIDE;

Renders the skybox. Call it after TCamera.ApplyRotationmatrix.

The size is 20 x 20 x 20 so the "far" plane should be more than 50 to be sure it won't cut it.

Properties

Public property OwnsTexture: Boolean read fOwnsTexture write fOwnsTexture;

Should free the Texture when removed.

Public property Texture: ALLEGRO_BITMAPptr read fTexture write SetTexture;

Access to texture.


Generated by PasDoc 0.15.0. Generated on 2025-07-31 11:41:01.