Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes
btKinematicCharacterController Class Reference

#include <btKinematicCharacterController.h>

Inheritance diagram for btKinematicCharacterController:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 btKinematicCharacterController (btPairCachingGhostObject *ghostObject, btConvexShape *convexShape, btScalar stepHeight, int upAxis=1)
bool canJump () const
void debugDraw (btIDebugDraw *debugDrawer)
 btActionInterface interface
btPairCachingGhostObjectgetGhostObject ()
btScalar getGravity () const
btScalar getMaxSlope () const
void jump ()
bool onGround () const
void playerStep (btCollisionWorld *collisionWorld, btScalar dt)
void preStep (btCollisionWorld *collisionWorld)
void reset ()
void setFallSpeed (btScalar fallSpeed)
void setGravity (btScalar gravity)
void setJumpSpeed (btScalar jumpSpeed)
void setMaxJumpHeight (btScalar maxJumpHeight)
void setMaxSlope (btScalar slopeRadians)
void setUpAxis (int axis)
void setUseGhostSweepTest (bool useGhostObjectSweepTest)
virtual void setVelocityForTimeInterval (const btVector3 &velocity, btScalar timeInterval)
virtual void setWalkDirection (const btVector3 &walkDirection)
virtual void updateAction (btCollisionWorld *collisionWorld, btScalar deltaTime)
 btActionInterface interface
void warp (const btVector3 &origin)
 ~btKinematicCharacterController ()

Protected Member Functions

btVector3 computeReflectionDirection (const btVector3 &direction, const btVector3 &normal)
btVector3 parallelComponent (const btVector3 &direction, const btVector3 &normal)
btVector3 perpindicularComponent (const btVector3 &direction, const btVector3 &normal)
bool recoverFromPenetration (btCollisionWorld *collisionWorld)
void stepDown (btCollisionWorld *collisionWorld, btScalar dt)
void stepForwardAndStrafe (btCollisionWorld *collisionWorld, const btVector3 &walkMove)
void stepUp (btCollisionWorld *collisionWorld)
void updateTargetPositionBasedOnCollision (const btVector3 &hit_normal, btScalar tangentMag=btScalar(0.0), btScalar normalMag=btScalar(1.0))

Static Protected Member Functions

static btVector3 * getUpAxisDirections ()

Protected Attributes

btScalar m_addedMargin
btConvexShape * m_convexShape
btVector3 m_currentPosition
btScalar m_currentStepOffset
btScalar m_fallSpeed
btPairCachingGhostObjectm_ghostObject
btScalar m_gravity
btScalar m_halfHeight
btScalar m_jumpSpeed
btManifoldArray m_manifoldArray
 keep track of the contact manifolds
btScalar m_maxJumpHeight
btScalar m_maxSlopeCosine
btScalar m_maxSlopeRadians
btVector3 m_normalizedDirection
btScalar m_stepHeight
btVector3 m_targetPosition
bool m_touchingContact
btVector3 m_touchingNormal
btScalar m_turnAngle
int m_upAxis
bool m_useGhostObjectSweepTest
bool m_useWalkDirection
btScalar m_velocityTimeInterval
btScalar m_verticalOffset
btScalar m_verticalVelocity
btVector3 m_walkDirection
 this is the desired walk direction, set by the user
bool m_wasJumping
bool m_wasOnGround

Detailed Description

btKinematicCharacterController is an object that supports a sliding motion in a world. It uses a ghost object and convex sweep test to test for upcoming collisions. This is combined with discrete collision detection to recover from penetrations. Interaction between btKinematicCharacterController and dynamic rigid bodies needs to be explicity implemented by the user.

Definition at line 36 of file btKinematicCharacterController.h.


Constructor & Destructor Documentation

btKinematicCharacterController::btKinematicCharacterController ( btPairCachingGhostObject ghostObject,
btConvexShape *  convexShape,
btScalar  stepHeight,
int  upAxis = 1 
)

Member Function Documentation

bool btKinematicCharacterController::canJump ( ) const [virtual]
btVector3 btKinematicCharacterController::computeReflectionDirection ( const btVector3 &  direction,
const btVector3 &  normal 
) [protected]
void btKinematicCharacterController::debugDraw ( btIDebugDraw debugDrawer) [virtual]

btActionInterface interface

Implements btActionInterface.

