GLUS
|
#include "GL/glus.h"
Functions | |
GLUSboolean GLUSAPIENTRY | glusShapeCreatePlanef (GLUSshape *shape, const GLUSfloat halfExtend) |
Creates a quadratic plane. More... | |
GLUSboolean GLUSAPIENTRY | glusShapeCreateRectangularPlanef (GLUSshape *shape, const GLUSfloat horizontalExtend, const GLUSfloat verticalExtend) |
Creates a rectangular plane. More... | |
GLUSboolean GLUSAPIENTRY | glusShapeCreateRectangularGridPlanef (GLUSshape *shape, const GLUSfloat horizontalExtend, const GLUSfloat verticalExtend, const GLUSuint rows, const GLUSuint columns, const GLUSboolean triangleStrip) |
Creates a rectangular plane organized as a grid with given number rows and columns. More... | |
GLUSboolean GLUSAPIENTRY | glusShapeCreateDiscf (GLUSshape *shape, const GLUSfloat radius, const GLUSuint numberSectors) |
Creates a disc with the given radius and number sectors. More... | |
GLUSboolean GLUSAPIENTRY | glusShapeCreateCubef (GLUSshape *shape, const GLUSfloat halfExtend) |
Creates a cube. More... | |
GLUSboolean GLUSAPIENTRY | glusShapeCreateSpheref (GLUSshape *shape, const GLUSfloat radius, const GLUSuint numberSlices) |
Creates a sphere. More... | |
GLUSboolean GLUSAPIENTRY | glusShapeCreateDomef (GLUSshape *shape, const GLUSfloat radius, const GLUSuint numberSlices) |
Creates a dome. More... | |
GLUSboolean GLUSAPIENTRY | glusShapeCreateTorusf (GLUSshape *shape, const GLUSfloat innerRadius, const GLUSfloat outerRadius, const GLUSuint numberSlices, const GLUSuint numberStacks) |
Creates a torus / doughnut. More... | |
GLUSboolean GLUSAPIENTRY | glusShapeCreateCylinderf (GLUSshape *shape, const GLUSfloat halfExtend, const GLUSfloat radius, const GLUSuint numberSlices) |
Creates a cylinder. More... | |
GLUSboolean GLUSAPIENTRY | glusShapeCreateConef (GLUSshape *shape, const GLUSfloat halfExtend, const GLUSfloat radius, const GLUSuint numberSlices, const GLUSuint numberStacks) |
Creates a cone. More... | |
GLUSboolean GLUSAPIENTRY | glusShapeCalculateTangentBitangentf (GLUSshape *shape) |
Calculates and creates the tangent and bitangent vectors. More... | |
GLUSboolean GLUSAPIENTRY | glusShapeCopyf (GLUSshape *shape, const GLUSshape *source) |
Copies the shape. More... | |
GLUSvoid GLUSAPIENTRY | glusShapeDestroyf (GLUSshape *shape) |
Destroys the shape by freeing the allocated memory. More... | |
GLUSboolean GLUSAPIENTRY glusShapeCalculateTangentBitangentf | ( | GLUSshape * | shape | ) |
Calculates and creates the tangent and bitangent vectors.
Uses the previous created memory for the tangents and bitangents.
shape | The structure which will be filled with the calculated vectors. |
GLUSboolean GLUSAPIENTRY glusShapeCopyf | ( | GLUSshape * | shape, |
const GLUSshape * | source | ||
) |
Copies the shape.
shape | The target shape. |
source | The source shape. |
GLUSboolean GLUSAPIENTRY glusShapeCreateConef | ( | GLUSshape * | shape, |
const GLUSfloat | halfExtend, | ||
const GLUSfloat | radius, | ||
const GLUSuint | numberSlices, | ||
const GLUSuint | numberStacks | ||
) |
Creates a cone.
More slices and stacks makes the torus more round and smooth.
shape | The data is stored into this structure. |
halfExtend | The distance from the center point to the bottom disc of the cone. |
radius | The radius of the cone at the bottom. |
numberSlices | The number of slices the cone should have. |
numberStacks | The number of stacks the cone should have. |
GLUSboolean GLUSAPIENTRY glusShapeCreateCubef | ( | GLUSshape * | shape, |
const GLUSfloat | halfExtend | ||
) |
Creates a cube.
shape | The data is stored into this structure. |
halfExtend | The distance from the center point to any face of the cube. |
GLUSboolean GLUSAPIENTRY glusShapeCreateCylinderf | ( | GLUSshape * | shape, |
const GLUSfloat | halfExtend, | ||
const GLUSfloat | radius, | ||
const GLUSuint | numberSlices | ||
) |
Creates a cylinder.
More slices makes the cylinder more round.
shape | The data is stored into this structure. |
halfExtend | The distance from the center point to the bottom and top disc of the cylinder. |
radius | The radius of the cylinder. |
numberSlices | The number of slices the cylinder should have. |
GLUSboolean GLUSAPIENTRY glusShapeCreateDiscf | ( | GLUSshape * | shape, |
const GLUSfloat | radius, | ||
const GLUSuint | numberSectors | ||
) |
Creates a disc with the given radius and number sectors.
More sectors makes the disc more round.
shape | The data is stored into this structure. |
radius | The radius of the disc. |
numberSectors | The number of sectors the disc should have. |
GLUSboolean GLUSAPIENTRY glusShapeCreateDomef | ( | GLUSshape * | shape, |
const GLUSfloat | radius, | ||
const GLUSuint | numberSlices | ||
) |
Creates a dome.
More slices makes the dome more round.
shape | The data is stored into this structure. |
radius | The radius of the dome. |
numberSlices | The number of slices the dome should have. |
GLUSboolean GLUSAPIENTRY glusShapeCreatePlanef | ( | GLUSshape * | shape, |
const GLUSfloat | halfExtend | ||
) |
Creates a quadratic plane.
shape | The data is stored into this structure. |
halfExtend | The length from the center point to any border of the plane. |
GLUSboolean GLUSAPIENTRY glusShapeCreateRectangularGridPlanef | ( | GLUSshape * | shape, |
const GLUSfloat | horizontalExtend, | ||
const GLUSfloat | verticalExtend, | ||
const GLUSuint | rows, | ||
const GLUSuint | columns, | ||
const GLUSboolean | triangleStrip | ||
) |
Creates a rectangular plane organized as a grid with given number rows and columns.
shape | The data is stored into this structure. |
horizontalExtend | The length from the center point to the left/right border of the plane. |
verticalExtend | The length from the center point to the upper/lower border of the plane. |
rows | The number of rows the grid should have. |
columns | The number of columns the grid should have. |
triangleStrip | Set to GLUS_TRUE, if a triangle strip should be created. |
GLUSboolean GLUSAPIENTRY glusShapeCreateRectangularPlanef | ( | GLUSshape * | shape, |
const GLUSfloat | horizontalExtend, | ||
const GLUSfloat | verticalExtend | ||
) |
Creates a rectangular plane.
shape | The data is stored into this structure. |
horizontalExtend | The length from the center point to the left/right border of the plane. |
verticalExtend | The length from the center point to the upper/lower border of the plane. |
GLUSboolean GLUSAPIENTRY glusShapeCreateSpheref | ( | GLUSshape * | shape, |
const GLUSfloat | radius, | ||
const GLUSuint | numberSlices | ||
) |
Creates a sphere.
More slices makes the sphere more round.
shape | The data is stored into this structure. |
radius | The radius of the sphere. |
numberSlices | The number of slices the sphere should have. |
GLUSboolean GLUSAPIENTRY glusShapeCreateTorusf | ( | GLUSshape * | shape, |
const GLUSfloat | innerRadius, | ||
const GLUSfloat | outerRadius, | ||
const GLUSuint | numberSlices, | ||
const GLUSuint | numberStacks | ||
) |
Creates a torus / doughnut.
More slices and stacks makes the torus more round.
shape | The data is stored into this structure. |
innerRadius | The inner radius of the torus. This is the distance from the center point to the closest point from the torus surface. |
outerRadius | The outer radius of the torus. This is the distance from the center point to the farthest point from the torus surface. |
numberSlices | The number of slices the torus should have. |
numberStacks | The number of stacks / elements the torus should have per slice. |
GLUSvoid GLUSAPIENTRY glusShapeDestroyf | ( | GLUSshape * | shape | ) |
Destroys the shape by freeing the allocated memory.
shape | The structure which contains the dynamic allocated shape data, which will be freed by this function. |