[ODE] triangle collider surface
Nate W
coding at natew.com
Sat May 11 03:22:02 2002
On Sat, 11 May 2002, Erwin de Vries wrote:
> Were you able to solve the linker errors? I've never seen them before.
I can link and run with __forceinline removed from TransformPoint and one
other function whose name I've now forgotten. There is no logical reason
for this that I can see, but it works. I guess I'll just hope the
optimizer is smart enough to inline it anyhow.
> > Call dGeomTriListBuild
> > delete the arrays
> > start the simulation
>
> You should not delete the arrays. They are passed into the tricollider, and
> it uses them. If you delete them its pretty 'unsafe'. In other words.. It is
> very likely to crash.
Yeah, so I noticed. :-)
The original problem, which didn't crash but also didn't generate any
contacts, was due to my building ODE with dDOUBLE defined. There's a
couple places in the tri-collide code that expert pointers to arrays of
floats, e.g. from dGeomGetPosition.
Once I got that straighted out I got ran into memory faults and found the
vertex arrays full of garbage...
> > Also, from looking at the source, it appears to me that the callback
> > functions passed into dCreateTriList() are optional, and collision
> > detection should work without them. Am I correct, or does the fact that
> > I'm passing nulls for them explain the first problem? :-)
>
> Yes they are optional. It works perfectly without them.
That's good to know, thanks.
--
Nate Waddoups
Redmond WA USA
http://www.natew.com