static btVector3* btKinematicCharacterController::getUpAxisDirections ( ) [static, protected]
bool btKinematicCharacterController::onGround ( ) const [virtual]
btVector3 btKinematicCharacterController::parallelComponent ( const btVector3 &  direction,
const btVector3 &  normal 
) [protected]
btVector3 btKinematicCharacterController::perpindicularComponent ( const btVector3 &  direction,
const btVector3 &  normal 
) [protected]
void btKinematicCharacterController::playerStep ( btCollisionWorld collisionWorld,
btScalar  dt 
) [virtual]
void btKinematicCharacterController::preStep ( btCollisionWorld collisionWorld) [virtual]

The max slope determines the maximum angle that the controller can walk up. The slope angle is measured in radians.

void btKinematicCharacterController::setUpAxis ( int  axis) [inline]

Definition at line 108 of file btKinematicCharacterController.h.

void btKinematicCharacterController::setUseGhostSweepTest ( bool  useGhostObjectSweepTest) [inline]

Definition at line 154 of file btKinematicCharacterController.h.

virtual void btKinematicCharacterController::setVelocityForTimeInterval ( const btVector3 &  velocity,
btScalar  timeInterval 
) [virtual]

Caller provides a velocity with which the character should move for the given time period. After the time period, velocity is reset to zero. This call will reset any walk direction set by setWalkDirection(). Negative time intervals will result in no motion.

Implements btCharacterControllerInterface.

virtual void btKinematicCharacterController::setWalkDirection ( const btVector3 &  walkDirection) [virtual]

This should probably be called setPositionIncrementPerSimulatorStep. This is neither a direction nor a velocity, but the amount to increment the position each simulation iteration, regardless of dt. This call will reset any velocity set by setVelocityForTimeInterval().

Implements btCharacterControllerInterface.

void btKinematicCharacterController::stepDown ( btCollisionWorld collisionWorld,
btScalar  dt 
) [protected]
void btKinematicCharacterController::stepForwardAndStrafe ( btCollisionWorld collisionWorld,
const btVector3 &  walkMove 
) [protected]
void btKinematicCharacterController::stepUp ( btCollisionWorld collisionWorld) [protected]
virtual void btKinematicCharacterController::updateAction ( btCollisionWorld collisionWorld,
btScalar  deltaTime 
) [inline, virtual]

btActionInterface interface

Implements btActionInterface.

Definition at line 99 of file btKinematicCharacterController.h.

void btKinematicCharacterController::updateTargetPositionBasedOnCollision ( const btVector3 &  hit_normal,
btScalar  tangentMag = btScalar(0.0),
btScalar  normalMag = btScalar(1.0) 
) [protected]
void btKinematicCharacterController::warp ( const btVector3 &  origin) [virtual]

Member Data Documentation

Definition at line 58 of file btKinematicCharacterController.h.

Definition at line 43 of file btKinematicCharacterController.h.

Definition at line 65 of file btKinematicCharacterController.h.

Definition at line 66 of file btKinematicCharacterController.h.

Definition at line 47 of file btKinematicCharacterController.h.

Definition at line 42 of file btKinematicCharacterController.h.

Definition at line 52 of file btKinematicCharacterController.h.

Definition at line 40 of file btKinematicCharacterController.h.

Definition at line 48 of file btKinematicCharacterController.h.

keep track of the contact manifolds

Definition at line 70 of file btKinematicCharacterController.h.

Definition at line 49 of file btKinematicCharacterController.h.

Definition at line 51 of file btKinematicCharacterController.h.

Definition at line 50 of file btKinematicCharacterController.h.

Definition at line 62 of file btKinematicCharacterController.h.

Definition at line 56 of file btKinematicCharacterController.h.

Definition at line 67 of file btKinematicCharacterController.h.

Definition at line 72 of file btKinematicCharacterController.h.

Definition at line 73 of file btKinematicCharacterController.h.

Definition at line 54 of file btKinematicCharacterController.h.

Definition at line 80 of file btKinematicCharacterController.h.

Definition at line 77 of file btKinematicCharacterController.h.

Definition at line 78 of file btKinematicCharacterController.h.

Definition at line 79 of file btKinematicCharacterController.h.

Definition at line 46 of file btKinematicCharacterController.h.

Definition at line 45 of file btKinematicCharacterController.h.

this is the desired walk direction, set by the user

Definition at line 61 of file btKinematicCharacterController.h.

Definition at line 76 of file btKinematicCharacterController.h.

Definition at line 75 of file btKinematicCharacterController.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


bullet
Author(s): Erwin Coumans, ROS package maintained by Tully Foote
autogenerated on Wed Oct 31 2012 07:54:32