GLUS
glus_line.h
Go to the documentation of this file.
1 /*
2  * GLUS - Modern OpenGL, OpenGL ES and OpenVG Utilities. Copyright (C) since 2010 Norbert Nopper
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef GLUS_LINE_H_
19 #define GLUS_LINE_H_
20 
24 typedef struct _GLUSline
25 {
30 
35 
40 
45 
54 
55 } GLUSline;
56 
66 GLUSAPI GLUSboolean GLUSAPIENTRY glusLineCreateLinef(GLUSline* line, const GLUSfloat point0[4], const GLUSfloat point1[4]);
67 
77 
89 GLUSAPI GLUSboolean GLUSAPIENTRY glusLineCreateRectangularGridf(GLUSline* line, const GLUSfloat horizontalExtend, const GLUSfloat verticalExtend, const GLUSuint rows, const GLUSuint columns);
90 
100 GLUSAPI GLUSboolean GLUSAPIENTRY glusLineCreateCirclef(GLUSline* line, const GLUSfloat radius, const GLUSuint numberSectors);
101 
111 
118 
119 #endif /* GLUS_LINE_H_ */
GLUSAPI GLUSboolean GLUSAPIENTRY glusLineCreateRectangularGridf(GLUSline *line, const GLUSfloat horizontalExtend, const GLUSfloat verticalExtend, const GLUSuint rows, const GLUSuint columns)
Creates a rectangular grid out of lines.
Definition: glus_line.c:125
GLUSAPI GLUSboolean GLUSAPIENTRY glusLineCreateSquaref(GLUSline *line, const GLUSfloat halfExtend)
Creates a square out of lines.
Definition: glus_line.c:74
struct _GLUSline GLUSline
Structure for holding line data.
GLUSuint numberIndices
Number of indices.
Definition: glus_line.h:44
GLUSAPI GLUSboolean GLUSAPIENTRY glusLineCreateCirclef(GLUSline *line, const GLUSfloat radius, const GLUSuint numberSectors)
Creates a circle out of lines with the given radius and number sectors.
Definition: glus_line.c:198
GLUSAPI GLUSboolean GLUSAPIENTRY glusLineCreateLinef(GLUSline *line, const GLUSfloat point0[4], const GLUSfloat point1[4])
Creates a line out of two points.
Definition: glus_line.c:42
float GLUSfloat
Definition: glus_typedef.h:37
GLUSenum mode
Line render mode - could be either:
Definition: glus_line.h:53
GLUSAPI GLUSboolean GLUSAPIENTRY glusLineCopyf(GLUSline *line, const GLUSline *source)
Copies the line.
Definition: glus_line.c:245
void GLUSvoid
Definition: glus_typedef.h:51
#define GLUSindex
Definition: glus_define_uint.h:24
unsigned int GLUSuint
Definition: glus_typedef.h:28
Structure for holding line data.
Definition: glus_line.h:24
unsigned int GLUSenum
Definition: glus_typedef.h:33
GLUSAPI GLUSvoid GLUSAPIENTRY glusLineDestroyf(GLUSline *line)
Destroys the line by freeing the allocated memory.
Definition: glus_line.c:286
#define GLUSAPI
Definition: glus_function.h:38
unsigned char GLUSboolean
Definition: glus_typedef.h:21
GLUSindex * indices
Indices.
Definition: glus_line.h:34
GLUSuint numberVertices
Number of vertices.
Definition: glus_line.h:39
#define GLUSAPIENTRY
Definition: glus_function.h:31
GLUSfloat * vertices
Vertices in homogeneous coordinates.
Definition: glus_line.h:29