KinematicCharacterController is an object that supports a sliding motion in a world.
More...
#include <external/RadixEngine/include/radix/physics/KinematicCharacterController.hpp>
Inherits btCharacterControllerInterface.
KinematicCharacterController 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.
radix::KinematicCharacterController::KinematicCharacterController |
( |
btPairCachingGhostObject * |
ghostObject, |
|
|
btConvexShape * |
convexShape, |
|
|
btScalar |
stepHeight, |
|
|
int |
upAxis = 1 |
|
) |
| |
radix::KinematicCharacterController::~KinematicCharacterController |
( |
| ) |
|
radix::KinematicCharacterController::BT_DECLARE_ALIGNED_ALLOCATOR |
( |
| ) |
|
bool radix::KinematicCharacterController::canJump |
( |
| ) |
const |
btVector3 radix::KinematicCharacterController::computeReflectionDirection |
( |
const btVector3 & |
direction, |
|
|
const btVector3 & |
normal |
|
) |
| |
|
protected |
void radix::KinematicCharacterController::debugDraw |
( |
btIDebugDraw * |
debugDrawer | ) |
|
btActionInterface interface
btPairCachingGhostObject * radix::KinematicCharacterController::getGhostObject |
( |
| ) |
|
btScalar radix::KinematicCharacterController::getGravity |
( |
| ) |
const |
btScalar radix::KinematicCharacterController::getMaxSlope |
( |
| ) |
const |
btVector3 * radix::KinematicCharacterController::getUpAxisDirections |
( |
| ) |
|
|
staticprotected |
void radix::KinematicCharacterController::jump |
( |
const btVector3 & |
dir = btVector3() | ) |
|
bool radix::KinematicCharacterController::onGround |
( |
| ) |
const |
btVector3 radix::KinematicCharacterController::parallelComponent |
( |
const btVector3 & |
direction, |
|
|
const btVector3 & |
normal |
|
) |
| |
|
protected |
btVector3 radix::KinematicCharacterController::perpindicularComponent |
( |
const btVector3 & |
direction, |
|
|
const btVector3 & |
normal |
|
) |
| |
|
protected |
void radix::KinematicCharacterController::playerStep |
( |
btCollisionWorld * |
collisionWorld, |
|
|
btScalar |
dt |
|
) |
| |
void radix::KinematicCharacterController::preStep |
( |
btCollisionWorld * |
collisionWorld | ) |
|
bool radix::KinematicCharacterController::recoverFromPenetration |
( |
btCollisionWorld * |
collisionWorld | ) |
|
|
protected |
void radix::KinematicCharacterController::reset |
( |
btCollisionWorld * |
collisionWorld | ) |
|
void radix::KinematicCharacterController::setFallSpeed |
( |
btScalar |
fallSpeed | ) |
|
void radix::KinematicCharacterController::setGravity |
( |
btScalar |
gravity | ) |
|
void radix::KinematicCharacterController::setJumpSpeed |
( |
btScalar |
jumpSpeed | ) |
|
void radix::KinematicCharacterController::setMaxJumpHeight |
( |
btScalar |
maxJumpHeight | ) |
|
void radix::KinematicCharacterController::setMaxSlope |
( |
btScalar |
slopeRadians | ) |
|
The max slope determines the maximum angle that the controller can walk up.
The slope angle is measured in radians.
void radix::KinematicCharacterController::setUpAxis |
( |
int |
axis | ) |
|
|
inline |
void radix::KinematicCharacterController::setUpInterpolate |
( |
bool |
value | ) |
|
void radix::KinematicCharacterController::setUseGhostSweepTest |
( |
bool |
useGhostObjectSweepTest | ) |
|
|
inline |
void radix::KinematicCharacterController::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.
void radix::KinematicCharacterController::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().
void radix::KinematicCharacterController::stepDown |
( |
btCollisionWorld * |
collisionWorld, |
|
|
btScalar |
dt |
|
) |
| |
|
protected |
void radix::KinematicCharacterController::stepForwardAndStrafe |
( |
btCollisionWorld * |
collisionWorld, |
|
|
const btVector3 & |
walkMove |
|
) |
| |
|
protected |
void radix::KinematicCharacterController::stepUp |
( |
btCollisionWorld * |
collisionWorld | ) |
|
|
protected |
virtual void radix::KinematicCharacterController::updateAction |
( |
btCollisionWorld * |
collisionWorld, |
|
|
btScalar |
deltaTime |
|
) |
| |
|
inlinevirtual |
btActionInterface interface
void radix::KinematicCharacterController::updateTargetPositionBasedOnCollision |
( |
const btVector3 & |
hit_normal, |
|
|
btScalar |
tangentMag = btScalar(0.0) , |
|
|
btScalar |
normalMag = btScalar(1.0) |
|
) |
| |
|
protected |
void radix::KinematicCharacterController::warp |
( |
const btVector3 & |
origin | ) |
|
bool radix::KinematicCharacterController::bounce_fix |
|
protected |
bool radix::KinematicCharacterController::full_drop |
|
protected |
btScalar radix::KinematicCharacterController::m_addedMargin |
|
protected |
btConvexShape* radix::KinematicCharacterController::m_convexShape |
|
protected |
btVector3 radix::KinematicCharacterController::m_currentPosition |
|
protected |
btScalar radix::KinematicCharacterController::m_currentStepOffset |
|
protected |
btScalar radix::KinematicCharacterController::m_fallSpeed |
|
protected |
btPairCachingGhostObject* radix::KinematicCharacterController::m_ghostObject |
|
protected |
btScalar radix::KinematicCharacterController::m_gravity |
|
protected |
btScalar radix::KinematicCharacterController::m_halfHeight |
|
protected |
bool radix::KinematicCharacterController::m_interpolateUp |
|
protected |
btScalar radix::KinematicCharacterController::m_jumpSpeed |
|
protected |
btManifoldArray radix::KinematicCharacterController::m_manifoldArray |
|
protected |
keep track of the contact manifolds
btScalar radix::KinematicCharacterController::m_maxJumpHeight |
|
protected |
btScalar radix::KinematicCharacterController::m_maxSlopeCosine |
|
protected |
btScalar radix::KinematicCharacterController::m_maxSlopeRadians |
|
protected |
btVector3 radix::KinematicCharacterController::m_normalizedDirection |
|
protected |
btScalar radix::KinematicCharacterController::m_stepHeight |
|
protected |
btVector3 radix::KinematicCharacterController::m_targetPosition |
|
protected |
bool radix::KinematicCharacterController::m_touchingContact |
|
protected |
btVector3 radix::KinematicCharacterController::m_touchingNormal |
|
protected |
btScalar radix::KinematicCharacterController::m_turnAngle |
|
protected |
int radix::KinematicCharacterController::m_upAxis |
|
protected |
bool radix::KinematicCharacterController::m_useGhostObjectSweepTest |
|
protected |
bool radix::KinematicCharacterController::m_useWalkDirection |
|
protected |
btScalar radix::KinematicCharacterController::m_velocityTimeInterval |
|
protected |
btScalar radix::KinematicCharacterController::m_verticalOffset |
|
protected |
btScalar radix::KinematicCharacterController::m_verticalVelocity |
|
protected |
btVector3 radix::KinematicCharacterController::m_walkDirection |
|
protected |
this is the desired walk direction, set by the user
bool radix::KinematicCharacterController::m_wasJumping |
|
protected |
bool radix::KinematicCharacterController::m_wasOnGround |
|
protected |
The documentation for this class was generated from the following files: