Cyclone Cyclone: cyclone::ParticleContact Class Reference

cyclone::ParticleContact Class Reference

>PContact More...

#include <pcontacts.h>

Collaboration diagram for cyclone::ParticleContact:

Collaboration graph
[legend]
List of all members.

Public Attributes

Particleparticle [2]
 Holds the particles that are involved in the contact.
real restitution
 Holds the normal restitution coefficient at the contact.
Vector3 contactNormal
 Holds the direction of the contact in world coordinates.PContactIntro.
real penetration
 Holds the depth of penetration at the contact.PContactInterpenetrationDef.
Vector3 particleMovement [2]
 Holds the amount each particle is moved by during interpenetration resolution.

Protected Member Functions

void resolve (real duration)
 Resolves this contact, for both velocity and interpenetration.
real calculateSeparatingVelocity () const
 Calculates the separating velocity at this contact.

Detailed Description

>PContact

Resolving a contact removes their interpenetration, and applies sufficient impulse to keep them apart. Colliding bodies may also rebound.

The contact has no callable functions, it just holds the contact details. To resolve a set of contacts, use the particle contact resolver class.


Member Function Documentation

real cyclone::ParticleContact::calculateSeparatingVelocity  )  const [protected]
 

Calculates the separating velocity at this contact.

void cyclone::ParticleContact::resolve real  duration  )  [protected]
 

Resolves this contact, for both velocity and interpenetration.


Member Data Documentation

Vector3 cyclone::ParticleContact::contactNormal
 

Holds the direction of the contact in world coordinates.PContactIntro.

Particle* cyclone::ParticleContact::particle[2]
 

Holds the particles that are involved in the contact.

The second of these can be NULL, for contacts with the scenery.

Vector3 cyclone::ParticleContact::particleMovement[2]
 

Holds the amount each particle is moved by during interpenetration resolution.

real cyclone::ParticleContact::penetration
 

Holds the depth of penetration at the contact.PContactInterpenetrationDef.

real cyclone::ParticleContact::restitution
 

Holds the normal restitution coefficient at the contact.


The documentation for this class was generated from the following file: