09-30-2001, 07:13 AM
in my extremely exciting opengl project i need a function that works like this, to return an intersection for a sphere and line segment.
defined values:
sphere is the point where the sphere sits. x,y,z
line_start is the point where the line originates
line_end is the ending point of that line
readius is the radius of the sphere
bool Intersection(float sphere[3], float line_start[3], float line_end[3], float radius)
{
if intersection return true;
else return false;
}
Im not worried about point of intersection, just if an intersection does exist.
defined values:
sphere is the point where the sphere sits. x,y,z
line_start is the point where the line originates
line_end is the ending point of that line
readius is the radius of the sphere
bool Intersection(float sphere[3], float line_start[3], float line_end[3], float radius)
{
if intersection return true;
else return false;
}
Im not worried about point of intersection, just if an intersection does exist.