[ODE] Re: Heightfield / Collision.

Clint Brewer clint at haptek.com
Tue Feb 18 10:47:02 2003


>
> or optionally, I was thinking you could have a function that asks the 
> terrain for a set of triangles underneath a sample point.   Then the 
> terrain can return a small set of triangles and you can collide the 
> geometry against those triangles?  This would let the terrain give you 
> the real triangles, which you might not get with your query for height 
> samples,  and it would keep the format of the terrain completely up to 
> the terrain.


something like:

/**
    
    x,y,z  the point of interest
    numTris  is set to the number of tris placed in the triData array
    triData  is a dReal[3*maxTris]  to be filled with data bout a 
terrain at a point.
    maxTris,  the maximum number of tris triData can hold
*/
void getTerrainCollisionGeometry at point( dReal x, dReal y, dReal z,  
int* numTris, dReal* triData, int maxTris )


c