After looking at (and deconstructing) the cardemo's there's one question I like to ask:
First you create a body , then create the geometry for it and then create the mesh. So far so good.
Now, let's say I've modeled a car (including the wheels).
Would it not be possible to create ODE-objects in a reverse order?
Thus:
1) load carmesh (wheels are child-entities within the same file btw)
2) create a body
3) determine size of carmesh (meshwidth,meshheight,meshdepth)
4) position body at location of carmesh
5) use dMassSetBoxTotal as follows: dMassSetBoxTotal ( mass , CarMass , meshwidth*2 , meshheight*2 , meshdepth*2 )
6) create geometry for carmesh
7) bind geometry to body
and because I already know the location and size of each wheel just repeat step (2) through (7) ?
This should do the trick , right?
Unfortunately I get some strange readings in my debuglog , and my screen shows absolutely nothing.
I'll try to reproduce the situation and post a screenshot of it.
In the meantime I would like to know if the aforementioned procedure is acceptable or not?
Thanks in advance!
First you create a body , then create the geometry for it and then create the mesh. So far so good.
Now, let's say I've modeled a car (including the wheels).
Would it not be possible to create ODE-objects in a reverse order?
Thus:
1) load carmesh (wheels are child-entities within the same file btw)
2) create a body
3) determine size of carmesh (meshwidth,meshheight,meshdepth)
4) position body at location of carmesh
5) use dMassSetBoxTotal as follows: dMassSetBoxTotal ( mass , CarMass , meshwidth*2 , meshheight*2 , meshdepth*2 )
6) create geometry for carmesh
7) bind geometry to body
and because I already know the location and size of each wheel just repeat step (2) through (7) ?
This should do the trick , right?
Unfortunately I get some strange readings in my debuglog , and my screen shows absolutely nothing.
I'll try to reproduce the situation and post a screenshot of it.
In the meantime I would like to know if the aforementioned procedure is acceptable or not?
Thanks in advance!