GLUS
Functions
glus_sphere.h File Reference

Go to the source code of this file.

Functions

GLUSAPI GLUSvoid GLUSAPIENTRY glusSphereCopyf (GLUSfloat resultCenter[4], GLUSfloat resultRadius, const GLUSfloat center[4], const GLUSfloat radius)
 Copies a sphere. More...
 
GLUSAPI GLUSfloat GLUSAPIENTRY glusSphereDistancePoint4f (const GLUSfloat center[4], const GLUSfloat radius, const GLUSfloat point[4])
 Calculates the signed distance from a sphere to a point. More...
 

Function Documentation

GLUSAPI GLUSvoid GLUSAPIENTRY glusSphereCopyf ( GLUSfloat  resultCenter[4],
GLUSfloat  resultRadius,
const GLUSfloat  center[4],
const GLUSfloat  radius 
)

Copies a sphere.

Parameters
resultCenterDestination center.
resultRadiusDestination radius.
centerSource center.
radiusSource radius.
GLUSAPI GLUSfloat GLUSAPIENTRY glusSphereDistancePoint4f ( const GLUSfloat  center[4],
const GLUSfloat  radius,
const GLUSfloat  point[4] 
)

Calculates the signed distance from a sphere to a point.

If the value is negative, the point is inside the sphere.

Parameters
centerThe center of the sphere.
radiusThe radius of the sphere.
pointThe used point.
Returns
The signed distance.