Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

anoid::plugin::Dynamics Class Reference

#include <dynamics.hh>

Inheritance diagram for anoid::plugin::Dynamics:

Inheritance graph
[legend]
Collaboration diagram for anoid::plugin::Dynamics:

Collaboration graph
[legend]
List of all members.

Public Methods

virtual void init (config::Configuration &c)
virtual void update ()
virtual void redraw ()
virtual base::Objectadd (base::Object *o)
virtual void receive (base::Message *m)
 Dynamics ()

Protected Attributes

std::vector< Force * > forces
double constantOfRestitution

Detailed Description

This is the ability to follow the physical laws of dynamics (on collision and movement), including but not limited to responding to forces being applied

Definition at line 19 of file dynamics.hh.


Constructor & Destructor Documentation

anoid::plugin::Dynamics::Dynamics   [inline]
 

Definition at line 29 of file dynamics.hh.

References constantOfRestitution.


Member Function Documentation

Object * anoid::plugin::Dynamics::add base::Object   o [virtual]
 

Definition at line 53 of file dynamics.cc.

References forces.

void anoid::plugin::Dynamics::init config::Configuration   c [virtual]
 

This is the real initialiser. It should take it's parameters from the provided configuration

Parameters:
c  the configuration describing this object and it's children

Reimplemented from anoid::plugin::Acceleration.

Definition at line 40 of file dynamics.cc.

References constantOfRestitution, and anoid::base::Ability::registerName().

void anoid::plugin::Dynamics::receive base::Message   m [virtual]
 

Reimplemented from anoid::plugin::Velocity.

Definition at line 62 of file dynamics.cc.

References constantOfRestitution, copyMatrix(), anoid::plugin::SpinVelocity::getInverseInertiaTensor(), anoid::plugin::SpinVelocity::getInverseWorldInertiaTensor(), anoid::plugin::Mass::getMass(), CollisionMessage::getNormal(), CollisionMessage::getOther(), CollisionMessage::getP1(), CollisionMessage::getP2(), anoid::plugin::Scale::getScale(), anoid::plugin::SpinVelocity::getSpinVelocity(), anoid::plugin::Velocity::getVelocity(), anoid::plugin::SpinVelocity::inverseInertiaTensor, anoid::simple::j(), anoid::plugin::Mass::mass, anoid::simple::O(), anoid::plugin::Move::oldPosition, anoid::plugin::Spin::oldRotation, anoid::plugin::Position::position, anoid::plugin::Rotation::rotation, anoid::plugin::Scale::scale, anoid::plugin::SpinVelocity::spinvelocity, Vector(), and anoid::plugin::Velocity::velocity.

void anoid::plugin::Dynamics::redraw   [virtual]
 

Called just after update has been called on the entire world. This should draw the objects (using OpenGL).

Reimplemented from anoid::plugin::SpinVelocity.

Definition at line 34 of file dynamics.cc.

void anoid::plugin::Dynamics::update   [virtual]
 

Called when the main loop is ready for another step. Should be used to perform any calculations prior to movement.

Reimplemented from anoid::plugin::Acceleration.

Definition at line 15 of file dynamics.cc.

References anoid::plugin::Acceleration::acceleration, forces, anoid::base::Object::getWorld(), anoid::simple::i(), anoid::plugin::Mass::mass, anoid::simple::O(), anoid::plugin::SpinVelocity::spinvelocity, and Vector().


Member Data Documentation

double anoid::plugin::Dynamics::constantOfRestitution [protected]
 

Definition at line 22 of file dynamics.hh.

Referenced by Dynamics(), init(), and receive().

std::vector<Force *> anoid::plugin::Dynamics::forces [protected]
 

Definition at line 21 of file dynamics.hh.

Referenced by add(), and update().


The documentation for this class was generated from the following files:
Anoid NG © Michael Westergaard, Martin Stig Stissing, Ronni Michael Laursen, and Kristian Bisgaard Lassen