Changeset 1571
- Timestamp:
- Jul 4, 2012, 10:52:32 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/.gitignore
r1520 r1571 61 61 !contrib/*/*/*/*/*/*/* 62 62 # Our binaries 63 test/benchsuite 64 test/btphystest 65 test/quad 63 66 test/testsuite 64 test/benchsuite65 test/quad66 67 test/sandbox/sample 67 68 test/math/pi -
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 } -
trunk/test/BtPhysTest.h
r1554 r1571 25 25 bool m_ready; 26 26 EasyMesh m_ground_mesh; 27 EasyMesh m_rigid_mesh ;27 EasyMesh m_rigid_mesh[3]; 28 28 29 29 //Bullet Physics Datas -
trunk/test/Makefile.am
r1518 r1571 18 18 EXTRA_DIST = data/gradient.png 19 19 20 noinst_PROGRAMS = quad benchsuite testsuite 20 noinst_PROGRAMS = quad benchsuite testsuite btphystest 21 21 22 22 TESTS = testsuite … … 42 42 quad_DEPENDENCIES = $(top_builddir)/src/liblol.a 43 43 44 btphystest_SOURCES = BtPhysTest.cpp BtPhysTest.h 45 btphystest_CPPFLAGS = @LOL_CFLAGS@ @PIPI_CFLAGS@ -I$(top_builddir)/src/bullet 46 btphystest_LDFLAGS = $(top_builddir)/src/liblol.a @LOL_LIBS@ @PIPI_LIBS@ 47 btphystest_DEPENDENCIES = $(top_builddir)/src/liblol.a 48
Note: See TracChangeset
for help on using the changeset viewer.