Cyclone Cyclone: cyclone::ParticleLink Class Reference

cyclone::ParticleLink Class Reference

Links connect two particles together, generating a contact if they violate the constraints of their link. More...

#include <plinks.h>

Inheritance diagram for cyclone::ParticleLink:

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

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 [2]
 Holds the pair of particles that are connected by this link.

Protected Member Functions

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

Detailed Description

Links connect two particles together, generating a contact if they violate the constraints of their link.

It is used as a base class for cables and rods, and could be used as a base class for springs with a limit to their extension..


Member Function Documentation

virtual unsigned cyclone::ParticleLink::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::ParticleCable, and cyclone::ParticleRod.

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

Returns the current length of the link.


Member Data Documentation

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

Holds the pair of particles that are connected by this link.


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