Changeset 1724 for trunk/test/Physics/LolPhysics.h
- Timestamp:
- Aug 12, 2012, 11:07:23 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/Physics/LolPhysics.h
r1698 r1724 46 46 { 47 47 // Build the broadphase 48 m_broadphase = new btDbvtBroadphase(); 48 if (1) 49 { 50 m_Sweep_broadphase = new btAxisSweep3(LOL2BT_VEC3(m_world_min), LOL2BT_VEC3(m_world_max)); 51 m_Sweep_broadphase->getOverlappingPairCache()->setInternalGhostPairCallback(new btGhostPairCallback()); 52 m_broadphase = m_Sweep_broadphase; 53 } 54 else 55 m_broadphase = new btDbvtBroadphase(); 49 56 50 57 // Set up the collision configuration and dispatcher … … 99 106 } 100 107 108 void CustomSetWorldLimit(vec3 &NewWorldMin, vec3 &NewWorldMax) 109 { 110 } 111 101 112 void CustomSetTimestep(float NewTimestep) { } 102 113 103 114 //broadphase 104 115 btBroadphaseInterface* m_broadphase; 116 btAxisSweep3* m_Sweep_broadphase; 105 117 // Set up the collision configuration and dispatc 106 118 btDefaultCollisionConfiguration* m_collision_configuration; … … 120 132 void CustomSetContinuousDetection(bool ShouldUseCCD) { } 121 133 void CustomSetGravity(vec3 &NewGravity) { } 134 void CustomSetWorldLimit(vec3 &NewWorldMin, vec3 &NewWorldMax) { } 122 135 void CustomSetTimestep(float NewTimestep) { } 123 136 … … 141 154 m_gravity = NewGravity; 142 155 CustomSetGravity(NewGravity); 156 } 157 158 //Sets the simulation gravity. 159 void SetWorldLimit(vec3 &NewWorldMin, vec3 &NewWorldMax) 160 { 161 m_world_min = NewWorldMin; 162 m_world_max = NewWorldMax; 163 CustomSetWorldLimit(NewWorldMin, NewWorldMax); 143 164 } 144 165 … … 173 194 bool m_using_CCD; 174 195 vec3 m_gravity; 196 vec3 m_world_min; 197 vec3 m_world_max; 175 198 }; 176 199
Note: See TracChangeset
for help on using the changeset viewer.