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

Elastoid Class Reference

#include <Elastoid.h>

Inheritance diagram for Elastoid:

PhysicalObject GraphicalObject Pac List of all members.

Public Member Functions

Public Attributes


Constructor & Destructor Documentation

Elastoid::Elastoid (   ) 
 

Definition at line 13 of file Elastoid.cpp.

Elastoid::~Elastoid (   )  [virtual]
 

Definition at line 16 of file Elastoid.cpp.

References objects, and purgeContainer().


Member Function Documentation

void Elastoid::addObject (  PhysicalObject *  object  )  [inline]
 

Definition at line 18 of file Elastoid.h.

References objects.

Referenced by Pac::Pac().

void Elastoid::computeDerivatives (  GlobalContactInfoVector *  globalContacts  )  [virtual]
 

Computes the derivatives, given the contact forces. The globalContacts pointer is needed for contact processing for articulated agents.

Reimplemented from PhysicalObject.

Definition at line 35 of file Elastoid.cpp.

References objects.

void Elastoid::computeDerivativesWithoutContacts (  ContactSolver *  contactSolver  )  [virtual]
 

Computes the derivatives (velocity, angular velocity) of the object, ignoring any eventual contact forces.

Reimplemented from PhysicalObject.

Definition at line 27 of file Elastoid.cpp.

References links, and objects.

void Elastoid::deleteContacts (   )  [virtual]
 

Delete the contacts of the object.

Reimplemented from PhysicalObject.

Definition at line 67 of file Elastoid.cpp.

References objects.

bool Elastoid::detectContacts (  PhysicalObject *  object,
GlobalContactInfoVector *  contacts
)  [virtual]
 

Contact handling.

Implements PhysicalObject.

Definition at line 52 of file Elastoid.cpp.

References objects.

void Elastoid::detectInternalContacts (  GlobalContactInfoVector *  globalContacts  )  [virtual]
 

Detects internal contacts. Does nothing for primitive objects or composed objects. To be overriden by complex objects that have parts that move relative to each other, such as articulated objects.

Reimplemented from PhysicalObject.

Definition at line 60 of file Elastoid.cpp.

References objects.

bool Elastoid::detectMouseContact (  const Vector2 &  rMouse,
Vector2 &  p,
PhysicalObject *&  object
)  [virtual]
 

Detects whether a click of the mouse at rMouse has touched the object. In case of contact, returns true and sets p to the relative vector between the center of the object and the contact point; p is expressed in the object reference frame because it rotates with the object while the object is dragged. The object needs to be set by the function because, for articulated objects, the dragged object is an articulation and not the whole articulated object. To be overriden by the various object primitives.

Reimplemented from PhysicalObject.

Definition at line 73 of file Elastoid.cpp.

References objects.

void Elastoid::draw (  GUI *  gui  )  [virtual]
 

Draw the object to the graphical user interface.

Implements GraphicalObject.

Definition at line 84 of file Elastoid.cpp.

References links, objects, and GUI::setPenColor().

void Elastoid::integrate (  const Integrator &  integrator  )  [virtual]
 

Advances the time to the next timestep.

Reimplemented from PhysicalObject.

Definition at line 41 of file Elastoid.cpp.

References objects, Vector2::setXY(), Vector2::updateMax(), and Vector2::updateMin().

void Elastoid::registerPrimitives (  Simulator *  simulator  )  [virtual]
 

Registers all composing primitives of the object with the simulator.

Reimplemented from PhysicalObject.

Definition at line 20 of file Elastoid.cpp.

References objects, and Simulator::registerPrimitive().


Member Data Documentation

ElasticLinkVector Elastoid::links
 

Definition at line 16 of file Elastoid.h.

Referenced by computeDerivativesWithoutContacts(), and draw().

PhysicalObjectPVector Elastoid::objects
 

Definition at line 15 of file Elastoid.h.

Referenced by addObject(), computeDerivatives(), computeDerivativesWithoutContacts(), deleteContacts(), detectContacts(), detectInternalContacts(), detectMouseContact(), draw(), integrate(), registerPrimitives(), and ~Elastoid().


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

Thyrix homepage • Users' guide

(C) Arxia 2004-2005