Hello :-)
I wanted to tell you what i'm working on, because i quite happy that it does work correctly ^_^
Few years ago, i built a script-engine that works with plugins to extend its capacities. I used this script-engine as the core of a 3D engine.
I even tryed to build a physics plugin, but since i was too bad with math and physics, i abandonned this idea and searched for an easy, afordable and stable physiscs engine.
I found Newton and i created a plugin for Newton :-)
All of that works perfectly :-)
Though, building large scenes with lots of joints and physics things, was a bit boring and tiedous since i had to make everything by hand into my scripts ... (about 10 to 30 lines of codes for each objects)
As modeler, i use Wings3D that is a great software too, and which is open source but wrote in a weird nightmarish language --> Erlang.
Last week, i decided to start to learn Erlang so i can modify a Wings3D exporter to add some litlle functionnalities to make my life easier when exporting scenes ... but i wen't so far that now, i can use Wings3D to generate scripts for my engine :-)
I can use Wings3D to position and orients joints into my scene.
I successfully added "helpers" to position and orients joints. And the script is generated correctly :-)
For the moment, it support only the 6 basical joints :
UpVector, Ball and Socket, Slider, Hinge, Corkscrew and Universal Joint.
I use those objects as helpers into my scene to define position and orientation of joints into the scene so the exporter can generate the corresponding script for my engine.
To define parameters of objects and joints (so the exporter can now if it is a static or dynamic object, and what is the parent and children of a joint) i simply add those parameters after the object name like that :
Here, p000 to p003 are the rectangular boxes.
The * means that those boxes use a default material for the physics. Instead of the * i can put a material name if i want.
obj means that it must be put into the "obj" list of objects (that correspond to the list of dynamics objects in my engine. By default, objects are stored into a "scene" list that is the list of static objects).
And convex means that the geo (volume) of the object for the physics, must be build from the object's vertices. This generates a convex hull. For the moment, only "convex" is supported, but i could use primitives like "boxes", "cubes", "spheres" etc instead of a convex hull ...
The joints names start with a @.
Follows the joint type, here hinge.
Next, follow the name of the children object, and the name of the parent object :-)
And that's how i can build a scene directly into Wings3D which now build the script to load and destroy the scene :) It cans generate scripts of thousands lines that i jsut have to include into my other script and run to test it 8-)
I still have some work to do (like adding parameters to define mass etc), but it does work very well ^_^
I think that it is possible to make Wings3D exporting C/C++ (or even pascal/delphi) codes that can be included into watever project you want, so Wings3D would become a editor for projects that uses Newton.
If somebody is interrested about using Wings3D as Newton's scene editor to automatically generate codes (C/C++, Delphi or whatever you want) that can be included in his engine, we could try to establish a standard API for the generated codes :-)