Class TCollider

Unit

Declaration

type TCollider = class(TObject)

Description

Shape used for collision detection of a rigid body TRigidBody.

Hierarchy

Overview

Fields

Public nested const DefaultDensity = 1.0;
Public nested const DefaultMass = 0.0;
Public nested const DefaultRestitution = 0.0;
Public nested const DefaultFriction = 0.5;

Methods

Public constructor Create(const AParent: TRigidBody);
Public destructor Destroy; override;

Properties

Public property Parent: TRigidBody read FParent;
Public property Density: Single read FDensity write FDensity default DefaultDensity;
Public property Mass: Single read FMass write FMass default DefaultMass;
Public property Restitution: Single read FRestitution write FRestitution default DefaultRestitution;
Public property Friction: Single read FFriction write FFriction default DefaultFriction;
Public property Translation: TVector3 read FTranslation write FTranslation; experimental;
Public property Rotation: TVector4 read FRotation write FRotation; experimental;
Public property Scale: TVector3 read FScale write FScale; experimental;

Description

Fields

Public nested const DefaultDensity = 1.0;

Default for Density.

Public nested const DefaultMass = 0.0;

Default for Mass, zero means "use Density instead".

Public nested const DefaultRestitution = 0.0;

Default for Restitution.

Public nested const DefaultFriction = 0.5;

Default for Friction.

Methods

Public constructor Create(const AParent: TRigidBody);

Create a collider, and set the parent rigid body. The collider instance is owned by the TRigidBody instance, so will be freed when the TRigidBody is freed. This automatically sets the TRigidBody.Collider property and TCollider.Parent property.

Public destructor Destroy; override;
 

Properties

Public property Parent: TRigidBody read FParent;

Parent rigid body, which in turn refers to this collider by TRigidBody.Collider.

Public property Density: Single read FDensity write FDensity default DefaultDensity;

Density (per volume) in kg, this implicitly determines mass (volume is automatically calculated by the physics engine). If you instead prefer to explicitly set mass, set Mass property to something non-zero.

Public property Mass: Single read FMass write FMass default DefaultMass;

Mass in kg. When non-zero, this overrides the automatically calculated mass from the volume and Density.

Public property Restitution: Single read FRestitution write FRestitution default DefaultRestitution;
 
Public property Friction: Single read FFriction write FFriction default DefaultFriction;
 
Public property Translation: TVector3 read FTranslation write FTranslation; experimental;

Warning: this symbol is experimental.

Local translation applied to the collider shape. Note: These properties may disappear soon from TCollider, and will only be in new (similar but not 100% compatible) TCastleCollider.

Public property Rotation: TVector4 read FRotation write FRotation; experimental;

Warning: this symbol is experimental.

Local rotation applied to the collider shape. Note: These properties may disappear soon from TCollider, and will only be in new (similar but not 100% compatible) TCastleCollider.

Public property Scale: TVector3 read FScale write FScale; experimental;

Warning: this symbol is experimental.

Local scale applied to the collider shape. Note: These properties may disappear soon from TCollider, and will only be in new (similar but not 100% compatible) TCastleCollider.


Generated by PasDoc 0.16.0.