Class TCastlePlane

Unit

Declaration

type TCastlePlane = class(TCastleAbstractPrimitive)

Description

Plane with configurable size, position and material.

The plane is actually just a rectangle with specified Size. It is centered around the point (0,0,0).

The plane is parallel to the given Axis, by default the Axis is 1 (Y) – which means that the plane acts like a floor in a typical 3D setup. If you want a rectangle visible in typical 2D setup (where X goes to the right, Y goes up), change the Axis to 2 (Z).

You can translate, rotate, scale the plane freely, as it is a TCastleTransform, and can be a child of other TCastleTransform instances too.

Hierarchy

Overview

Methods

Public constructor Create(AOwner: TComponent); override;
Public destructor Destroy; override;
Public function PropertySections(const PropertyName: String): TPropertySections; override;

Properties

Public property Size: TVector2 read FSize write SetSize;
Published property Axis: T3DAxis read FAxis write SetAxis default 1;
Published property DoubleSided: Boolean read FDoubleSided write SetDoubleSided default false;
Published property SizePersistent: TCastleVector2Persistent read FSizePersistent ;

Description

Methods

Public constructor Create(AOwner: TComponent); override;

This item has no description.

Public destructor Destroy; override;

This item has no description.

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.

Properties

Public property Size: TVector2 read FSize write SetSize;

Size of the plane. By default (2, 2).

The coordinates affected by this property depend on current Axis value. That is:

  • Axis = 0 means that this property determines the size in Y and Z (in this order).

  • Axis = 1 means that this property determines the size in X and Z (in this order).

  • Axis = 2 means that this property determines the size in X and Y (in this order).

Published property Axis: T3DAxis read FAxis write SetAxis default 1;

Axis where the plane is constant. That is:

  • Axis = 0 means the plane is in YZ (at constant X = 0).

  • Axis = 1 means the plane is in XZ (at constant Y = 0). In particular useful for floors in 3D games.

  • Axis = 2 means the plane is in XY (at constant Z = 0). In particular useful for rectangles in 2D games.

Published property DoubleSided: Boolean read FDoubleSided write SetDoubleSided default false;

When this is True, the object is visible (and lit) from both sides.

Published property SizePersistent: TCastleVector2Persistent read FSizePersistent ;

Size 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 Size directly.

See also
Size
Size of the plane.

Generated by PasDoc 0.16.0-snapshot.