[ODE] triangle id query giving a position

Chris Ledwith cledwith at d-a-s.com
Sun Jan 9 01:15:23 MST 2005


> I have my terrain modeled as a static trimesh, and I
> need to know wich is the triangle id for a given
> point. I need know this in the callback, for configure
> the mu in function of the material of the triangle
> (grass, stone..)
> I think that a Ray - Trimesh collision would do the
> trick, but the contact Joint return the same thing
> that I already know: the position of the contact. no
> the triangle id.
> some clue? :(
>
>

I never found a way to do this with the code as-is, so I added a faceIndex
int to the dContactGeom struct, and fill it when the other members get set
(in dCollideRTL).

-C





More information about the ODE mailing list