merge with git://github.com/tonttu/assimp.git
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1029 67173fc5-114c-0410-ac8e-9d2fd5bffc1fpull/1/head
parent
2de55ee880
commit
9edc0a9b8e
|
@ -433,7 +433,7 @@ void Discreet3DSImporter::ConvertMeshes(aiScene* pcOut)
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Add a node to the scenegraph and setup its final transformation
|
// Add a node to the scenegraph and setup its final transformation
|
||||||
void Discreet3DSImporter::AddNodeToGraph(aiScene* pcSOut,aiNode* pcOut,
|
void Discreet3DSImporter::AddNodeToGraph(aiScene* pcSOut,aiNode* pcOut,
|
||||||
D3DS::Node* pcIn, aiMatrix4x4& absTrafo)
|
D3DS::Node* pcIn, aiMatrix4x4& /*absTrafo*/)
|
||||||
{
|
{
|
||||||
std::vector<unsigned int> iArray;
|
std::vector<unsigned int> iArray;
|
||||||
iArray.reserve(3);
|
iArray.reserve(3);
|
||||||
|
|
|
@ -117,7 +117,7 @@ void Discreet3DSImporter::GetExtensionList(std::set<std::string>& extensions)
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Setup configuration properties
|
// Setup configuration properties
|
||||||
void Discreet3DSImporter::SetupProperties(const Importer* pImp)
|
void Discreet3DSImporter::SetupProperties(const Importer* /*pImp*/)
|
||||||
{
|
{
|
||||||
// nothing to be done for the moment
|
// nothing to be done for the moment
|
||||||
}
|
}
|
||||||
|
@ -1373,6 +1373,7 @@ void Discreet3DSImporter::ParseColorChunk(aiColor3D* out,
|
||||||
// Skip unknown chunks, hope this won't cause any problems.
|
// Skip unknown chunks, hope this won't cause any problems.
|
||||||
return ParseColorChunk(out,acceptPercent);
|
return ParseColorChunk(out,acceptPercent);
|
||||||
};
|
};
|
||||||
|
(void)bGamma;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // !! ASSIMP_BUILD_NO_3DS_IMPORTER
|
#endif // !! ASSIMP_BUILD_NO_3DS_IMPORTER
|
||||||
|
|
|
@ -62,7 +62,7 @@ using namespace std;
|
||||||
//#define DEBUG_B3D
|
//#define DEBUG_B3D
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
bool B3DImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const{
|
bool B3DImporter::CanRead( const std::string& pFile, IOSystem* /*pIOHandler*/, bool /*checkSig*/) const{
|
||||||
|
|
||||||
size_t pos=pFile.find_last_of( '.' );
|
size_t pos=pFile.find_last_of( '.' );
|
||||||
if( pos==string::npos ) return false;
|
if( pos==string::npos ) return false;
|
||||||
|
|
|
@ -290,7 +290,7 @@ void BVHLoader::ReadNodeChannels( BVHLoader::Node& pNode)
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Reads the motion data
|
// Reads the motion data
|
||||||
void BVHLoader::ReadMotion( aiScene* pScene)
|
void BVHLoader::ReadMotion( aiScene* /*pScene*/)
|
||||||
{
|
{
|
||||||
// Read number of frames
|
// Read number of frames
|
||||||
std::string tokenFrames = GetNextToken();
|
std::string tokenFrames = GetNextToken();
|
||||||
|
|
|
@ -98,7 +98,7 @@ aiScene* BaseImporter::ReadFile(const Importer* pImp, const std::string& pFile,
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void BaseImporter::SetupProperties(const Importer* pImp)
|
void BaseImporter::SetupProperties(const Importer* /*pImp*/)
|
||||||
{
|
{
|
||||||
// the default implementation does nothing
|
// the default implementation does nothing
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,7 @@ void BaseProcess::ExecuteOnScene( Importer* pImp)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void BaseProcess::SetupProperties(const Importer* pImp)
|
void BaseProcess::SetupProperties(const Importer* /*pImp*/)
|
||||||
{
|
{
|
||||||
// the default implementation does nothing
|
// the default implementation does nothing
|
||||||
}
|
}
|
||||||
|
|
|
@ -288,7 +288,7 @@ boost::shared_ptr< ElemBase > DNA :: ConvertBlobToStructure(
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
DNA::FactoryPair DNA :: GetBlobToStructureConverter(
|
DNA::FactoryPair DNA :: GetBlobToStructureConverter(
|
||||||
const Structure& structure,
|
const Structure& structure,
|
||||||
const FileDatabase& db
|
const FileDatabase& /*db*/
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
std::map<std::string, FactoryPair>::const_iterator it = converters.find(structure.name);
|
std::map<std::string, FactoryPair>::const_iterator it = converters.find(structure.name);
|
||||||
|
|
|
@ -376,7 +376,7 @@ template <> struct Structure :: _defaultInitializer<ErrorPolicy_Warn> {
|
||||||
template <> struct Structure :: _defaultInitializer<ErrorPolicy_Fail> {
|
template <> struct Structure :: _defaultInitializer<ErrorPolicy_Fail> {
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void operator ()(T& out,const char* = "") {
|
void operator ()(T& /*out*/,const char* = "") {
|
||||||
// obviously, it is crucial that _DefaultInitializer is used
|
// obviously, it is crucial that _DefaultInitializer is used
|
||||||
// only from within a catch clause.
|
// only from within a catch clause.
|
||||||
throw;
|
throw;
|
||||||
|
@ -681,7 +681,7 @@ public:
|
||||||
|
|
||||||
ObjectCache(const FileDatabase&) {}
|
ObjectCache(const FileDatabase&) {}
|
||||||
|
|
||||||
template <typename T> void get(const Structure&, vector<T>&t, const Pointer&) {}
|
template <typename T> void get(const Structure&, vector<T>&, const Pointer&) {}
|
||||||
template <typename T> void set(const Structure&, const vector<T>&, const Pointer&) {}
|
template <typename T> void set(const Structure&, const vector<T>&, const Pointer&) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -701,9 +701,9 @@ public:
|
||||||
|
|
||||||
|
|
||||||
FileDatabase()
|
FileDatabase()
|
||||||
: next_cache_idx()
|
: _cacheArrays(*this)
|
||||||
, _cacheArrays(*this)
|
|
||||||
, _cache(*this)
|
, _cache(*this)
|
||||||
|
, next_cache_idx()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -727,12 +727,12 @@ public:
|
||||||
// arrays of objects are never cached because we can't easily
|
// arrays of objects are never cached because we can't easily
|
||||||
// ensure their proper destruction.
|
// ensure their proper destruction.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
ObjectCache<boost::shared_ptr>& cache(boost::shared_ptr<T>& in) const {
|
ObjectCache<boost::shared_ptr>& cache(boost::shared_ptr<T>& /*in*/) const {
|
||||||
return _cache;
|
return _cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
ObjectCache<vector>& cache(vector<T>& in) const {
|
ObjectCache<vector>& cache(vector<T>& /*in*/) const {
|
||||||
return _cacheArrays;
|
return _cacheArrays;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -348,7 +348,7 @@ void Structure :: ResolvePointer(TOUT<T>& out, const Pointer & ptrval, const Fil
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------
|
||||||
inline void Structure :: ResolvePointer( boost::shared_ptr< FileOffset >& out, const Pointer & ptrval, const FileDatabase& db, const Field& f) const
|
inline void Structure :: ResolvePointer( boost::shared_ptr< FileOffset >& out, const Pointer & ptrval, const FileDatabase& db, const Field& /*f*/) const
|
||||||
{
|
{
|
||||||
// Currently used exclusively by PackedFile::data to represent
|
// Currently used exclusively by PackedFile::data to represent
|
||||||
// a simple offset into the mapped BLEND file.
|
// a simple offset into the mapped BLEND file.
|
||||||
|
@ -402,7 +402,7 @@ void Structure :: ResolvePointer(vector< TOUT<T> >& out, const Pointer & ptrval,
|
||||||
template <> void Structure :: ResolvePointer<boost::shared_ptr,ElemBase>(boost::shared_ptr<ElemBase>& out,
|
template <> void Structure :: ResolvePointer<boost::shared_ptr,ElemBase>(boost::shared_ptr<ElemBase>& out,
|
||||||
const Pointer & ptrval,
|
const Pointer & ptrval,
|
||||||
const FileDatabase& db,
|
const FileDatabase& db,
|
||||||
const Field& f
|
const Field& /*f*/
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
// Special case when the data type needs to be determined at runtime.
|
// Special case when the data type needs to be determined at runtime.
|
||||||
|
|
|
@ -127,7 +127,7 @@ const aiLoaderDesc& BlenderImporter::GetInfo () const
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Setup configuration properties for the loader
|
// Setup configuration properties for the loader
|
||||||
void BlenderImporter::SetupProperties(const Importer* pImp)
|
void BlenderImporter::SetupProperties(const Importer* /*pImp*/)
|
||||||
{
|
{
|
||||||
// nothing to be done for the moment
|
// nothing to be done for the moment
|
||||||
}
|
}
|
||||||
|
@ -400,7 +400,7 @@ void BlenderImporter::ConvertBlendFile(aiScene* out, const Scene& in,const FileD
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void BlenderImporter::ResolveImage(MaterialHelper* out, const Material* mat, const MTex* tex, const Image* img, ConversionData& conv_data)
|
void BlenderImporter::ResolveImage(MaterialHelper* out, const Material* mat, const MTex* tex, const Image* img, ConversionData& conv_data)
|
||||||
{
|
{
|
||||||
mat; tex; conv_data;
|
(void)mat; (void)tex; (void)conv_data;
|
||||||
aiString name;
|
aiString name;
|
||||||
|
|
||||||
// check if the file contents are bundled with the BLEND file
|
// check if the file contents are bundled with the BLEND file
|
||||||
|
@ -445,7 +445,7 @@ void BlenderImporter::ResolveImage(MaterialHelper* out, const Material* mat, con
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void BlenderImporter::AddSentinelTexture(MaterialHelper* out, const Material* mat, const MTex* tex, ConversionData& conv_data)
|
void BlenderImporter::AddSentinelTexture(MaterialHelper* out, const Material* mat, const MTex* tex, ConversionData& conv_data)
|
||||||
{
|
{
|
||||||
mat; tex; conv_data;
|
(void)mat; (void)tex; (void)conv_data;
|
||||||
|
|
||||||
aiString name;
|
aiString name;
|
||||||
name.length = sprintf(name.data, "Procedural,num=%i,type=%s",conv_data.sentinel_cnt++,
|
name.length = sprintf(name.data, "Procedural,num=%i,type=%s",conv_data.sentinel_cnt++,
|
||||||
|
@ -600,7 +600,7 @@ void BlenderImporter::NotSupportedObjectType(const Object* obj, const char* type
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void BlenderImporter::ConvertMesh(const Scene& in, const Object* obj, const Mesh* mesh,
|
void BlenderImporter::ConvertMesh(const Scene& /*in*/, const Object* /*obj*/, const Mesh* mesh,
|
||||||
ConversionData& conv_data, TempArray<std::vector,aiMesh>& temp
|
ConversionData& conv_data, TempArray<std::vector,aiMesh>& temp
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -847,7 +847,7 @@ void BlenderImporter::ConvertMesh(const Scene& in, const Object* obj, const Mesh
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
aiCamera* BlenderImporter::ConvertCamera(const Scene& in, const Object* obj, const Camera* mesh, ConversionData& conv_data)
|
aiCamera* BlenderImporter::ConvertCamera(const Scene& /*in*/, const Object* /*obj*/, const Camera* /*mesh*/, ConversionData& /*conv_data*/)
|
||||||
{
|
{
|
||||||
ScopeGuard<aiCamera> out(new aiCamera());
|
ScopeGuard<aiCamera> out(new aiCamera());
|
||||||
|
|
||||||
|
@ -855,7 +855,7 @@ aiCamera* BlenderImporter::ConvertCamera(const Scene& in, const Object* obj, con
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
aiLight* BlenderImporter::ConvertLight(const Scene& in, const Object* obj, const Lamp* mesh, ConversionData& conv_data)
|
aiLight* BlenderImporter::ConvertLight(const Scene& /*in*/, const Object* /*obj*/, const Lamp* /*mesh*/, ConversionData& /*conv_data*/)
|
||||||
{
|
{
|
||||||
ScopeGuard<aiLight> out(new aiLight());
|
ScopeGuard<aiLight> out(new aiLight());
|
||||||
|
|
||||||
|
|
|
@ -178,7 +178,7 @@ bool BlenderModifier_Mirror :: IsActive (const ModifierData& modin)
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void BlenderModifier_Mirror :: DoIt(aiNode& out, ConversionData& conv_data, const ElemBase& orig_modifier,
|
void BlenderModifier_Mirror :: DoIt(aiNode& out, ConversionData& conv_data, const ElemBase& orig_modifier,
|
||||||
const Scene& in,
|
const Scene& /*in*/,
|
||||||
const Object& orig_object )
|
const Object& orig_object )
|
||||||
{
|
{
|
||||||
// hijacking the ABI, see the big note in BlenderModifierShowcase::ApplyModifiers()
|
// hijacking the ABI, see the big note in BlenderModifierShowcase::ApplyModifiers()
|
||||||
|
@ -271,7 +271,7 @@ bool BlenderModifier_Subdivision :: IsActive (const ModifierData& modin)
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void BlenderModifier_Subdivision :: DoIt(aiNode& out, ConversionData& conv_data, const ElemBase& orig_modifier,
|
void BlenderModifier_Subdivision :: DoIt(aiNode& out, ConversionData& conv_data, const ElemBase& orig_modifier,
|
||||||
const Scene& in,
|
const Scene& /*in*/,
|
||||||
const Object& orig_object )
|
const Object& orig_object )
|
||||||
{
|
{
|
||||||
// hijacking the ABI, see the big note in BlenderModifierShowcase::ApplyModifiers()
|
// hijacking the ABI, see the big note in BlenderModifierShowcase::ApplyModifiers()
|
||||||
|
|
|
@ -64,7 +64,7 @@ public:
|
||||||
|
|
||||||
// --------------------
|
// --------------------
|
||||||
/** Check if *this* modifier is active, given a ModifierData& block.*/
|
/** Check if *this* modifier is active, given a ModifierData& block.*/
|
||||||
virtual bool IsActive( const ModifierData& modin) {
|
virtual bool IsActive( const ModifierData& /*modin*/) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,11 +72,11 @@ public:
|
||||||
/** Apply the modifier to a given output node. The original data used
|
/** Apply the modifier to a given output node. The original data used
|
||||||
* to construct the node is given as well. Not called unless IsActive()
|
* to construct the node is given as well. Not called unless IsActive()
|
||||||
* was called and gave positive response. */
|
* was called and gave positive response. */
|
||||||
virtual void DoIt(aiNode& out,
|
virtual void DoIt(aiNode& /*out*/,
|
||||||
ConversionData& conv_data,
|
ConversionData& /*conv_data*/,
|
||||||
const ElemBase& orig_modifier,
|
const ElemBase& orig_modifier,
|
||||||
const Scene& in,
|
const Scene& /*in*/,
|
||||||
const Object& orig_object
|
const Object& /*orig_object*/
|
||||||
) {
|
) {
|
||||||
DefaultLogger::get()->warn((Formatter::format("This modifier is not supported, skipping: "),orig_modifier.dna_type));
|
DefaultLogger::get()->warn((Formatter::format("This modifier is not supported, skipping: "),orig_modifier.dna_type));
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -56,13 +56,13 @@ class BlobIOStream : public IOStream
|
||||||
public:
|
public:
|
||||||
|
|
||||||
BlobIOStream(BlobIOSystem* creator, const std::string& file, size_t initial = 4096)
|
BlobIOStream(BlobIOSystem* creator, const std::string& file, size_t initial = 4096)
|
||||||
: file_size()
|
: buffer()
|
||||||
, cursor()
|
|
||||||
, buffer()
|
|
||||||
, creator(creator)
|
|
||||||
, file(file)
|
|
||||||
, cur_size()
|
, cur_size()
|
||||||
|
, file_size()
|
||||||
|
, cursor()
|
||||||
, initial(initial)
|
, initial(initial)
|
||||||
|
, file(file)
|
||||||
|
, creator(creator)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ namespace boost {
|
||||||
|
|
||||||
|
|
||||||
#define BOOST_STATIC_ASSERT(eval) \
|
#define BOOST_STATIC_ASSERT(eval) \
|
||||||
{boost::detail::static_assertion_failure<(eval)> assert_dummy;assert_dummy;}
|
{boost::detail::static_assertion_failure<(eval)> assert_dummy;(void)assert_dummy;}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif // !! AI_BOOST_STATIC_ASSERT_INCLUDED
|
#endif // !! AI_BOOST_STATIC_ASSERT_INCLUDED
|
||||||
|
|
|
@ -273,8 +273,8 @@ struct Getter {
|
||||||
|
|
||||||
template <bool SwapEndianess, typename T>
|
template <bool SwapEndianess, typename T>
|
||||||
struct Getter<SwapEndianess,T,false> {
|
struct Getter<SwapEndianess,T,false> {
|
||||||
void operator() (T* inout, bool le) {
|
|
||||||
|
|
||||||
|
void operator() (T* inout, bool /*le*/) {
|
||||||
// static branch
|
// static branch
|
||||||
ByteSwapper<T,(SwapEndianess && sizeof(T)>1)> () (inout);
|
ByteSwapper<T,(SwapEndianess && sizeof(T)>1)> () (inout);
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,7 +108,7 @@ void COBImporter::GetExtensionList(std::set<std::string>& app)
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Setup configuration properties for the loader
|
// Setup configuration properties for the loader
|
||||||
void COBImporter::SetupProperties(const Importer* pImp)
|
void COBImporter::SetupProperties(const Importer* /*pImp*/)
|
||||||
{
|
{
|
||||||
// nothing to be done for the moment
|
// nothing to be done for the moment
|
||||||
}
|
}
|
||||||
|
@ -505,7 +505,7 @@ void COBImporter::LogDebug_Ascii(const Formatter::format& message) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void COBImporter::ReadBasicNodeInfo_Ascii(Node& msh, LineSplitter& splitter, const ChunkInfo& nfo)
|
void COBImporter::ReadBasicNodeInfo_Ascii(Node& msh, LineSplitter& splitter, const ChunkInfo& /*nfo*/)
|
||||||
{
|
{
|
||||||
for(;splitter;++splitter) {
|
for(;splitter;++splitter) {
|
||||||
if (splitter.match_start("Name")) {
|
if (splitter.match_start("Name")) {
|
||||||
|
@ -639,7 +639,7 @@ void COBImporter::ReadUnit_Ascii(Scene& out, LineSplitter& splitter, const Chunk
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void COBImporter::ReadChan_Ascii(Scene& out, LineSplitter& splitter, const ChunkInfo& nfo)
|
void COBImporter::ReadChan_Ascii(Scene& /*out*/, LineSplitter& splitter, const ChunkInfo& nfo)
|
||||||
{
|
{
|
||||||
if(nfo.version > 8) {
|
if(nfo.version > 8) {
|
||||||
return UnsupportedChunk_Ascii(splitter,nfo,"Chan");
|
return UnsupportedChunk_Ascii(splitter,nfo,"Chan");
|
||||||
|
@ -850,7 +850,7 @@ void COBImporter::ReadPolH_Ascii(Scene& out, LineSplitter& splitter, const Chunk
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void COBImporter::ReadBitM_Ascii(Scene& out, LineSplitter& splitter, const ChunkInfo& nfo)
|
void COBImporter::ReadBitM_Ascii(Scene& /*out*/, LineSplitter& splitter, const ChunkInfo& nfo)
|
||||||
{
|
{
|
||||||
if(nfo.version > 1) {
|
if(nfo.version > 1) {
|
||||||
return UnsupportedChunk_Ascii(splitter,nfo,"BitM");
|
return UnsupportedChunk_Ascii(splitter,nfo,"BitM");
|
||||||
|
@ -886,7 +886,7 @@ void COBImporter::ReadString_Binary(std::string& out, StreamReaderLE& reader)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void COBImporter::ReadBasicNodeInfo_Binary(Node& msh, StreamReaderLE& reader, const ChunkInfo& nfo)
|
void COBImporter::ReadBasicNodeInfo_Binary(Node& msh, StreamReaderLE& reader, const ChunkInfo& /*nfo*/)
|
||||||
{
|
{
|
||||||
const unsigned int dupes = reader.GetI2();
|
const unsigned int dupes = reader.GetI2();
|
||||||
ReadString_Binary(msh.name,reader);
|
ReadString_Binary(msh.name,reader);
|
||||||
|
@ -1077,7 +1077,7 @@ void COBImporter::ReadPolH_Binary(COB::Scene& out, StreamReaderLE& reader, const
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void COBImporter::ReadBitM_Binary(COB::Scene& out, StreamReaderLE& reader, const ChunkInfo& nfo)
|
void COBImporter::ReadBitM_Binary(COB::Scene& /*out*/, StreamReaderLE& reader, const ChunkInfo& nfo)
|
||||||
{
|
{
|
||||||
if(nfo.version > 1) {
|
if(nfo.version > 1) {
|
||||||
return UnsupportedChunk_Binary(reader,nfo,"BitM");
|
return UnsupportedChunk_Binary(reader,nfo,"BitM");
|
||||||
|
|
|
@ -90,7 +90,7 @@ void CSMImporter::GetExtensionList(std::set<std::string>& extensions)
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Setup configuration properties for the loader
|
// Setup configuration properties for the loader
|
||||||
void CSMImporter::SetupProperties(const Importer* pImp)
|
void CSMImporter::SetupProperties(const Importer* /*pImp*/)
|
||||||
{
|
{
|
||||||
// nothing to be done for the moment
|
// nothing to be done for the moment
|
||||||
}
|
}
|
||||||
|
|
|
@ -349,7 +349,7 @@ void ColladaExporter::WriteNode( const aiNode* pNode)
|
||||||
// instance every geometry
|
// instance every geometry
|
||||||
for( size_t a = 0; a < pNode->mNumMeshes; ++a )
|
for( size_t a = 0; a < pNode->mNumMeshes; ++a )
|
||||||
{
|
{
|
||||||
const aiMesh* mesh = mScene->mMeshes[pNode->mMeshes[a]];
|
// const aiMesh* mesh = mScene->mMeshes[pNode->mMeshes[a]];
|
||||||
mOutput << startstr << "<instance_geometry url=\"#" << GetMeshId( a) << "\">" << endstr;
|
mOutput << startstr << "<instance_geometry url=\"#" << GetMeshId( a) << "\">" << endstr;
|
||||||
PushTag();
|
PushTag();
|
||||||
|
|
||||||
|
|
|
@ -1180,7 +1180,7 @@ void ColladaLoader::AddTexture ( Assimp::MaterialHelper& mat, const ColladaParse
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Fills materials from the collada material definitions
|
// Fills materials from the collada material definitions
|
||||||
void ColladaLoader::FillMaterials( const ColladaParser& pParser, aiScene* pScene)
|
void ColladaLoader::FillMaterials( const ColladaParser& pParser, aiScene* /*pScene*/)
|
||||||
{
|
{
|
||||||
for (std::vector<std::pair<Collada::Effect*, aiMaterial*> >::iterator it = newMats.begin(),
|
for (std::vector<std::pair<Collada::Effect*, aiMaterial*> >::iterator it = newMats.begin(),
|
||||||
end = newMats.end(); it != end; ++it)
|
end = newMats.end(); it != end; ++it)
|
||||||
|
@ -1272,7 +1272,7 @@ void ColladaLoader::FillMaterials( const ColladaParser& pParser, aiScene* pScene
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Constructs materials from the collada material definitions
|
// Constructs materials from the collada material definitions
|
||||||
void ColladaLoader::BuildMaterials( const ColladaParser& pParser, aiScene* pScene)
|
void ColladaLoader::BuildMaterials( const ColladaParser& pParser, aiScene* /*pScene*/)
|
||||||
{
|
{
|
||||||
newMats.reserve(pParser.mMaterialLibrary.size());
|
newMats.reserve(pParser.mMaterialLibrary.size());
|
||||||
|
|
||||||
|
|
|
@ -380,7 +380,7 @@ void ComputeUVMappingProcess::ComputePlaneMapping(aiMesh* mesh,const aiVector3D&
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void ComputeUVMappingProcess::ComputeBoxMapping(aiMesh* mesh, aiVector3D* out)
|
void ComputeUVMappingProcess::ComputeBoxMapping(aiMesh* /*mesh*/, aiVector3D* /*out*/)
|
||||||
{
|
{
|
||||||
DefaultLogger::get()->error("Mapping type currently not implemented");
|
DefaultLogger::get()->error("Mapping type currently not implemented");
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,7 +98,7 @@ DXFImporter::~DXFImporter()
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Returns whether the class can handle the format of the given file.
|
// Returns whether the class can handle the format of the given file.
|
||||||
bool DXFImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
|
bool DXFImporter::CanRead( const std::string& pFile, IOSystem* /*pIOHandler*/, bool /*checkSig*/) const
|
||||||
{
|
{
|
||||||
return SimpleExtensionCheck(pFile,"dxf");
|
return SimpleExtensionCheck(pFile,"dxf");
|
||||||
}
|
}
|
||||||
|
@ -381,7 +381,7 @@ void DXFImporter::ExpandBlockReferences(DXF::Block& bl,const DXF::BlockMap& bloc
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void DXFImporter::GenerateMaterials(aiScene* pScene, DXF::FileData& output)
|
void DXFImporter::GenerateMaterials(aiScene* pScene, DXF::FileData& /*output*/)
|
||||||
{
|
{
|
||||||
// generate an almost-white default material. Reason:
|
// generate an almost-white default material. Reason:
|
||||||
// the default vertex color is GREY, so we are
|
// the default vertex color is GREY, so we are
|
||||||
|
@ -408,7 +408,7 @@ void DXFImporter::GenerateMaterials(aiScene* pScene, DXF::FileData& output)
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void DXFImporter::GenerateHierarchy(aiScene* pScene, DXF::FileData& output)
|
void DXFImporter::GenerateHierarchy(aiScene* pScene, DXF::FileData& /*output*/)
|
||||||
{
|
{
|
||||||
// generate the output scene graph, which is just the root node with a single child for each layer.
|
// generate the output scene graph, which is just the root node with a single child for each layer.
|
||||||
pScene->mRootNode = new aiNode();
|
pScene->mRootNode = new aiNode();
|
||||||
|
@ -441,7 +441,7 @@ void DXFImporter::SkipSection(DXF::LineReader& reader)
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void DXFImporter::ParseHeader(DXF::LineReader& reader, DXF::FileData& output)
|
void DXFImporter::ParseHeader(DXF::LineReader& reader, DXF::FileData& /*output*/)
|
||||||
{
|
{
|
||||||
for( ;!reader.End() && !reader.Is(0,"ENDSEC"); reader++);
|
for( ;!reader.End() && !reader.Is(0,"ENDSEC"); reader++);
|
||||||
}
|
}
|
||||||
|
@ -545,7 +545,7 @@ void DXFImporter::ParseEntities(DXF::LineReader& reader, DXF::FileData& output)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
|
||||||
void DXFImporter::ParseInsertion(DXF::LineReader& reader, DXF::FileData& output)
|
void DXFImporter::ParseInsertion(DXF::LineReader& reader, DXF::FileData& output)
|
||||||
{
|
{
|
||||||
output.blocks.back().insertions.push_back( DXF::InsertBlock() );
|
output.blocks.back().insertions.push_back( DXF::InsertBlock() );
|
||||||
|
@ -599,8 +599,6 @@ void DXFImporter::ParseInsertion(DXF::LineReader& reader, DXF::FileData& output)
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void DXFImporter::ParsePolyLine(DXF::LineReader& reader, DXF::FileData& output)
|
void DXFImporter::ParsePolyLine(DXF::LineReader& reader, DXF::FileData& output)
|
||||||
{
|
{
|
||||||
bool ret = false;
|
|
||||||
|
|
||||||
output.blocks.back().lines.push_back( boost::shared_ptr<DXF::PolyLine>( new DXF::PolyLine() ) );
|
output.blocks.back().lines.push_back( boost::shared_ptr<DXF::PolyLine>( new DXF::PolyLine() ) );
|
||||||
DXF::PolyLine& line = *output.blocks.back().lines.back();
|
DXF::PolyLine& line = *output.blocks.back().lines.back();
|
||||||
|
|
||||||
|
@ -691,7 +689,6 @@ void DXFImporter::ParsePolyLine(DXF::LineReader& reader, DXF::FileData& output)
|
||||||
if (line.flags & DXF_POLYLINE_FLAG_CLOSED) {
|
if (line.flags & DXF_POLYLINE_FLAG_CLOSED) {
|
||||||
line.indices.push_back(line.positions.size()-1);
|
line.indices.push_back(line.positions.size()-1);
|
||||||
line.indices.push_back(0);
|
line.indices.push_back(0);
|
||||||
|
|
||||||
line.counts.push_back(2);
|
line.counts.push_back(2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -881,7 +878,7 @@ void DXFImporter::Parse3DFace(DXF::LineReader& reader, DXF::FileData& output)
|
||||||
}
|
}
|
||||||
|
|
||||||
// sanity checks to see if we got something meaningful
|
// sanity checks to see if we got something meaningful
|
||||||
if (b[1] && !b[0] || !b[2] || !b[3]) {
|
if ((b[1] && !b[0]) || !b[2] || !b[3]) {
|
||||||
DefaultLogger::get()->warn("DXF: unexpected vertex setup in 3DFACE/LINE/FACE entity; ignoring");
|
DefaultLogger::get()->warn("DXF: unexpected vertex setup in 3DFACE/LINE/FACE entity; ignoring");
|
||||||
output.blocks.back().lines.pop_back();
|
output.blocks.back().lines.pop_back();
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -53,7 +53,7 @@ class ASSIMP_API DefaultProgressHandler
|
||||||
: public ProgressHandler {
|
: public ProgressHandler {
|
||||||
|
|
||||||
|
|
||||||
virtual bool Update(float percentage) {
|
virtual bool Update(float /*percentage*/) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -259,10 +259,18 @@ struct TempMesh
|
||||||
aiVector3D vmin,vmax;
|
aiVector3D vmin,vmax;
|
||||||
ArrayBounds(&*base, cnt ,vmin,vmax);
|
ArrayBounds(&*base, cnt ,vmin,vmax);
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
const float epsilon = (vmax-vmin).SquareLength() / 1e9f, dotepsilon = 1e-7;
|
const float epsilon = (vmax-vmin).SquareLength() / 1e9f, dotepsilon = 1e-7;
|
||||||
|
|
||||||
//// look for vertices that lie directly on the line between their predecessor and their
|
//// look for vertices that lie directly on the line between their predecessor and their
|
||||||
//// successor and replace them with either of them.
|
//// successor and replace them with either of them.
|
||||||
|
=======
|
||||||
|
const float epsilon = (vmax-vmin).SquareLength() / 1e9f;
|
||||||
|
|
||||||
|
//// look for vertices that lie directly on the line between their predecessor and their
|
||||||
|
//// successor and replace them with either of them.
|
||||||
|
//const float dotepsilon = 1e-7;
|
||||||
|
>>>>>>> 320a7a7a7e0422e4d8d9c2a22b74cb48f74b14ce
|
||||||
//for(size_t i = 0; i < cnt; ++i) {
|
//for(size_t i = 0; i < cnt; ++i) {
|
||||||
// aiVector3D& v1 = *(base+i), &v0 = *(base+(i?i-1:cnt-1)), &v2 = *(base+(i+1)%cnt);
|
// aiVector3D& v1 = *(base+i), &v0 = *(base+(i?i-1:cnt-1)), &v2 = *(base+(i+1)%cnt);
|
||||||
// const aiVector3D& d0 = (v1-v0), &d1 = (v2-v1);
|
// const aiVector3D& d0 = (v1-v0), &d1 = (v2-v1);
|
||||||
|
@ -669,7 +677,7 @@ void AssignMatrixAxes(aiMatrix4x4& out, const aiVector3D& x, const aiVector3D& y
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void ConvertAxisPlacement(aiMatrix4x4& out, const IFC::IfcAxis2Placement3D& in, ConversionData& conv)
|
void ConvertAxisPlacement(aiMatrix4x4& out, const IFC::IfcAxis2Placement3D& in, ConversionData& /*conv*/)
|
||||||
{
|
{
|
||||||
aiVector3D loc;
|
aiVector3D loc;
|
||||||
ConvertCartesianPoint(loc,in.Location);
|
ConvertCartesianPoint(loc,in.Location);
|
||||||
|
@ -694,7 +702,7 @@ void ConvertAxisPlacement(aiMatrix4x4& out, const IFC::IfcAxis2Placement3D& in,
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void ConvertAxisPlacement(aiMatrix4x4& out, const IFC::IfcAxis2Placement2D& in, ConversionData& conv)
|
void ConvertAxisPlacement(aiMatrix4x4& out, const IFC::IfcAxis2Placement2D& in, ConversionData& /*conv*/)
|
||||||
{
|
{
|
||||||
aiVector3D loc;
|
aiVector3D loc;
|
||||||
ConvertCartesianPoint(loc,in.Location);
|
ConvertCartesianPoint(loc,in.Location);
|
||||||
|
@ -711,7 +719,7 @@ void ConvertAxisPlacement(aiMatrix4x4& out, const IFC::IfcAxis2Placement2D& in,
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void ConvertAxisPlacement(aiVector3D& axis, aiVector3D& pos, const IFC::IfcAxis1Placement& in, ConversionData& conv)
|
void ConvertAxisPlacement(aiVector3D& axis, aiVector3D& pos, const IFC::IfcAxis1Placement& in, ConversionData& /*conv*/)
|
||||||
{
|
{
|
||||||
ConvertCartesianPoint(pos,in.Location);
|
ConvertCartesianPoint(pos,in.Location);
|
||||||
if (in.Axis) {
|
if (in.Axis) {
|
||||||
|
@ -797,7 +805,7 @@ void ConvertTransformOperator(aiMatrix4x4& out, const IFC::IfcCartesianTransform
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
bool ProcessPolyloop(const IFC::IfcPolyLoop& loop, TempMesh& meshout, ConversionData& conv)
|
bool ProcessPolyloop(const IFC::IfcPolyLoop& loop, TempMesh& meshout, ConversionData& /*conv*/)
|
||||||
{
|
{
|
||||||
size_t cnt = 0;
|
size_t cnt = 0;
|
||||||
BOOST_FOREACH(const IFC::IfcCartesianPoint& c, loop.Polygon) {
|
BOOST_FOREACH(const IFC::IfcCartesianPoint& c, loop.Polygon) {
|
||||||
|
@ -1022,7 +1030,7 @@ void MergePolygonBoundaries(TempMesh& result, const TempMesh& inmesh, size_t mas
|
||||||
// see if one of the polygons is a IfcFaceOuterBound (in which case `master_bounds` is its index).
|
// see if one of the polygons is a IfcFaceOuterBound (in which case `master_bounds` is its index).
|
||||||
// sadly we can't rely on it, the docs say 'At most one of the bounds shall be of the type IfcFaceOuterBound'
|
// sadly we can't rely on it, the docs say 'At most one of the bounds shall be of the type IfcFaceOuterBound'
|
||||||
float area_outer_polygon = 1e-10f;
|
float area_outer_polygon = 1e-10f;
|
||||||
if (master_bounds != -1) {
|
if (master_bounds != (size_t)-1) {
|
||||||
outer_polygon = begin + master_bounds;
|
outer_polygon = begin + master_bounds;
|
||||||
outer_polygon_start = std::accumulate(begin,outer_polygon,0);
|
outer_polygon_start = std::accumulate(begin,outer_polygon,0);
|
||||||
area_outer_polygon = normals[master_bounds].SquareLength();
|
area_outer_polygon = normals[master_bounds].SquareLength();
|
||||||
|
@ -1146,17 +1154,28 @@ next_loop:
|
||||||
void ProcessConnectedFaceSet(const IFC::IfcConnectedFaceSet& fset, TempMesh& result, ConversionData& conv)
|
void ProcessConnectedFaceSet(const IFC::IfcConnectedFaceSet& fset, TempMesh& result, ConversionData& conv)
|
||||||
{
|
{
|
||||||
BOOST_FOREACH(const IFC::IfcFace& face, fset.CfsFaces) {
|
BOOST_FOREACH(const IFC::IfcFace& face, fset.CfsFaces) {
|
||||||
|
<<<<<<< HEAD
|
||||||
size_t ob = -1, cnt = 0;
|
size_t ob = -1, cnt = 0;
|
||||||
|
=======
|
||||||
|
// size_t ob = -1, cnt = 0;
|
||||||
|
>>>>>>> 320a7a7a7e0422e4d8d9c2a22b74cb48f74b14ce
|
||||||
TempMesh meshout;
|
TempMesh meshout;
|
||||||
BOOST_FOREACH(const IFC::IfcFaceBound& bound, face.Bounds) {
|
BOOST_FOREACH(const IFC::IfcFaceBound& bound, face.Bounds) {
|
||||||
|
|
||||||
// XXX implement proper merging for polygonal loops
|
// XXX implement proper merging for polygonal loops
|
||||||
if(const IFC::IfcPolyLoop* const polyloop = bound.Bound->ToPtr<IFC::IfcPolyLoop>()) {
|
if(const IFC::IfcPolyLoop* const polyloop = bound.Bound->ToPtr<IFC::IfcPolyLoop>()) {
|
||||||
if(ProcessPolyloop(*polyloop, meshout,conv)) {
|
if(ProcessPolyloop(*polyloop, meshout,conv)) {
|
||||||
|
<<<<<<< HEAD
|
||||||
if(bound.ToPtr<IFC::IfcFaceOuterBound>()) {
|
if(bound.ToPtr<IFC::IfcFaceOuterBound>()) {
|
||||||
ob = cnt;
|
ob = cnt;
|
||||||
}
|
}
|
||||||
++cnt;
|
++cnt;
|
||||||
|
=======
|
||||||
|
// if(bound.ToPtr<IFC::IfcFaceOuterBound>()) {
|
||||||
|
// ob = cnt;
|
||||||
|
// }
|
||||||
|
// ++cnt;
|
||||||
|
>>>>>>> 320a7a7a7e0422e4d8d9c2a22b74cb48f74b14ce
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -1178,7 +1197,7 @@ void ProcessConnectedFaceSet(const IFC::IfcConnectedFaceSet& fset, TempMesh& res
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void ProcessPolyLine(const IFC::IfcPolyline& def, TempMesh& meshout, ConversionData& conv)
|
void ProcessPolyLine(const IFC::IfcPolyline& def, TempMesh& meshout, ConversionData& /*conv*/)
|
||||||
{
|
{
|
||||||
// this won't produce a valid mesh, it just spits out a list of vertices
|
// this won't produce a valid mesh, it just spits out a list of vertices
|
||||||
aiVector3D t;
|
aiVector3D t;
|
||||||
|
@ -1385,13 +1404,13 @@ bool TryAddOpenings(const std::vector<TempOpening>& openings,const std::vector<a
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const aiVector3D diff = t.extrusionDir;
|
// const aiVector3D diff = t.extrusionDir;
|
||||||
const std::vector<aiVector3D>& va = t.profileMesh->verts;
|
const std::vector<aiVector3D>& va = t.profileMesh->verts;
|
||||||
if(va.size() <= 2) {
|
if(va.size() <= 2) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const float dd = t.extrusionDir*nor;
|
// const float dd = t.extrusionDir*nor;
|
||||||
IFCImporter::LogDebug("apply an IfcOpeningElement linked via IfcRelVoidsElement to this polygon");
|
IFCImporter::LogDebug("apply an IfcOpeningElement linked via IfcRelVoidsElement to this polygon");
|
||||||
|
|
||||||
got_openings = true;
|
got_openings = true;
|
||||||
|
@ -1635,7 +1654,11 @@ void InsertWindowContours(const std::vector< BoundingBox >& bbs,const std::vecto
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hit) {
|
if (hit) {
|
||||||
|
<<<<<<< HEAD
|
||||||
if (last_hit != -1) {
|
if (last_hit != -1) {
|
||||||
|
=======
|
||||||
|
if (last_hit != (size_t)-1) {
|
||||||
|
>>>>>>> 320a7a7a7e0422e4d8d9c2a22b74cb48f74b14ce
|
||||||
const size_t old = curmesh.verts.size();
|
const size_t old = curmesh.verts.size();
|
||||||
size_t cnt = last_hit > n ? size-(last_hit-n) : n-last_hit;
|
size_t cnt = last_hit > n ? size-(last_hit-n) : n-last_hit;
|
||||||
for(size_t a = last_hit, e = 0; e <= cnt; a=(a+1)%size, ++e) {
|
for(size_t a = last_hit, e = 0; e <= cnt; a=(a+1)%size, ++e) {
|
||||||
|
@ -1683,7 +1706,7 @@ bool TryAddOpenings_Quadrulate(const std::vector<TempOpening>& openings,const st
|
||||||
const aiVector3D any_point = out[s-4];
|
const aiVector3D any_point = out[s-4];
|
||||||
const aiVector3D nor = ((out[s-3]-any_point)^(out[s-2]-any_point)).Normalize();
|
const aiVector3D nor = ((out[s-3]-any_point)^(out[s-2]-any_point)).Normalize();
|
||||||
|
|
||||||
const aiVector3D diag = vmax-vmin, diagn = aiVector3D(diag).Normalize();
|
const aiVector3D diag = vmax-vmin;
|
||||||
const float ax = fabs(nor.x);
|
const float ax = fabs(nor.x);
|
||||||
const float ay = fabs(nor.y);
|
const float ay = fabs(nor.y);
|
||||||
const float az = fabs(nor.z);
|
const float az = fabs(nor.z);
|
||||||
|
@ -1727,7 +1750,11 @@ bool TryAddOpenings_Quadrulate(const std::vector<TempOpening>& openings,const st
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
const aiVector3D diff = t.extrusionDir;
|
const aiVector3D diff = t.extrusionDir;
|
||||||
|
=======
|
||||||
|
// const aiVector3D diff = t.extrusionDir;
|
||||||
|
>>>>>>> 320a7a7a7e0422e4d8d9c2a22b74cb48f74b14ce
|
||||||
const std::vector<aiVector3D>& va = t.profileMesh->verts;
|
const std::vector<aiVector3D>& va = t.profileMesh->verts;
|
||||||
if(va.size() <= 2) {
|
if(va.size() <= 2) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -1928,7 +1955,7 @@ void ProcessExtrudedAreaSolid(const IFC::IfcExtrudedAreaSolid& solid, TempMesh&
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(conv.apply_openings && (sides_with_openings != 2 && sides_with_openings || sides_with_v_openings != 2 && sides_with_v_openings)) {
|
if(conv.apply_openings && ((sides_with_openings != 2 && sides_with_openings) || (sides_with_v_openings != 2 && sides_with_v_openings))) {
|
||||||
IFCImporter::LogWarn("failed to resolve all openings, presumably their topology is not supported by Assimp");
|
IFCImporter::LogWarn("failed to resolve all openings, presumably their topology is not supported by Assimp");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2142,7 +2169,7 @@ void FillMaterial(MaterialHelper* mat,const IFC::IfcSurfaceStyle* surf,Conversio
|
||||||
mat->AddProperty(&col,1, AI_MATKEY_COLOR_REFLECTIVE);
|
mat->AddProperty(&col,1, AI_MATKEY_COLOR_REFLECTIVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
const int shading = (ren->SpecularHighlight && ren->SpecularColour)?ConvertShadingMode(ren->ReflectanceMethod):aiShadingMode_Gouraud;
|
const int shading = (ren->SpecularHighlight && ren->SpecularColour)?ConvertShadingMode(ren->ReflectanceMethod):static_cast<int>(aiShadingMode_Gouraud);
|
||||||
mat->AddProperty(&shading,1, AI_MATKEY_SHADING_MODEL);
|
mat->AddProperty(&shading,1, AI_MATKEY_SHADING_MODEL);
|
||||||
|
|
||||||
if (ren->SpecularHighlight) {
|
if (ren->SpecularHighlight) {
|
||||||
|
@ -2263,7 +2290,7 @@ bool ProcessGeometricItem(const IFC::IfcGeometricRepresentationItem& geo, std::v
|
||||||
else if(const IFC::IfcBooleanResult* boolean = geo.ToPtr<IFC::IfcBooleanResult>()) {
|
else if(const IFC::IfcBooleanResult* boolean = geo.ToPtr<IFC::IfcBooleanResult>()) {
|
||||||
ProcessBoolean(*boolean,meshtmp,conv);
|
ProcessBoolean(*boolean,meshtmp,conv);
|
||||||
}
|
}
|
||||||
else if(const IFC::IfcBoundingBox* bb = geo.ToPtr<IFC::IfcBoundingBox>()) {
|
else if(geo.ToPtr<IFC::IfcBoundingBox>()) {
|
||||||
// silently skip over bounding boxes
|
// silently skip over bounding boxes
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2286,7 +2313,7 @@ bool ProcessGeometricItem(const IFC::IfcGeometricRepresentationItem& geo, std::v
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void AssignAddedMeshes(std::vector<unsigned int>& mesh_indices,aiNode* nd,ConversionData& conv)
|
void AssignAddedMeshes(std::vector<unsigned int>& mesh_indices,aiNode* nd,ConversionData& /*conv*/)
|
||||||
{
|
{
|
||||||
if (!mesh_indices.empty()) {
|
if (!mesh_indices.empty()) {
|
||||||
|
|
||||||
|
|
|
@ -1045,7 +1045,7 @@ void IFC::GetSchema(EXPRESS::ConversionSchema& out)
|
||||||
namespace STEP {
|
namespace STEP {
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------------------------------
|
||||||
template <> size_t GenericFill<NotImplemented>(const STEP::DB& db, const LIST& params, NotImplemented* in)
|
template <> size_t GenericFill<NotImplemented>(const STEP::DB& /*db*/, const LIST& /*params*/, NotImplemented* /*in*/)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1166,7 +1166,7 @@ template <> size_t GenericFill<IfcGrid>(const DB& db, const LIST& params, IfcGri
|
||||||
return base;
|
return base;
|
||||||
}
|
}
|
||||||
// -----------------------------------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------------------------------
|
||||||
template <> size_t GenericFill<IfcRepresentationItem>(const DB& db, const LIST& params, IfcRepresentationItem* in)
|
template <> size_t GenericFill<IfcRepresentationItem>(const DB& /*db*/, const LIST& params, IfcRepresentationItem* /*in*/)
|
||||||
{
|
{
|
||||||
size_t base = 0;
|
size_t base = 0;
|
||||||
if (params.GetSize() < 0) { throw STEP::TypeError("expected 0 arguments to IfcRepresentationItem"); } return base;
|
if (params.GetSize() < 0) { throw STEP::TypeError("expected 0 arguments to IfcRepresentationItem"); } return base;
|
||||||
|
@ -1867,8 +1867,8 @@ template <> size_t GenericFill<IfcColumn>(const DB& db, const LIST& params, IfcC
|
||||||
// this data structure is not used yet, so there is no code generated to fill its members
|
// this data structure is not used yet, so there is no code generated to fill its members
|
||||||
return base;
|
return base;
|
||||||
}
|
}
|
||||||
// -----------------------------------------------------------------------------------------------------------
|
template <> size_t GenericFill<IfcObjectPlacement>(const DB& /*db*/, const LIST& params, IfcObjectPlacement* /*in*/)
|
||||||
template <> size_t GenericFill<IfcObjectPlacement>(const DB& db, const LIST& params, IfcObjectPlacement* in)
|
>>>>>>> 320a7a7a7e0422e4d8d9c2a22b74cb48f74b14ce
|
||||||
{
|
{
|
||||||
size_t base = 0;
|
size_t base = 0;
|
||||||
if (params.GetSize() < 0) { throw STEP::TypeError("expected 0 arguments to IfcObjectPlacement"); } return base;
|
if (params.GetSize() < 0) { throw STEP::TypeError("expected 0 arguments to IfcObjectPlacement"); } return base;
|
||||||
|
|
|
@ -138,7 +138,7 @@ int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
|
||||||
// A little helper to find locally close vertices faster.
|
// A little helper to find locally close vertices faster.
|
||||||
// Try to reuse the lookup table from the last step.
|
// Try to reuse the lookup table from the last step.
|
||||||
const static float epsilon = 1e-5f;
|
const static float epsilon = 1e-5f;
|
||||||
float posEpsilonSqr;
|
// float posEpsilonSqr;
|
||||||
SpatialSort* vertexFinder = NULL;
|
SpatialSort* vertexFinder = NULL;
|
||||||
SpatialSort _vertexFinder;
|
SpatialSort _vertexFinder;
|
||||||
|
|
||||||
|
@ -149,14 +149,14 @@ int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
|
||||||
if (avf) {
|
if (avf) {
|
||||||
SpatPair& blubb = (*avf)[meshIndex];
|
SpatPair& blubb = (*avf)[meshIndex];
|
||||||
vertexFinder = &blubb.first;
|
vertexFinder = &blubb.first;
|
||||||
posEpsilonSqr = blubb.second;
|
// posEpsilonSqr = blubb.second;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!vertexFinder) {
|
if (!vertexFinder) {
|
||||||
// bad, need to compute it.
|
// bad, need to compute it.
|
||||||
_vertexFinder.Fill(pMesh->mVertices, pMesh->mNumVertices, sizeof( aiVector3D));
|
_vertexFinder.Fill(pMesh->mVertices, pMesh->mNumVertices, sizeof( aiVector3D));
|
||||||
vertexFinder = &_vertexFinder;
|
vertexFinder = &_vertexFinder;
|
||||||
posEpsilonSqr = ComputePositionEpsilon(pMesh);
|
// posEpsilonSqr = ComputePositionEpsilon(pMesh);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Squared because we check against squared length of the vector difference
|
// Squared because we check against squared length of the vector difference
|
||||||
|
|
|
@ -535,9 +535,9 @@ void AnimResolver::ExtractAnimChannel(aiNodeAnim** out, unsigned int flags /*= 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// We won't spawn an animation channel if we don't have at least one envelope with more than one keyframe defined.
|
// We won't spawn an animation channel if we don't have at least one envelope with more than one keyframe defined.
|
||||||
const bool trans = (trans_x && trans_x->keys.size() > 1 || trans_y && trans_y->keys.size() > 1 || trans_z && trans_z->keys.size() > 1);
|
const bool trans = ((trans_x && trans_x->keys.size() > 1) || (trans_y && trans_y->keys.size() > 1) || (trans_z && trans_z->keys.size() > 1));
|
||||||
const bool rotat = (rotat_x && rotat_x->keys.size() > 1 || rotat_y && rotat_y->keys.size() > 1 || rotat_z && rotat_z->keys.size() > 1);
|
const bool rotat = ((rotat_x && rotat_x->keys.size() > 1) || (rotat_y && rotat_y->keys.size() > 1) || (rotat_z && rotat_z->keys.size() > 1));
|
||||||
const bool scale = (scale_x && scale_x->keys.size() > 1 || scale_y && scale_y->keys.size() > 1 || scale_z && scale_z->keys.size() > 1);
|
const bool scale = ((scale_x && scale_x->keys.size() > 1) || (scale_y && scale_y->keys.size() > 1) || (scale_z && scale_z->keys.size() > 1));
|
||||||
if (!trans && !rotat && !scale)
|
if (!trans && !rotat && !scale)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -276,7 +276,7 @@ struct Face : public aiFace
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//! Copy construction
|
//! Copy construction
|
||||||
Face(const Face& f) {
|
Face(const Face& f) : aiFace() {
|
||||||
*this = f;
|
*this = f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -376,7 +376,7 @@ void LWOImporter::ConvertMaterial(const LWO::Surface& surf,MaterialHelper* pcMat
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
char LWOImporter::FindUVChannels(LWO::TextureList& list,
|
char LWOImporter::FindUVChannels(LWO::TextureList& list,
|
||||||
LWO::Layer& layer,LWO::UVChannel& uv, unsigned int next)
|
LWO::Layer& /*layer*/,LWO::UVChannel& uv, unsigned int next)
|
||||||
{
|
{
|
||||||
char ret = 0;
|
char ret = 0;
|
||||||
for (TextureList::iterator it = list.begin(), end = list.end();it != end;++it) {
|
for (TextureList::iterator it = list.begin(), end = list.end();it != end;++it) {
|
||||||
|
@ -562,7 +562,7 @@ void LWOImporter::LoadLWO2ImageMap(unsigned int size, LWO::Texture& tex )
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void LWOImporter::LoadLWO2Procedural(unsigned int size, LWO::Texture& tex )
|
void LWOImporter::LoadLWO2Procedural(unsigned int /*size*/, LWO::Texture& tex )
|
||||||
{
|
{
|
||||||
// --- not supported at the moment
|
// --- not supported at the moment
|
||||||
DefaultLogger::get()->error("LWO2: Found procedural texture, this is not supported");
|
DefaultLogger::get()->error("LWO2: Found procedural texture, this is not supported");
|
||||||
|
@ -570,7 +570,7 @@ void LWOImporter::LoadLWO2Procedural(unsigned int size, LWO::Texture& tex )
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void LWOImporter::LoadLWO2Gradient(unsigned int size, LWO::Texture& tex )
|
void LWOImporter::LoadLWO2Gradient(unsigned int /*size*/, LWO::Texture& tex )
|
||||||
{
|
{
|
||||||
// --- not supported at the moment
|
// --- not supported at the moment
|
||||||
DefaultLogger::get()->error("LWO2: Found gradient texture, this is not supported");
|
DefaultLogger::get()->error("LWO2: Found gradient texture, this is not supported");
|
||||||
|
@ -675,7 +675,7 @@ void LWOImporter::LoadLWO2TextureBlock(LE_NCONST IFF::SubChunkHeader* head, unsi
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void LWOImporter::LoadLWO2ShaderBlock(LE_NCONST IFF::SubChunkHeader* head, unsigned int size )
|
void LWOImporter::LoadLWO2ShaderBlock(LE_NCONST IFF::SubChunkHeader* /*head*/, unsigned int size )
|
||||||
{
|
{
|
||||||
LE_NCONST uint8_t* const end = mFileBuffer + size;
|
LE_NCONST uint8_t* const end = mFileBuffer + size;
|
||||||
|
|
||||||
|
|
|
@ -241,7 +241,7 @@ void LWSImporter::ReadEnvelope_Old(
|
||||||
std::list< LWS::Element >::const_iterator& it,
|
std::list< LWS::Element >::const_iterator& it,
|
||||||
const std::list< LWS::Element >::const_iterator& end,
|
const std::list< LWS::Element >::const_iterator& end,
|
||||||
LWS::NodeDesc& nodes,
|
LWS::NodeDesc& nodes,
|
||||||
unsigned int version)
|
unsigned int /*version*/)
|
||||||
{
|
{
|
||||||
unsigned int num,sub_num;
|
unsigned int num,sub_num;
|
||||||
if (++it == end)goto unexpected_end;
|
if (++it == end)goto unexpected_end;
|
||||||
|
|
|
@ -126,7 +126,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
if (trim) {
|
if (trim) {
|
||||||
while (stream.GetRemainingSize() && ((s = stream.GetI1()) == ' ') || s == '\t');
|
while (stream.GetRemainingSize() && ((s = stream.GetI1()) == ' ' || s == '\t'));
|
||||||
if (stream.GetRemainingSize()) {
|
if (stream.GetRemainingSize()) {
|
||||||
stream.IncPtr(-1);
|
stream.IncPtr(-1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,8 +62,8 @@ using namespace Assimp;
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Constructor to be privately used by Importer
|
// Constructor to be privately used by Importer
|
||||||
MD5Importer::MD5Importer()
|
MD5Importer::MD5Importer()
|
||||||
: configNoAutoLoad (false)
|
: mBuffer()
|
||||||
, mBuffer()
|
, configNoAutoLoad (false)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
@ -367,7 +367,6 @@ void MD5Importer::LoadMD5MeshFile ()
|
||||||
if (pScene->mRootNode->mChildren[1]->mNumChildren) /* start at the right hierarchy level */
|
if (pScene->mRootNode->mChildren[1]->mNumChildren) /* start at the right hierarchy level */
|
||||||
SkeletonMeshBuilder skeleton_maker(pScene,pScene->mRootNode->mChildren[1]->mChildren[0]);
|
SkeletonMeshBuilder skeleton_maker(pScene,pScene->mRootNode->mChildren[1]->mChildren[0]);
|
||||||
#else
|
#else
|
||||||
std::vector<MD5::MeshDesc>::const_iterator end = meshParser.mMeshes.end();
|
|
||||||
|
|
||||||
// FIX: MD5 files exported from Blender can have empty meshes
|
// FIX: MD5 files exported from Blender can have empty meshes
|
||||||
for (std::vector<MD5::MeshDesc>::const_iterator it = meshParser.mMeshes.begin(),end = meshParser.mMeshes.end(); it != end;++it) {
|
for (std::vector<MD5::MeshDesc>::const_iterator it = meshParser.mMeshes.begin(),end = meshParser.mMeshes.end(); it != end;++it) {
|
||||||
|
|
|
@ -364,6 +364,7 @@ void MS3DImporter::InternReadFile( const std::string& pFile,
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string& s = std::string(reinterpret_cast<char*>(stream.GetPtr()),len);
|
const std::string& s = std::string(reinterpret_cast<char*>(stream.GetPtr()),len);
|
||||||
|
DefaultLogger::get()->debug("MS3D: Model comment: " + s);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(stream.GetRemainingSize() > 4 && inrange((stream >> subversion,subversion),1u,3u)) {
|
if(stream.GetRemainingSize() > 4 && inrange((stream >> subversion,subversion),1u,3u)) {
|
||||||
|
|
|
@ -74,7 +74,7 @@ public:
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
// Write to stream
|
// Write to stream
|
||||||
size_t Write(const void* pvBuffer, size_t pSize,size_t pCount) {
|
size_t Write(const void* /*pvBuffer*/, size_t /*pSize*/,size_t /*pCount*/) {
|
||||||
ai_assert(false); // won't be needed
|
ai_assert(false); // won't be needed
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -154,7 +154,7 @@ public:
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
/** Open a new file with a given path. */
|
/** Open a new file with a given path. */
|
||||||
IOStream* Open( const char* pFile, const char* pMode = "rb") {
|
IOStream* Open( const char* pFile, const char* /*pMode*/ = "rb") {
|
||||||
if (strncmp(pFile,AI_MEMORYIO_MAGIC_FILENAME,AI_MEMORYIO_MAGIC_FILENAME_LENGTH)) {
|
if (strncmp(pFile,AI_MEMORYIO_MAGIC_FILENAME,AI_MEMORYIO_MAGIC_FILENAME_LENGTH)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -163,12 +163,12 @@ public:
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
/** Closes the given file and releases all resources associated with it. */
|
/** Closes the given file and releases all resources associated with it. */
|
||||||
void Close( IOStream* pFile) {
|
void Close( IOStream* /*pFile*/) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
/** Compare two paths */
|
/** Compare two paths */
|
||||||
bool ComparePaths (const char* one, const char* second) const {
|
bool ComparePaths (const char* /*one*/, const char* /*second*/) const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ void NDOImporter::GetExtensionList(std::set<std::string>& extensions)
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Setup configuration properties for the loader
|
// Setup configuration properties for the loader
|
||||||
void NDOImporter::SetupProperties(const Importer* pImp)
|
void NDOImporter::SetupProperties(const Importer* /*pImp*/)
|
||||||
{
|
{
|
||||||
// nothing to be done for the moment
|
// nothing to be done for the moment
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@ NFFImporter::~NFFImporter()
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Returns whether the class can handle the format of the given file.
|
// Returns whether the class can handle the format of the given file.
|
||||||
bool NFFImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
|
bool NFFImporter::CanRead( const std::string& pFile, IOSystem* /*pIOHandler*/, bool /*checkSig*/) const
|
||||||
{
|
{
|
||||||
return SimpleExtensionCheck(pFile,"nff","enff");
|
return SimpleExtensionCheck(pFile,"nff","enff");
|
||||||
}
|
}
|
||||||
|
|
|
@ -175,7 +175,7 @@ void ObjFileImporter::CreateDataFromImport(const ObjFile::Model* pModel, aiScene
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Creates all nodes of the model
|
// Creates all nodes of the model
|
||||||
aiNode *ObjFileImporter::createNodes(const ObjFile::Model* pModel, const ObjFile::Object* pObject,
|
aiNode *ObjFileImporter::createNodes(const ObjFile::Model* pModel, const ObjFile::Object* pObject,
|
||||||
unsigned int uiMeshIndex,
|
unsigned int /*uiMeshIndex*/,
|
||||||
aiNode *pParent, aiScene* pScene,
|
aiNode *pParent, aiScene* pScene,
|
||||||
std::vector<aiMesh*> &MeshArray )
|
std::vector<aiMesh*> &MeshArray )
|
||||||
{
|
{
|
||||||
|
@ -499,6 +499,7 @@ void ObjFileImporter::appendChildToParentNode(aiNode *pParent, aiNode *pChild)
|
||||||
// Assign parent to child
|
// Assign parent to child
|
||||||
pChild->mParent = pParent;
|
pChild->mParent = pParent;
|
||||||
size_t sNumChildren = 0;
|
size_t sNumChildren = 0;
|
||||||
|
(void)sNumChildren; // remove warning on release build
|
||||||
|
|
||||||
// If already children was assigned to the parent node, store them in a
|
// If already children was assigned to the parent node, store them in a
|
||||||
std::vector<aiNode*> temp;
|
std::vector<aiNode*> temp;
|
||||||
|
|
|
@ -643,7 +643,7 @@ bool ObjFileParser::needsNewMesh( const std::string &rMaterialName )
|
||||||
bool newMat = false;
|
bool newMat = false;
|
||||||
int matIdx = getMaterialIndex( rMaterialName );
|
int matIdx = getMaterialIndex( rMaterialName );
|
||||||
int curMatIdx = m_pModel->m_pCurrentMesh->m_uiMaterialIndex;
|
int curMatIdx = m_pModel->m_pCurrentMesh->m_uiMaterialIndex;
|
||||||
if ( curMatIdx != ObjFile::Mesh::NoMaterial || curMatIdx != matIdx )
|
if ( curMatIdx != int(ObjFile::Mesh::NoMaterial) || curMatIdx != matIdx )
|
||||||
{
|
{
|
||||||
// New material -> only one material per mesh, so we need to create a new
|
// New material -> only one material per mesh, so we need to create a new
|
||||||
// material
|
// material
|
||||||
|
|
|
@ -408,6 +408,7 @@ void OgreImporter::ReadSubMesh(SubMesh &theSubMesh, XmlReader *Reader)
|
||||||
aiMesh* OgreImporter::CreateAssimpSubMesh(const SubMesh& theSubMesh, const vector<Bone>& Bones) const
|
aiMesh* OgreImporter::CreateAssimpSubMesh(const SubMesh& theSubMesh, const vector<Bone>& Bones) const
|
||||||
{
|
{
|
||||||
const aiScene* const m_CurrentScene=this->m_CurrentScene;//make sure, that we can access but not change the scene
|
const aiScene* const m_CurrentScene=this->m_CurrentScene;//make sure, that we can access but not change the scene
|
||||||
|
(void)m_CurrentScene;
|
||||||
|
|
||||||
aiMesh* NewAiMesh=new aiMesh();
|
aiMesh* NewAiMesh=new aiMesh();
|
||||||
|
|
||||||
|
@ -500,6 +501,7 @@ aiMesh* OgreImporter::CreateAssimpSubMesh(const SubMesh& theSubMesh, const vecto
|
||||||
void OgreImporter::LoadSkeleton(std::string FileName, vector<Bone> &Bones, vector<Animation> &Animations) const
|
void OgreImporter::LoadSkeleton(std::string FileName, vector<Bone> &Bones, vector<Animation> &Animations) const
|
||||||
{
|
{
|
||||||
const aiScene* const m_CurrentScene=this->m_CurrentScene;//make sure, that we can access but not change the scene
|
const aiScene* const m_CurrentScene=this->m_CurrentScene;//make sure, that we can access but not change the scene
|
||||||
|
(void)m_CurrentScene;
|
||||||
|
|
||||||
|
|
||||||
//most likely the skeleton file will only end with .skeleton
|
//most likely the skeleton file will only end with .skeleton
|
||||||
|
@ -705,7 +707,7 @@ void OgreImporter::LoadSkeleton(std::string FileName, vector<Bone> &Bones, vecto
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void OgreImporter::CreateAssimpSkeleton(const std::vector<Bone> &Bones, const std::vector<Animation> &Animations)
|
void OgreImporter::CreateAssimpSkeleton(const std::vector<Bone> &Bones, const std::vector<Animation> &/*Animations*/)
|
||||||
{
|
{
|
||||||
if(!m_CurrentScene->mRootNode)
|
if(!m_CurrentScene->mRootNode)
|
||||||
throw DeadlyImportError("No root node exists!!");
|
throw DeadlyImportError("No root node exists!!");
|
||||||
|
@ -818,6 +820,7 @@ void OgreImporter::PutAnimationsInScene(const std::vector<Bone> &Bones, const st
|
||||||
aiNode* OgreImporter::CreateAiNodeFromBone(int BoneId, const std::vector<Bone> &Bones, aiNode* ParentNode) const
|
aiNode* OgreImporter::CreateAiNodeFromBone(int BoneId, const std::vector<Bone> &Bones, aiNode* ParentNode) const
|
||||||
{
|
{
|
||||||
const aiScene* const m_CurrentScene=this->m_CurrentScene;//make sure, that we can access but not change the scene
|
const aiScene* const m_CurrentScene=this->m_CurrentScene;//make sure, that we can access but not change the scene
|
||||||
|
(void)m_CurrentScene;
|
||||||
|
|
||||||
//----Create the node for this bone and set its values-----
|
//----Create the node for this bone and set its values-----
|
||||||
aiNode* NewNode=new aiNode(Bones[BoneId].Name);
|
aiNode* NewNode=new aiNode(Bones[BoneId].Name);
|
||||||
|
|
|
@ -69,6 +69,7 @@ namespace Ogre
|
||||||
aiMaterial* OgreImporter::LoadMaterial(const std::string MaterialName) const
|
aiMaterial* OgreImporter::LoadMaterial(const std::string MaterialName) const
|
||||||
{
|
{
|
||||||
const aiScene* const m_CurrentScene=this->m_CurrentScene;//make sure, that we can access but not change the scene
|
const aiScene* const m_CurrentScene=this->m_CurrentScene;//make sure, that we can access but not change the scene
|
||||||
|
(void)m_CurrentScene;
|
||||||
|
|
||||||
MaterialHelper *NewMaterial=new MaterialHelper();
|
MaterialHelper *NewMaterial=new MaterialHelper();
|
||||||
|
|
||||||
|
|
|
@ -234,6 +234,8 @@ const char* TextureTypeToString(aiTextureType in)
|
||||||
return "Reflection";
|
return "Reflection";
|
||||||
case aiTextureType_UNKNOWN:
|
case aiTextureType_UNKNOWN:
|
||||||
return "Unknown";
|
return "Unknown";
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ai_assert(false);
|
ai_assert(false);
|
||||||
|
@ -257,6 +259,8 @@ const char* MappingTypeToString(aiTextureMapping in)
|
||||||
return "Plane";
|
return "Plane";
|
||||||
case aiTextureMapping_OTHER:
|
case aiTextureMapping_OTHER:
|
||||||
return "Other";
|
return "Other";
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ai_assert(false);
|
ai_assert(false);
|
||||||
|
@ -401,6 +405,7 @@ aiMesh* MakeSubmesh(const aiMesh *pMesh, const std::vector<unsigned int> &subMes
|
||||||
}
|
}
|
||||||
|
|
||||||
ai_assert(nbParanoia==oMesh->mNumBones);
|
ai_assert(nbParanoia==oMesh->mNumBones);
|
||||||
|
(void)nbParanoia; // remove compiler warning on release build
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -344,7 +344,7 @@ class DestroySpatialSortProcess : public BaseProcess
|
||||||
aiProcess_GenNormals | aiProcess_JoinIdenticalVertices));
|
aiProcess_GenNormals | aiProcess_JoinIdenticalVertices));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Execute( aiScene* pScene)
|
void Execute( aiScene* /*pScene*/)
|
||||||
{
|
{
|
||||||
shared->RemoveProperty(AI_SPP_SPATIAL_SORT);
|
shared->RemoveProperty(AI_SPP_SPATIAL_SORT);
|
||||||
}
|
}
|
||||||
|
|
|
@ -158,7 +158,7 @@ Q3BSPFileImporter::~Q3BSPFileImporter()
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Returns true, if the loader can read this.
|
// Returns true, if the loader can read this.
|
||||||
bool Q3BSPFileImporter::CanRead( const std::string& rFile, IOSystem* pIOHandler, bool checkSig ) const
|
bool Q3BSPFileImporter::CanRead( const std::string& rFile, IOSystem* /*pIOHandler*/, bool checkSig ) const
|
||||||
{
|
{
|
||||||
if(!checkSig) {
|
if(!checkSig) {
|
||||||
return SimpleExtensionCheck( rFile, Q3BSPExtension .c_str() );
|
return SimpleExtensionCheck( rFile, Q3BSPExtension .c_str() );
|
||||||
|
@ -176,7 +176,7 @@ void Q3BSPFileImporter::GetExtensionList( std::set<std::string>& extensions )
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Import method.
|
// Import method.
|
||||||
void Q3BSPFileImporter::InternReadFile(const std::string &rFile, aiScene* pScene, IOSystem* pIOHandler)
|
void Q3BSPFileImporter::InternReadFile(const std::string &rFile, aiScene* pScene, IOSystem* /*pIOHandler*/)
|
||||||
{
|
{
|
||||||
Q3BSPZipArchive Archive( rFile );
|
Q3BSPZipArchive Archive( rFile );
|
||||||
if ( !Archive.isOpen() )
|
if ( !Archive.isOpen() )
|
||||||
|
@ -469,7 +469,6 @@ void Q3BSPFileImporter::createMaterials( const Q3BSP::Q3BSPModel *pModel, aiScen
|
||||||
}
|
}
|
||||||
|
|
||||||
pScene->mMaterials = new aiMaterial*[ m_MaterialLookupMap.size() ];
|
pScene->mMaterials = new aiMaterial*[ m_MaterialLookupMap.size() ];
|
||||||
size_t texIdx( 0 );
|
|
||||||
aiString aiMatName;
|
aiString aiMatName;
|
||||||
int textureId( -1 ), lightmapId( -1 );
|
int textureId( -1 ), lightmapId( -1 );
|
||||||
for ( FaceMapIt it = m_MaterialLookupMap.begin(); it != m_MaterialLookupMap.end();
|
for ( FaceMapIt it = m_MaterialLookupMap.begin(); it != m_MaterialLookupMap.end();
|
||||||
|
@ -623,7 +622,7 @@ aiFace *Q3BSPFileImporter::getNextFace( aiMesh *pMesh, unsigned int &rFaceIdx )
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Imports a texture file.
|
// Imports a texture file.
|
||||||
bool Q3BSPFileImporter::importTextureFromArchive( const Q3BSP::Q3BSPModel *pModel,
|
bool Q3BSPFileImporter::importTextureFromArchive( const Q3BSP::Q3BSPModel *pModel,
|
||||||
Q3BSP::Q3BSPZipArchive *pArchive, aiScene* pScene,
|
Q3BSP::Q3BSPZipArchive *pArchive, aiScene* /*pScene*/,
|
||||||
Assimp::MaterialHelper *pMatHelper, int textureId )
|
Assimp::MaterialHelper *pMatHelper, int textureId )
|
||||||
{
|
{
|
||||||
std::vector<std::string> supportedExtensions;
|
std::vector<std::string> supportedExtensions;
|
||||||
|
@ -656,6 +655,7 @@ bool Q3BSPFileImporter::importTextureFromArchive( const Q3BSP::Q3BSPModel *pMode
|
||||||
pTexture->mWidth = texSize;
|
pTexture->mWidth = texSize;
|
||||||
unsigned char *pData = new unsigned char[ pTexture->mWidth ];
|
unsigned char *pData = new unsigned char[ pTexture->mWidth ];
|
||||||
size_t readSize = pTextureStream->Read( pData, sizeof( unsigned char ), pTexture->mWidth );
|
size_t readSize = pTextureStream->Read( pData, sizeof( unsigned char ), pTexture->mWidth );
|
||||||
|
(void)readSize;
|
||||||
ai_assert( readSize == pTexture->mWidth );
|
ai_assert( readSize == pTexture->mWidth );
|
||||||
pTexture->pcData = reinterpret_cast<aiTexel*>( pData );
|
pTexture->pcData = reinterpret_cast<aiTexel*>( pData );
|
||||||
pTexture->achFormatHint[ 0 ] = ext[ 0 ];
|
pTexture->achFormatHint[ 0 ] = ext[ 0 ];
|
||||||
|
|
|
@ -113,7 +113,7 @@ char Q3BSPZipArchive::getOsSeparator() const
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Opens a file, which is part of the archive.
|
// Opens a file, which is part of the archive.
|
||||||
IOStream *Q3BSPZipArchive::Open( const char* pFile, const char* pMode )
|
IOStream *Q3BSPZipArchive::Open( const char* pFile, const char* /*pMode*/ )
|
||||||
{
|
{
|
||||||
ai_assert( NULL != pFile );
|
ai_assert( NULL != pFile );
|
||||||
|
|
||||||
|
|
|
@ -93,18 +93,19 @@ public:
|
||||||
// you need to mark the last character with '\0', so add
|
// you need to mark the last character with '\0', so add
|
||||||
// another character
|
// another character
|
||||||
unzOpenCurrentFile( m_zipFile );
|
unzOpenCurrentFile( m_zipFile );
|
||||||
bytes_read = unzReadCurrentFile( m_zipFile, pvBuffer, fileInfo.uncompressed_size);
|
const int ret = unzReadCurrentFile( m_zipFile, pvBuffer, fileInfo.uncompressed_size);
|
||||||
if ( bytes_read < 0 || bytes_read != static_cast<size_t>( fileInfo.uncompressed_size ) )
|
size_t filesize = fileInfo.uncompressed_size;
|
||||||
|
if ( ret < 0 || size_t(ret) != filesize )
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
size_t filesize = fileInfo.uncompressed_size;
|
bytes_read = ret;
|
||||||
unzCloseCurrentFile( m_zipFile );
|
unzCloseCurrentFile( m_zipFile );
|
||||||
}
|
}
|
||||||
return bytes_read;
|
return bytes_read;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t Write(const void* pvBuffer, size_t pSize, size_t pCount)
|
size_t Write(const void* /*pvBuffer*/, size_t /*pSize*/, size_t /*pCount*/)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -122,7 +123,7 @@ public:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
aiReturn Seek(size_t pOffset, aiOrigin pOrigin)
|
aiReturn Seek(size_t /*pOffset*/, aiOrigin /*pOrigin*/)
|
||||||
{
|
{
|
||||||
return aiReturn_FAILURE;
|
return aiReturn_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@ RAWImporter::~RAWImporter()
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Returns whether the class can handle the format of the given file.
|
// Returns whether the class can handle the format of the given file.
|
||||||
bool RAWImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
|
bool RAWImporter::CanRead( const std::string& pFile, IOSystem* /*pIOHandler*/, bool /*checkSig*/) const
|
||||||
{
|
{
|
||||||
return SimpleExtensionCheck(pFile,"raw");
|
return SimpleExtensionCheck(pFile,"raw");
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@ SMDImporter::~SMDImporter()
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Returns whether the class can handle the format of the given file.
|
// Returns whether the class can handle the format of the given file.
|
||||||
bool SMDImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool) const
|
bool SMDImporter::CanRead( const std::string& pFile, IOSystem* /*pIOHandler*/, bool) const
|
||||||
{
|
{
|
||||||
// fixme: auto format detection
|
// fixme: auto format detection
|
||||||
return SimpleExtensionCheck(pFile,"smd","vta");
|
return SimpleExtensionCheck(pFile,"smd","vta");
|
||||||
|
@ -200,6 +200,7 @@ void SMDImporter::LogWarning(const char* msg)
|
||||||
{
|
{
|
||||||
char szTemp[1024];
|
char szTemp[1024];
|
||||||
ai_assert(strlen(msg) < 1000);
|
ai_assert(strlen(msg) < 1000);
|
||||||
|
sprintf(szTemp,"Line %i: %s",iLineNumber,msg);
|
||||||
DefaultLogger::get()->warn(szTemp);
|
DefaultLogger::get()->warn(szTemp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -507,6 +507,7 @@ namespace STEP {
|
||||||
|
|
||||||
// GenericFill<T> is undefined so we need to have a specialization
|
// GenericFill<T> is undefined so we need to have a specialization
|
||||||
const size_t num_args = GenericFill<TDerived>(db,params,&*impl);
|
const size_t num_args = GenericFill<TDerived>(db,params,&*impl);
|
||||||
|
(void)num_args;
|
||||||
|
|
||||||
// the following check is commented because it will always trigger if
|
// the following check is commented because it will always trigger if
|
||||||
// parts of the entities are generated with dummy wrapper code.
|
// parts of the entities are generated with dummy wrapper code.
|
||||||
|
@ -731,7 +732,7 @@ namespace STEP {
|
||||||
// ------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct InternGenericConvert {
|
struct InternGenericConvert {
|
||||||
void operator()(T& out, const boost::shared_ptr< const EXPRESS::DataType >& in, const STEP::DB& db) {
|
void operator()(T& out, const boost::shared_ptr< const EXPRESS::DataType >& in, const STEP::DB& /*db*/) {
|
||||||
try{
|
try{
|
||||||
out = dynamic_cast< const typename PickBaseType<T>::Type& > ( *in );
|
out = dynamic_cast< const typename PickBaseType<T>::Type& > ( *in );
|
||||||
}
|
}
|
||||||
|
@ -743,7 +744,7 @@ namespace STEP {
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct InternGenericConvert< boost::shared_ptr< const EXPRESS::DataType > > {
|
struct InternGenericConvert< boost::shared_ptr< const EXPRESS::DataType > > {
|
||||||
void operator()(boost::shared_ptr< const EXPRESS::DataType >& out, const boost::shared_ptr< const EXPRESS::DataType >& in, const STEP::DB& db) {
|
void operator()(boost::shared_ptr< const EXPRESS::DataType >& out, const boost::shared_ptr< const EXPRESS::DataType >& in, const STEP::DB& /*db*/) {
|
||||||
out = in;
|
out = in;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -407,12 +407,12 @@ boost::shared_ptr<const EXPRESS::LIST> EXPRESS::LIST::Parse(const char*& inout,u
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
STEP::LazyObject::LazyObject(DB& db, uint64_t id,uint64_t line, const char* const type,const char* args)
|
STEP::LazyObject::LazyObject(DB& db, uint64_t id,uint64_t /*line*/, const char* const type,const char* args)
|
||||||
: db(db)
|
: id(id)
|
||||||
, id(id)
|
|
||||||
, type(type)
|
, type(type)
|
||||||
, obj()
|
, db(db)
|
||||||
, args(args)
|
, args(args)
|
||||||
|
, obj()
|
||||||
{
|
{
|
||||||
// find any external references and store them in the database.
|
// find any external references and store them in the database.
|
||||||
// this helps us emulate STEPs INVERSE fields.
|
// this helps us emulate STEPs INVERSE fields.
|
||||||
|
|
|
@ -747,7 +747,7 @@ void SceneCombiner::MergeBones(aiMesh* out,std::vector<aiMesh*>::const_iterator
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Merge a list of meshes
|
// Merge a list of meshes
|
||||||
void SceneCombiner::MergeMeshes(aiMesh** _out,unsigned int flags,
|
void SceneCombiner::MergeMeshes(aiMesh** _out,unsigned int /*flags*/,
|
||||||
std::vector<aiMesh*>::const_iterator begin,
|
std::vector<aiMesh*>::const_iterator begin,
|
||||||
std::vector<aiMesh*>::const_iterator end)
|
std::vector<aiMesh*>::const_iterator end)
|
||||||
{
|
{
|
||||||
|
|
|
@ -121,6 +121,7 @@ void TerragenImporter::InternReadFile( const std::string& pFile,
|
||||||
|
|
||||||
unsigned int x = 0,y = 0,mode = 0;
|
unsigned int x = 0,y = 0,mode = 0;
|
||||||
float rad = 6370.f;
|
float rad = 6370.f;
|
||||||
|
(void)rad;
|
||||||
|
|
||||||
|
|
||||||
aiNode* root = pScene->mRootNode = new aiNode();
|
aiNode* root = pScene->mRootNode = new aiNode();
|
||||||
|
|
|
@ -72,7 +72,7 @@ UnrealImporter::~UnrealImporter()
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Returns whether the class can handle the format of the given file.
|
// Returns whether the class can handle the format of the given file.
|
||||||
bool UnrealImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
|
bool UnrealImporter::CanRead( const std::string& pFile, IOSystem* /*pIOHandler*/, bool /*checkSig*/) const
|
||||||
{
|
{
|
||||||
return SimpleExtensionCheck(pFile,"3d","uc");
|
return SimpleExtensionCheck(pFile,"3d","uc");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1060,7 +1060,7 @@ std::string XFileParser::GetNextToken()
|
||||||
// name token
|
// name token
|
||||||
if( End - P < 4) return s;
|
if( End - P < 4) return s;
|
||||||
len = ReadBinDWord();
|
len = ReadBinDWord();
|
||||||
if( End - P < len) return s;
|
if( End - P < int(len)) return s;
|
||||||
s = std::string(P, len);
|
s = std::string(P, len);
|
||||||
P += len;
|
P += len;
|
||||||
return s;
|
return s;
|
||||||
|
@ -1068,7 +1068,7 @@ std::string XFileParser::GetNextToken()
|
||||||
// string token
|
// string token
|
||||||
if( End - P < 4) return s;
|
if( End - P < 4) return s;
|
||||||
len = ReadBinDWord();
|
len = ReadBinDWord();
|
||||||
if( End - P < len) return s;
|
if( End - P < int(len)) return s;
|
||||||
s = std::string(P, len);
|
s = std::string(P, len);
|
||||||
P += (len + 2);
|
P += (len + 2);
|
||||||
return s;
|
return s;
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
*/
|
*/
|
||||||
static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab)
|
static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab)
|
||||||
{
|
{
|
||||||
|
(void)pcrc_32_tab;
|
||||||
unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an
|
unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an
|
||||||
* unpredictable manner on 16-bit systems; not a problem
|
* unpredictable manner on 16-bit systems; not a problem
|
||||||
* with any known compiler so far, though */
|
* with any known compiler so far, though */
|
||||||
|
|
|
@ -168,7 +168,9 @@ def gen_converter(entity,schema):
|
||||||
if entity.name in schema.blacklist_partial:
|
if entity.name in schema.blacklist_partial:
|
||||||
return code+template_converter_ommitted+template_converter_epilogue;
|
return code+template_converter_ommitted+template_converter_epilogue;
|
||||||
|
|
||||||
code +=template_converter_check_argcnt.format(max_arg=max_arg,name=entity.name)
|
if max_arg > 0:
|
||||||
|
code +=template_converter_check_argcnt.format(max_arg=max_arg,name=entity.name)
|
||||||
|
|
||||||
for field in entity.members:
|
for field in entity.members:
|
||||||
code += template_converter_code_per_field.format(fieldname=field.name,
|
code += template_converter_code_per_field.format(fieldname=field.name,
|
||||||
handle_unset=handle_unset_args(field,entity,schema,arg_idx-arg_idx_ofs),
|
handle_unset=handle_unset_args(field,entity,schema,arg_idx-arg_idx_ofs),
|
||||||
|
|
|
@ -605,6 +605,9 @@ void CompareOnTheFlyMaterialProperty(comparer_context& comp) {
|
||||||
case aiPTI_Buffer:
|
case aiPTI_Buffer:
|
||||||
comp.cmp<uint8_t>(length,"mData");
|
comp.cmp<uint8_t>(length,"mData");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -759,6 +762,7 @@ void CompareOnTheFlyTexture(comparer_context& comp) {
|
||||||
|
|
||||||
const uint32_t w = comp.cmp<uint32_t>("mWidth");
|
const uint32_t w = comp.cmp<uint32_t>("mWidth");
|
||||||
const uint32_t h = comp.cmp<uint32_t>("mHeight");
|
const uint32_t h = comp.cmp<uint32_t>("mHeight");
|
||||||
|
(void)w; (void)h;
|
||||||
comp.cmp<char>("achFormatHint[0]");
|
comp.cmp<char>("achFormatHint[0]");
|
||||||
comp.cmp<char>("achFormatHint[1]");
|
comp.cmp<char>("achFormatHint[1]");
|
||||||
comp.cmp<char>("achFormatHint[2]");
|
comp.cmp<char>("achFormatHint[2]");
|
||||||
|
@ -842,7 +846,7 @@ void CheckHeader(comparer_context& comp)
|
||||||
int Assimp_CompareDump (const char* const* params, unsigned int num)
|
int Assimp_CompareDump (const char* const* params, unsigned int num)
|
||||||
{
|
{
|
||||||
// --help
|
// --help
|
||||||
if (num == 1 && !strcmp( params[0], "-h") || !strcmp( params[0], "--help") || !strcmp( params[0], "-?") ) {
|
if ((num == 1 && !strcmp( params[0], "-h")) || !strcmp( params[0], "--help") || !strcmp( params[0], "-?") ) {
|
||||||
printf("%s",AICMD_MSG_CMPDUMP_HELP);
|
printf("%s",AICMD_MSG_CMPDUMP_HELP);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -414,7 +414,7 @@ uint32_t WriteBinaryMesh(const aiMesh* mesh)
|
||||||
// using Assimp's standard hashing function.
|
// using Assimp's standard hashing function.
|
||||||
if (shortened) {
|
if (shortened) {
|
||||||
unsigned int processed = 0;
|
unsigned int processed = 0;
|
||||||
for (unsigned int job;job = std::min(mesh->mNumFaces-processed,512u);processed += job) {
|
for (unsigned int job;(job = std::min(mesh->mNumFaces-processed,512u));processed += job) {
|
||||||
|
|
||||||
uint32_t hash = 0;
|
uint32_t hash = 0;
|
||||||
for (unsigned int a = 0; a < job;++a) {
|
for (unsigned int a = 0; a < job;++a) {
|
||||||
|
@ -800,6 +800,8 @@ const char* TextureTypeToString(aiTextureType in)
|
||||||
return "Reflection";
|
return "Reflection";
|
||||||
case aiTextureType_UNKNOWN:
|
case aiTextureType_UNKNOWN:
|
||||||
return "Unknown";
|
return "Unknown";
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
ai_assert(false);
|
ai_assert(false);
|
||||||
return "BUG";
|
return "BUG";
|
||||||
|
@ -937,7 +939,7 @@ void WriteDump(const aiScene* scene, FILE* out, const char* src, const char* cmd
|
||||||
else if (!shortened){
|
else if (!shortened){
|
||||||
fprintf(out,"\t\t<Data length=\"%i\"> \n",tex->mWidth*tex->mHeight*4);
|
fprintf(out,"\t\t<Data length=\"%i\"> \n",tex->mWidth*tex->mHeight*4);
|
||||||
|
|
||||||
const unsigned int width = (unsigned int)log10((double)std::max(tex->mHeight,tex->mWidth))+1;
|
// const unsigned int width = (unsigned int)log10((double)std::max(tex->mHeight,tex->mWidth))+1;
|
||||||
for (unsigned int y = 0; y < tex->mHeight;++y) {
|
for (unsigned int y = 0; y < tex->mHeight;++y) {
|
||||||
for (unsigned int x = 0; x < tex->mWidth;++x) {
|
for (unsigned int x = 0; x < tex->mWidth;++x) {
|
||||||
aiTexel* tx = tex->pcData + y*tex->mWidth+x;
|
aiTexel* tx = tex->pcData + y*tex->mWidth+x;
|
||||||
|
@ -1094,7 +1096,7 @@ void WriteDump(const aiScene* scene, FILE* out, const char* src, const char* cmd
|
||||||
fprintf(out,"<MeshList num=\"%i\">\n",scene->mNumMeshes);
|
fprintf(out,"<MeshList num=\"%i\">\n",scene->mNumMeshes);
|
||||||
for (unsigned int i = 0; i < scene->mNumMeshes;++i) {
|
for (unsigned int i = 0; i < scene->mNumMeshes;++i) {
|
||||||
aiMesh* mesh = scene->mMeshes[i];
|
aiMesh* mesh = scene->mMeshes[i];
|
||||||
const unsigned int width = (unsigned int)log10((double)mesh->mNumVertices)+1;
|
// const unsigned int width = (unsigned int)log10((double)mesh->mNumVertices)+1;
|
||||||
|
|
||||||
// mesh header
|
// mesh header
|
||||||
fprintf(out,"\t<Mesh types=\"%s %s %s %s\" material_index=\"%i\">\n",
|
fprintf(out,"\t<Mesh types=\"%s %s %s %s\" material_index=\"%i\">\n",
|
||||||
|
|
Loading…
Reference in New Issue