diff --git a/doc/images/hello_world.png b/doc/images/hello_world.png new file mode 100644 index 0000000..46314d0 Binary files /dev/null and b/doc/images/hello_world.png differ diff --git a/doc/quickstart_guide.docx b/doc/quickstart_guide.docx new file mode 100644 index 0000000..d915482 Binary files /dev/null and b/doc/quickstart_guide.docx differ diff --git a/examples/hello_world/main.cpp b/examples/hello_world/main.cpp index a520268..5715060 100644 --- a/examples/hello_world/main.cpp +++ b/examples/hello_world/main.cpp @@ -35,9 +35,15 @@ void b3EndProfileScope() // using Bounce. int main(int argc, char** argv) { + // The world. We allocate it using the heap but you can to it + // on the stack if the stack is sufficiently large. + b3World* world = new b3World(); + // The world gravity. const b3Vec3 gravity(0.0f, -9.8f, 0.0f); + world->SetGravity(gravity); + // The fixed time step size. const float32 timeStep = 1.0f / 60.0f; @@ -47,11 +53,6 @@ int main(int argc, char** argv) // Number of iterations for the position constraint solver. const u32 positionIterations = 2; - // The world-> We allocate it using the heap but you can to it - // on the stack if the stack is sufficiently large. - b3World* world = new b3World(); - world->SetGravity(gravity); - // Create a static ground body at the world origin. b3BodyDef groundDef; b3Body* ground = world->CreateBody(groundDef);