#include <TireForceOperator.h>
Inheritance diagram for gator::TireForceOperator:
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... |
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.
|
Definition at line 26 of file TireForceOperator.h. Referenced by TireForceOperator(). |
|
default constructor.
Definition at line 30 of file TireForceOperator.h. References EntityTypePtr, and ani::Operator< ani::Body >::Operator(). |
|
destructor.
Definition at line 38 of file TireForceOperator.h. |
|
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. |
|
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(). |
|
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. |