cleap  0.3.2
A gpu-based library for handling and processing 3D meshes.
cleap.h
Go to the documentation of this file.
1 // //
3 // cleap //
4 // A library for handling / processing / rendering 3D meshes. //
5 // //
7 // //
8 // Copyright © 2011 Cristobal A. Navarro. //
9 // //
10 // This file is part of cleap. //
11 // cleap is free software: you can redistribute it and/or modify //
12 // it under the terms of the GNU General Public License as published by //
13 // the Free Software Foundation, either version 3 of the License, or //
14 // (at your option) any later version. //
15 // //
16 // cleap is distributed in the hope that it will be useful, //
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
19 // GNU General Public License for more details. //
20 // //
21 // You should have received a copy of the GNU General Public License //
22 // along with cleap. If not, see <http://www.gnu.org/licenses/>. //
23 // //
25 
26 #ifndef CLEAP_H
27 #define CLEAP_H
28 
31 typedef int CLEAP_RESULT;
34 #define CLEAP_SUCCESS 1
35 
37 #define CLEAP_FAILURE -1
38 
40 #define CLEAP_MODE_2D 2
41 
43 #define CLEAP_MODE_3D 3
44 
46 #define CLEAP_TRUE 1
47 
49 #define CLEAP_FALSE 0
50 
51 
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55 
59  //struct _cleap_mesh;
60  typedef struct _cleap_mesh cleap_mesh;
77  cleap_mesh* cleap_load_mesh(const char *filename);
93  CLEAP_RESULT cleap_save_mesh(cleap_mesh *m, const char *filename);
99  CLEAP_RESULT cleap_save_mesh_no_sync(cleap_mesh *m, const char *filename);
108  CLEAP_RESULT cleap_paint_mesh(cleap_mesh *m, float r, float g, float b, float a );
127  void cleap_print_mesh(cleap_mesh *m);
162  void cleap_mesh_set_wireframe(cleap_mesh *m, int w);
167  void cleap_mesh_set_solid(cleap_mesh *m, int s);
185 #ifdef __cplusplus
186 }
187 #endif
188 
189 #endif
float cleap_get_bsphere_y(cleap_mesh *m)
CLEAP_RESULT cleap_delaunay_transformation(cleap_mesh *m, int mode)
CLEAP_RESULT cleap_init()
int cleap_mesh_is_wireframe(cleap_mesh *m)
float cleap_get_bsphere_z(cleap_mesh *m)
CLEAP_RESULT cleap_sync_mesh(cleap_mesh *m)
cleap_mesh * cleap_load_mesh(const char *filename)
int cleap_get_vertex_count(cleap_mesh *m)
int CLEAP_RESULT
Definition: cleap.h:31
void cleap_mesh_set_solid(cleap_mesh *m, int s)
CLEAP_RESULT cleap_render_mesh(cleap_mesh *m)
CLEAP_RESULT cleap_end()
CLEAP_RESULT cleap_clear_mesh(cleap_mesh *m)
CLEAP_RESULT cleap_paint_mesh(cleap_mesh *m, float r, float g, float b, float a)
int cleap_mesh_is_solid(cleap_mesh *m)
float cleap_get_bsphere_x(cleap_mesh *m)
float cleap_get_bsphere_r(cleap_mesh *m)
int cleap_get_face_count(cleap_mesh *m)
CLEAP_RESULT cleap_save_mesh(cleap_mesh *m, const char *filename)
int cleap_get_edge_count(cleap_mesh *m)
int cleap_delaunay_transformation_interactive(cleap_mesh *m, int mode)
void cleap_mesh_set_wireframe(cleap_mesh *m, int w)
CLEAP_RESULT cleap_init_no_render()
CLEAP_RESULT cleap_save_mesh_no_sync(cleap_mesh *m, const char *filename)
void cleap_print_mesh(cleap_mesh *m)
Definition: cleap_private.h:40