GLUS
Functions
glus_plane.h File Reference

Go to the source code of this file.

Functions

GLUSAPI GLUSvoid GLUSAPIENTRY glusPlaneCopyf (GLUSfloat result[4], const GLUSfloat plane[4])
 Copies a plane. More...
 
GLUSAPI GLUSvoid GLUSAPIENTRY glusPlaneCreatef (GLUSfloat result[4], const GLUSfloat point[4], const GLUSfloat normal[3])
 Creates a plane. More...
 
GLUSAPI GLUSfloat GLUSAPIENTRY glusPlaneDistancePoint4f (const GLUSfloat plane[4], const GLUSfloat point[4])
 Calculates the signed distance from a plane to a point. More...
 
GLUSAPI GLUSvoid GLUSAPIENTRY glusPlaneGetPoint4f (GLUSfloat point[4], const GLUSfloat plane[4])
 Calculates a point on the given plane, located around the origin. More...
 

Function Documentation

GLUSAPI GLUSvoid GLUSAPIENTRY glusPlaneCopyf ( GLUSfloat  result[4],
const GLUSfloat  plane[4] 
)

Copies a plane.

Parameters
resultDestination plane.
planeSource plane.
GLUSAPI GLUSvoid GLUSAPIENTRY glusPlaneCreatef ( GLUSfloat  result[4],
const GLUSfloat  point[4],
const GLUSfloat  normal[3] 
)

Creates a plane.

The formula is Ax + By + Cz + D = 0, where A,B,C and D are stored in the resulting array.

See also
Mathematics For 3D Game Programming & Computer Graphics, Second Edition, Page105
Parameters
resultThe calculated plane.
pointAny point on the plane.
normalThe normal vector of the plane. The vector will be normalized during calculation.
GLUSAPI GLUSfloat GLUSAPIENTRY glusPlaneDistancePoint4f ( const GLUSfloat  plane[4],
const GLUSfloat  point[4] 
)

Calculates the signed distance from a plane to a point.

If the value is positive, the point is on the side the normal is directing to.

Parameters
planeThe used plane.
pointThe used point.
Returns
The signed distance.
GLUSAPI GLUSvoid GLUSAPIENTRY glusPlaneGetPoint4f ( GLUSfloat  point[4],
const GLUSfloat  plane[4] 
)

Calculates a point on the given plane, located around the origin.

Parameters
pointThe resulting point.
planeThe used plane.