#include <collisionmotionmodel.h>

Public Types | |
| enum | eMode { WALKING = 0, FALLING, SLIDING } |
Public Member Functions | |
| CollisionMotionModel (float pHeight, float pRadius, float k, float theta, dtCore::Scene *pScene, Keyboard *keyboard, Mouse *mouse) | |
| Constructor. | |
| virtual void | PerformTranslation (const double deltaTime) |
| This method can be overriden in subclasses to produce desired translation behavior Note: Any collision detection/response and other physical constraints should be applied here. | |
| FPSCollider & | GetFPSCollider () |
| void | SetCanJump (bool jump) |
| Sets if the Target can jump. | |
| bool | GetCanJump () const |
| Returns true if the target can jump. | |
Protected Member Functions | |
| virtual | ~CollisionMotionModel () |
| Destructor. | |
| dtCore::CollisionMotionModel::CollisionMotionModel | ( | float | pHeight, | |
| float | pRadius, | |||
| float | k, | |||
| float | theta, | |||
| dtCore::Scene * | pScene, | |||
| Keyboard * | keyboard, | |||
| Mouse * | mouse | |||
| ) |
Constructor.
| height,the | height of the character and camera, in meters | |
| radius,the | width of our character | |
| k | the distance from the bottom of the knees to the ground, this represents the maximum step up height | |
| theta | the collision amount to maintain below the ground (note: this should be less then half of k, something small like 0.1 is recommended) | |
| Scene | is used to get the gravity and the ode space | |
| keyboard | the keyboard instance, or 0 to avoid creating default input mappings | |
| mouse | the mouse instance, or 0 to avoid creating default input mappings | |
| keyboard | the keyboard instance, or 0 to avoid creating default input mappings | |
| mouse | the mouse instance, or 0 to avoid creating default input mappings |
| dtCore::CollisionMotionModel::~CollisionMotionModel | ( | ) | [protected, virtual] |
Destructor.
| void dtCore::CollisionMotionModel::PerformTranslation | ( | const double | deltaTime | ) | [virtual] |
This method can be overriden in subclasses to produce desired translation behavior Note: Any collision detection/response and other physical constraints should be applied here.
| deltaTime | The time change |
Reimplemented from dtCore::FPSMotionModel.
| FPSCollider & dtCore::CollisionMotionModel::GetFPSCollider | ( | ) |
| void dtCore::CollisionMotionModel::SetCanJump | ( | bool | jump | ) | [inline] |
Sets if the Target can jump.
| jump | True to enable jumping |
| bool dtCore::CollisionMotionModel::GetCanJump | ( | ) | const [inline] |
Returns true if the target can jump.