GLUS
Functions
glus_intersect.h File Reference

Go to the source code of this file.

Functions

GLUSAPI GLUSint GLUSAPIENTRY glusIntersectRaySpheref (GLUSfloat *tNear, GLUSfloat *tFar, GLUSboolean *insideSphere, const GLUSfloat rayStart[4], const GLUSfloat rayDirection[3], const GLUSfloat sphereCenter[4], const GLUSfloat radius)
 Intersecting ray against sphere. More...
 

Function Documentation

GLUSAPI GLUSint GLUSAPIENTRY glusIntersectRaySpheref ( GLUSfloat tNear,
GLUSfloat tFar,
GLUSboolean insideSphere,
const GLUSfloat  rayStart[4],
const GLUSfloat  rayDirection[3],
const GLUSfloat  sphereCenter[4],
const GLUSfloat  radius 
)

Intersecting ray against sphere.

Parameters
tNeart of near intersection point if number intersections greater than zero.
tFart of far intersection point if number intersections greater than zero.
insideSphereSet to GLUS_TRUE, if ray starts inside sphere.
rayStartPoint, where the ray starts.
rayDirectionRay direction vector. Has to be normalized.
sphereCenterCenter of the sphere given as a point.
radiusRadius of the sphere.
Returns
Number of intersection points.