• Advertisement


This topic is now archived and is closed to further replies.

Collision-Detection woes, once and for all...

This topic is 5924 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This does it. I do not want theory, or math, or anything extra. I just want collision-detection CODE (in C++, C, or Visual Basic), for these 2 detection tests. RAY-SPHERE RAY-TRIANGLE All objects are in 3 dimensions, {x,y,z}. A ray is an infinite line, which''s vector is described using the positional vector{xOrigin,yOrigin,zOrigin} and the normalized directional vector {xSlope,ySlope,zSlope}. A triangle is a list of 3 {x,y,z} co-ordinates. A sphere is a {xCenter,yCenter,zCenter} co-ordinate and a radius. Assume all values are 32-bit floating-point variables (aka float, aka Single). If whosoever posts a reply so desires, they may put theory and math in comments. Also, if one uses a different system for describing any of the three objects I have described, said one should describe how the object is described, in precise and technical detail. *sighs* *calms down a bit* Please?

Share this post

Link to post
Share on other sites

  • Advertisement