16#ifndef BT_KINEMATIC_CHARACTER_CONTROLLER_H
17#define BT_KINEMATIC_CHARACTER_CONTROLLER_H
139 virtual void setWalkDirection(
const btVector3& walkDirection);
146 virtual void setVelocityForTimeInterval(
const btVector3& velocity,
149 virtual void setAngularVelocity(
const btVector3& velocity);
150 virtual const btVector3& getAngularVelocity()
const;
152 virtual void setLinearVelocity(
const btVector3& velocity);
153 virtual btVector3 getLinearVelocity()
const;
168 void setFallSpeed(
btScalar fallSpeed);
170 void setJumpSpeed(
btScalar jumpSpeed);
172 void setMaxJumpHeight(
btScalar maxJumpHeight);
173 bool canJump()
const;
179 void setGravity(
const btVector3& gravity);
184 void setMaxSlope(
btScalar slopeRadians);
187 void setMaxPenetrationDepth(
btScalar d);
188 btScalar getMaxPenetrationDepth()
const;
196 bool onGround()
const;
197 void setUpInterpolate(
bool value);
btAlignedObjectArray< btPersistentManifold * > btManifoldArray
const T & btClamped(const T &a, const T &lb, const T &ub)
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
#define ATTRIBUTE_ALIGNED16(a)
btCharacterControllerInterface()
btCollisionDispatcher supports algorithms that handle ConvexConvex and ConvexConcave collision pairs.
btCollisionObject can be used to manage collision detection objects.
The btCollisionShape class provides an interface for collision shapes that can be shared among btColl...
CollisionWorld is interface and container for the collision detection.
The btConvexShape is an abstract shape interface, implemented by all convex shapes such as btBoxShape...
The btIDebugDraw interface class allows hooking up a debug renderer to visually debug simulations.
void setUpVector(const btVector3 &up)
btQuaternion m_targetOrientation
btVector3 perpindicularComponent(const btVector3 &direction, const btVector3 &normal)
btVector3 m_walkDirection
this is the desired walk direction, set by the user
virtual bool needsCollision(const btCollisionObject *body0, const btCollisionObject *body1)
btScalar m_maxSlopeRadians
btScalar getFallSpeed() const
btQuaternion m_currentOrientation
btVector3 m_targetPosition
btScalar getStepHeight() const
void playerStep(btCollisionWorld *collisionWorld, btScalar dt)
btScalar getJumpSpeed() const
void preStep(btCollisionWorld *collisionWorld)
btVector3 m_currentPosition
btVector3 computeReflectionDirection(const btVector3 &direction, const btVector3 &normal)
void applyImpulse(const btVector3 &v)
virtual void updateAction(btCollisionWorld *collisionWorld, btScalar deltaTime)
btActionInterface interface
btScalar m_maxPenetrationDepth
void setUseGhostSweepTest(bool useGhostObjectSweepTest)
void stepDown(btCollisionWorld *collisionWorld, btScalar dt)
btScalar m_velocityTimeInterval
btManifoldArray m_manifoldArray
keep track of the contact manifolds
btVector3 m_touchingNormal
btKinematicCharacterController(btPairCachingGhostObject *ghostObject, btConvexShape *convexShape, btScalar stepHeight, const btVector3 &up=btVector3(1.0, 0.0, 0.0))
void jump(const btVector3 &v=btVector3(0, 0, 0))
bool m_useGhostObjectSweepTest
btScalar m_verticalVelocity
btScalar m_currentStepOffset
btScalar m_verticalOffset
void stepForwardAndStrafe(btCollisionWorld *collisionWorld, const btVector3 &walkMove)
void setLinearDamping(btScalar d)
btScalar getAngularDamping() const
void updateTargetPositionBasedOnCollision(const btVector3 &hit_normal, btScalar tangentMag=btScalar(0.0), btScalar normalMag=btScalar(1.0))
void stepUp(btCollisionWorld *collisionWorld)
btScalar getLinearDamping() const
btScalar m_maxSlopeCosine
const btVector3 & getUp()
btScalar m_angularDamping
btConvexShape * m_convexShape
BT_DECLARE_ALIGNED_ALLOCATOR()
btVector3 m_normalizedDirection
void setAngularDamping(btScalar d)
btQuaternion getRotation(btVector3 &v0, btVector3 &v1) const
btVector3 parallelComponent(const btVector3 &direction, const btVector3 &normal)
bool recoverFromPenetration(btCollisionWorld *collisionWorld)
static btVector3 * getUpAxisDirections()
btPairCachingGhostObject * m_ghostObject
The btQuaternion implements quaternion to perform linear algebra rotations in combination with btMatr...
The btRigidBody is the main class for rigid body objects.
btVector3 can be used to represent 3D points and vectors.