README.TXT 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. Ode.NET - .NET bindings for ODE
  2. Jason Perkins ([email protected])
  3. ---------------------------------------------------------------------
  4. INSTALLATION
  5. ---------------------------------------------------------------------
  6. This binding uses a C# 2.0 feature (the UnmanagedFunctionPointer
  7. attribute). You will need to use Visual Studio 2005 (C# Express is
  8. fine) or Mono's gmcs compiler.
  9. Start by getting or building ODE as a shared library (DLL).
  10. The simplest way to build the bindings is probably to create a
  11. new library assembly in your tool of choice and drop in the files
  12. Ode/Ode.cs and Ode/AssemblyInfo.cs (optional). Define the symbol
  13. `dDOUBLE` if you used double-precision math in your ode.dll.
  14. Build, done.
  15. For testing purposes, I have also created bindings for the
  16. Drawstuff library and a C# version of the BoxStack demo. You can
  17. throw all of these files into a console executable and run it to
  18. see the demo.
  19. If you happen to have Premake installed (http://premake.sf.net/),
  20. you can generate build scripts for the library with:
  21. premake --target (toolset) # for single precision
  22. premake --with-doubles --target (toolset) # for double precision
  23. To build the test application too, use:
  24. premake --with-tests --target (toolset)
  25. To build with Mono, you must add the --dotnet parameter to enable
  26. support .NET 2.0:
  27. premake --dotnet mono2 --target gnu
  28. ---------------------------------------------------------------------
  29. USAGE
  30. ---------------------------------------------------------------------
  31. I have tried to keep things as close to the original C API as I can,
  32. rather than forcing a class structure on everyone. Everything is
  33. contained within the `Ode.NET` namespace inside a static class
  34. named `d`. All ODE IDs are replaced with IntPtrs. A quick example:
  35. using Ode.NET;
  36. IntPtr world = d.WorldCreate();
  37. IntPtr body = d.BodyCreate(world);
  38. Take a look at Tests/BoxStack.cs for a more complete example.
  39. ---------------------------------------------------------------------
  40. KNOWN ISSUES
  41. ---------------------------------------------------------------------
  42. While I managed to map most of the API, there may still be some bits
  43. missing. If you find something, please submit a bug report or patch
  44. the Tracker on SourceForge.
  45. Collision response (contact joints) do not work when built under
  46. Mono as double-precision. I have not tried to track down why.