Class TCastleBoxCollider

Unit

Declaration

type TCastleBoxCollider = class(TCastleCollider)

Description

Collide as a box. Add this collider to TCastleTransform behaviors, along with a TCastleRigidBody, to make the given TCastleTransform be affected by physics and collide with other physics bodies.

Source: transform/castletransform_physics.inc (line 523).

Hierarchy

Overview

Methods

Protected function CreateKraftShape(const APhysics: TKraft; const ARigidBody: TKraftRigidBody): TKraftShape; override;
Protected procedure CalculateSizeCore; override;
Protected procedure UpdateVisualization; override;
Public constructor Create(AOwner: TComponent); override;
Public destructor Destroy; override;
Public function PropertySections(const PropertyName: String): TPropertySections; override;
Public procedure InternalDesigningBegin; override;
Public procedure InternalDesigningEnd; override;

Properties

Public property Size: TVector3 read FSize write SetSize;
Published property SizePersistent: TCastleVector3Persistent read FSizePersistent stored StoredWithAutoSize;

Description

Methods

Protected function CreateKraftShape(const APhysics: TKraft; const ARigidBody: TKraftRigidBody): TKraftShape; override;

This item has no description.

Source: transform/castletransform_physics.inc (line 531).

Protected procedure CalculateSizeCore; override;

This item has no description. Showing description inherited from TCastleCollider.CalculateSizeCore.

Recalculate collider size. Do not be concerned about AutoSize here, just update collider properties. The default implementation resets Translation and Rotation.

Source: transform/castletransform_physics.inc (line 533).

Protected procedure UpdateVisualization; override;

This item has no description. Showing description inherited from TCastleCollider.UpdateVisualization.

Called when the collider size has changed and needs to be updated.

Source: transform/castletransform_physics.inc (line 534).

Public constructor Create(AOwner: TComponent); override;

This item has no description.

Source: transform/castletransform_physics.inc (line 536).

Public destructor Destroy; override;

This item has no description.

Source: transform/castletransform_physics.inc (line 537).

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: transform/castletransform_physics.inc (line 538).

Public procedure InternalDesigningBegin; override;

This item has no description. Showing description inherited from TCastleCollider.InternalDesigningBegin.

Create collider visualization.

Source: transform/castletransform_physics.inc (line 539).

Public procedure InternalDesigningEnd; override;

This item has no description. Showing description inherited from TCastleCollider.InternalDesigningEnd.

Destroy collider visualization.

Source: transform/castletransform_physics.inc (line 540).

Properties

Public property Size: TVector3 read FSize write SetSize;

Box size. Default is (2,2,2) (if not AutoSize), consistent with TCastleBox.

Source: transform/castletransform_physics.inc (line 544).

Published property SizePersistent: TCastleVector3Persistent read FSizePersistent stored StoredWithAutoSize;

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
Box size.

Source: transform/auto_generated_persistent_vectors/tcastleboxcollider_persistent_vectors.inc (line 37).


Generated by PasDoc 0.17.0.snapshot.