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

gator::TireForceOperator Class Reference

force from steering - tire force simulates tangential force as car turns. More...

#include <TireForceOperator.h>

Inheritance diagram for gator::TireForceOperator:

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

Public Types

typedef boost::shared_ptr<
ani::Body
EntityTypePtr

Public Methods

 TireForceOperator (EntityTypePtr &e)
 default constructor. More...

virtual ~TireForceOperator ()
 destructor. More...

void setAirSteering (bool state)
 set to true to use car-like steering while in the air. More...

virtual void exec (ani::DynamicSystem< ani::Body > &ps, float timeDelta)
 apply the force to the system. More...

virtual void setCollisionDetector (CollisionDetectorPtr detect)
 tell the travel method how to collide with your scene. More...


Detailed Description

force from steering - tire force simulates tangential force as car turns.

what this means is that while in contact with other objects the body will experience force tangential to the turning radius (i.e. from the sides to simulate tires). if the tires become out of contact (no collisions), then this perpendicular force is not applied allowing the body to fly freely (like a car flying over a cliff - no steering)

Features:

Definition at line 23 of file TireForceOperator.h.


Member Typedef Documentation

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

Definition at line 26 of file TireForceOperator.h.

Referenced by TireForceOperator().


Constructor & Destructor Documentation

gator::TireForceOperator::TireForceOperator EntityTypePtr   e [inline]
 

default constructor.

Definition at line 30 of file TireForceOperator.h.

References EntityTypePtr, and ani::Operator< ani::Body >::Operator().

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

destructor.

Definition at line 38 of file TireForceOperator.h.


Member Function Documentation

void gator::TireForceOperator::setAirSteering bool    state [inline]
 

set to true to use car-like steering while in the air.

(while not colliding). set to false to use car-like steering only when in contact with the ground.

Definition at line 47 of file TireForceOperator.h.

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

apply the force to the system.

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

Definition at line 53 of file TireForceOperator.h.

References ani::Body::applyForce(), gator::computeCollisionForces(), ani::Body::linearVelocity(), ani::Body::mass(), and ani::Body::rotation().

virtual void gator::TireForceOperator::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 84 of file TireForceOperator.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