Merge branch 'master' of github.com:acgessler/assimp-gsoc2012-fbx

pull/14/head
Alexander Gessler 2012-07-08 01:29:49 +02:00
commit ab93c6f38e
10 changed files with 19 additions and 24 deletions

View File

@ -20,7 +20,7 @@ set(CPACK_COMPONENTS_ALL assimp-bin ${LIBASSIMP_COMPONENT} assimp-dev)
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
add_definitions(-fPIC) # this is a very important switch and some libraries seem now to have it....
## hide all not-exported symbols
add_definitions( -fvisibility=hidden )
add_definitions( -fvisibility=hidden -Wall )
endif()
INCLUDE (FindPkgConfig)

View File

@ -465,8 +465,8 @@ Geometry::~Geometry()
// ------------------------------------------------------------------------------------------------
Document::Document(const Parser& parser, const ImportSettings& settings)
: parser(parser)
, settings(settings)
: settings(settings)
, parser(parser)
{
// cannot use array default initialization syntax because vc8 fails on it
for (unsigned int i = 0; i < 7; ++i) {
@ -707,9 +707,9 @@ std::vector<const Connection*> Document::GetConnectionsByDestinationSequenced(ui
// ------------------------------------------------------------------------------------------------
Connection::Connection(uint64_t insertionOrder, uint64_t src, uint64_t dest, const std::string& prop, const Document& doc)
: insertionOrder(insertionOrder)
, prop(prop)
, src(src)
, dest(dest)
, prop(prop)
, doc(doc)
{
ai_assert(doc.Objects().find(src) != doc.Objects().end());

View File

@ -72,9 +72,6 @@ MeshGeometry::MeshGeometry(uint64_t id, const Element& element, const std::strin
// optional Mesh elements:
const ElementCollection& Layer = sc->GetCollection("Layer");
const ElementCollection& LayerElementMaterial = sc->GetCollection("LayerElementMaterial");
const ElementCollection& LayerElementUV = sc->GetCollection("LayerElementUV");
const ElementCollection& LayerElementNormal = sc->GetCollection("LayerElementNormal");
std::vector<aiVector3D> tempVerts;
ReadVectorDataArray(tempVerts,Vertices);

View File

@ -165,9 +165,9 @@ Scope::~Scope()
// ------------------------------------------------------------------------------------------------
Parser::Parser (const TokenList& tokens)
: tokens(tokens)
, cursor(tokens.begin())
, current()
, last()
, current()
, cursor(tokens.begin())
{
root.reset(new Scope(*this,true));
}
@ -276,7 +276,6 @@ float ParseTokenAsFloat(const Token& t, const char*& err_out)
return 0.0f;
}
const char* inout = t.begin();
// need to copy the input string to a temporary buffer
// first - next in the fbx token stream comes ',',

View File

@ -129,15 +129,15 @@ std::string PeekPropertyName(const Element& element)
// ------------------------------------------------------------------------------------------------
PropertyTable::PropertyTable()
: element()
, templateProps()
: templateProps()
, element()
{
}
// ------------------------------------------------------------------------------------------------
PropertyTable::PropertyTable(const Element& element, boost::shared_ptr<const PropertyTable> templateProps)
: element(&element)
, templateProps(templateProps)
: templateProps(templateProps)
, element(&element)
{
const Scope& scope = GetRequiredScope(element);
BOOST_FOREACH(const ElementMap::value_type& v, scope.Elements()) {

View File

@ -123,10 +123,10 @@ void FillMaterial(aiMaterial* mat,const IFC::IfcSurfaceStyle* surf,ConversionDat
}
}
}
}
} /*
else if (const IFC::IfcSurfaceStyleWithTextures* tex = sel2->ResolveSelectPtr<IFC::IfcSurfaceStyleWithTextures>(conv.db)) {
// XXX
}
} */
}
}

View File

@ -113,8 +113,7 @@ void M3Importer::InternReadFile( const std::string& pFile, aiScene* pScene, IOSy
}
m_Buffer.resize( filesize );
size_t readsize = file->Read( &m_Buffer[ 0 ], sizeof( unsigned char ), filesize );
ai_assert( readsize == filesize );
file->Read( &m_Buffer[ 0 ], sizeof( unsigned char ), filesize );
m_pHead = reinterpret_cast<MD33*>( &m_Buffer[ 0 ] );
m_pRefs = reinterpret_cast<ReferenceEntry*>( &m_Buffer[ 0 ] + m_pHead->ofsRefs );

View File

@ -394,7 +394,7 @@ aiNode* XGLImporter::ReadObject(TempScope& scope, bool skipFirst, const char* cl
// XXX
}
else if (s == "meshref") {
const int id = ReadIndexFromText();
const unsigned int id = static_cast<unsigned int>( ReadIndexFromText() );
std::multimap<unsigned int, aiMesh*>::iterator it = scope.meshes.find(id), end = scope.meshes.end();
if (it == end) {

View File

@ -119,10 +119,10 @@ void Triangle::ClearDelunayEdges()
Point* Triangle::OppositePoint(Triangle& t, Point& p)
{
Point *cw = t.PointCW(p);
double x = cw->x;
double y = cw->y;
x = p.x;
y = p.y;
//double x = cw->x;
//double y = cw->y;
//x = p.x;
//y = p.y;
return PointCW(*cw);
}

View File

@ -754,7 +754,7 @@ void Sweep::FlipScanEdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle&
Sweep::~Sweep() {
// Clean up memory
for(int i = 0; i < nodes_.size(); i++) {
for(unsigned int i = 0; i < nodes_.size(); i++) {
delete nodes_[i];
}