Changeset 3342
- Timestamp:
- 01/31/10 14:35:40 (7 weeks ago)
- Location:
- plugins/branches/0185_GEN_PHYSICS_REFACTOR_2
- Files:
-
- 8 modified
-
ZBullet/src/PhysicsService.cpp (modified) (1 diff)
-
ZBullet/src/PhysicsService.hpp (modified) (1 diff)
-
ZBullet/src/PhysicsZone.cpp (modified) (2 diffs)
-
ZBullet/src/PhysicsZone.hpp (modified) (2 diffs)
-
ZNewton/src/PhysicsService.cpp (modified) (3 diffs)
-
ZNewton/src/PhysicsService.hpp (modified) (1 diff)
-
ZNewton/src/PhysicsZone.cpp (modified) (3 diffs)
-
ZNewton/src/PhysicsZone.hpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
plugins/branches/0185_GEN_PHYSICS_REFACTOR_2/ZBullet/src/PhysicsService.cpp
r3339 r3342 52 52 //-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ 53 53 PhysicsService::pPhysicsZone_type 54 PhysicsService::createZone( void)54 PhysicsService::createZone(const Math::Vector3& _min, const Math::Vector3& _max) 55 55 { 56 56 // TODO evaluate whether or not we should have an unregister function for removing worlds from the list. -
plugins/branches/0185_GEN_PHYSICS_REFACTOR_2/ZBullet/src/PhysicsService.hpp
r3292 r3342 54 54 /// @{ 55 55 public: 56 virtual pPhysicsZone_type createZone( void);56 virtual pPhysicsZone_type createZone(const Math::Vector3& _min, const Math::Vector3& _max); 57 57 virtual void stepSimulation(double _elapsedTime); 58 58 /// @} -
plugins/branches/0185_GEN_PHYSICS_REFACTOR_2/ZBullet/src/PhysicsZone.cpp
r3329 r3342 42 42 //-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ 43 43 //refnote: http://bulletphysics.org/mediawiki-1.5.8/index.php/Hello_World 44 PhysicsZone::PhysicsZone() 45 : m_pScriptModule(Engine::Physics::I_PhysicsManager::getSingleton().getDefaultScriptModule()) 44 PhysicsZone::PhysicsZone(const Math::Vector3& _min, const Math::Vector3& _max) 45 : I_PhysicsZone(_min,_max) 46 , m_pScriptModule(Engine::Physics::I_PhysicsManager::getSingleton().getDefaultScriptModule()) 46 47 , m_pScriptObject(NULL) 47 48 { … … 100 101 //-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ 101 102 void 102 PhysicsZone::setZoneSize(const Math::Vector3& _min, const Math::Vector3& _max)103 {104 // set the size of the world105 NewtonSetWorldSize(m_pZone, _min.m_array, _max.m_array);106 }107 108 //-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~109 void110 103 PhysicsZone::setGravity(const Math::Vector3& _grav) 111 104 { -
plugins/branches/0185_GEN_PHYSICS_REFACTOR_2/ZBullet/src/PhysicsZone.hpp
r3322 r3342 76 76 public: 77 77 virtual int getDefaultMaterialID(); 78 virtual void setZoneSize(const Math::Vector3& _min, const Math::Vector3& _max);79 78 virtual void setGravity(const Math::Vector3& _grav); 80 79 virtual pPhysicsActor_type createActor(); … … 153 152 /// @{ 154 153 public: 155 PhysicsZone( );154 PhysicsZone(const Math::Vector3& _min, const Math::Vector3& _max); 156 155 virtual ~PhysicsZone(); 157 156 /// @} -
plugins/branches/0185_GEN_PHYSICS_REFACTOR_2/ZNewton/src/PhysicsService.cpp
r3294 r3342 31 31 #include <iostream> 32 32 33 33 34 //-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ 34 35 namespace Zen { … … 37 38 PhysicsService::PhysicsService() 38 39 { 40 39 41 } 40 42 … … 47 49 //-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ 48 50 PhysicsService::pPhysicsZone_type 49 PhysicsService::createZone( void)51 PhysicsService::createZone(const Math::Vector3& _min, const Math::Vector3& _max) 50 52 { 51 53 // TODO evaluate whether or not we should have an unregister function for removing worlds from the list. 52 54 53 PhysicsZone* pRawZone = new PhysicsZone( );55 PhysicsZone* pRawZone = new PhysicsZone(_min,_max); 54 56 pPhysicsZone_type pZone = pPhysicsZone_type(pRawZone, boost::bind(&PhysicsService::onDestroyPhysicsZone, this, _1)); 55 57 m_zoneSet.insert(pZone); -
plugins/branches/0185_GEN_PHYSICS_REFACTOR_2/ZNewton/src/PhysicsService.hpp
r3053 r3342 54 54 /// @{ 55 55 public: 56 virtual pPhysicsZone_type createZone( void);56 virtual pPhysicsZone_type createZone(const Math::Vector3& _min, const Math::Vector3& _max); 57 57 virtual void stepSimulation(double _elapsedTime); 58 58 /// @} -
plugins/branches/0185_GEN_PHYSICS_REFACTOR_2/ZNewton/src/PhysicsZone.cpp
r3339 r3342 43 43 namespace ZNewton { 44 44 //-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ 45 PhysicsZone::PhysicsZone() 46 : m_pScriptModule(Engine::Physics::I_PhysicsManager::getSingleton().getDefaultScriptModule()) 45 PhysicsZone::PhysicsZone(const Math::Vector3& _min, const Math::Vector3& _max) 46 : I_PhysicsZone(_min,_max) 47 , m_pScriptModule(Engine::Physics::I_PhysicsManager::getSingleton().getDefaultScriptModule()) 47 48 , m_pScriptObject(NULL) 48 49 { … … 54 55 NewtonSetFrictionModel(m_pZone, 1); 55 56 NewtonSetSolverModel(m_pZone, 2); 57 58 // set the size of the world 59 NewtonSetWorldSize(m_pZone, _min.m_array, _max.m_array); 56 60 } 57 61 … … 81 85 { 82 86 return NewtonMaterialGetDefaultGroupID(m_pZone); 83 }84 85 //-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~86 void87 PhysicsZone::setZoneSize(const Math::Vector3& _min, const Math::Vector3& _max)88 {89 // set the size of the world90 NewtonSetWorldSize(m_pZone, _min.m_array, _max.m_array);91 87 } 92 88 -
plugins/branches/0185_GEN_PHYSICS_REFACTOR_2/ZNewton/src/PhysicsZone.hpp
r3339 r3342 76 76 public: 77 77 virtual int getDefaultMaterialID(); 78 virtual void setZoneSize(const Math::Vector3& _min, const Math::Vector3& _max);79 78 virtual void setGravity(const Math::Vector3& _grav); 80 79 virtual pPhysicsActor_type createActor(); … … 153 152 /// @{ 154 153 public: 155 PhysicsZone( );154 PhysicsZone(const Math::Vector3& _min, const Math::Vector3& _max); 156 155 virtual ~PhysicsZone(); 157 156 /// @}
