Cyclone Cyclone: cyclone::ParticleConstraint Class Reference

cyclone::ParticleConstraint Class Reference

Constraints are just like links, except they connect a particle to an immovable anchor point. More...

#include <plinks.h>

Inheritance diagram for cyclone::ParticleConstraint:

Inheritance graph
[legend]
Collaboration diagram for cyclone::ParticleConstraint:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual unsigned addContact (ParticleContact *contact, unsigned limit) const =0
 Geneates the contacts to keep this link from being violated.

Public Attributes

Particleparticle
 Holds the particles connected by this constraint.
Vector3 anchor
 The point to which the particle is anchored.

Protected Member Functions

real currentLength () const
 Returns the current length of the link.

Detailed Description

Constraints are just like links, except they connect a particle to an immovable anchor point.


Member Function Documentation

virtual unsigned cyclone::ParticleConstraint::addContact ParticleContact contact,
unsigned  limit
const [pure virtual]
 

Geneates the contacts to keep this link from being violated.

This class can only ever generate a single contact, so the pointer can be a pointer to a single element, the limit parameter is assumed to be at least one (zero isn't valid) and the return value is either 0, if the cable wasn't over-extended, or one if a contact was needed.

NB: This method is declared in the same way (as pure virtual) in the parent class, but is replicated here for documentation purposes.

Implements cyclone::ParticleContactGenerator.

Implemented in cyclone::ParticleCableConstraint, and cyclone::ParticleRodConstraint.

real cyclone::ParticleConstraint::currentLength  )  const [protected]
 

Returns the current length of the link.


Member Data Documentation

Vector3 cyclone::ParticleConstraint::anchor
 

The point to which the particle is anchored.

Particle* cyclone::ParticleConstraint::particle
 

Holds the particles connected by this constraint.


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