diff --git a/test/BtPhysTest.cpp b/test/BtPhysTest.cpp index ea9aaaad..6a4ce935 100644 --- a/test/BtPhysTest.cpp +++ b/test/BtPhysTest.cpp @@ -85,6 +85,18 @@ BtPhysTest::BtPhysTest(bool editor) m_simulation->SetTimestep(1.f / 120.f); Ticker::Ref(m_simulation); + /* Add a white directional light */ + m_light1 = new Light(); + m_light1->SetPosition(vec4(0.2f, 0.2f, 0.f, 0.f)); + m_light1->SetColor(vec4(0.5f, 0.5f, 0.5f, 1.f)); + Ticker::Ref(m_light1); + + /* Add an orangeish point light */ + m_light2 = new Light(); + m_light2->SetPosition(vec4(-15.f, 15.f, 15.f, 1.f)); + m_light2->SetColor(vec4(0.4f, 0.3f, 0.2f, 1.f)); + Ticker::Ref(m_light2); + float offset = 29.5f; vec3 pos_offset = vec3(.0f, 30.f, .0f); if (USE_STAIRS) @@ -422,6 +434,8 @@ void BtPhysTest::TickDraw(float seconds) BtPhysTest::~BtPhysTest() { Ticker::Unref(m_camera); + Ticker::Unref(m_light1); + Ticker::Unref(m_light2); while (m_constraint_list.Count()) { diff --git a/test/PhysicObject.h b/test/PhysicObject.h index bcdf5208..65893d94 100644 --- a/test/PhysicObject.h +++ b/test/PhysicObject.h @@ -110,18 +110,12 @@ public: { Array MeshRand; - //MeshRand << "[sc#add afcb2 2 2 -.1]"; - //MeshRand << "[sc#dad afcb2 2 2 -.1]"; - //MeshRand << "[sc#dda afcb2 2 2 -.1]"; - //MeshRand << "[sc#daa afcb2 2 2 -.1]"; - //MeshRand << "[sc#ada afcb2 2 2 -.1]"; - //MeshRand << "[sc#aad afcb2 2 2 -.1]"; - MeshRand << "[sc#add afcb1.7 1.7 1.7 0][sc#000 tsw afcb1.9 1.9 1.9 0 sx-1 sy-1 sz-1]"; - MeshRand << "[sc#dad afcb1.7 1.7 1.7 0][sc#000 tsw afcb1.9 1.9 1.9 0 sx-1 sy-1 sz-1]"; - MeshRand << "[sc#dda afcb1.7 1.7 1.7 0][sc#000 tsw afcb1.9 1.9 1.9 0 sx-1 sy-1 sz-1]"; - MeshRand << "[sc#daa afcb1.7 1.7 1.7 0][sc#000 tsw afcb1.9 1.9 1.9 0 sx-1 sy-1 sz-1]"; - MeshRand << "[sc#ada afcb1.7 1.7 1.7 0][sc#000 tsw afcb1.9 1.9 1.9 0 sx-1 sy-1 sz-1]"; - MeshRand << "[sc#aad afcb1.7 1.7 1.7 0][sc#000 tsw afcb1.9 1.9 1.9 0 sx-1 sy-1 sz-1]"; + MeshRand << "[sc#add afcb1.7 1.7 1.7 0.4][sc#000 tsw afcb1.9 1.9 1.9 0.4 sx-1 sy-1 sz-1]"; + MeshRand << "[sc#dad afcb1.7 1.7 1.7 0.4][sc#000 tsw afcb1.9 1.9 1.9 0.4 sx-1 sy-1 sz-1]"; + MeshRand << "[sc#dda afcb1.7 1.7 1.7 0.4][sc#000 tsw afcb1.9 1.9 1.9 0.4 sx-1 sy-1 sz-1]"; + MeshRand << "[sc#daa afcb1.7 1.7 1.7 0.4][sc#000 tsw afcb1.9 1.9 1.9 0.4 sx-1 sy-1 sz-1]"; + MeshRand << "[sc#ada afcb1.7 1.7 1.7 0.4][sc#000 tsw afcb1.9 1.9 1.9 0.4 sx-1 sy-1 sz-1]"; + MeshRand << "[sc#aad afcb1.7 1.7 1.7 0.4][sc#000 tsw afcb1.9 1.9 1.9 0.4 sx-1 sy-1 sz-1]"; int SphereLimit = MeshRand.Count();