28 #include "../../../repo_bouncer_global.h"
31 namespace manipulator{
32 namespace modelconvertor{
48 return boolSettings.at(CALCULATE_TANGENT_SPACE);
57 return floatSettings.at(CALCULATE_TANGENT_SPACE_MAX_SMOOTHING_ANGLE);
66 return boolSettings.at(CONVERT_TO_UV_COORDINATES);
75 return boolSettings.at(DEGENERATES_TO_POINTS_LINES);
84 return boolSettings.at(DEBONE);
93 return floatSettings.at(DEBONE_THRESHOLD);
102 return boolSettings.at(DEBONE_ONLY_IF_ALL);
111 return boolSettings.at(FIND_INSTANCES);
120 return boolSettings.at(FIND_INAVLID_DATA);
130 return floatSettings.at(FIND_INAVLID_DATA_ANIMATION_ACCURACY);
139 return boolSettings.at(FIX_INFACING_NORMALS);
148 return boolSettings.at(FLIP_UV_COORDINATES);
157 return boolSettings.at(FLIP_WINDING_ORDER);
166 return boolSettings.at(GENERATE_NORMALS);
175 return boolSettings.at(GENERATE_NORMALS_FLAT);
184 return boolSettings.at(GENERATE_NORMALS_SMOOTH);
193 return floatSettings.at(GENERATE_NORMALS_SMOOTH_CREASE_ANGLE);
202 return boolSettings.at(IMPROVE_CACHE_LOCALITY);
211 return intSettings.at(IMPROVE_CACHE_LOCALITY_VERTEX_CACHE_SIZE);
220 return boolSettings.at(JOIN_IDENTICAL_VERTICES);
229 return boolSettings.at(LIMIT_BONE_WEIGHTS);
238 return intSettings.at(LIMIT_BONE_WEIGHTS_MAX_WEIGHTS);
247 return boolSettings.at(MAKE_LEFT_HANDED);
256 return boolSettings.at(OPTIMIZE_MESHES);
265 return boolSettings.at(PRE_TRANSFORM_UV_COORDINATES);
274 return boolSettings.at(PRE_TRANSFORM_VERTICES);
283 return boolSettings.at(PRE_TRANSFORM_VERTICES_NORMALIZE);
292 return boolSettings.at(REMOVE_COMPONENTS);
301 return boolSettings.at(REMOVE_COMPONENTS_ANIMATIONS);
310 return boolSettings.at(REMOVE_COMPONENTS_BI_TANGENTS);
319 return boolSettings.at(REMOVE_COMPONENTS_BONE_WEIGHTS);
328 return boolSettings.at(REMOVE_COMPONENTS_CAMERAS);
337 return boolSettings.at(REMOVE_COMPONENTS_COLORS);
346 return boolSettings.at(REMOVE_COMPONENTS_LIGHTS);
355 return boolSettings.at(REMOVE_COMPONENTS_MATERIALS);
364 return boolSettings.at(REMOVE_COMPONENTS_MESHES);
373 return boolSettings.at(REMOVE_COMPONENTS_NORMALS);
382 return boolSettings.at(REMOVE_COMPONENTS_TEXTURES);
391 return boolSettings.at(REMOVE_COMPONENTS_TEXTURE_COORDINATES);
400 return boolSettings.at(REMOVE_REDUNDANT_MATERIALS);
409 return stringSettings.at(REMOVE_REDUNDANT_MATERIALS_SKIP);
418 return boolSettings.at(REMOVE_REDUNDANT_NODES);
427 return stringSettings.at(REMOVE_REDUNDANT_NODES_SKIP);
430 virtual bool getSkipIFCSpaceRepresentation()
const
432 return boolSettings.at(IFC_SKIP_SPACE_REPRESENTATIONS);
441 return boolSettings.at(SORT_AND_REMOVE);
450 return boolSettings.at(SORT_AND_REMOVE_LINES);
459 return boolSettings.at(SORT_AND_REMOVE_POINTS);
468 return boolSettings.at(SORT_AND_REMOVE_POLYGONS);
477 return boolSettings.at(SORT_AND_REMOVE_TRIANGLES);
486 return boolSettings.at(SPLIT_BY_BONE_COUNT);
495 return boolSettings.at(SPLIT_BY_BONE_COUNT_MAX_BONES);
504 return boolSettings.at(SPLIT_LARGE_MESHES);
513 return intSettings.at(SPLIT_LARGE_MESHES_TRIANGLE_LIMIT);
522 return intSettings.at(SPLIT_LARGE_MESHES_VERTEX_LIMIT);
531 return boolSettings.at(TRIANGULATE);
540 return boolSettings.at(VALIDATE_DATA_STRUCTURES);
547 virtual void setCalculateTangentSpace(
bool on)
550 setValue(CALCULATE_TANGENT_SPACE, on);
553 virtual void setCalculateTangentSpaceMaxSmoothingAngle(
float angle)
555 setValue(CALCULATE_TANGENT_SPACE_MAX_SMOOTHING_ANGLE, angle);
561 setValue(CONVERT_TO_UV_COORDINATES, on);
567 setValue(DEGENERATES_TO_POINTS_LINES, on);
571 virtual void setDebone(
bool on) { setValue(DEBONE, on); }
576 setValue(DEBONE_THRESHOLD, t);
579 virtual void setDeboneOnlyIfAll(
bool on)
581 setValue(DEBONE_ONLY_IF_ALL, on);
584 virtual void setFindInstances(
bool on)
586 setValue(FIND_INSTANCES, on);
589 virtual void setFindInvalidData(
bool on)
591 setValue(FIND_INAVLID_DATA, on);
594 virtual void setFindInvalidDataAnimationAccuracy(
float f)
596 setValue(FIND_INAVLID_DATA_ANIMATION_ACCURACY, f);
599 virtual void setFixInfacingNormals(
bool on)
601 setValue(FIX_INFACING_NORMALS, on);
604 virtual void setFlipUVCoordinates(
bool on)
606 setValue(FLIP_UV_COORDINATES, on);
609 virtual void setFlipWindingOrder(
bool on)
611 setValue(FLIP_WINDING_ORDER, on);
614 virtual void setGenerateNormals(
bool on)
616 setValue(GENERATE_NORMALS, on);
619 virtual void setGenerateNormalsFlat(
bool on)
621 setValue(GENERATE_NORMALS_FLAT, on);
624 virtual void setGenerateNormalsSmooth(
bool on)
626 setValue(GENERATE_NORMALS_SMOOTH, on);
629 virtual void setGenerateNormalsSmoothCreaseAngle(
float f)
631 setValue(GENERATE_NORMALS_SMOOTH_CREASE_ANGLE, f);
634 virtual void setImproveCacheLocality(
bool on)
636 setValue(IMPROVE_CACHE_LOCALITY, on);
639 virtual void setImproveCacheLocalityCacheSize(
int vertexCount)
641 setValue(IMPROVE_CACHE_LOCALITY_VERTEX_CACHE_SIZE, vertexCount);
644 virtual void setJoinIdenticalVertices(
bool on)
646 setValue(JOIN_IDENTICAL_VERTICES, on);
649 virtual void setLimitBoneWeights(
bool on)
651 setValue(LIMIT_BONE_WEIGHTS, on);
654 virtual void setLimitBoneWeightsMaxWeights(
int i)
656 setValue(LIMIT_BONE_WEIGHTS_MAX_WEIGHTS, i);
659 virtual void setMakeLeftHanded(
bool on)
661 setValue(MAKE_LEFT_HANDED, on);
664 virtual void setOptimizeMeshes(
bool on)
666 setValue(OPTIMIZE_MESHES, on);
669 virtual void setPreTransformUVCoordinates(
bool on)
671 setValue(PRE_TRANSFORM_UV_COORDINATES, on);
674 virtual void setPreTransformVertices(
bool on)
676 setValue(PRE_TRANSFORM_VERTICES, on);
679 virtual void setPreTransforVerticesNormalize(
bool on)
681 setValue(PRE_TRANSFORM_VERTICES_NORMALIZE, on);
684 virtual void setRemoveComponents(
bool on)
686 setValue(REMOVE_COMPONENTS, on);
689 virtual void setRemoveComponentsAnimations(
bool on)
691 setValue(REMOVE_COMPONENTS_ANIMATIONS, on);
694 virtual void setRemoveComponentsBiTangents(
bool on)
696 setValue(REMOVE_COMPONENTS_BI_TANGENTS, on);
699 virtual void setRemoveComponentsBoneWeights(
bool on)
701 setValue(REMOVE_COMPONENTS_BONE_WEIGHTS, on);
704 virtual void setRemoveComponentsCameras(
bool on)
706 setValue(REMOVE_COMPONENTS_CAMERAS, on);
709 virtual void setRemoveComponentsColors(
bool on)
711 setValue(REMOVE_COMPONENTS_COLORS, on);
714 virtual void setRemoveComponentsLights(
bool on)
716 setValue(REMOVE_COMPONENTS_LIGHTS, on);
719 virtual void setRemoveComponentsMaterials(
bool on)
721 setValue(REMOVE_COMPONENTS_MATERIALS, on);
724 virtual void setRemoveComponentsMeshes(
bool on)
726 setValue(REMOVE_COMPONENTS_MESHES, on);
729 virtual void setRemoveComponentsNormals(
bool on)
731 setValue(REMOVE_COMPONENTS_NORMALS, on);
734 virtual void setRemoveComponentsTextures(
bool on)
736 setValue(REMOVE_COMPONENTS_TEXTURES, on);
739 virtual void setRemoveComponentsTextureCoordinates(
bool on)
741 setValue(REMOVE_COMPONENTS_TEXTURE_COORDINATES, on);
744 virtual void setRemoveRedundantMaterials(
bool on)
746 setValue(REMOVE_REDUNDANT_MATERIALS, on);
749 virtual void setRemoveRedundantMaterialsSkip(
const std::string& skip)
751 setValue(REMOVE_REDUNDANT_MATERIALS_SKIP, skip);
754 virtual void setRemoveRedundantNodes(
bool on)
756 setValue(REMOVE_REDUNDANT_NODES, on);
759 virtual void setRemoveRedundantNodesSkip(
const std::string& skip)
761 setValue(REMOVE_REDUNDANT_NODES_SKIP, skip);
764 virtual void getSkipIFCSpaceRepresentation(
const bool &skip)
766 setValue(IFC_SKIP_SPACE_REPRESENTATIONS, skip);
769 virtual void setSortAndRemove(
bool on)
771 setValue(SORT_AND_REMOVE, on);
774 virtual void setSortAndRemoveLines(
bool on)
776 setValue(SORT_AND_REMOVE_LINES, on);
779 virtual void setSortAndRemovePoints(
bool on)
781 setValue(SORT_AND_REMOVE_POINTS, on);
784 virtual void setSortAndRemovePolygons(
bool on)
786 setValue(SORT_AND_REMOVE_POLYGONS, on);
789 virtual void setSortAndRemoveTriangles(
bool on)
791 setValue(SORT_AND_REMOVE_TRIANGLES, on);
794 virtual void setSplitByBoneCount(
bool on)
796 setValue(SPLIT_BY_BONE_COUNT, on);
799 virtual void setSplitByBoneCountMaxBones(
int max)
801 setValue(SPLIT_BY_BONE_COUNT_MAX_BONES, max);
804 virtual void setSplitLargeMeshes(
bool on)
806 setValue(SPLIT_LARGE_MESHES, on);
809 virtual void setSplitLargeMeshesTriangleLimit(
int limit)
811 setValue(SPLIT_LARGE_MESHES_TRIANGLE_LIMIT, limit);
814 virtual void setSplitLargeMeshesVertexLimit(
int limit)
816 setValue(SPLIT_LARGE_MESHES_VERTEX_LIMIT, limit);
819 virtual void setTriangulate(
bool on)
821 setValue(TRIANGULATE, on);
824 virtual void setValidateDataStructures(
bool on)
826 setValue(VALIDATE_DATA_STRUCTURES, on);
841 std::ifstream &conf);
843 void setValue(std::string label,
bool value)
845 boolSettings[label] = value;
848 void setValue(std::string label, int32_t value)
850 intSettings[label] = value;
853 void setValue(std::string label,
float value)
855 floatSettings[label] = value;
858 void setValue(std::string label, std::string value)
860 stringSettings[label] = value;
863 std::map<std::string, bool> boolSettings;
864 std::map<std::string, int32_t> intSettings;
865 std::map<std::string, float> floatSettings;
866 std::map<std::string, std::string> stringSettings;
868 static const std::string CALCULATE_TANGENT_SPACE;
869 static const std::string CALCULATE_TANGENT_SPACE_MAX_SMOOTHING_ANGLE;
870 static const std::string CONVERT_TO_UV_COORDINATES;
871 static const std::string DEGENERATES_TO_POINTS_LINES;
872 static const std::string DEBONE;
873 static const std::string DEBONE_THRESHOLD;
874 static const std::string DEBONE_ONLY_IF_ALL;
875 static const std::string FIND_INSTANCES;
876 static const std::string FIND_INAVLID_DATA;
877 static const std::string FIND_INAVLID_DATA_ANIMATION_ACCURACY;
878 static const std::string FIX_INFACING_NORMALS;
879 static const std::string FLIP_UV_COORDINATES;
880 static const std::string FLIP_WINDING_ORDER;
881 static const std::string GENERATE_NORMALS;
882 static const std::string GENERATE_NORMALS_FLAT;
883 static const std::string GENERATE_NORMALS_SMOOTH;
884 static const std::string GENERATE_NORMALS_SMOOTH_CREASE_ANGLE;
885 static const std::string IFC_SKIP_SPACE_REPRESENTATIONS;
886 static const std::string IMPROVE_CACHE_LOCALITY;
887 static const std::string IMPROVE_CACHE_LOCALITY_VERTEX_CACHE_SIZE;
888 static const std::string JOIN_IDENTICAL_VERTICES;
889 static const std::string LIMIT_BONE_WEIGHTS;
890 static const std::string LIMIT_BONE_WEIGHTS_MAX_WEIGHTS;
891 static const std::string MAKE_LEFT_HANDED;
892 static const std::string OPTIMIZE_MESHES;
893 static const std::string PRE_TRANSFORM_UV_COORDINATES;
894 static const std::string PRE_TRANSFORM_VERTICES;
895 static const std::string PRE_TRANSFORM_VERTICES_NORMALIZE;
896 static const std::string REMOVE_COMPONENTS;
897 static const std::string REMOVE_COMPONENTS_ANIMATIONS;
898 static const std::string REMOVE_COMPONENTS_BI_TANGENTS;
899 static const std::string REMOVE_COMPONENTS_BONE_WEIGHTS;
900 static const std::string REMOVE_COMPONENTS_CAMERAS;
901 static const std::string REMOVE_COMPONENTS_COLORS;
902 static const std::string REMOVE_COMPONENTS_LIGHTS;
903 static const std::string REMOVE_COMPONENTS_MATERIALS;
904 static const std::string REMOVE_COMPONENTS_MESHES;
905 static const std::string REMOVE_COMPONENTS_NORMALS;
906 static const std::string REMOVE_COMPONENTS_TEXTURES;
907 static const std::string REMOVE_COMPONENTS_TEXTURE_COORDINATES;
908 static const std::string REMOVE_REDUNDANT_MATERIALS;
909 static const std::string REMOVE_REDUNDANT_MATERIALS_SKIP;
910 static const std::string REMOVE_REDUNDANT_NODES;
911 static const std::string REMOVE_REDUNDANT_NODES_SKIP;
912 static const std::string SORT_AND_REMOVE;
913 static const std::string SORT_AND_REMOVE_POINTS;
914 static const std::string SORT_AND_REMOVE_LINES;
915 static const std::string SORT_AND_REMOVE_TRIANGLES;
916 static const std::string SORT_AND_REMOVE_POLYGONS;
917 static const std::string SPLIT_BY_BONE_COUNT;
918 static const std::string SPLIT_BY_BONE_COUNT_MAX_BONES;
919 static const std::string SPLIT_LARGE_MESHES;
920 static const std::string SPLIT_LARGE_MESHES_TRIANGLE_LIMIT;
921 static const std::string SPLIT_LARGE_MESHES_VERTEX_LIMIT;
922 static const std::string TRIANGULATE;
923 static const std::string VALIDATE_DATA_STRUCTURES;
virtual bool getConvertToUVCoordinates() const
Definition: repo_model_import_config.h:64
virtual bool getRemoveComponentsNormals() const
Definition: repo_model_import_config.h:371
virtual bool getRemoveComponentsBoneWeights() const
Definition: repo_model_import_config.h:317
virtual std::string getRemoveRedundantMaterialsSkip() const
Definition: repo_model_import_config.h:407
virtual bool getJoinIdenticalVertices() const
Definition: repo_model_import_config.h:218
virtual bool getFlipWindingOrder() const
Definition: repo_model_import_config.h:155
virtual bool getImproveCacheLocality() const
Definition: repo_model_import_config.h:200
virtual void setDegeneratesToPointsLines(bool on)
Sets the degenerates to points and lines to settings.
Definition: repo_model_import_config.h:565
virtual bool getRemoveRedundantNodes() const
Definition: repo_model_import_config.h:416
virtual int getImproveCacheLocalityVertexCacheSize() const
Definition: repo_model_import_config.h:209
virtual std::string getRemoveRedundantNodesSkip() const
Definition: repo_model_import_config.h:425
virtual float getCalculateTangentSpaceMaxSmoothingAngle() const
Definition: repo_model_import_config.h:55
virtual bool getRemoveComponentsAnimations() const
Definition: repo_model_import_config.h:299
Definition: repo_connection_pool_mongo.h:32
virtual bool getRemoveComponentsTextureCoordinates() const
Definition: repo_model_import_config.h:389
virtual bool getGenerateNormalsFlat() const
Definition: repo_model_import_config.h:173
virtual void setDeboneThreshold(float t)
Sets the debone threshold to settings.
Definition: repo_model_import_config.h:574
virtual bool getPreTransformUVCoordinates() const
Definition: repo_model_import_config.h:263
virtual int getSplitLargeMeshesVertexLimit() const
Definition: repo_model_import_config.h:520
virtual bool getRemoveComponentsLights() const
Definition: repo_model_import_config.h:344
virtual bool getSortAndRemovePolygons() const
Definition: repo_model_import_config.h:466
virtual bool getRemoveComponentsColors() const
Definition: repo_model_import_config.h:335
virtual bool getPreTransformVerticesNormalize() const
Definition: repo_model_import_config.h:281
virtual bool getFixInfacingNormals() const
Definition: repo_model_import_config.h:137
virtual bool getDeboneOnlyIfAll() const
Definition: repo_model_import_config.h:100
virtual bool getRemoveRedundantMaterials() const
Definition: repo_model_import_config.h:398
virtual float getDeboneThreshold() const
Definition: repo_model_import_config.h:91
virtual bool getRemoveComponentsBiTangents() const
Definition: repo_model_import_config.h:308
virtual bool getPreTransformVertices() const
Definition: repo_model_import_config.h:272
virtual bool getTriangulate() const
Definition: repo_model_import_config.h:529
virtual bool getRemoveComponents() const
Definition: repo_model_import_config.h:290
virtual bool getSplitLargeMeshes() const
Definition: repo_model_import_config.h:502
virtual bool getFlipUVCoordinates() const
Definition: repo_model_import_config.h:146
virtual bool getGenerateNormalsSmooth() const
Definition: repo_model_import_config.h:182
virtual bool getSortAndRemove() const
Definition: repo_model_import_config.h:439
virtual bool getLimitBoneWeights() const
Definition: repo_model_import_config.h:227
virtual bool getRemoveComponentsMeshes() const
Definition: repo_model_import_config.h:362
virtual bool getRemoveComponentsCameras() const
Definition: repo_model_import_config.h:326
virtual float getFindInvalidDataAnimationAccuracy() const
Definition: repo_model_import_config.h:128
virtual bool getFindInstances() const
Definition: repo_model_import_config.h:109
virtual void setDebone(bool on)
Sets the debone to settings.
Definition: repo_model_import_config.h:571
virtual void setConvertToUVCoordinates(bool on)
Sets the convert to UV coordinates to settings.
Definition: repo_model_import_config.h:559
virtual bool getSplitByBoneCount() const
Definition: repo_model_import_config.h:484
virtual bool getFindInvalidData() const
Definition: repo_model_import_config.h:118
virtual float getGenerateNormalsSmoothCreaseAngle() const
Definition: repo_model_import_config.h:191
virtual bool getSortAndRemoveLines() const
Definition: repo_model_import_config.h:448
virtual bool getSortAndRemovePoints() const
Definition: repo_model_import_config.h:457
virtual bool getRemoveComponentsTextures() const
Definition: repo_model_import_config.h:380
virtual bool getCalculateTangentSpace() const
Definition: repo_model_import_config.h:46
virtual bool getGenerateNormals() const
Definition: repo_model_import_config.h:164
virtual bool getRemoveComponentsMaterials() const
Definition: repo_model_import_config.h:353
virtual int getSplitByBoneCountMaxBones() const
Definition: repo_model_import_config.h:493
virtual int getLimitBoneWeightsMaxWeight() const
Definition: repo_model_import_config.h:236
virtual int getSplitLargeMeshesTriangleLimit() const
Definition: repo_model_import_config.h:511
virtual bool getDebone() const
Definition: repo_model_import_config.h:82
virtual bool getMakeLeftHanded() const
Definition: repo_model_import_config.h:245
virtual bool getOptimizeMeshes() const
Definition: repo_model_import_config.h:254
Definition: repo_model_import_config.h:33
virtual bool getDegeneratesToPointsLines() const
Definition: repo_model_import_config.h:73
virtual bool getSortAndRemoveTriangles() const
Definition: repo_model_import_config.h:475
virtual bool getValidateDataStructures() const
Definition: repo_model_import_config.h:538