#include <btKinematicCharacterController.h>
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.
btKinematicCharacterController::btKinematicCharacterController | ( | btPairCachingGhostObject * | ghostObject, |
btConvexShape * | convexShape, | ||
btScalar | stepHeight, | ||
int | upAxis = 1 |
||
) |
bool btKinematicCharacterController::canJump | ( | ) | const [virtual] |
Implements btCharacterControllerInterface.
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] |
void btKinematicCharacterController::jump | ( | ) | [virtual] |
Implements btCharacterControllerInterface.
bool btKinematicCharacterController::onGround | ( | ) | const [virtual] |
Implements btCharacterControllerInterface.
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] |
Implements btCharacterControllerInterface.
void btKinematicCharacterController::preStep | ( | btCollisionWorld * | collisionWorld | ) | [virtual] |
Implements btCharacterControllerInterface.
bool btKinematicCharacterController::recoverFromPenetration | ( | btCollisionWorld * | collisionWorld | ) | [protected] |
void btKinematicCharacterController::reset | ( | ) | [virtual] |
Implements btCharacterControllerInterface.
void btKinematicCharacterController::setFallSpeed | ( | btScalar | fallSpeed | ) |
void btKinematicCharacterController::setGravity | ( | btScalar | gravity | ) |
void btKinematicCharacterController::setJumpSpeed | ( | btScalar | jumpSpeed | ) |
void btKinematicCharacterController::setMaxJumpHeight | ( | btScalar | maxJumpHeight | ) |
void btKinematicCharacterController::setMaxSlope | ( | btScalar | slopeRadians | ) |
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] |
Implements btCharacterControllerInterface.
Definition at line 58 of file btKinematicCharacterController.h.
btConvexShape* btKinematicCharacterController::m_convexShape [protected] |
Definition at line 43 of file btKinematicCharacterController.h.
btVector3 btKinematicCharacterController::m_currentPosition [protected] |
Definition at line 65 of file btKinematicCharacterController.h.
Definition at line 66 of file btKinematicCharacterController.h.
btScalar btKinematicCharacterController::m_fallSpeed [protected] |
Definition at line 47 of file btKinematicCharacterController.h.
Definition at line 42 of file btKinematicCharacterController.h.
btScalar btKinematicCharacterController::m_gravity [protected] |
Definition at line 52 of file btKinematicCharacterController.h.
btScalar btKinematicCharacterController::m_halfHeight [protected] |
Definition at line 40 of file btKinematicCharacterController.h.
btScalar btKinematicCharacterController::m_jumpSpeed [protected] |
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.
btVector3 btKinematicCharacterController::m_normalizedDirection [protected] |
Definition at line 62 of file btKinematicCharacterController.h.
btScalar btKinematicCharacterController::m_stepHeight [protected] |
Definition at line 56 of file btKinematicCharacterController.h.
btVector3 btKinematicCharacterController::m_targetPosition [protected] |
Definition at line 67 of file btKinematicCharacterController.h.
bool btKinematicCharacterController::m_touchingContact [protected] |
Definition at line 72 of file btKinematicCharacterController.h.
btVector3 btKinematicCharacterController::m_touchingNormal [protected] |
Definition at line 73 of file btKinematicCharacterController.h.
btScalar btKinematicCharacterController::m_turnAngle [protected] |
Definition at line 54 of file btKinematicCharacterController.h.
int btKinematicCharacterController::m_upAxis [protected] |
Definition at line 80 of file btKinematicCharacterController.h.
bool btKinematicCharacterController::m_useGhostObjectSweepTest [protected] |
Definition at line 77 of file btKinematicCharacterController.h.
bool btKinematicCharacterController::m_useWalkDirection [protected] |
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.
btVector3 btKinematicCharacterController::m_walkDirection [protected] |
this is the desired walk direction, set by the user
Definition at line 61 of file btKinematicCharacterController.h.
bool btKinematicCharacterController::m_wasJumping [protected] |
Definition at line 76 of file btKinematicCharacterController.h.
bool btKinematicCharacterController::m_wasOnGround [protected] |
Definition at line 75 of file btKinematicCharacterController.h.