vrshoot

annotate libs/assimp/assimp/defs.h @ 0:b2f14e535253

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 01 Feb 2014 19:58:19 +0200
parents
children
rev   line source
nuclear@0 1 /*
nuclear@0 2 ---------------------------------------------------------------------------
nuclear@0 3 Open Asset Import Library (assimp)
nuclear@0 4 ---------------------------------------------------------------------------
nuclear@0 5
nuclear@0 6 Copyright (c) 2006-2012, assimp team
nuclear@0 7
nuclear@0 8 All rights reserved.
nuclear@0 9
nuclear@0 10 Redistribution and use of this software in source and binary forms,
nuclear@0 11 with or without modification, are permitted provided that the following
nuclear@0 12 conditions are met:
nuclear@0 13
nuclear@0 14 * Redistributions of source code must retain the above
nuclear@0 15 copyright notice, this list of conditions and the
nuclear@0 16 following disclaimer.
nuclear@0 17
nuclear@0 18 * Redistributions in binary form must reproduce the above
nuclear@0 19 copyright notice, this list of conditions and the
nuclear@0 20 following disclaimer in the documentation and/or other
nuclear@0 21 materials provided with the distribution.
nuclear@0 22
nuclear@0 23 * Neither the name of the assimp team, nor the names of its
nuclear@0 24 contributors may be used to endorse or promote products
nuclear@0 25 derived from this software without specific prior
nuclear@0 26 written permission of the assimp team.
nuclear@0 27
nuclear@0 28 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
nuclear@0 29 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
nuclear@0 30 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
nuclear@0 31 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
nuclear@0 32 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
nuclear@0 33 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
nuclear@0 34 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
nuclear@0 35 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
nuclear@0 36 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
nuclear@0 37 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
nuclear@0 38 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
nuclear@0 39 ---------------------------------------------------------------------------
nuclear@0 40 */
nuclear@0 41
nuclear@0 42 /** @file aiDefines.h
nuclear@0 43 * @brief Assimp build configuration setup. See the notes in the comment
nuclear@0 44 * blocks to find out how to customize _your_ Assimp build.
nuclear@0 45 */
nuclear@0 46
nuclear@0 47 #ifndef INCLUDED_AI_DEFINES_H
nuclear@0 48 #define INCLUDED_AI_DEFINES_H
nuclear@0 49
nuclear@0 50 //////////////////////////////////////////////////////////////////////////
nuclear@0 51 /* Define ASSIMP_BUILD_NO_XX_IMPORTER to disable a specific
nuclear@0 52 * file format loader. The loader is be excluded from the
nuclear@0 53 * build in this case. 'XX' stands for the most common file
nuclear@0 54 * extension of the file format. E.g.:
nuclear@0 55 * ASSIMP_BUILD_NO_X_IMPORTER disables the X loader.
nuclear@0 56 *
nuclear@0 57 * If you're unsure about that, take a look at the implementation of the
nuclear@0 58 * import plugin you wish to disable. You'll find the right define in the
nuclear@0 59 * first lines of the corresponding unit.
nuclear@0 60 *
nuclear@0 61 * Other (mixed) configuration switches are listed here:
nuclear@0 62 * ASSIMP_BUILD_NO_COMPRESSED_X
nuclear@0 63 * - Disable support for compressed X files (zip)
nuclear@0 64 * ASSIMP_BUILD_NO_COMPRESSED_BLEND
nuclear@0 65 * - Disable support for compressed Blender files (zip)
nuclear@0 66 * ASSIMP_BUILD_NO_COMPRESSED_IFC
nuclear@0 67 * - Disable support for IFCZIP files (unzip)
nuclear@0 68 */
nuclear@0 69 //////////////////////////////////////////////////////////////////////////
nuclear@0 70
nuclear@0 71 #define ASSIMP_BUILD_NO_OWN_ZLIB
nuclear@0 72
nuclear@0 73 // let's disable anything we don't really need
nuclear@0 74 #define ASSIMP_BUILD_NO_COMPRESSED_X
nuclear@0 75 #define ASSIMP_BUILD_NO_COMPRESSED_BLEND
nuclear@0 76 #define ASSIMP_BUILD_NO_COMPRESSED_IFC
nuclear@0 77 #define ASSIMP_BUILD_NO_Q3BSP_IMPORTER
nuclear@0 78
nuclear@0 79 // disable various formats
nuclear@0 80 #define ASSIMP_BUILD_NO_B3D_IMPORTER
nuclear@0 81 #define ASSIMP_BUILD_NO_BVH_IMPORTER
nuclear@0 82 #define ASSIMP_BUILD_NO_COB_IMPORTER
nuclear@0 83 #define ASSIMP_BUILD_NO_CSM_IMPORTER
nuclear@0 84 #define ASSIMP_BUILD_NO_DXF_IMPORTER
nuclear@0 85 #define ASSIMP_BUILD_NO_HMP_IMPORTER
nuclear@0 86 #define ASSIMP_BUILD_NO_IFC_IMPORTER
nuclear@0 87 #define ASSIMP_BUILD_NO_IRR_IMPORTER
nuclear@0 88 #define ASSIMP_BUILD_NO_IRRMESH_IMPORTER
nuclear@0 89 #define ASSIMP_BUILD_NO_LWO_IMPORTER
nuclear@0 90 #define ASSIMP_BUILD_NO_LWS_IMPORTER
nuclear@0 91 #define ASSIMP_BUILD_NO_MD2_IMPORTER
nuclear@0 92 #define ASSIMP_BUILD_NO_MDC_IMPORTER
nuclear@0 93 #define ASSIMP_BUILD_NO_MDL_IMPORTER
nuclear@0 94 #define ASSIMP_BUILD_NO_NDO_IMPORTER
nuclear@0 95 #define ASSIMP_BUILD_NO_NFF_IMPORTER
nuclear@0 96 #define ASSIMP_BUILD_NO_OFF_IMPORTER
nuclear@0 97 #define ASSIMP_BUILD_NO_OGRE_IMPORTER
nuclear@0 98 #define ASSIMP_BUILD_NO_PLY_IMPORTER
nuclear@0 99 #define ASSIMP_BUILD_NO_Q3D_IMPORTER
nuclear@0 100 #define ASSIMP_BUILD_NO_RAW_IMPORTER
nuclear@0 101 #define ASSIMP_BUILD_NO_SMD_IMPORTER
nuclear@0 102 #define ASSIMP_BUILD_NO_STL_IMPORTER
nuclear@0 103 #define ASSIMP_BUILD_NO_TERRAGEN_IMPORTER
nuclear@0 104 #define ASSIMP_BUILD_NO_3D_IMPORTER
nuclear@0 105 #define ASSIMP_BUILD_NO_X_IMPORTER
nuclear@0 106 #define ASSIMP_BUILD_NO_XGL_IMPORTER
nuclear@0 107
nuclear@0 108 // we don't really need assimp to be thread-safe (I think)
nuclear@0 109 #define ASSIMP_BUILD_SINGLETHREADED
nuclear@0 110
nuclear@0 111
nuclear@0 112 #ifndef ASSIMP_BUILD_NO_COMPRESSED_X
nuclear@0 113 # define ASSIMP_BUILD_NEED_Z_INFLATE
nuclear@0 114 #endif
nuclear@0 115
nuclear@0 116 #ifndef ASSIMP_BUILD_NO_COMPRESSED_BLEND
nuclear@0 117 # define ASSIMP_BUILD_NEED_Z_INFLATE
nuclear@0 118 #endif
nuclear@0 119
nuclear@0 120 #ifndef ASSIMP_BUILD_NO_COMPRESSED_IFC
nuclear@0 121 # define ASSIMP_BUILD_NEED_Z_INFLATE
nuclear@0 122 # define ASSIMP_BUILD_NEED_UNZIP
nuclear@0 123 #endif
nuclear@0 124
nuclear@0 125 #ifndef ASSIMP_BUILD_NO_Q3BSP_IMPORTER
nuclear@0 126 # define ASSIMP_BUILD_NEED_Z_INFLATE
nuclear@0 127 # define ASSIMP_BUILD_NEED_UNZIP
nuclear@0 128 #endif
nuclear@0 129
nuclear@0 130 //////////////////////////////////////////////////////////////////////////
nuclear@0 131 /* Define ASSIMP_BUILD_NO_XX_PROCESS to disable a specific
nuclear@0 132 * post processing step. This is the current list of process names ('XX'):
nuclear@0 133 * CALCTANGENTS
nuclear@0 134 * JOINVERTICES
nuclear@0 135 * TRIANGULATE
nuclear@0 136 * GENFACENORMALS
nuclear@0 137 * GENVERTEXNORMALS
nuclear@0 138 * REMOVEVC
nuclear@0 139 * SPLITLARGEMESHES
nuclear@0 140 * PRETRANSFORMVERTICES
nuclear@0 141 * LIMITBONEWEIGHTS
nuclear@0 142 * VALIDATEDS
nuclear@0 143 * IMPROVECACHELOCALITY
nuclear@0 144 * FIXINFACINGNORMALS
nuclear@0 145 * REMOVE_REDUNDANTMATERIALS
nuclear@0 146 * OPTIMIZEGRAPH
nuclear@0 147 * SORTBYPTYPE
nuclear@0 148 * FINDINVALIDDATA
nuclear@0 149 * TRANSFORMTEXCOORDS
nuclear@0 150 * GENUVCOORDS
nuclear@0 151 * ENTITYMESHBUILDER
nuclear@0 152 * MAKELEFTHANDED
nuclear@0 153 * FLIPUVS
nuclear@0 154 * FLIPWINDINGORDER
nuclear@0 155 * OPTIMIZEMESHES
nuclear@0 156 * OPTIMIZEANIMS
nuclear@0 157 * OPTIMIZEGRAPH
nuclear@0 158 * GENENTITYMESHES
nuclear@0 159 * FIXTEXTUREPATHS */
nuclear@0 160 //////////////////////////////////////////////////////////////////////////
nuclear@0 161
nuclear@0 162 #ifdef _MSC_VER
nuclear@0 163 # undef ASSIMP_API
nuclear@0 164
nuclear@0 165 //////////////////////////////////////////////////////////////////////////
nuclear@0 166 /* Define 'ASSIMP_BUILD_DLL_EXPORT' to build a DLL of the library */
nuclear@0 167 //////////////////////////////////////////////////////////////////////////
nuclear@0 168 # ifdef ASSIMP_BUILD_DLL_EXPORT
nuclear@0 169 # define ASSIMP_API __declspec(dllexport)
nuclear@0 170 # define ASSIMP_API_WINONLY __declspec(dllexport)
nuclear@0 171 # pragma warning (disable : 4251)
nuclear@0 172
nuclear@0 173 //////////////////////////////////////////////////////////////////////////
nuclear@0 174 /* Define 'ASSIMP_DLL' before including Assimp to link to ASSIMP in
nuclear@0 175 * an external DLL under Windows. Default is static linkage. */
nuclear@0 176 //////////////////////////////////////////////////////////////////////////
nuclear@0 177 # elif (defined ASSIMP_DLL)
nuclear@0 178 # define ASSIMP_API __declspec(dllimport)
nuclear@0 179 # define ASSIMP_API_WINONLY __declspec(dllimport)
nuclear@0 180 # else
nuclear@0 181 # define ASSIMP_API
nuclear@0 182 # define ASSIMP_API_WINONLY
nuclear@0 183 # endif
nuclear@0 184
nuclear@0 185 /* Force the compiler to inline a function, if possible
nuclear@0 186 */
nuclear@0 187 # define AI_FORCE_INLINE __forceinline
nuclear@0 188
nuclear@0 189 /* Tells the compiler that a function never returns. Used in code analysis
nuclear@0 190 * to skip dead paths (e.g. after an assertion evaluated to false). */
nuclear@0 191 # define AI_WONT_RETURN __declspec(noreturn)
nuclear@0 192
nuclear@0 193 #elif defined(SWIG)
nuclear@0 194
nuclear@0 195 /* Do nothing, the relevant defines are all in AssimpSwigPort.i */
nuclear@0 196
nuclear@0 197 #else
nuclear@0 198
nuclear@0 199 # define AI_WONT_RETURN
nuclear@0 200
nuclear@0 201 # define ASSIMP_API __attribute__ ((visibility("default")))
nuclear@0 202 # define ASSIMP_API_WINONLY
nuclear@0 203 # define AI_FORCE_INLINE inline
nuclear@0 204 #endif // (defined _MSC_VER)
nuclear@0 205
nuclear@0 206 #ifdef __cplusplus
nuclear@0 207 /* No explicit 'struct' and 'enum' tags for C++, this keeps showing up
nuclear@0 208 * in doxydocs.
nuclear@0 209 */
nuclear@0 210 # define C_STRUCT
nuclear@0 211 # define C_ENUM
nuclear@0 212 #else
nuclear@0 213 //////////////////////////////////////////////////////////////////////////
nuclear@0 214 /* To build the documentation, make sure ASSIMP_DOXYGEN_BUILD
nuclear@0 215 * is defined by Doxygen's preprocessor. The corresponding
nuclear@0 216 * entries in the DOXYFILE are: */
nuclear@0 217 //////////////////////////////////////////////////////////////////////////
nuclear@0 218 #if 0
nuclear@0 219 ENABLE_PREPROCESSING = YES
nuclear@0 220 MACRO_EXPANSION = YES
nuclear@0 221 EXPAND_ONLY_PREDEF = YES
nuclear@0 222 SEARCH_INCLUDES = YES
nuclear@0 223 INCLUDE_PATH =
nuclear@0 224 INCLUDE_FILE_PATTERNS =
nuclear@0 225 PREDEFINED = ASSIMP_DOXYGEN_BUILD=1
nuclear@0 226 EXPAND_AS_DEFINED = C_STRUCT C_ENUM
nuclear@0 227 SKIP_FUNCTION_MACROS = YES
nuclear@0 228 #endif
nuclear@0 229 //////////////////////////////////////////////////////////////////////////
nuclear@0 230 /* Doxygen gets confused if we use c-struct typedefs to avoid
nuclear@0 231 * the explicit 'struct' notation. This trick here has the same
nuclear@0 232 * effect as the TYPEDEF_HIDES_STRUCT option, but we don't need
nuclear@0 233 * to typedef all structs/enums. */
nuclear@0 234 //////////////////////////////////////////////////////////////////////////
nuclear@0 235 # if (defined ASSIMP_DOXYGEN_BUILD)
nuclear@0 236 # define C_STRUCT
nuclear@0 237 # define C_ENUM
nuclear@0 238 # else
nuclear@0 239 # define C_STRUCT struct
nuclear@0 240 # define C_ENUM enum
nuclear@0 241 # endif
nuclear@0 242 #endif
nuclear@0 243
nuclear@0 244 #if (defined(__BORLANDC__) || defined (__BCPLUSPLUS__))
nuclear@0 245 #error Currently, Borland is unsupported. Feel free to port Assimp.
nuclear@0 246
nuclear@0 247 // "W8059 Packgröße der Struktur geändert"
nuclear@0 248
nuclear@0 249 #endif
nuclear@0 250 //////////////////////////////////////////////////////////////////////////
nuclear@0 251 /* Define 'ASSIMP_BUILD_BOOST_WORKAROUND' to compile assimp
nuclear@0 252 * without boost. This is done by using a few workaround
nuclear@0 253 * classes and brings some limitations (e.g. some logging won't be done,
nuclear@0 254 * the library won't utilize threads or be threadsafe at all).
nuclear@0 255 * This implies the 'ASSIMP_BUILD_SINGLETHREADED' setting. */
nuclear@0 256 //////////////////////////////////////////////////////////////////////////
nuclear@0 257 #ifdef ASSIMP_BUILD_BOOST_WORKAROUND
nuclear@0 258
nuclear@0 259 // threading support requires boost
nuclear@0 260 #ifndef ASSIMP_BUILD_SINGLETHREADED
nuclear@0 261 # define ASSIMP_BUILD_SINGLETHREADED
nuclear@0 262 #endif
nuclear@0 263
nuclear@0 264 #endif // !! ASSIMP_BUILD_BOOST_WORKAROUND
nuclear@0 265
nuclear@0 266 //////////////////////////////////////////////////////////////////////////
nuclear@0 267 /* Define ASSIMP_BUILD_SINGLETHREADED to compile assimp
nuclear@0 268 * without threading support. The library doesn't utilize
nuclear@0 269 * threads then and is itself not threadsafe.
nuclear@0 270 * If this flag is specified boost::threads is *not* required. */
nuclear@0 271 //////////////////////////////////////////////////////////////////////////
nuclear@0 272 #ifndef ASSIMP_BUILD_SINGLETHREADED
nuclear@0 273 # define ASSIMP_BUILD_SINGLETHREADED
nuclear@0 274 #endif
nuclear@0 275
nuclear@0 276 #ifndef ASSIMP_BUILD_SINGLETHREADED
nuclear@0 277 # define AI_C_THREADSAFE
nuclear@0 278 #endif // !! ASSIMP_BUILD_SINGLETHREADED
nuclear@0 279
nuclear@0 280 #ifdef _DEBUG
nuclear@0 281 # define ASSIMP_BUILD_DEBUG
nuclear@0 282 #endif
nuclear@0 283
nuclear@0 284 //////////////////////////////////////////////////////////////////////////
nuclear@0 285 /* Useful constants */
nuclear@0 286 //////////////////////////////////////////////////////////////////////////
nuclear@0 287
nuclear@0 288 /* This is PI. Hi PI. */
nuclear@0 289 #define AI_MATH_PI (3.141592653589793238462643383279 )
nuclear@0 290 #define AI_MATH_TWO_PI (AI_MATH_PI * 2.0)
nuclear@0 291 #define AI_MATH_HALF_PI (AI_MATH_PI * 0.5)
nuclear@0 292
nuclear@0 293 /* And this is to avoid endless casts to float */
nuclear@0 294 #define AI_MATH_PI_F (3.1415926538f)
nuclear@0 295 #define AI_MATH_TWO_PI_F (AI_MATH_PI_F * 2.0f)
nuclear@0 296 #define AI_MATH_HALF_PI_F (AI_MATH_PI_F * 0.5f)
nuclear@0 297
nuclear@0 298 /* Tiny macro to convert from radians to degrees and back */
nuclear@0 299 #define AI_DEG_TO_RAD(x) (x*0.0174532925f)
nuclear@0 300 #define AI_RAD_TO_DEG(x) (x*57.2957795f)
nuclear@0 301
nuclear@0 302 /* Support for big-endian builds */
nuclear@0 303 #if defined(__BYTE_ORDER__)
nuclear@0 304 # if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
nuclear@0 305 # if !defined(__BIG_ENDIAN__)
nuclear@0 306 # define __BIG_ENDIAN__
nuclear@0 307 # endif
nuclear@0 308 # else /* little endian */
nuclear@0 309 # if defined (__BIG_ENDIAN__)
nuclear@0 310 # undef __BIG_ENDIAN__
nuclear@0 311 # endif
nuclear@0 312 # endif
nuclear@0 313 #endif
nuclear@0 314 #if defined(__BIG_ENDIAN__)
nuclear@0 315 # define AI_BUILD_BIG_ENDIAN
nuclear@0 316 #endif
nuclear@0 317
nuclear@0 318 #endif // !! INCLUDED_AI_DEFINES_H