dtCore::CollisionMotionModel Class Reference

Collision Motion Model uses ode collision meshes to allow typical FPS Camera interaction with the environment. More...

#include <collisionmotionmodel.h>

Inheritance diagram for dtCore::CollisionMotionModel:

dtCore::FPSMotionModel dtCore::MotionModel dtCore::Base

List of all members.

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.
FPSColliderGetFPSCollider ()
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.


Detailed Description

Collision Motion Model uses ode collision meshes to allow typical FPS Camera interaction with the environment.

Member Enumeration Documentation

enum dtCore::CollisionMotionModel::eMode

Enumerator:
WALKING 
FALLING 
SLIDING 


Constructor & Destructor Documentation

dtCore::CollisionMotionModel::CollisionMotionModel ( float  pHeight,
float  pRadius,
float  k,
float  theta,
dtCore::Scene pScene,
Keyboard keyboard,
Mouse mouse 
)

Constructor.

Parameters:
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.


Member Function Documentation

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.

Parameters:
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.

Parameters:
jump True to enable jumping

bool dtCore::CollisionMotionModel::GetCanJump (  )  const [inline]

Returns true if the target can jump.

Returns:
mCanJump


http://www.delta3d.org
2.0.0 generated 14 Feb 2008