glFT: refactoring.

refactor_gltf
Kim Kulling 2020-08-17 19:46:15 +02:00
parent 6cca078947
commit 243c1e15fe
6 changed files with 35 additions and 109 deletions

View File

@ -51,66 +51,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#if !defined(ASSIMP_BUILD_NO_GLTF_IMPORTER) && !defined(ASSIMP_BUILD_NO_GLTF1_IMPORTER) #if !defined(ASSIMP_BUILD_NO_GLTF_IMPORTER) && !defined(ASSIMP_BUILD_NO_GLTF1_IMPORTER)
#include <assimp/Exceptional.h> #include "AssetLib/glTFCommon/glTFCommon.h"
#include <map>
#include <string>
#include <list>
#include <vector>
#include <algorithm>
#include <stdexcept>
#ifndef RAPIDJSON_HAS_STDSTRING
#define RAPIDJSON_HAS_STDSTRING 1
#endif
#if (__GNUC__ == 8 && __GNUC_MINOR__ >= 0)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wclass-memaccess"
#endif
#ifndef RAPIDJSON_NOMEMBERITERATORCLASS
#define RAPIDJSON_NOMEMBERITERATORCLASS
#endif
#include <rapidjson/rapidjson.h>
#include <rapidjson/document.h>
#include <rapidjson/error/en.h>
#if (__GNUC__ == 8 && __GNUC_MINOR__ >= 0)
#pragma GCC diagnostic pop
#endif
#ifdef ASSIMP_API
# include <memory>
# include <assimp/DefaultIOSystem.h>
# include <assimp/ByteSwapper.h>
#else
# include <memory>
# define AI_SWAP4(p)
# define ai_assert
#endif
#if _MSC_VER > 1500 || (defined __GNUC___) namespace glTF {
# define ASSIMP_GLTF_USE_UNORDERED_MULTIMAP
# else
# define gltf_unordered_map map
#endif
#ifdef ASSIMP_GLTF_USE_UNORDERED_MULTIMAP
# include <unordered_map>
# if _MSC_VER > 1600
# define gltf_unordered_map unordered_map
# else
# define gltf_unordered_map tr1::unordered_map
# endif
#endif
#include "AssetLib/glTF/glTFCommon.h"
namespace glTF
{
using glTFCommon::shared_ptr; using glTFCommon::shared_ptr;
using glTFCommon::IOSystem; using glTFCommon::IOSystem;
using glTFCommon::IOStream; using glTFCommon::IOStream;

View File

@ -62,37 +62,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <string> #include <string>
#include <vector> #include <vector>
#ifndef RAPIDJSON_HAS_STDSTRING
#define RAPIDJSON_HAS_STDSTRING 1
#endif
#if (__GNUC__ == 8 && __GNUC_MINOR__ >= 0)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wclass-memaccess"
#endif
#ifndef RAPIDJSON_NOMEMBERITERATORCLASS
#define RAPIDJSON_NOMEMBERITERATORCLASS
#endif
#include <rapidjson/document.h>
#include <rapidjson/error/en.h>
#include <rapidjson/rapidjson.h>
#if (__GNUC__ == 8 && __GNUC_MINOR__ >= 0)
#pragma GCC diagnostic pop
#endif
#ifdef ASSIMP_API
#include <assimp/ByteSwapper.h>
#include <assimp/DefaultIOSystem.h>
#include <memory>
#else
#include <memory>
#define AI_SWAP4(p)
#define ai_assert
#endif
#if _MSC_VER > 1500 || (defined __GNUC___) #if _MSC_VER > 1500 || (defined __GNUC___)
#define ASSIMP_GLTF_USE_UNORDERED_MULTIMAP #define ASSIMP_GLTF_USE_UNORDERED_MULTIMAP
#else #else
@ -112,9 +81,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif #endif
#endif #endif
#include <assimp/StringUtils.h> #include "AssetLib/glTFCommon/glTFCommon.h"
#include "AssetLib/glTF/glTFCommon.h"
namespace glTF2 { namespace glTF2 {

View File

@ -40,7 +40,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---------------------------------------------------------------------- ----------------------------------------------------------------------
*/ */
#include "AssetLib/glTF/glTFCommon.h" #include "AssetLib/glTFCommon/glTFCommon.h"
#include <assimp/StringUtils.h> #include <assimp/StringUtils.h>
#include <assimp/DefaultLogger.hpp> #include <assimp/DefaultLogger.hpp>

View File

@ -38,7 +38,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---------------------------------------------------------------------- ----------------------------------------------------------------------
*/ */
#include "AssetLib/glTF/glTFCommon.h" #include "AssetLib/glTFCommon/glTFCommon.h"
namespace glTFCommon { namespace glTFCommon {

View File

@ -44,6 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_GLTF_IMPORTER #ifndef ASSIMP_BUILD_NO_GLTF_IMPORTER
#include <assimp/Exceptional.h> #include <assimp/Exceptional.h>
#include <assimp/StringUtils.h>
#include <algorithm> #include <algorithm>
#include <list> #include <list>
@ -51,13 +52,25 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
#include <vector> #include <vector>
#include <set>
#if (__GNUC__ == 8 && __GNUC_MINOR__ >= 0)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wclass-memaccess"
#endif
#define RAPIDJSON_HAS_STDSTRING 1 #define RAPIDJSON_HAS_STDSTRING 1
#define RAPIDJSON_NOMEMBERITERATORCLASS #define RAPIDJSON_NOMEMBERITERATORCLASS
#include <rapidjson/document.h> #include <rapidjson/document.h>
#include <rapidjson/error/en.h> #include <rapidjson/error/en.h>
#include <rapidjson/rapidjson.h> #include <rapidjson/rapidjson.h>
#if (__GNUC__ == 8 && __GNUC_MINOR__ >= 0)
# pragma GCC diagnostic pop
#endif
#ifdef ASSIMP_API #ifdef ASSIMP_API
# include <assimp/ByteSwapper.h> # include <assimp/ByteSwapper.h>
# include <assimp/DefaultIOSystem.h> # include <assimp/DefaultIOSystem.h>
@ -80,6 +93,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# define gltf_unordered_map unordered_map # define gltf_unordered_map unordered_map
# else # else
# define gltf_unordered_map tr1::unordered_map # define gltf_unordered_map tr1::unordered_map
# define gltf_unordered_set set
# endif # endif
#endif #endif

View File

@ -818,8 +818,8 @@ ADD_ASSIMP_IMPORTER( X3D
) )
ADD_ASSIMP_IMPORTER( GLTF ADD_ASSIMP_IMPORTER( GLTF
AssetLib/glTF/glTFCommon.h AssetLib/glTFCommon/glTFCommon.h
AssetLib/glTF/glTFCommon.cpp AssetLib/glTFCommon/glTFCommon.cpp
AssetLib/glTF/glTFAsset.h AssetLib/glTF/glTFAsset.h
AssetLib/glTF/glTFAsset.inl AssetLib/glTF/glTFAsset.inl
AssetLib/glTF/glTFAssetWriter.h AssetLib/glTF/glTFAssetWriter.h