commit
89eb7f889a
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
||||||
|
|
||||||
Copyright (c) 2006-2020, assimp team
|
Copyright (c) 2006-2020, assimp team
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use of this software in source and binary forms,
|
Redistribution and use of this software in source and binary forms,
|
||||||
|
@ -52,27 +50,32 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
template <size_t sizeOfPointer>
|
template <size_t sizeOfPointer>
|
||||||
size_t select_ftell(FILE *file) {
|
inline size_t select_ftell(FILE *file) {
|
||||||
return ::ftell(file);
|
return ::ftell(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <size_t sizeOfPointer>
|
template <size_t sizeOfPointer>
|
||||||
int select_fseek(FILE *file, int64_t offset, int origin) {
|
inline int select_fseek(FILE *file, int64_t offset, int origin) {
|
||||||
return ::fseek(file, static_cast<long>(offset), origin);
|
return ::fseek(file, static_cast<long>(offset), origin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#if defined _WIN32 && (!defined __GNUC__ || __MSVCRT_VERSION__ >= 0x0601)
|
#if defined _WIN32 && (!defined __GNUC__ || __MSVCRT_VERSION__ >= 0x0601)
|
||||||
template <>
|
template <>
|
||||||
size_t select_ftell<8>(FILE *file) {
|
inline size_t select_ftell<8>(FILE *file) {
|
||||||
return (size_t)::_ftelli64(file);
|
return (size_t)::_ftelli64(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
int select_fseek<8>(FILE *file, int64_t offset, int origin) {
|
inline int select_fseek<8>(FILE *file, int64_t offset, int origin) {
|
||||||
return ::_fseeki64(file, offset, origin);
|
return ::_fseeki64(file, offset, origin);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
#endif // #if defined _WIN32 && (!defined __GNUC__ || __MSVCRT_VERSION__ >= 0x0601)
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------------
|
||||||
|
|
|
@ -64,6 +64,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "Common/PolyTools.h"
|
#include "Common/PolyTools.h"
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
//#define AI_BUILD_TRIANGULATE_COLOR_FACE_WINDING
|
//#define AI_BUILD_TRIANGULATE_COLOR_FACE_WINDING
|
||||||
//#define AI_BUILD_TRIANGULATE_DEBUG_POLYS
|
//#define AI_BUILD_TRIANGULATE_DEBUG_POLYS
|
||||||
|
@ -141,7 +142,7 @@ bool TriangulateProcess::TriangulateMesh( aiMesh* pMesh)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find out how many output faces we'll get
|
// Find out how many output faces we'll get
|
||||||
unsigned int numOut = 0, max_out = 0;
|
uint32_t numOut = 0, max_out = 0;
|
||||||
bool get_normals = true;
|
bool get_normals = true;
|
||||||
for( unsigned int a = 0; a < pMesh->mNumFaces; a++) {
|
for( unsigned int a = 0; a < pMesh->mNumFaces; a++) {
|
||||||
aiFace& face = pMesh->mFaces[a];
|
aiFace& face = pMesh->mFaces[a];
|
||||||
|
|
Loading…
Reference in New Issue