Browse Source

Some CIS FIX.

legacy
Benjamin ‘Touky’ Huet touky 12 years ago
parent
commit
ecd676ae74
2 changed files with 7 additions and 4 deletions
  1. +2
    -1
      test/BtPhysTest.cpp
  2. +5
    -3
      test/PhysicObject.h

+ 2
- 1
test/BtPhysTest.cpp View File

@@ -71,7 +71,8 @@ BtPhysTest::BtPhysTest(bool editor)

m_simulation = new Simulation();
m_simulation->InitContext();
m_simulation->SetGravity(vec3(.0f, -10.0f, .0f));
vec3 NewGravity = vec3(.0f, -10.0f, .0f);
m_simulation->SetGravity(NewGravity);

m_ground_object = new PhysicsObject(m_simulation);
Ticker::Ref(m_ground_object);


+ 5
- 3
test/PhysicObject.h View File

@@ -25,13 +25,14 @@ public:
: m_ready(false)
{
m_mesh.Compile("[sc#add afcb110 1 110 -.1]");
m_physics.SetShapeToBox(vec3(110.f, 1.f, 110.f));
vec3 BoxSize = vec3(110.f, 1.f, 110.f);
m_physics.SetShapeToBox(BoxSize);
m_physics.SetMass(.0f);
m_physics.InitBodyToRigid();
m_physics.AddToSimulation(new_sim);
}

PhysicsObject(Simulation* new_sim, float base_mass, vec3 &base_location)
PhysicsObject(Simulation* new_sim, float base_mass, const vec3 &base_location)
: m_ready(false)
{
Array<char *> MeshRand;
@@ -46,7 +47,8 @@ public:
int RandValue = (int)(lol::RandF() * (MeshRand.Count() - 1));

m_mesh.Compile(MeshRand[RandValue]);
m_physics.SetShapeToBox(vec3(2.0f));
vec3 BoxSize = vec3(2.0f);
m_physics.SetShapeToBox(BoxSize);
m_physics.SetMass(base_mass);
m_physics.SetBaseTransform(base_location);
m_physics.InitBodyToRigid();


Loading…
Cancel
Save