diff options
Diffstat (limited to 'source/gameengine/Physics/Bullet')
8 files changed, 35 insertions, 14 deletions
diff --git a/source/gameengine/Physics/Bullet/CMakeLists.txt b/source/gameengine/Physics/Bullet/CMakeLists.txt index 02f2aa635af..7b7fb508ebd 100644 --- a/source/gameengine/Physics/Bullet/CMakeLists.txt +++ b/source/gameengine/Physics/Bullet/CMakeLists.txt @@ -35,7 +35,6 @@ SET(INC ../../../../intern/guardedalloc ../../../kernel/gen_system ../../../../intern/string - ../../../../intern/SoundSystem ../../Rasterizer ../../Ketsji ../../Expressions diff --git a/source/gameengine/Physics/Bullet/CcdGraphicController.h b/source/gameengine/Physics/Bullet/CcdGraphicController.h index b0626f902c2..99885eb99ee 100644 --- a/source/gameengine/Physics/Bullet/CcdGraphicController.h +++ b/source/gameengine/Physics/Bullet/CcdGraphicController.h @@ -75,6 +75,12 @@ private: btBroadphaseProxy* m_handle; void* m_newClientInfo; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + void *operator new( unsigned int num_bytes) { return MEM_mallocN(num_bytes, "GE:CcdGraphicController"); } + void operator delete( void *mem ) { MEM_freeN(mem); } +#endif }; #endif //BULLET2_PHYSICSCONTROLLER_H diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp index 7f84b06cc3c..df8dc3560ac 100644 --- a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp +++ b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp @@ -1829,8 +1829,6 @@ bool CcdShapeConstructionInfo::UpdateMesh(class KX_GameObject* gameobj, class RA } for(mf= mface, i=0; i < numpolys; mf++, i++) { - unsigned int *fv = &mf->v1; - if(mf->v4) { fv_pt= quad_verts; *poly_index_pt++ = *poly_index_pt++ = index[i]; diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsController.h b/source/gameengine/Physics/Bullet/CcdPhysicsController.h index 8eb2e616ecf..69b16ca35bd 100644 --- a/source/gameengine/Physics/Bullet/CcdPhysicsController.h +++ b/source/gameengine/Physics/Bullet/CcdPhysicsController.h @@ -58,8 +58,6 @@ class btCollisionShape; class CcdShapeConstructionInfo { public: - - static CcdShapeConstructionInfo* FindMesh(class RAS_MeshObject* mesh, struct DerivedMesh* dm, bool polytope, bool gimpact); CcdShapeConstructionInfo() : @@ -191,6 +189,13 @@ protected: bool m_forceReInstance; //use gimpact for concave dynamic/moving collision detection float m_weldingThreshold1; //welding closeby vertices together can improve softbody stability etc. CcdShapeConstructionInfo* m_shapeProxy; // only used for PHY_SHAPE_PROXY, pointer to actual shape info + + +#ifdef WITH_CXX_GUARDEDALLOC +public: + void *operator new( unsigned int num_bytes) { return MEM_mallocN(num_bytes, "GE:CcdShapeConstructionInfo"); } + void operator delete( void *mem ) { MEM_freeN(mem); } +#endif }; struct CcdConstructionInfo @@ -559,7 +564,11 @@ protected: } - +#ifdef WITH_CXX_GUARDEDALLOC +public: + void *operator new( unsigned int num_bytes) { return MEM_mallocN(num_bytes, "GE:CcdPhysicsController"); } + void operator delete( void *mem ) { MEM_freeN(mem); } +#endif }; @@ -587,7 +596,13 @@ class DefaultMotionState : public PHY_IMotionState btTransform m_worldTransform; btVector3 m_localScaling; - + + +#ifdef WITH_CXX_GUARDEDALLOC +public: + void *operator new( unsigned int num_bytes) { return MEM_mallocN(num_bytes, "GE:DefaultMotionState"); } + void operator delete( void *mem ) { MEM_freeN(mem); } +#endif }; diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp index bc7ccacc39b..bf28802870a 100644 --- a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp +++ b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp @@ -327,7 +327,6 @@ CcdPhysicsEnvironment::CcdPhysicsEnvironment(bool useDbvtCulling,btDispatcher* d :m_cullingCache(NULL), m_cullingTree(NULL), m_numIterations(10), -m_scalingPropagated(false), m_numTimeSubSteps(1), m_ccdMode(0), m_solverType(-1), @@ -336,7 +335,8 @@ m_enableSatCollisionDetection(false), m_solver(NULL), m_ownPairCache(NULL), m_filterCallback(NULL), -m_ownDispatcher(NULL) +m_ownDispatcher(NULL), +m_scalingPropagated(false) { for (int i=0;i<PHY_NUM_RESPONSE;i++) diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h index bc5491e00cc..e087eac32c5 100644 --- a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h +++ b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h @@ -275,7 +275,11 @@ protected: bool m_scalingPropagated; - +#ifdef WITH_CXX_GUARDEDALLOC +public: + void *operator new( unsigned int num_bytes) { return MEM_mallocN(num_bytes, "GE:CcdPhysicsEnvironment"); } + void operator delete( void *mem ) { MEM_freeN(mem); } +#endif }; #endif //CCDPHYSICSENVIRONMENT diff --git a/source/gameengine/Physics/Bullet/Makefile b/source/gameengine/Physics/Bullet/Makefile index 19b17de275a..433d1df3d2f 100644 --- a/source/gameengine/Physics/Bullet/Makefile +++ b/source/gameengine/Physics/Bullet/Makefile @@ -41,7 +41,6 @@ CPPFLAGS += -I$(NAN_STRING)/include CPPFLAGS += -I$(NAN_MOTO)/include CPPFLAGS += -I$(NAN_GLEW)/include CPPFLAGS += -I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION) -CPPFLAGS += -I$(NAN_SOUNDSYSTEM)/include CPPFLAGS += -I../../../kernel/gen_system CPPFLAGS += -I../../Physics/common CPPFLAGS += -I../../Physics/Dummy diff --git a/source/gameengine/Physics/Bullet/SConscript b/source/gameengine/Physics/Bullet/SConscript index c517d8b5d9d..44b75402630 100644 --- a/source/gameengine/Physics/Bullet/SConscript +++ b/source/gameengine/Physics/Bullet/SConscript @@ -16,15 +16,15 @@ incs += ' #source/gameengine/SceneGraph' incs += ' #source/blender/makesdna' incs += ' #source/blender/blenkernel' incs += ' #source/blender/blenlib' -incs += ' #intern/SoundSystem' incs += ' #intern/guardedalloc' incs += ' ' + env['BF_BULLET_INC'] incs += ' ' + env['BF_PYTHON_INC'] cxxflags = [] -if env['OURPLATFORM']=='win32-vc': +if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): cxxflags.append ('/GR') cxxflags.append ('/O2') + cxxflags.append ('/EHsc') -env.BlenderLib ( 'bf_bullet', Split(sources), Split(incs), [], libtype=['game','player'], priority=[15,90], cxx_compileflags=cxxflags ) +env.BlenderLib ( 'bf_bullet', Split(sources), Split(incs), [], libtype=['core','player'], priority=[350,80], cxx_compileflags=cxxflags ) |