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 AssimpPCH.h
|
nuclear@0
|
43 * PCH master include. Every unit in Assimp has to include it.
|
nuclear@0
|
44 */
|
nuclear@0
|
45
|
nuclear@0
|
46 #ifndef ASSIMP_PCH_INCLUDED
|
nuclear@0
|
47 #define ASSIMP_PCH_INCLUDED
|
nuclear@0
|
48 #define ASSIMP_INTERNAL_BUILD
|
nuclear@0
|
49
|
nuclear@0
|
50 // ----------------------------------------------------------------------------------------
|
nuclear@0
|
51 /* General compile config taken from defs.h. It is important that the user compiles
|
nuclear@0
|
52 * using exactly the same settings in defs.h. Settings in AssimpPCH.h may differ,
|
nuclear@0
|
53 * they won't affect the public API.
|
nuclear@0
|
54 */
|
nuclear@0
|
55 #include "assimp/defs.h"
|
nuclear@0
|
56
|
nuclear@0
|
57 // Include our stdint.h replacement header for MSVC, take the global header for gcc/mingw
|
nuclear@0
|
58 #if defined( _MSC_VER) && (_MSC_VER < 1600)
|
nuclear@0
|
59 # include "pstdint.h"
|
nuclear@0
|
60 #else
|
nuclear@0
|
61 # include <stdint.h>
|
nuclear@0
|
62 #endif
|
nuclear@0
|
63
|
nuclear@0
|
64 /* Undefine the min/max macros defined by some platform headers (namely Windows.h) to
|
nuclear@0
|
65 * avoid obvious conflicts with std::min() and std::max().
|
nuclear@0
|
66 */
|
nuclear@0
|
67 #undef min
|
nuclear@0
|
68 #undef max
|
nuclear@0
|
69
|
nuclear@0
|
70 /* Concatenate two tokens after evaluating them
|
nuclear@0
|
71 */
|
nuclear@0
|
72 #define _AI_CONCAT(a,b) a ## b
|
nuclear@0
|
73 #define AI_CONCAT(a,b) _AI_CONCAT(a,b)
|
nuclear@0
|
74
|
nuclear@0
|
75 /* Helper macro to set a pointer to NULL in debug builds
|
nuclear@0
|
76 */
|
nuclear@0
|
77 #if (defined _DEBUG)
|
nuclear@0
|
78 # define AI_DEBUG_INVALIDATE_PTR(x) x = NULL;
|
nuclear@0
|
79 #else
|
nuclear@0
|
80 # define AI_DEBUG_INVALIDATE_PTR(x)
|
nuclear@0
|
81 #endif
|
nuclear@0
|
82
|
nuclear@0
|
83 /* Beginning with MSVC8 some C string manipulation functions are mapped to their _safe_
|
nuclear@0
|
84 * counterparts (e.g. _itoa_s). This avoids a lot of trouble with deprecation warnings.
|
nuclear@0
|
85 */
|
nuclear@0
|
86 #if _MSC_VER >= 1400 && !(defined _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES)
|
nuclear@0
|
87 # define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
|
nuclear@0
|
88 #endif
|
nuclear@0
|
89
|
nuclear@0
|
90 /* size_t to unsigned int, possible loss of data. The compiler is right with his warning
|
nuclear@0
|
91 * but this loss of data won't be a problem for us. So shut up, little boy.
|
nuclear@0
|
92 */
|
nuclear@0
|
93 #ifdef _MSC_VER
|
nuclear@0
|
94 # pragma warning (disable : 4267)
|
nuclear@0
|
95 #endif
|
nuclear@0
|
96
|
nuclear@0
|
97 // ----------------------------------------------------------------------------------------
|
nuclear@0
|
98 /* Actually that's not required for MSVC. It is included somewhere in the deeper parts of
|
nuclear@0
|
99 * the MSVC STL but it's necessary for proper build with STLport.
|
nuclear@0
|
100 */
|
nuclear@0
|
101 #include <ctype.h>
|
nuclear@0
|
102
|
nuclear@0
|
103 // Runtime/STL headers
|
nuclear@0
|
104 #include <vector>
|
nuclear@0
|
105 #include <list>
|
nuclear@0
|
106 #include <map>
|
nuclear@0
|
107 #include <set>
|
nuclear@0
|
108 #include <string>
|
nuclear@0
|
109 #include <sstream>
|
nuclear@0
|
110 #include <iomanip>
|
nuclear@0
|
111 #include <cassert>
|
nuclear@0
|
112 #include <stack>
|
nuclear@0
|
113 #include <queue>
|
nuclear@0
|
114 #include <iostream>
|
nuclear@0
|
115 #include <algorithm>
|
nuclear@0
|
116 #include <numeric>
|
nuclear@0
|
117 #include <new>
|
nuclear@0
|
118 #include <cstdio>
|
nuclear@0
|
119 #include <limits.h>
|
nuclear@0
|
120 #include <memory>
|
nuclear@0
|
121
|
nuclear@0
|
122 // Boost headers
|
nuclear@0
|
123 #include <boost/pointer_cast.hpp>
|
nuclear@0
|
124 #include <boost/scoped_ptr.hpp>
|
nuclear@0
|
125 #include <boost/scoped_array.hpp>
|
nuclear@0
|
126 #include <boost/shared_ptr.hpp>
|
nuclear@0
|
127 #include <boost/shared_array.hpp>
|
nuclear@0
|
128 #include <boost/make_shared.hpp>
|
nuclear@0
|
129 #include <boost/format.hpp>
|
nuclear@0
|
130 #include <boost/foreach.hpp>
|
nuclear@0
|
131 #include <boost/static_assert.hpp>
|
nuclear@0
|
132 #include <boost/lexical_cast.hpp>
|
nuclear@0
|
133
|
nuclear@0
|
134 // Public ASSIMP headers
|
nuclear@0
|
135 #include "assimp/DefaultLogger.hpp"
|
nuclear@0
|
136 #include "assimp/IOStream.hpp"
|
nuclear@0
|
137 #include "assimp/IOSystem.hpp"
|
nuclear@0
|
138 #include "assimp/scene.h"
|
nuclear@0
|
139 #include "assimp/importerdesc.h"
|
nuclear@0
|
140 #include "assimp/postprocess.h"
|
nuclear@0
|
141 #include "assimp/Importer.hpp"
|
nuclear@0
|
142 #include "assimp/Exporter.hpp"
|
nuclear@0
|
143
|
nuclear@0
|
144 // Internal utility headers
|
nuclear@0
|
145 #include "BaseImporter.h"
|
nuclear@0
|
146 #include "StringComparison.h"
|
nuclear@0
|
147 #include "StreamReader.h"
|
nuclear@0
|
148 #include "qnan.h"
|
nuclear@0
|
149 #include "ScenePrivate.h"
|
nuclear@0
|
150
|
nuclear@0
|
151
|
nuclear@0
|
152 // We need those constants, workaround for any platforms where nobody defined them yet
|
nuclear@0
|
153 #if (!defined SIZE_MAX)
|
nuclear@0
|
154 # define SIZE_MAX (~((size_t)0))
|
nuclear@0
|
155 #endif
|
nuclear@0
|
156
|
nuclear@0
|
157 #if (!defined UINT_MAX)
|
nuclear@0
|
158 # define UINT_MAX (~((unsigned int)0))
|
nuclear@0
|
159 #endif
|
nuclear@0
|
160
|
nuclear@0
|
161
|
nuclear@0
|
162 #endif // !! ASSIMP_PCH_INCLUDED
|