Merge branch 'master' into stackallocator-undefined-ref-fix
commit
64620aaa2c
|
@ -53,7 +53,8 @@ namespace Assimp {
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Constructor to be privately used by Importer
|
// Constructor to be privately used by Importer
|
||||||
LimitBoneWeightsProcess::LimitBoneWeightsProcess() : mMaxWeights(AI_LMW_MAX_WEIGHTS) {
|
LimitBoneWeightsProcess::LimitBoneWeightsProcess() :
|
||||||
|
mMaxWeights(AI_LMW_MAX_WEIGHTS), mRemoveEmptyBones(true) {
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,10 +13,14 @@
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
/* For Visual Studio only, NOT MinGW (GCC) -- ThatOSDev */
|
||||||
|
#pragma warning( disable : 4706 )
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(__WIN32__) || defined(_MSC_VER) || \
|
#if defined(_WIN32) || defined(__WIN32__) || defined(_MSC_VER) || \
|
||||||
defined(__MINGW32__)
|
defined(__MINGW32__)
|
||||||
/* Win32, DOS, MSVC, MSVS */
|
/* Win32, DOS, MSVC, MSVS, MinGW(GCC for windows) */
|
||||||
#pragma warning( disable : 4706 )
|
|
||||||
#include <direct.h>
|
#include <direct.h>
|
||||||
|
|
||||||
#define STRCLONE(STR) ((STR) ? _strdup(STR) : NULL)
|
#define STRCLONE(STR) ((STR) ? _strdup(STR) : NULL)
|
||||||
|
|
|
@ -113,19 +113,19 @@ struct aiMetadata;
|
||||||
*/
|
*/
|
||||||
// -------------------------------------------------------------------------------
|
// -------------------------------------------------------------------------------
|
||||||
|
|
||||||
inline aiMetadataType GetAiType(bool) {
|
inline aiMetadataType GetAiType(const bool &) {
|
||||||
return AI_BOOL;
|
return AI_BOOL;
|
||||||
}
|
}
|
||||||
inline aiMetadataType GetAiType(int32_t) {
|
inline aiMetadataType GetAiType(int32_t) {
|
||||||
return AI_INT32;
|
return AI_INT32;
|
||||||
}
|
}
|
||||||
inline aiMetadataType GetAiType(uint64_t) {
|
inline aiMetadataType GetAiType(const uint64_t &) {
|
||||||
return AI_UINT64;
|
return AI_UINT64;
|
||||||
}
|
}
|
||||||
inline aiMetadataType GetAiType(float) {
|
inline aiMetadataType GetAiType(const float &) {
|
||||||
return AI_FLOAT;
|
return AI_FLOAT;
|
||||||
}
|
}
|
||||||
inline aiMetadataType GetAiType(double) {
|
inline aiMetadataType GetAiType(const double &) {
|
||||||
return AI_DOUBLE;
|
return AI_DOUBLE;
|
||||||
}
|
}
|
||||||
inline aiMetadataType GetAiType(const aiString &) {
|
inline aiMetadataType GetAiType(const aiString &) {
|
||||||
|
@ -137,10 +137,10 @@ inline aiMetadataType GetAiType(const aiVector3D &) {
|
||||||
inline aiMetadataType GetAiType(const aiMetadata &) {
|
inline aiMetadataType GetAiType(const aiMetadata &) {
|
||||||
return AI_AIMETADATA;
|
return AI_AIMETADATA;
|
||||||
}
|
}
|
||||||
inline aiMetadataType GetAiType(int64_t) {
|
inline aiMetadataType GetAiType(const int64_t &) {
|
||||||
return AI_INT64;
|
return AI_INT64;
|
||||||
}
|
}
|
||||||
inline aiMetadataType GetAiType(uint32_t) {
|
inline aiMetadataType GetAiType(const uint32_t &) {
|
||||||
return AI_UINT32;
|
return AI_UINT32;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -379,7 +379,7 @@ enum aiPostProcessSteps
|
||||||
* point primitives to separate meshes.
|
* point primitives to separate meshes.
|
||||||
* </li>
|
* </li>
|
||||||
* <li>Set the <tt>#AI_CONFIG_PP_SBP_REMOVE</tt> importer property to
|
* <li>Set the <tt>#AI_CONFIG_PP_SBP_REMOVE</tt> importer property to
|
||||||
* @code aiPrimitiveType_POINTS | aiPrimitiveType_LINES
|
* @code aiPrimitiveType_POINT | aiPrimitiveType_LINE
|
||||||
* @endcode to cause SortByPType to reject point
|
* @endcode to cause SortByPType to reject point
|
||||||
* and line meshes from the scene.
|
* and line meshes from the scene.
|
||||||
* </li>
|
* </li>
|
||||||
|
|
|
@ -270,7 +270,7 @@ aiProcess_SortByPType = 0x8000
|
||||||
# point primitives to separate meshes.
|
# point primitives to separate meshes.
|
||||||
# <li>
|
# <li>
|
||||||
# <li>Set the <tt>AI_CONFIG_PP_SBP_REMOVE<tt> option to
|
# <li>Set the <tt>AI_CONFIG_PP_SBP_REMOVE<tt> option to
|
||||||
# @code aiPrimitiveType_POINTS | aiPrimitiveType_LINES
|
# @code aiPrimitiveType_POINT | aiPrimitiveType_LINE
|
||||||
# @endcode to cause SortByPType to reject point
|
# @endcode to cause SortByPType to reject point
|
||||||
# and line meshes from the scene.
|
# and line meshes from the scene.
|
||||||
# <li>
|
# <li>
|
||||||
|
|
|
@ -348,7 +348,7 @@ extern ( C ) {
|
||||||
* <li>Specify the <code>SortByPType</code> flag. This moves line and
|
* <li>Specify the <code>SortByPType</code> flag. This moves line and
|
||||||
* point primitives to separate meshes.</li>
|
* point primitives to separate meshes.</li>
|
||||||
* <li>Set the <code>AI_CONFIG_PP_SBP_REMOVE</codet> option to
|
* <li>Set the <code>AI_CONFIG_PP_SBP_REMOVE</codet> option to
|
||||||
* <code>aiPrimitiveType_POINTS | aiPrimitiveType_LINES</code>
|
* <code>aiPrimitiveType_POINT | aiPrimitiveType_LINE</code>
|
||||||
* to cause SortByPType to reject point and line meshes from the
|
* to cause SortByPType to reject point and line meshes from the
|
||||||
* scene.</li>
|
* scene.</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
|
|
|
@ -349,7 +349,7 @@ public enum AiPostProcessSteps {
|
||||||
* <li>Specify the #SortByPType flag. This moves line and point
|
* <li>Specify the #SortByPType flag. This moves line and point
|
||||||
* primitives to separate meshes.
|
* primitives to separate meshes.
|
||||||
* <li>Set the <tt>AI_CONFIG_PP_SBP_REMOVE</tt> option to
|
* <li>Set the <tt>AI_CONFIG_PP_SBP_REMOVE</tt> option to
|
||||||
* <code>aiPrimitiveType_POINTS | aiPrimitiveType_LINES</code>
|
* <code>aiPrimitiveType_POINT | aiPrimitiveType_LINE</code>
|
||||||
* to cause SortByPType to reject point and line meshes from the
|
* to cause SortByPType to reject point and line meshes from the
|
||||||
* scene.
|
* scene.
|
||||||
* </ul>
|
* </ul>
|
||||||
|
|
|
@ -242,6 +242,22 @@ TEST_F( utMetadata, copy_test ) {
|
||||||
EXPECT_EQ( i32v, v );
|
EXPECT_EQ( i32v, v );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// uint32_t test
|
||||||
|
{
|
||||||
|
uint32_t v = 0;
|
||||||
|
bool ok = copy.Get("uint32_t", v);
|
||||||
|
EXPECT_TRUE(ok);
|
||||||
|
EXPECT_EQ( ui32, v );
|
||||||
|
}
|
||||||
|
|
||||||
|
// int64_t test
|
||||||
|
{
|
||||||
|
int64_t v = -1;
|
||||||
|
bool ok = copy.Get("int64_t", v);
|
||||||
|
EXPECT_TRUE(ok);
|
||||||
|
EXPECT_EQ( i64, v );
|
||||||
|
}
|
||||||
|
|
||||||
// uint64_t test
|
// uint64_t test
|
||||||
{
|
{
|
||||||
uint64_t v = 255;
|
uint64_t v = 255;
|
||||||
|
@ -264,14 +280,14 @@ TEST_F( utMetadata, copy_test ) {
|
||||||
EXPECT_EQ( dv, v );
|
EXPECT_EQ( dv, v );
|
||||||
}
|
}
|
||||||
|
|
||||||
// bool test
|
// string test
|
||||||
{
|
{
|
||||||
aiString v;
|
aiString v;
|
||||||
EXPECT_TRUE( copy.Get( "aiString", v ) );
|
EXPECT_TRUE( copy.Get( "aiString", v ) );
|
||||||
EXPECT_EQ( strVal, v );
|
EXPECT_EQ( strVal, v );
|
||||||
}
|
}
|
||||||
|
|
||||||
// bool test
|
// vector test
|
||||||
{
|
{
|
||||||
aiVector3D v;
|
aiVector3D v;
|
||||||
EXPECT_TRUE( copy.Get( "aiVector3D", v ) );
|
EXPECT_TRUE( copy.Get( "aiVector3D", v ) );
|
||||||
|
|
Loading…
Reference in New Issue