Commit ea0193a4 authored by Max Lyon's avatar Max Lyon

Differentiate between HexahedralMeshSupport and PolyhedralMeshSupport in property vis plugin.

closes #1269

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@15838 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 930d0323
...@@ -6,6 +6,12 @@ endif() ...@@ -6,6 +6,12 @@ endif()
if (EXISTS ${CMAKE_SOURCE_DIR}/ObjectTypes/PolyhedralMesh) if (EXISTS ${CMAKE_SOURCE_DIR}/ObjectTypes/PolyhedralMesh)
add_definitions (-DENABLE_OPENVOLUMEMESH_SUPPORT) add_definitions (-DENABLE_OPENVOLUMEMESH_SUPPORT)
add_definitions (-DENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT)
endif()
if (EXISTS ${CMAKE_SOURCE_DIR}/ObjectTypes/HexahedralMesh)
add_definitions (-DENABLE_OPENVOLUMEMESH_SUPPORT)
add_definitions (-DENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT)
endif() endif()
openflipper_plugin (INSTALLDATA Icons DIRS OpenMesh OpenVolumeMesh Widgets) openflipper_plugin (INSTALLDATA Icons DIRS OpenMesh OpenVolumeMesh Widgets)
...@@ -55,7 +55,6 @@ ...@@ -55,7 +55,6 @@
#include "../Utils.hh" #include "../Utils.hh"
#include <OpenVolumeMesh/Core/BaseProperty.hh> #include <OpenVolumeMesh/Core/BaseProperty.hh>
#include <ObjectTypes/PolyhedralMesh/PolyhedralMesh.hh>
#include "Widgets/LoadSaveWidget.hh" #include "Widgets/LoadSaveWidget.hh"
#include "Widgets/PickWidget.hh" #include "Widgets/PickWidget.hh"
......
...@@ -49,9 +49,6 @@ ...@@ -49,9 +49,6 @@
#include "Widgets/BooleanWidget.hh" #include "Widgets/BooleanWidget.hh"
#include <ObjectTypes/PolyhedralMesh/PolyhedralMesh.hh>
#include <ObjectTypes/HexahedralMesh/HexahedralMesh.hh>
#include <iostream> #include <iostream>
template <typename MeshT> template <typename MeshT>
......
...@@ -51,10 +51,6 @@ ...@@ -51,10 +51,6 @@
#include <ACG/Utils/ColorGenerator.hh> #include <ACG/Utils/ColorGenerator.hh>
#include <ObjectTypes/PolyhedralMesh/PolyhedralMesh.hh>
#include <ObjectTypes/HexahedralMesh/HexahedralMesh.hh>
#include <iostream> #include <iostream>
template <typename MeshT, typename T> template <typename MeshT, typename T>
......
...@@ -44,6 +44,13 @@ ...@@ -44,6 +44,13 @@
#define OVM_PROPERTY_VISUALIZER_CC #define OVM_PROPERTY_VISUALIZER_CC
#ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT
#include <ObjectTypes/PolyhedralMesh/PolyhedralMesh.hh>
#endif
#ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT
#include <ObjectTypes/HexahedralMesh/HexahedralMesh.hh>
#endif
#include "OVMPropertyVisualizer.hh" #include "OVMPropertyVisualizer.hh"
template <typename MeshT> template <typename MeshT>
......
...@@ -53,9 +53,6 @@ ...@@ -53,9 +53,6 @@
#include <OpenVolumeMesh/Core/BaseEntities.hh> #include <OpenVolumeMesh/Core/BaseEntities.hh>
#include <OpenVolumeMesh/Core/BaseProperty.hh> #include <OpenVolumeMesh/Core/BaseProperty.hh>
#include <ObjectTypes/PolyhedralMesh/PolyhedralMesh.hh>
#include <ObjectTypes/HexahedralMesh/HexahedralMesh.hh>
#include "Widgets/VectorWidget.hh" #include "Widgets/VectorWidget.hh"
#include <iostream> #include <iostream>
......
...@@ -42,13 +42,24 @@ ...@@ -42,13 +42,24 @@
#include "PropertyModelFactory.hh" #include "PropertyModelFactory.hh"
#include <OpenFlipper/BasePlugin/PluginFunctions.hh>
#include "OpenMesh/OMPropertyModel.hh" #include "OpenMesh/OMPropertyModel.hh"
#include <ObjectTypes/TriangleMesh/TriangleMesh.hh>
#include <ObjectTypes/PolyMesh/PolyMesh.hh>
#ifdef ENABLE_OPENVOLUMEMESH_SUPPORT #ifdef ENABLE_OPENVOLUMEMESH_SUPPORT
#include "OpenVolumeMesh/OVMPropertyModel.hh" #include "OpenVolumeMesh/OVMPropertyModel.hh"
#endif /* ENABLE_OPENVOLUMEMESH_SUPPORT */ #endif /* ENABLE_OPENVOLUMEMESH_SUPPORT */
#ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT
#include <ObjectTypes/PolyhedralMesh/PolyhedralMesh.hh>
#endif /* ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT */
#ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT
#include <ObjectTypes/HexahedralMesh/HexahedralMesh.hh>
#endif /* ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT */
/** /**
* @brief Returns the PropertyModel * @brief Returns the PropertyModel
...@@ -91,18 +102,20 @@ PropertyModel* __PropertyModelFactory::getModel(int objectID) ...@@ -91,18 +102,20 @@ PropertyModel* __PropertyModelFactory::getModel(int objectID)
PolyMesh* mesh = PluginFunctions::polyMesh(object); PolyMesh* mesh = PluginFunctions::polyMesh(object);
propertyModel = new OMPropertyModel<PolyMesh>(mesh, objectID); propertyModel = new OMPropertyModel<PolyMesh>(mesh, objectID);
} }
#ifdef ENABLE_OPENVOLUMEMESH_SUPPORT #ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT
else if ( object->dataType(DATA_POLYHEDRAL_MESH) ) else if ( object->dataType(DATA_POLYHEDRAL_MESH) )
{ {
PolyhedralMesh* mesh = PluginFunctions::polyhedralMesh(object); PolyhedralMesh* mesh = PluginFunctions::polyhedralMesh(object);
propertyModel = new OVMPropertyModel<PolyhedralMesh>(mesh, objectID); propertyModel = new OVMPropertyModel<PolyhedralMesh>(mesh, objectID);
} }
#endif /* ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT */
#ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT
else if ( object->dataType(DATA_HEXAHEDRAL_MESH) ) else if ( object->dataType(DATA_HEXAHEDRAL_MESH) )
{ {
HexahedralMesh* mesh = PluginFunctions::hexahedralMesh(object); HexahedralMesh* mesh = PluginFunctions::hexahedralMesh(object);
propertyModel = new OVMPropertyModel<HexahedralMesh>(mesh, objectID); propertyModel = new OVMPropertyModel<HexahedralMesh>(mesh, objectID);
} }
#endif /* ENABLE_OPENVOLUMEMESH_SUPPORT */ #endif /* ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT */
else else
{ {
propertyModel = new PropertyModel(); propertyModel = new PropertyModel();
......
...@@ -47,15 +47,6 @@ ...@@ -47,15 +47,6 @@
#include "PropertyModel.hh" #include "PropertyModel.hh"
#include <OpenFlipper/BasePlugin/PluginFunctions.hh>
#include <ObjectTypes/TriangleMesh/TriangleMesh.hh>
#include <ObjectTypes/PolyMesh/PolyMesh.hh>
#ifdef ENABLE_OPENVOLUMEMESH_SUPPORT
#include <ObjectTypes/PolyhedralMesh/PolyhedralMesh.hh>
#include <ObjectTypes/HexahedralMesh/HexahedralMesh.hh>
#endif /* ENABLE_OPENVOLUMEMESH_SUPPORT */
class PropertyVisPlugin; class PropertyVisPlugin;
......
...@@ -65,6 +65,16 @@ ...@@ -65,6 +65,16 @@
#include "PropertyModelFactory.hh" #include "PropertyModelFactory.hh"
#include <ObjectTypes/TriangleMesh/TriangleMesh.hh>
#include <ObjectTypes/PolyMesh/PolyMesh.hh>
#ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT
#include <ObjectTypes/PolyhedralMesh/PolyhedralMesh.hh>
#endif
#ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT
#include <ObjectTypes/HexahedralMesh/HexahedralMesh.hh>
#endif
//== IMPLEMENTATION ========================================================== //== IMPLEMENTATION ==========================================================
#define PROP_VIS "PropertyVisualization" #define PROP_VIS "PropertyVisualization"
...@@ -144,8 +154,11 @@ void PropertyVisPlugin::slotObjectUpdated( int _identifier, const UpdateType& _t ...@@ -144,8 +154,11 @@ void PropertyVisPlugin::slotObjectUpdated( int _identifier, const UpdateType& _t
void PropertyVisPlugin::updateGUI() void PropertyVisPlugin::updateGUI()
{ {
DataType datatype = DataType(DATA_TRIANGLE_MESH | DATA_POLY_MESH); DataType datatype = DataType(DATA_TRIANGLE_MESH | DATA_POLY_MESH);
#ifdef ENABLE_OPENVOLUMEMESH_SUPPORT #ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT
datatype |= DataType(DATA_POLYHEDRAL_MESH | DATA_HEXAHEDRAL_MESH); datatype |= DataType(DATA_POLYHEDRAL_MESH);
#endif
#ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT
datatype |= DataType(DATA_HEXAHEDRAL_MESH);
#endif #endif
objectListItemModel_.refresh(datatype); objectListItemModel_.refresh(datatype);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment