Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

ElasticLink Class Reference

#include <ElasticLink.h>

List of all members.

Public Member Functions

Public Attributes


Detailed Description

An elastic link, linking two objects. The objects are connected in their reference point.

Definition at line 12 of file ElasticLink.h.


Constructor & Destructor Documentation

ElasticLink::ElasticLink PhysicalObject object1,
PhysicalObject object2,
real  length,
real  k
 

Definition at line 11 of file ElasticLink.cpp.

ElasticLink::~ElasticLink  )  [virtual]
 

Definition at line 16 of file ElasticLink.cpp.


Member Function Documentation

void ElasticLink::applyForces  ) 
 

Applies the elastic forces to the objects, by adding them to the externalForces accumulator of the objects.

Definition at line 20 of file ElasticLink.cpp.

References PhysicalObject::externalForce, Vector2::getModule(), k, length, object1, object2, PhysicalObject::r, and real.

void ElasticLink::draw GUI gui  ) 
 

Definition at line 29 of file ElasticLink.cpp.

References GUI::drawLine(), object1, object2, and PhysicalObject::r.


Member Data Documentation

real ElasticLink::k
 

The elastic contact of the link.

Definition at line 25 of file ElasticLink.h.

Referenced by applyForces(), and Pac::Pac().

real ElasticLink::length
 

The rest length of the elastic link.

Definition at line 22 of file ElasticLink.h.

Referenced by applyForces(), and Pac::controll().

PhysicalObject* ElasticLink::object1
 

Definition at line 18 of file ElasticLink.h.

Referenced by applyForces(), and draw().

PhysicalObject* ElasticLink::object2
 

Definition at line 19 of file ElasticLink.h.

Referenced by applyForces(), and draw().


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

Thyrix homepageUsers' guide

(C) Arxia 2004-2005