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

Functions

GLUSboolean GLUSAPIENTRY glusLineCreateLinef (GLUSline *line, const GLUSfloat point0[4], const GLUSfloat point1[4])
 Creates a line out of two points. More...
 
GLUSboolean GLUSAPIENTRY glusLineCreateSquaref (GLUSline *line, const GLUSfloat halfExtend)
 Creates a square out of lines. More...
 
GLUSboolean GLUSAPIENTRY glusLineCreateRectangularGridf (GLUSline *line, const GLUSfloat horizontalExtend, const GLUSfloat verticalExtend, const GLUSuint rows, const GLUSuint columns)
 Creates a rectangular grid out of lines. More...
 
GLUSboolean GLUSAPIENTRY glusLineCreateCirclef (GLUSline *line, const GLUSfloat radius, const GLUSuint numberSectors)
 Creates a circle out of lines with the given radius and number sectors. More...
 
GLUSboolean GLUSAPIENTRY glusLineCopyf (GLUSline *line, const GLUSline *source)
 Copies the line. More...
 
GLUSAPI GLUSvoid GLUSAPIENTRY glusLineDestroyf (GLUSline *line)
 Destroys the line by freeing the allocated memory. More...
 

Function Documentation

GLUSboolean GLUSAPIENTRY glusLineCopyf ( GLUSline line,
const GLUSline source 
)

Copies the line.

Parameters
lineThe target line.
sourceThe source line.
Returns
GLUS_TRUE, if copy succeeded.
GLUSboolean GLUSAPIENTRY glusLineCreateCirclef ( GLUSline line,
const GLUSfloat  radius,
const GLUSuint  numberSectors 
)

Creates a circle out of lines with the given radius and number sectors.

More sectors makes the circle more round.

Parameters
lineThe data is stored into this structure.
radiusThe radius of the circle.
numberSectorsThe number of sectors the circle should have.
Returns
GLUS_TRUE, if creation succeeded.
GLUSboolean GLUSAPIENTRY glusLineCreateLinef ( GLUSline line,
const GLUSfloat  point0[4],
const GLUSfloat  point1[4] 
)

Creates a line out of two points.

Parameters
lineThe data is stored into this structure.
point0The starting point.
point1The ending point.
Returns
GLUS_TRUE, if creation succeeded.
GLUSboolean GLUSAPIENTRY glusLineCreateRectangularGridf ( GLUSline line,
const GLUSfloat  horizontalExtend,
const GLUSfloat  verticalExtend,
const GLUSuint  rows,
const GLUSuint  columns 
)

Creates a rectangular grid out of lines.

The grid is centered.

Parameters
lineThe data is stored into this structure.
horizontalExtendThe width of the grid.
verticalExtendThe height of the grid.
rowsNumber of rows of the grid.
columnsNumber of columns of the grid.
Returns
GLUS_TRUE, if creation succeeded.
GLUSboolean GLUSAPIENTRY glusLineCreateSquaref ( GLUSline line,
const GLUSfloat  halfExtend 
)

Creates a square out of lines.

Parameters
lineThe data is stored into this structure.
halfExtendThe length from the center point to edge of the square.
Returns
GLUS_TRUE, if creation succeeded.
GLUSAPI GLUSvoid GLUSAPIENTRY glusLineDestroyf ( GLUSline line)

Destroys the line by freeing the allocated memory.

Parameters
lineThe structure which contains the dynamic allocated line data, which will be freed by this function.