README for ODE to Torquescript Stuff


1) You are expected to have read the ODE documentation,
    available at http://ode.org
2) You are still expected to have read the ODE documentation,
    available at http://ode.org
3) Even though it's 96 pages long, you are expected to have read
    the ODE documentation, available at http://ode.org


With that out of the way, some other stuff

As a whole, the API is a "t" [for Torque] prefix on the normal ODE
objects, and converted to think in terms of torque and objects
rather than functions;

In C:
  dBodyID b = dBodyCreate(world);
  dBodySetLinearVel(b, x, y, z);

In TorqueScsript:
  datablock tdBodyData(bodydb) { foo="bar"; }; // foo="bar" is ignored
  $b = new tdBody() { worldsim = $odeworld; datablock = bodydb; } ;
  $b.SetLinearVel(x,y,z); // C Style
OR
  $b.SetLinearVel("x y z"); // TorqueScript Style
Note that both calling styles are supported.


Build Instructions:

1) Edit torque_ver.h you'll find a list of defines that you can
uncomment to make this work with any of the Torque Platforms.
2) Edit shapeBase.h, and find this [around like 70 or so]:
   friend class ShapeBase;
   friend class Vehicle;
and add:
   friend class ODEShape;
3) Add all the .cc/.h files in odescript/ to your build, and remember
to link with ODE.
4) Check out example-cs/README for a few snippets of torquescript
to help you do something useful with this.



You don't need to read below this line.

Some rationalisations:
1) If you're using only T2D, then GameBase doesn't work the same,
so objects get derived from SceneTicker instead.
2) If you're using TGE, then GameBase is good.
3) If you're using Both, then the GameBase implementation is
theoretically sufficient.
4) The ConsoleMethods will work for both, assuming (method and
member) (nomenclature and visbility) don't change.

Therefore ["ptr" may well be just an S32 objectID]:
1) The SceneTicker tdBody variant will need a ptr to a fxSceneObject2D
2) The GameBase tdBody variant will need ptrs to ShapeBase and
fxSceneObject2D, depending on TAP platform availability.

t{object}console.cc contains all the ConsoleMethods for the respective
t{object}.cc file



Thanks to Ray "Noolness" Gebhardt <noolness@gmail.com> for all his
Torque help, including specifically, writing ExampleGameBase and
ExampleCollider, from which all my objects derive.


Chunky (-;
<chunky@icculus.org>
http://icculus.org/~chunky/
