Geogram  Version 1.9.1-rc
A programming library of geometric algorithms
defs.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2000-2022 Inria
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * * Redistributions of source code must retain the above copyright notice,
9  * this list of conditions and the following disclaimer.
10  * * Redistributions in binary form must reproduce the above copyright notice,
11  * this list of conditions and the following disclaimer in the documentation
12  * and/or other materials provided with the distribution.
13  * * Neither the name of the ALICE Project-Team nor the names of its
14  * contributors may be used to endorse or promote products derived from this
15  * software without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
21  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27  * POSSIBILITY OF SUCH DAMAGE.
28  *
29  * Contact: Bruno Levy
30  *
31  * https://www.inria.fr/fr/bruno-levy
32  *
33  * Inria,
34  * Domaine de Voluceau,
35  * 78150 Le Chesnay - Rocquencourt
36  * FRANCE
37  *
38  */
39 
40 #ifndef GEOGRAM_API_DEFS
41 #define GEOGRAM_API_DEFS
42 
48 /*
49  * Deactivate warnings about documentation
50  * We do that, because CLANG's doxygen parser does not know
51  * some doxygen commands that we use (retval, copydoc) and
52  * generates many warnings for them...
53  */
54 #if defined(__clang__)
55 #pragma clang diagnostic ignored "-Wunknown-pragmas"
56 #pragma clang diagnostic ignored "-Wdocumentation-unknown-command"
57 #endif
58 
63 #if defined(GEO_DYNAMIC_LIBS)
64 #if defined(_MSC_VER)
65 #define GEO_IMPORT __declspec(dllimport)
66 #define GEO_EXPORT __declspec(dllexport)
67 #elif defined(__GNUC__)
68 #define GEO_IMPORT
69 #define GEO_EXPORT __attribute__ ((visibility("default")))
70 #else
71 #define GEO_IMPORT
72 #define GEO_EXPORT
73 #endif
74 #else
75 #define GEO_IMPORT
76 #define GEO_EXPORT
77 #endif
78 
79 #ifdef geogram_EXPORTS
80 #define GEOGRAM_API GEO_EXPORT
81 #else
82 #define GEOGRAM_API GEO_IMPORT
83 #endif
84 
85 
93 #define NO_GEOGRAM_API
94 
99 typedef int GeoMesh;
100 
105 typedef unsigned char geo_coord_index_t;
106 
107 /*
108  * If GARGANTUA is defined, then geogram is compiled
109  * with 64 bit indices.
110  */
111 #ifdef GARGANTUA
112 
113 #include <stdint.h>
114 
119 typedef uint64_t geo_index_t;
120 
125 typedef int64_t geo_signed_index_t;
126 
127 #else
128 
133 typedef unsigned int geo_index_t;
134 
139 typedef int geo_signed_index_t;
140 
141 #endif
142 
147 typedef double geo_coord_t;
148 
153 typedef int geo_boolean;
154 
159 enum {
160  GEO_FALSE = 0,
161  GEO_TRUE = 1
162 };
163 
164 #endif
int GeoMesh
Opaque identifier of a mesh.
Definition: defs.h:99
int geo_boolean
Represents truth values.
Definition: defs.h:153
double geo_coord_t
Represents floating-point coordinates.
Definition: defs.h:147
unsigned char geo_coord_index_t
Represents dimension (e.g. 3 for 3d, 4 for 4d ...).
Definition: defs.h:105
unsigned int geo_index_t
Represents indices.
Definition: defs.h:133
int geo_signed_index_t
Represents possibly negative indices.
Definition: defs.h:139