Added new option to IFC importer to control tessellation angle

+ removed unused IFC option
pull/1208/head
Leo Terziman 2017-03-10 14:42:17 +01:00
parent bbd487308b
commit 8bc183182c
3 changed files with 20 additions and 21 deletions

View File

@ -153,10 +153,8 @@ const aiImporterDesc* IFCImporter::GetInfo () const
void IFCImporter::SetupProperties(const Importer* pImp)
{
settings.skipSpaceRepresentations = pImp->GetPropertyBool(AI_CONFIG_IMPORT_IFC_SKIP_SPACE_REPRESENTATIONS,true);
settings.skipCurveRepresentations = pImp->GetPropertyBool(AI_CONFIG_IMPORT_IFC_SKIP_CURVE_REPRESENTATIONS,true);
settings.useCustomTriangulation = pImp->GetPropertyBool(AI_CONFIG_IMPORT_IFC_CUSTOM_TRIANGULATION,true);
settings.conicSamplingAngle = 10.f;
settings.conicSamplingAngle = pImp->GetPropertyFloat(AI_CONFIG_IMPORT_IFC_CONIC_SAMPLING_ANGLE, AI_IMPORT_IFC_DEFAULT_CONIC_SAMPLING_ANGLE);
settings.skipAnnotations = true;
}

View File

@ -107,7 +107,6 @@ public:
{
Settings()
: skipSpaceRepresentations()
, skipCurveRepresentations()
, useCustomTriangulation()
, skipAnnotations()
, conicSamplingAngle(10.f)
@ -115,7 +114,6 @@ public:
bool skipSpaceRepresentations;
bool skipCurveRepresentations;
bool useCustomTriangulation;
bool skipAnnotations;
float conicSamplingAngle;

View File

@ -844,14 +844,6 @@ enum aiComponent
#define AI_CONFIG_IMPORT_OGRE_TEXTURETYPE_FROM_FILENAME \
"IMPORT_OGRE_TEXTURETYPE_FROM_FILENAME"
/** @brief Specifies whether the IFC loader skips over IfcSpace elements.
*
* IfcSpace elements (and their geometric representations) are used to
* represent, well, free space in a building storey.<br>
* Property type: Bool. Default value: true.
*/
#define AI_CONFIG_IMPORT_IFC_SKIP_SPACE_REPRESENTATIONS "IMPORT_IFC_SKIP_SPACE_REPRESENTATIONS"
/** @brief Specifies whether the Android JNI asset extraction is supported.
*
* Turn on this option if you want to manage assets in native
@ -860,17 +852,13 @@ enum aiComponent
*/
#define AI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORT "AI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORT"
// ---------------------------------------------------------------------------
/** @brief Specifies whether the IFC loader skips over
* shape representations of type 'Curve2D'.
/** @brief Specifies whether the IFC loader skips over IfcSpace elements.
*
* A lot of files contain both a faceted mesh representation and a outline
* with a presentation type of 'Curve2D'. Currently Assimp doesn't convert those,
* so turning this option off just clutters the log with errors.<br>
* IfcSpace elements (and their geometric representations) are used to
* represent, well, free space in a building storey.<br>
* Property type: Bool. Default value: true.
*/
#define AI_CONFIG_IMPORT_IFC_SKIP_CURVE_REPRESENTATIONS "IMPORT_IFC_SKIP_CURVE_REPRESENTATIONS"
#define AI_CONFIG_IMPORT_IFC_SKIP_SPACE_REPRESENTATIONS "IMPORT_IFC_SKIP_SPACE_REPRESENTATIONS"
// ---------------------------------------------------------------------------
/** @brief Specifies whether the IFC loader will use its own, custom triangulation
@ -887,6 +875,21 @@ enum aiComponent
*/
#define AI_CONFIG_IMPORT_IFC_CUSTOM_TRIANGULATION "IMPORT_IFC_CUSTOM_TRIANGULATION"
// ---------------------------------------------------------------------------
/** @brief Set the tessellation conic angle for IFC curves.
*
* This is used by the IFC importer to determine the tessellation parameter
* for curves.
* @note The default value is AI_IMPORT_IFC_DEFAULT_CONIC_SAMPLING_ANGLE
* Property type: float.
*/
#define AI_CONFIG_IMPORT_IFC_CONIC_SAMPLING_ANGLE "IMPORT_IFC_CONIC_SAMPLING_ANGLE"
// default value for AI_CONFIG_IMPORT_IFC_CONIC_SAMPLING_ANGLE
#if (!defined AI_IMPORT_IFC_DEFAULT_CONIC_SAMPLING_ANGLE)
# define AI_IMPORT_IFC_DEFAULT_CONIC_SAMPLING_ANGLE 10.0f
#endif
// ---------------------------------------------------------------------------
/** @brief Specifies whether the Collada loader will ignore the provided up direction.
*