Changeset 1571 for trunk/test/BtPhysTest.cpp
- Timestamp:
- Jul 4, 2012, 10:52:32 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/BtPhysTest.cpp
r1569 r1571 121 121 // Re-using the same collision is better for memory usage and performance 122 122 btCollisionShape* colShape = new btBoxShape(btVector3(1,1,1)); 123 m_rigid_mesh.Compile("[sc#ada afcb2 2 2 -.1]"); 123 m_rigid_mesh[0].Compile("[sc#daa afcb2 2 2 -.1]"); 124 m_rigid_mesh[1].Compile("[sc#ada afcb2 2 2 -.1]"); 125 m_rigid_mesh[2].Compile("[sc#aad afcb2 2 2 -.1]"); 124 126 125 127 m_bt_collision_shapes << colShape; … … 157 159 } 158 160 159 btVector3 pos(col*2*CUBE_HALF_EXTENTS + (row2%2)*CUBE_HALF_EXTENTS, 20.0f + 160 row*2*CUBE_HALF_EXTENTS+CUBE_HALF_EXTENTS+EXTRA_HEIGHT,0); 161 btVector3 pos(((row+col+row2) % 4)*CUBE_HALF_EXTENTS, 162 20.0f + row*4*CUBE_HALF_EXTENTS+CUBE_HALF_EXTENTS+EXTRA_HEIGHT, 163 col*3*CUBE_HALF_EXTENTS + (row2%2)*CUBE_HALF_EXTENTS); 161 164 162 165 trans.setOrigin(pos); … … 219 222 { 220 223 m_ground_mesh.MeshConvert(); 221 m_rigid_mesh.MeshConvert(); 224 m_rigid_mesh[0].MeshConvert(); 225 m_rigid_mesh[1].MeshConvert(); 226 m_rigid_mesh[2].MeshConvert(); 222 227 /* FIXME: this object never cleans up */ 223 228 m_ready = true; … … 253 258 m_ground_mesh.Render(m); 254 259 else 255 m_rigid_mesh .Render(m);260 m_rigid_mesh[i % 3].Render(m); 256 261 } 257 262 if (BarycenterFactor > .0f) … … 260 265 261 266 m_camera->SetTarget(BarycenterLocation); 262 m_camera->SetPosition(BarycenterLocation + vec3(- 20.0f, 5.0f, .0f));267 m_camera->SetPosition(BarycenterLocation + vec3(-15.0f, 8.0f, .0f)); 263 268 } 264 269 }
Note: See TracChangeset
for help on using the changeset viewer.