[ODE] Re: Heightfield / Collision.

Chris Brodie Chris.Brodie at macquarie.com
Wed Feb 19 02:26:01 2003


>From: gl [mailto:gl@ntlworld.com] 
>
>There's always one, right ; ).

:) Came up with that nastiness all by myself too, does it show? I posted the technique to GD-Algorithms about a year ago and nobody cold tell me of a faster way to draw a stripped tile. 

Your doing a great job BTW, keep at it, I would have been frustrated to boredom by the debate by now :)

I sort of have a picture of what your doing structurally. I assume that on each of my terrain tiles I create a dTerrainID , by passing it an AABB and an ID\pointer whatever to my tile(I supply this), something like :

Lazy psudo code blobs:

void callback(dVector& in, triangle& out, void* mypointer)
{
	((static_cast<CTile*>)mypointer)->Collide(in, out);
}

In my tile creation:

dTerrain m_TileId = dCreateTerrain(aabb, callback, mypointer);

When an object collides with the AABB in ODE the callback then asks my callback func for the triangle over which the point resides. I build that data return it and your code then does the geeky math stuff, returns the ode penetration depth \ normal whatever and we get our nice bounce. More or less, if in ODE the object straddled both AABB's along a boundry you'd need to query both my tiles I guess...

Or have I missed the point. This looks good to me. So long as it's fast, and object are brought to rest. There is going to be a crapload of these in most engines as everything dynamic is supported(held up) by the terrain.

I like this system, assuming I'm guessing how it works correctly!


NOTICE
This e-mail and any attachments are confidential and may contain copyright material of Macquarie Bank or third parties. If you are not the intended recipient of this email you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. Macquarie Bank does not guarantee the integrity of any emails or any attached files. The views or opinions expressed are the author's own and may not reflect the views or opinions of Macquarie Bank.