You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. /*
  2. ---------------------------------------------------------------------------
  3. Open Asset Import Library (assimp)
  4. ---------------------------------------------------------------------------
  5. Copyright (c) 2006-2012, assimp team
  6. All rights reserved.
  7. Redistribution and use of this software in source and binary forms,
  8. with or without modification, are permitted provided that the following
  9. conditions are met:
  10. * Redistributions of source code must retain the above
  11. copyright notice, this list of conditions and the
  12. following disclaimer.
  13. * Redistributions in binary form must reproduce the above
  14. copyright notice, this list of conditions and the
  15. following disclaimer in the documentation and/or other
  16. materials provided with the distribution.
  17. * Neither the name of the assimp team, nor the names of its
  18. contributors may be used to endorse or promote products
  19. derived from this software without specific prior
  20. written permission of the assimp team.
  21. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  22. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  23. LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  24. A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  25. OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  26. SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  27. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  28. DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  29. THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  30. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  31. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32. ---------------------------------------------------------------------------
  33. */
  34. /** @file AssimpPCH.h
  35. * PCH master include. Every unit in Assimp has to include it.
  36. */
  37. #ifndef ASSIMP_PCH_INCLUDED
  38. #define ASSIMP_PCH_INCLUDED
  39. #define ASSIMP_INTERNAL_BUILD
  40. // ----------------------------------------------------------------------------------------
  41. /* General compile config taken from defs.h. It is important that the user compiles
  42. * using exactly the same settings in defs.h. Settings in AssimpPCH.h may differ,
  43. * they won't affect the public API.
  44. */
  45. #include "../include/assimp/defs.h"
  46. // Include our stdint.h replacement header for MSVC, take the global header for gcc/mingw
  47. #if defined( _MSC_VER) && (_MSC_VER < 1600)
  48. # include "../include/assimp/Compiler/pstdint.h"
  49. #else
  50. # include <stdint.h>
  51. #endif
  52. /* Undefine the min/max macros defined by some platform headers (namely Windows.h) to
  53. * avoid obvious conflicts with std::min() and std::max().
  54. */
  55. #undef min
  56. #undef max
  57. /* Concatenate two tokens after evaluating them
  58. */
  59. #define _AI_CONCAT(a,b) a ## b
  60. #define AI_CONCAT(a,b) _AI_CONCAT(a,b)
  61. /* Helper macro to set a pointer to NULL in debug builds
  62. */
  63. #if (defined ASSIMP_BUILD_DEBUG)
  64. # define AI_DEBUG_INVALIDATE_PTR(x) x = NULL;
  65. #else
  66. # define AI_DEBUG_INVALIDATE_PTR(x)
  67. #endif
  68. /* Beginning with MSVC8 some C string manipulation functions are mapped to their _safe_
  69. * counterparts (e.g. _itoa_s). This avoids a lot of trouble with deprecation warnings.
  70. */
  71. #if _MSC_VER >= 1400 && !(defined _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES)
  72. # define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
  73. #endif
  74. /* size_t to unsigned int, possible loss of data. The compiler is right with his warning
  75. * but this loss of data won't be a problem for us. So shut up, little boy.
  76. */
  77. #ifdef _MSC_VER
  78. # pragma warning (disable : 4267)
  79. #endif
  80. // ----------------------------------------------------------------------------------------
  81. /* Actually that's not required for MSVC. It is included somewhere in the deeper parts of
  82. * the MSVC STL but it's necessary for proper build with STLport.
  83. */
  84. #include <ctype.h>
  85. // Runtime/STL headers
  86. #include <vector>
  87. #include <list>
  88. #include <map>
  89. #include <set>
  90. #include <string>
  91. #include <sstream>
  92. #include <iomanip>
  93. #include <cassert>
  94. #include <stack>
  95. #include <queue>
  96. #include <iostream>
  97. #include <algorithm>
  98. #include <numeric>
  99. #include <new>
  100. #include <cstdio>
  101. #include <limits.h>
  102. #include <memory>
  103. // Boost headers
  104. #include <boost/pointer_cast.hpp>
  105. #include <boost/scoped_ptr.hpp>
  106. #include <boost/scoped_array.hpp>
  107. #include <boost/shared_ptr.hpp>
  108. #include <boost/shared_array.hpp>
  109. #include <boost/make_shared.hpp>
  110. #include <boost/format.hpp>
  111. #include <boost/foreach.hpp>
  112. #include <boost/static_assert.hpp>
  113. #include <boost/lexical_cast.hpp>
  114. // Public ASSIMP headers
  115. #include "../include/assimp/DefaultLogger.hpp"
  116. #include "../include/assimp/IOStream.hpp"
  117. #include "../include/assimp/IOSystem.hpp"
  118. #include "../include/assimp/scene.h"
  119. #include "../include/assimp/importerdesc.h"
  120. #include "../include/assimp/postprocess.h"
  121. #include "../include/assimp/Importer.hpp"
  122. #include "../include/assimp/Exporter.hpp"
  123. // Internal utility headers
  124. #include "BaseImporter.h"
  125. #include "StringComparison.h"
  126. #include "StreamReader.h"
  127. #include "qnan.h"
  128. #include "ScenePrivate.h"
  129. // We need those constants, workaround for any platforms where nobody defined them yet
  130. #if (!defined SIZE_MAX)
  131. # define SIZE_MAX (~((size_t)0))
  132. #endif
  133. #if (!defined UINT_MAX)
  134. # define UINT_MAX (~((unsigned int)0))
  135. #endif
  136. #endif // !! ASSIMP_PCH_INCLUDED