Class TCollider

Unit

Declaration

type TCollider = class(TObject)

Description

Shape used for collision detection of a rigid body TRigidBody.

Hierarchy

  • TObject
  • TCollider

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;

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;
 

Generated by PasDoc 0.16.0.