instead of an own version.
pull/941/head
Kim Kulling 2016-07-08 18:30:26 +02:00
parent 7c63208515
commit 070fb3363f
5 changed files with 8 additions and 12 deletions

View File

@ -50,6 +50,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "BlenderBMesh.h" #include "BlenderBMesh.h"
#include "BlenderTessellator.h" #include "BlenderTessellator.h"
#include <stddef.h>
static const unsigned int BLEND_TESS_MAGIC = 0x83ed9ac3; static const unsigned int BLEND_TESS_MAGIC = 0x83ed9ac3;
#if ASSIMP_BLEND_WITH_GLU_TESSELLATE #if ASSIMP_BLEND_WITH_GLU_TESSELLATE
@ -373,13 +375,13 @@ void BlenderTessellatorP2T::ReferencePoints( std::vector< Blender::PointP2T >& p
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
// Yes this is filthy... but we have no choice // Yes this is filthy... but we have no choice
#define OffsetOf( Class, Member ) ( static_cast< unsigned int >( \ /*#define OffsetOf( Class, Member ) ( static_cast< unsigned int >( \
reinterpret_cast<uint8_t*>(&( reinterpret_cast< Class* >( NULL )->*( &Class::Member ) )) - \ reinterpret_cast<uint8_t*>(&( reinterpret_cast< Class* >( NULL )->*( &Class::Member ) )) - \
static_cast<uint8_t*>(NULL) ) ) static_cast<uint8_t*>(NULL) ) )
*/
inline PointP2T& BlenderTessellatorP2T::GetActualPointStructure( p2t::Point& point ) const inline PointP2T& BlenderTessellatorP2T::GetActualPointStructure( p2t::Point& point ) const
{ {
unsigned int pointOffset = OffsetOf( PointP2T, point2D ); unsigned int pointOffset = offsetof( PointP2T, point2D );
PointP2T& pointStruct = *reinterpret_cast< PointP2T* >( reinterpret_cast< char* >( &point ) - pointOffset ); PointP2T& pointStruct = *reinterpret_cast< PointP2T* >( reinterpret_cast< char* >( &point ) - pointOffset );
if ( pointStruct.magic != static_cast<int>( BLEND_TESS_MAGIC ) ) if ( pointStruct.magic != static_cast<int>( BLEND_TESS_MAGIC ) )
{ {

Binary file not shown.

View File

@ -43,18 +43,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/scene.h> #include <assimp/scene.h>
#include <LimitBoneWeightsProcess.h> #include <LimitBoneWeightsProcess.h>
using namespace std; using namespace std;
using namespace Assimp; using namespace Assimp;
class LimitBoneWeightsTest : public ::testing::Test { class LimitBoneWeightsTest : public ::testing::Test {
public: public:
virtual void SetUp(); virtual void SetUp();
virtual void TearDown(); virtual void TearDown();
protected: protected:
LimitBoneWeightsProcess* piProcess; LimitBoneWeightsProcess* piProcess;
aiMesh* pcMesh; aiMesh* pcMesh;
}; };

View File

@ -43,19 +43,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/scene.h> #include <assimp/scene.h>
#include <MaterialSystem.h> #include <MaterialSystem.h>
using namespace ::std;
using namespace std; using namespace ::Assimp;
using namespace Assimp;
class MaterialSystemTest : public ::testing::Test class MaterialSystemTest : public ::testing::Test
{ {
public: public:
virtual void SetUp() { this->pcMat = new aiMaterial(); } virtual void SetUp() { this->pcMat = new aiMaterial(); }
virtual void TearDown() { delete this->pcMat; } virtual void TearDown() { delete this->pcMat; }
protected: protected:
aiMaterial* pcMat; aiMaterial* pcMat;
}; };

View File

@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "UnitTestPCH.h" #include "UnitTestPCH.h"
#include <iostream> #include <iostream>
using namespace Assimp; using namespace ::Assimp;
class utMatrix3x3Test : public ::testing::Test { class utMatrix3x3Test : public ::testing::Test {