GLUS
Functions
glus_matrix_viewprojection.h File Reference

Go to the source code of this file.

Functions

GLUSAPI GLUSboolean GLUSAPIENTRY glusMatrix4x4Orthof (GLUSfloat result[16], const GLUSfloat left, const GLUSfloat right, const GLUSfloat bottom, const GLUSfloat top, const GLUSfloat nearVal, const GLUSfloat farVal)
 Creates a matrix with orthogonal projection. More...
 
GLUSAPI GLUSboolean GLUSAPIENTRY glusMatrix4x4Frustumf (GLUSfloat result[16], const GLUSfloat left, const GLUSfloat right, const GLUSfloat bottom, const GLUSfloat top, const GLUSfloat nearVal, const GLUSfloat farVal)
 Creates a matrix with perspective projection. More...
 
GLUSAPI GLUSboolean GLUSAPIENTRY glusMatrix4x4Perspectivef (GLUSfloat result[16], const GLUSfloat fovy, const GLUSfloat aspect, const GLUSfloat zNear, const GLUSfloat zFar)
 Creates a matrix with perspective projection. More...
 
GLUSAPI GLUSvoid GLUSAPIENTRY glusMatrix4x4LookAtf (GLUSfloat result[16], const GLUSfloat eyeX, const GLUSfloat eyeY, const GLUSfloat eyeZ, const GLUSfloat centerX, const GLUSfloat centerY, const GLUSfloat centerZ, const GLUSfloat upX, const GLUSfloat upY, const GLUSfloat upZ)
 Creates a view / camera matrix. More...
 

Function Documentation

GLUSAPI GLUSboolean GLUSAPIENTRY glusMatrix4x4Frustumf ( GLUSfloat  result[16],
const GLUSfloat  left,
const GLUSfloat  right,
const GLUSfloat  bottom,
const GLUSfloat  top,
const GLUSfloat  nearVal,
const GLUSfloat  farVal 
)

Creates a matrix with perspective projection.

Parameters
resultThe resulting matrix.
leftLeft corner.
rightRight corner.
bottomBottom corner.
topTop corner.
nearValNear corner.
farValFar corner.
Returns
GLUS_TRUE, if creation was successful.
GLUSAPI GLUSvoid GLUSAPIENTRY glusMatrix4x4LookAtf ( GLUSfloat  result[16],
const GLUSfloat  eyeX,
const GLUSfloat  eyeY,
const GLUSfloat  eyeZ,
const GLUSfloat  centerX,
const GLUSfloat  centerY,
const GLUSfloat  centerZ,
const GLUSfloat  upX,
const GLUSfloat  upY,
const GLUSfloat  upZ 
)

Creates a view / camera matrix.

Parameters
resultThe resulting matrix.
eyeXEye / camera X position.
eyeYEye / camera Y position.
eyeZEye / camera Z position.
centerXX Position, where the view / camera points to.
centerYY Position, where the view / camera points to.
centerZZ Position, where the view / camera points to.
upXEye / camera X component from up vector.
upYEye / camera Y component from up vector.
upZEye / camera Z component from up vector.
GLUSAPI GLUSboolean GLUSAPIENTRY glusMatrix4x4Orthof ( GLUSfloat  result[16],
const GLUSfloat  left,
const GLUSfloat  right,
const GLUSfloat  bottom,
const GLUSfloat  top,
const GLUSfloat  nearVal,
const GLUSfloat  farVal 
)

Creates a matrix with orthogonal projection.

See also
http://en.wikipedia.org/wiki/Orthographic_projection_%28geometry%29
Parameters
resultThe resulting matrix.
leftLeft corner.
rightRight corner.
bottomBottom corner.
topTop corner.
nearValNear corner.
farValFar corner.
Returns
GLUS_TRUE, if creation was successful.
GLUSAPI GLUSboolean GLUSAPIENTRY glusMatrix4x4Perspectivef ( GLUSfloat  result[16],
const GLUSfloat  fovy,
const GLUSfloat  aspect,
const GLUSfloat  zNear,
const GLUSfloat  zFar 
)

Creates a matrix with perspective projection.

Parameters
resultThe resulting matrix.
fovyField of view.
aspectAspect ratio.
zNearNear plane.
zFarFar plane.
Returns
GLUS_TRUE, if creation was successful.