Class TBillboard

Unit

Declaration

type TBillboard = class(TModel3D)

Description

A billboarding object.

A billboard model consists in a single texture that always faces the camera.

The Position of the object refers to the central point of the bitmap.

By default, the TModel3D.Transparent property is set to True.

See also
TBillboard.StandUp
Is it a stand-up.

Hierarchy

Overview

Methods

Public constructor Create; override;
Public destructor Destroy; override;
Public function BoundingSphereRadius: Single; override;
Public function BoundingBox: TBox; override;
Public procedure Render (const aObject: TObject3D); override;

Properties

Public property Width: GLfloat read GetWidth write SetWidth;
Public property Height: GLfloat read GetHeight write SetHeight;
Public property OwnsTexture: Boolean read fOwnsTexture write fOwnsTexture;
Public property Texture: ALLEGRO_BITMAPptr read fTexture write SetTexture;
Public property StandUp: Boolean read fStandUp write fStandUp;
Public property NumFrames: Integer read fNumFrames write SetNumFrames;

Description

Methods

Public constructor Create; override;

Constructor.

Public destructor Destroy; override;

Destructor.

If OwnsTexture is True, it will destroy the texture.

Public function BoundingSphereRadius: Single; override;

Calculate the bounding sphere radius of the model.

It uses TBillboard.Width.

Public function BoundingBox: TBox; override;

Returns the bounding box limits.

It uses TBillboard.Width and TBillboard.Height.

Public procedure Render (const aObject: TObject3D); override;

Renders the model.

See also
TBillboard.StandUp
Is it a stand-up.
TBillboard.Texture
The bitmap.

Properties

Public property Width: GLfloat read GetWidth write SetWidth;

Billboard width.

Default value is 1.

See also
TBillboard.Height
Billboard height.
TBillboard.BoundingSphereRadius
Calculate the bounding sphere radius of the model.
TBillboard.BoundingBox
Returns the bounding box limits.
Public property Height: GLfloat read GetHeight write SetHeight;

Billboard height.

Default value is 1.

See also
TBillboard.Width
Billboard width.
TBillboard.BoundingSphereRadius
Calculate the bounding sphere radius of the model.
TBillboard.BoundingBox
Returns the bounding box limits.
Public property OwnsTexture: Boolean read fOwnsTexture write fOwnsTexture;

Should the object free the Texture when it's destroyed?

OwnsTexture determines whether the Texture used should be freed when a new one is assigned or when the object is destroyed. If the property is True then it is freed. If the property is False the texture isn't freed.

It defaults to True.

See also
TBillboard.Texture
The bitmap.
TBillboard.Destroy
Destructor.
Public property Texture: ALLEGRO_BITMAPptr read fTexture write SetTexture;

The bitmap.

On animated billboards the texture should contain all frames in a strip.

See also
TBillboard.Destroy
Destructor.
TBillboard.OwnsTexture
Should the object free the Texture when it's destroyed?

OwnsTexture determines whether the Texture used should be freed when a new one is assigned or when the object is destroyed.

TBillboard.NumFrames
Set the number of frames.
Public property StandUp: Boolean read fStandUp write fStandUp;

Is it a stand-up.

If True, it will keep the Y axis up. If False it will face the camera no matter the angle.

Default is True.

Public property NumFrames: Integer read fNumFrames write SetNumFrames;

Set the number of frames.

If it's greater than 1, the Render method will get the TObject3D.Frame value to render a single frame.

Default value is 1.

See also
TBillboard.Texture
The bitmap.

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