smudge

Member

3

122 Neutral

• Rank
Newbie
1. Ray to spherically capped cone

Aha, thanks, yes that invert makes sense. Okay, I'll try it out this afternoon and see if I can get it going. I got myself a copy of "Geometric Tools for Computer Graphics" this weekend and that looks like it might be of assistance (though it is pretty heavy going). I did notice a section on cone testing with an huge function provided to do the test. I'm guessing/hoping that the code is just so long because it is extremely robust and I might not need all of it. Also probably there are a bunch of early-outs that are useful. Thanks again for the help
2. Ray to spherically capped cone

Hi Zipster, Thanks for the tips... I like the idea of doing the test in cone space although I'm still not clear on how I get the thickness from the point of intersection to the exit point. Also it seems like there may be another way to unify the spherical cap into the mix without an additional special case test but I'm not seeing it. Another problem is the matrix inversion. The code is going to be running on the GPU and performing the matrix inversion won't be good. I can get around this by doing the calculations up front in the application though. I made this drawing to help visualize it http://webclips.s3.amazonaws.com/RayCone.jpg best
3. Ray to spherically capped cone

Hello I am looking for a fast way to ray trace a cone. My ray definition looks like this... struct Ray { float3 Origin; // the origin of the ray in world space float3 Direction; // the direction of the ray }; My cone is semi-infinite with a spherical cap: struct Cone { float3 Apex; // the position of the apex in world space float3 Direction; // the direction of the cone float Radius; // the radius of the cap sphere at the apex float SpreadAngle; // Cos(Theta) }; What I would like is to know if the ray intersects the cone and also if the ray does intersect what the thickness is from the point of entry to the point of exit. I've tried looking around to find the answer but the solutions I saw weren't very practical and didn't deal with spherically capped cones. If anyone could help me figure out how to do it I'd be very grateful. thanks!