[ODE] Any way to get the normal at a point on the surface of a geom?

Shamyl Zakariya shamyl at zakariya.net
Tue May 8 11:37:44 MST 2007

I've further examined the situation I emailed about a few hours ago,  
and realize now that I *am* getting the ray intersection when the ray  
is emitted from inside a geom. Furthermore, I better read the  
documentation and see that a ray will never generate more than one  
contact with a geom.

So, that being said, the only way I can think of to tell if a point  
is inside some geom or trimesh in the environment is to cast a ray  
and to check the normal generated when it collides with a geom. If  
the dot product of the ray direction and the normal is greater than  
zero, the ray origin is inside the geom. The trouble is, the normal  
generated, according to the documentation, is configured for  
reflection. So a ray cast from inside a geom will get a normal that  
reflects back into the geom. This doesn't help me at all!

How can I get the *actual* normal of the geom at the ray-intersection  

shamyl at zakariya.net
     "obviously, you're not a golfer"
         -- the Dude

More information about the ODE mailing list