diff --git a/code/FBXConverter.cpp b/code/FBXConverter.cpp index 289a84ac6..200853a92 100644 --- a/code/FBXConverter.cpp +++ b/code/FBXConverter.cpp @@ -54,13 +54,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "StringComparison.h" #include "../include/assimp/scene.h" -#include -#include #include -#include #include #include +#include +#include +#include namespace Assimp { namespace FBX { @@ -79,8 +79,9 @@ using namespace Util; class Converter { public: - - /** the different parts that make up the final local transformation of a fbx node */ + /** + * The different parts that make up the final local transformation of a fbx-node + */ enum TransformationComp { TransformationComp_Translation = 0, @@ -102,7 +103,6 @@ public: }; public: - Converter(aiScene* out, const Document& doc) : defaultMaterialIndex() , out(out) @@ -858,7 +858,7 @@ private: } } - // faster codepath, just copy the data + // faster code-path, just copy the data temp.push_back(ConvertMeshSingleMaterial(mesh, model, node_global_transform)); return temp; } @@ -961,7 +961,8 @@ private: } if(binormals) { - ai_assert(tangents.size() == vertices.size() && binormals->size() == vertices.size()); + ai_assert( tangents.size() == vertices.size() ); + ai_assert( binormals->size() == vertices.size() ); out_mesh->mTangents = new aiVector3D[vertices.size()]; std::copy(tangents.begin(),tangents.end(),out_mesh->mTangents); @@ -1216,10 +1217,12 @@ private: // ------------------------------------------------------------------------------------------------ - /** - if materialIndex == NO_MATERIAL_SEPARATION, materials are not taken into - * account when determining which weights to include. + /** + * - if materialIndex == NO_MATERIAL_SEPARATION, materials are not taken into + * account when determining which weights to include. * - outputVertStartIndices is only used when a material index is specified, it gives for - * each output vertex the DOM index it maps to. */ + * each output vertex the DOM index it maps to. + */ void ConvertWeights(aiMesh* out, const Model& model, const MeshGeometry& geo, const aiMatrix4x4& node_global_transform = aiMatrix4x4(), unsigned int materialIndex = NO_MATERIAL_SEPARATION, diff --git a/code/FBXConverter.h b/code/FBXConverter.h index a69c05e41..ddbbbbf25 100644 --- a/code/FBXConverter.h +++ b/code/FBXConverter.h @@ -51,15 +51,14 @@ namespace FBX { class Document; - -/** Convert a FBX #Document to #aiScene +/** + * Convert a FBX #Document to #aiScene * @param out Empty scene to be populated - * @param doc Parsed FBX document */ + * @param doc Parsed FBX document + */ void ConvertToAssimpScene(aiScene* out, const Document& doc); - } } - -#endif +#endif // INCLUDED_AI_FBX_CONVERTER_H diff --git a/code/FBXImporter.cpp b/code/FBXImporter.cpp index 48fd854ea..83b670125 100644 --- a/code/FBXImporter.cpp +++ b/code/FBXImporter.cpp @@ -86,7 +86,8 @@ static const aiImporterDesc desc = { // ------------------------------------------------------------------------------------------------ // Constructor to be privately used by #Importer FBXImporter::FBXImporter() -{} +{ +} // ------------------------------------------------------------------------------------------------ // Destructor, private as well @@ -104,7 +105,7 @@ bool FBXImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool } else if ((!extension.length() || checkSig) && pIOHandler) { - // at least ascii FBX files usually have a 'FBX' somewhere in their head + // at least ASCII-FBX files usually have a 'FBX' somewhere in their head const char* tokens[] = {"fbx"}; return SearchFileHeaderForToken(pIOHandler,pFile,tokens,1); } diff --git a/code/FBXModel.cpp b/code/FBXModel.cpp index c3018e4af..776334e78 100644 --- a/code/FBXModel.cpp +++ b/code/FBXModel.cpp @@ -56,7 +56,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. namespace Assimp { namespace FBX { - using namespace Util; +using namespace Util; // ------------------------------------------------------------------------------------------------ Model::Model(uint64_t id, const Element& element, const Document& doc, const std::string& name) diff --git a/code/FBXNodeAttribute.cpp b/code/FBXNodeAttribute.cpp index 2bb00248b..405ce7206 100644 --- a/code/FBXNodeAttribute.cpp +++ b/code/FBXNodeAttribute.cpp @@ -58,7 +58,8 @@ namespace FBX { // ------------------------------------------------------------------------------------------------ NodeAttribute::NodeAttribute(uint64_t id, const Element& element, const Document& doc, const std::string& name) - : Object(id,element,name) +: Object(id,element,name) +, props() { const Scope& sc = GetRequiredScope(element); diff --git a/code/FBXProperties.h b/code/FBXProperties.h index fbaa229a1..b9951db8b 100644 --- a/code/FBXProperties.h +++ b/code/FBXProperties.h @@ -65,15 +65,12 @@ namespace FBX { class Property { protected: - Property(); public: - virtual ~Property(); public: - template const T* As() const { return dynamic_cast(this); @@ -85,14 +82,12 @@ template class TypedProperty : public Property { public: - explicit TypedProperty(const T& value) : value(value) { } public: - const T& Value() const { return value; } @@ -106,19 +101,18 @@ typedef std::fbx_unordered_map > DirectP typedef std::fbx_unordered_map PropertyMap; typedef std::fbx_unordered_map LazyPropertyMap; -/** Represents a property table as can be found in the newer FBX files (Properties60, Properties70)*/ +/** + * Represents a property table as can be found in the newer FBX files (Properties60, Properties70) + */ class PropertyTable { public: - // in-memory property table with no source element PropertyTable(); - PropertyTable(const Element& element, boost::shared_ptr templateProps); ~PropertyTable(); public: - const Property* Get(const std::string& name) const; // PropertyTable's need not be coupled with FBX elements so this can be NULL @@ -133,7 +127,6 @@ public: DirectPropertyMap GetUnparsedProperties() const; private: - LazyPropertyMap lazyProps; mutable PropertyMap props; const boost::shared_ptr templateProps; @@ -187,4 +180,4 @@ inline T PropertyGet(const PropertyTable& in, const std::string& name, } //! FBX } //! Assimp -#endif // +#endif // INCLUDED_AI_FBX_PROPERTIES_H