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

gator::CollisionResponseOperator Class Reference

simple collision/response. More...

#include <CollisionResponseOperator.h>

Inheritance diagram for gator::CollisionResponseOperator:

ani::Operator< ani::Body > ani::Memory List of all members.

Public Types

typedef boost::shared_ptr<

Public Methods

 CollisionResponseOperator ()
virtual ~CollisionResponseOperator ()
void setElastic (float e)
 set the elasticity (e == 1, very bouncy). More...

void setFriction (float f)
 set the elasticity (e == 0, no friction). More...

virtual void exec (ani::DynamicSystem< ani::Body > &ps, float timeDelta)
virtual void setCollisionDetector (CollisionDetectorPtr detect)
 tell the travel method how to collide with your scene. More...

Detailed Description

simple collision/response.

If it collides, then it uses the collision function to determine magnitude/direction the responding forces should be.


Definition at line 18 of file CollisionResponseOperator.h.

Member Typedef Documentation

typedef boost::shared_ptr<ani::Body> gator::CollisionResponseOperator::EntityTypePtr

Definition at line 21 of file CollisionResponseOperator.h.

Constructor & Destructor Documentation

gator::CollisionResponseOperator::CollisionResponseOperator   [inline]

Definition at line 25 of file CollisionResponseOperator.h.

References ani::Operator< ani::Body >::Operator().

virtual gator::CollisionResponseOperator::~CollisionResponseOperator   [inline, virtual]

Definition at line 31 of file CollisionResponseOperator.h.

Member Function Documentation

void gator::CollisionResponseOperator::setElastic float    e [inline]

set the elasticity (e == 1, very bouncy).

Definition at line 36 of file CollisionResponseOperator.h.

void gator::CollisionResponseOperator::setFriction float    f [inline]

set the elasticity (e == 0, no friction).

Definition at line 42 of file CollisionResponseOperator.h.

virtual void gator::CollisionResponseOperator::exec ani::DynamicSystem< ani::Body > &    ps,
float    timeDelta
[inline, virtual]

Implements ani::Operator< ani::Body >.

Definition at line 47 of file CollisionResponseOperator.h.

References ani::Body::applyForce(), gator::computeCollisionForces(), ani::DynamicSystem< __EntityType >::entities(), ani::Body::linearVelocity(), ani::Body::mass(), ani::Body::position(), and ani::Body::setPosition().

virtual void gator::CollisionResponseOperator::setCollisionDetector CollisionDetectorPtr    detect [inline, virtual]

tell the travel method how to collide with your scene.

define your own collision detector, or use one predefined from gator.

Definition at line 82 of file CollisionResponseOperator.h.

References gator::CollisionDetectorPtr.

The documentation for this class was generated from the following file:
Generated on Wed Jun 12 01:54:09 2002 for Animaniac by doxygen1.2.15