Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/gameengine/Physics/Bullet/CcdPhysicsController.h')
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsController.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsController.h b/source/gameengine/Physics/Bullet/CcdPhysicsController.h
index 2228b6511ce..63c267443aa 100644
--- a/source/gameengine/Physics/Bullet/CcdPhysicsController.h
+++ b/source/gameengine/Physics/Bullet/CcdPhysicsController.h
@@ -29,6 +29,7 @@ subject to the following restrictions:
/// PHY_IPhysicsController is the abstract simplified Interface to a physical object.
/// It contains the IMotionState and IDeformableMesh Interfaces.
#include "btBulletDynamicsCommon.h"
+#include "BulletDynamics/Character/btKinematicCharacterController.h"
#include "LinearMath/btTransform.h"
#include "PHY_IMotionState.h"
@@ -221,7 +222,8 @@ struct CcdConstructionInfo
KinematicFilter = 4,
DebrisFilter = 8,
SensorFilter = 16,
- AllFilter = DefaultFilter | StaticFilter | KinematicFilter | DebrisFilter | SensorFilter,
+ CharacterFilter = 32,
+ AllFilter = DefaultFilter | StaticFilter | KinematicFilter | DebrisFilter | SensorFilter | CharacterFilter,
};
@@ -301,6 +303,10 @@ struct CcdConstructionInfo
btScalar m_margin;
////////////////////
+ float m_stepHeight;
+ float m_jumpSpeed;
+ float m_fallSpeed;
+
int m_gamesoftFlag;
float m_soft_linStiff; /* linear stiffness 0..1 */
float m_soft_angStiff; /* angular stiffness 0..1 */
@@ -343,6 +349,7 @@ struct CcdConstructionInfo
bool m_bRigid;
bool m_bSoft;
bool m_bSensor;
+ bool m_bCharacter;
bool m_bGimpact; // use Gimpact for mesh body
///optional use of collision group/mask:
@@ -391,6 +398,7 @@ class CcdPhysicsController : public PHY_IPhysicsController
{
protected:
btCollisionObject* m_object;
+ btKinematicCharacterController* m_characterController;
class PHY_IMotionState* m_MotionState;
@@ -417,6 +425,7 @@ protected:
void CreateRigidbody();
bool CreateSoftbody();
+ bool CreateCharacterController();
bool Register() {
return (m_registerCount++ == 0) ? true : false;
@@ -453,6 +462,7 @@ protected:
btRigidBody* GetRigidBody();
btCollisionObject* GetCollisionObject();
btSoftBody* GetSoftBody();
+ btKinematicCharacterController* GetCharacterController();
CcdShapeConstructionInfo* GetShapeInfo() { return m_shapeInfo; }