Переглянути джерело

test: minor tweaks to the physics demo.

legacy
Sam Hocevar sam 12 роки тому
джерело
коміт
b5f1b679b7
2 змінених файлів з 14 додано та 14 видалено
  1. +1
    -1
      test/BtPhysTest.cpp
  2. +13
    -13
      test/PhysicObject.h

+ 1
- 1
test/BtPhysTest.cpp Переглянути файл

@@ -243,7 +243,7 @@ void BtPhysTest::TickGame(float seconds)
m_simulation->TickContext(seconds);

m_camera->SetTarget(vec3(.0f));
m_camera->SetPosition(vec3(-30.0f, 10.0f, .0f));
m_camera->SetPosition(vec3(-30.0f, 20.0f, .0f));

#if 0
///step the simulation


+ 13
- 13
test/PhysicObject.h Переглянути файл

@@ -46,12 +46,12 @@ public:

int SphereLimit = MeshRand.Count();

MeshRand << "[sc#add asph16 2 2 2]";
MeshRand << "[sc#dad asph16 2 2 2]";
MeshRand << "[sc#dda asph16 2 2 2]";
MeshRand << "[sc#daa asph16 2 2 2]";
MeshRand << "[sc#ada asph16 2 2 2]";
MeshRand << "[sc#aad asph16 2 2 2]";
MeshRand << "[sc#add asph6 2 2 2]";
MeshRand << "[sc#dad asph6 2 2 2]";
MeshRand << "[sc#dda asph6 2 2 2]";
MeshRand << "[sc#daa asph6 2 2 2]";
MeshRand << "[sc#ada asph6 2 2 2]";
MeshRand << "[sc#aad asph6 2 2 2]";

int ConeLimit = MeshRand.Count();

@@ -73,12 +73,12 @@ public:

int CapsLimit = MeshRand.Count();

MeshRand << "[sc#add scb#add asph16 2 2 2 ty-1 my ac16 2 1 1 0 0]";
MeshRand << "[sc#dad scb#dad asph16 2 2 2 ty-1 my ac16 2 1 1 0 0]";
MeshRand << "[sc#dda scb#dda asph16 2 2 2 ty-1 my ac16 2 1 1 0 0]";
MeshRand << "[sc#daa scb#daa asph16 2 2 2 ty-1 my ac16 2 1 1 0 0]";
MeshRand << "[sc#ada scb#ada asph16 2 2 2 ty-1 my ac16 2 1 1 0 0]";
MeshRand << "[sc#aad scb#aad asph16 2 2 2 ty-1 my ac16 2 1 1 0 0]";
MeshRand << "[sc#add scb#add asph6 1 1 1 ty-1 my ac16 2 1 1 0 0]";
MeshRand << "[sc#dad scb#dad asph6 1 1 1 ty-1 my ac16 2 1 1 0 0]";
MeshRand << "[sc#dda scb#dda asph6 1 1 1 ty-1 my ac16 2 1 1 0 0]";
MeshRand << "[sc#daa scb#daa asph6 1 1 1 ty-1 my ac16 2 1 1 0 0]";
MeshRand << "[sc#ada scb#ada asph6 1 1 1 ty-1 my ac16 2 1 1 0 0]";
MeshRand << "[sc#aad scb#aad asph6 1 1 1 ty-1 my ac16 2 1 1 0 0]";

int RandValue = (int)(lol::RandF() * (MeshRand.Count() - 1));

@@ -87,7 +87,7 @@ public:
if (RandValue < SphereLimit)
m_physics.SetShapeToBox(BoxSize);
else if (RandValue < ConeLimit)
m_physics.SetShapeToSphere(BoxSize.x);
m_physics.SetShapeToSphere(BoxSize.x * 2.f);
else if (RandValue < CylLimit)
m_physics.SetShapeToCone(BoxSize.x, BoxSize.y);
else if (RandValue < CapsLimit)


Завантаження…
Відмінити
Зберегти