diff options
Diffstat (limited to 'src/3rdparty/assimp/code/FindDegenerates.h')
-rw-r--r-- | src/3rdparty/assimp/code/FindDegenerates.h | 62 |
1 files changed, 42 insertions, 20 deletions
diff --git a/src/3rdparty/assimp/code/FindDegenerates.h b/src/3rdparty/assimp/code/FindDegenerates.h index 7b945ea3a..cf03a24bc 100644 --- a/src/3rdparty/assimp/code/FindDegenerates.h +++ b/src/3rdparty/assimp/code/FindDegenerates.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -53,15 +54,11 @@ namespace Assimp { // --------------------------------------------------------------------------- /** FindDegeneratesProcess: Searches a mesh for degenerated triangles. */ -class ASSIMP_API FindDegeneratesProcess : public BaseProcess -{ +class ASSIMP_API FindDegeneratesProcess : public BaseProcess { public: - FindDegeneratesProcess(); ~FindDegeneratesProcess(); -public: - // ------------------------------------------------------------------- // Check whether step is active bool IsActive( unsigned int pFlags) const; @@ -78,28 +75,53 @@ public: // Execute step on a given mesh void ExecuteOnMesh( aiMesh* mesh); + // ------------------------------------------------------------------- + /// @brief Enable the instant removal of degenerated primitives + /// @param enabled true for enabled. + void EnableInstantRemoval(bool enabled); // ------------------------------------------------------------------- - /** @brief Enable the instant removal of degenerated primitives - * @param d hm ... difficult to guess what this means, hu!? - */ - void EnableInstantRemoval(bool d) { - configRemoveDegenerates = d; - } + /// @brief Check whether instant removal is currently enabled + /// @return The instant removal state. + bool IsInstantRemoval() const; // ------------------------------------------------------------------- - /** @brief Check whether instant removal is currently enabled - * @return ... - */ - bool IsInstantRemoval() const { - return configRemoveDegenerates; - } + /// @brief Enable the area check for triangles. + /// @param enabled true for enabled. + void EnableAreaCheck( bool enabled ); -private: + // ------------------------------------------------------------------- + /// @brief Check whether the area check is enabled. + /// @return The area check state. + bool isAreaCheckEnabled() const; +private: //! Configuration option: remove degenerates faces immediately - bool configRemoveDegenerates; + bool mConfigRemoveDegenerates; + //! Configuration option: check for area + bool mConfigCheckAreaOfTriangle; }; + +inline +void FindDegeneratesProcess::EnableInstantRemoval(bool enabled) { + mConfigRemoveDegenerates = enabled; +} + +inline +bool FindDegeneratesProcess::IsInstantRemoval() const { + return mConfigRemoveDegenerates; +} + +inline +void FindDegeneratesProcess::EnableAreaCheck( bool enabled ) { + mConfigCheckAreaOfTriangle = enabled; +} + +inline +bool FindDegeneratesProcess::isAreaCheckEnabled() const { + return mConfigCheckAreaOfTriangle; } +} // Namespace Assimp + #endif // !! AI_FINDDEGENERATESPROCESS_H_INC |