code reformattings.

pull/3137/head
Kim Kulling 2020-04-06 13:33:03 +02:00
parent 131aed73b0
commit 9a11d91cb8
2 changed files with 39 additions and 48 deletions

View File

@ -4,7 +4,6 @@ Open Asset Import Library (assimp)
Copyright (c) 2006-2020, assimp team
All rights reserved.
Redistribution and use of this software in source and binary forms,
@ -50,27 +49,25 @@ namespace Assimp {
namespace FBX {
/** FBX import settings, parts of which are publicly accessible via their corresponding AI_CONFIG constants */
struct ImportSettings
{
ImportSettings()
: strictMode(true)
, readAllLayers(true)
, readAllMaterials(false)
, readMaterials(true)
, readTextures(true)
, readCameras(true)
, readLights(true)
, readAnimations(true)
, readWeights(true)
, preservePivots(true)
, optimizeEmptyAnimationCurves(true)
, useLegacyEmbeddedTextureNaming(false)
, removeEmptyBones( true )
, convertToMeters( false ) {
struct ImportSettings {
ImportSettings() :
strictMode(true),
readAllLayers(true),
readAllMaterials(false),
readMaterials(true),
readTextures(true),
readCameras(true),
readLights(true),
readAnimations(true),
readWeights(true),
preservePivots(true),
optimizeEmptyAnimationCurves(true),
useLegacyEmbeddedTextureNaming(false),
removeEmptyBones(true),
convertToMeters(false) {
// empty
}
/** enable strict mode:
* - only accept fbx 2012, 2013 files
* - on the slightest error, give up.
@ -94,7 +91,6 @@ struct ImportSettings
* This bit is ignored unless readMaterials=true*/
bool readAllMaterials;
/** import materials (true) or skip them and assign a default
* material. The default value is true.*/
bool readMaterials;
@ -156,9 +152,7 @@ struct ImportSettings
bool convertToMeters;
};
} // !FBX
} // !Assimp
} // namespace FBX
} // namespace Assimp
#endif

View File

@ -4,7 +4,6 @@ Open Asset Import Library (assimp)
Copyright (c) 2006-2020, assimp team
All rights reserved.
Redistribution and use of this software in source and binary forms,
@ -51,45 +50,44 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "FBXImportSettings.h"
namespace Assimp {
namespace Assimp {
// TinyFormatter.h
namespace Formatter {
template <typename T,typename TR, typename A> class basic_formatter;
typedef class basic_formatter< char, std::char_traits<char>, std::allocator<char> > format;
}
template <typename T, typename TR, typename A>
class basic_formatter;
typedef class basic_formatter<char, std::char_traits<char>, std::allocator<char>> format;
} // namespace Formatter
// -------------------------------------------------------------------------------------------
/** Load the Autodesk FBX file format.
See http://en.wikipedia.org/wiki/FBX
*/
/// Loads the Autodesk FBX file format.
///
/// See http://en.wikipedia.org/wiki/FBX
// -------------------------------------------------------------------------------------------
class FBXImporter : public BaseImporter, public LogFunctions<FBXImporter>
{
class FBXImporter : public BaseImporter, public LogFunctions<FBXImporter> {
public:
FBXImporter();
virtual ~FBXImporter();
// --------------------
bool CanRead( const std::string& pFile,
IOSystem* pIOHandler,
bool checkSig
) const;
bool CanRead(const std::string &pFile,
IOSystem *pIOHandler,
bool checkSig) const;
protected:
// --------------------
const aiImporterDesc *GetInfo() const;
// --------------------
const aiImporterDesc* GetInfo () const;
void SetupProperties(const Importer *pImp);
// --------------------
void SetupProperties(const Importer* pImp);
// --------------------
void InternReadFile( const std::string& pFile,
aiScene* pScene,
IOSystem* pIOHandler
);
void InternReadFile(const std::string &pFile,
aiScene *pScene,
IOSystem *pIOHandler);
private:
FBX::ImportSettings settings;
@ -97,4 +95,3 @@ private:
} // end of namespace Assimp
#endif // !INCLUDED_AI_FBX_IMPORTER_H