GLUS
Functions
glus_raytrace.c File Reference
#include "GL/glus.h"

Functions

GLUSboolean GLUSAPIENTRY glusRaytracePerspectivef (GLUSfloat *directionBuffer, const GLUSubyte padding, const GLUSfloat fovy, const GLUSint width, const GLUSint height)
 Creates normals in a buffer for ray traced perspective projection. More...
 
GLUSvoid GLUSAPIENTRY glusRaytraceLookAtf (GLUSfloat *positionBuffer, GLUSfloat *directionBuffer, const GLUSfloat *originDirectionBuffer, const GLUSubyte padding, const GLUSint width, const GLUSint height, 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 the positions and directions in buffers needed for ray tracing. More...
 

Function Documentation

GLUSvoid GLUSAPIENTRY glusRaytraceLookAtf ( GLUSfloat positionBuffer,
GLUSfloat directionBuffer,
const GLUSfloat originDirectionBuffer,
const GLUSubyte  padding,
const GLUSint  width,
const GLUSint  height,
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 the positions and directions in buffers needed for ray tracing.

Parameters
positionBufferThe resulting position buffer. Positions are in homogeneous coordinates.
directionBufferThe resulting direction buffer.
originDirectionBufferThe direction buffer, pointing to -Z direction.
paddingAmount of padding bytes.
widthThe width of the buffers.
heightThe height of the buffers.
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.
GLUSboolean GLUSAPIENTRY glusRaytracePerspectivef ( GLUSfloat directionBuffer,
const GLUSubyte  padding,
const GLUSfloat  fovy,
const GLUSint  width,
const GLUSint  height 
)

Creates normals in a buffer for ray traced perspective projection.

Directions are pointing to -Z direction.

Parameters
directionBufferThe resulting direction buffer.
paddingAmount of padding bytes.
fovyField of view.
widthWidth of the buffer.
heightHeight of the buffer.
Returns
GLUS_TRUE, if creation was successful.