Commit 364858a0 authored by Max Lyon's avatar Max Lyon

TetrahedralMesh support in Property Visualization

parent 184d40f7
......@@ -14,4 +14,15 @@ if (EXISTS ${CMAKE_SOURCE_DIR}/ObjectTypes/HexahedralMesh)
add_definitions (-DENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT)
endif()
find_package(OpenVolumeMesh)
if(OPENVOLUMEMESH_FOUND)
if(EXISTS ${OPENVOLUMEMESH_INCLUDE_DIR}/OpenVolumeMesh/Mesh/TetrahedralMesh.hh)
if(EXISTS ${CMAKE_SOURCE_DIR}/ObjectTypes/TetrahedralMesh/TetrahedralMesh.hh)
add_definitions (-DENABLE_OPENVOLUMEMESH_SUPPORT)
add_definitions (-DENABLE_OPENVOLUMEMESH_TETRAHEDRAL_SUPPORT)
endif()
endif()
endif()
openflipper_plugin (INSTALLDATA Icons DIRS OpenMesh OpenVolumeMesh Widgets DEPS OpenMesh OpenVolumeMesh)
......@@ -57,6 +57,9 @@
#ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT
#include <ObjectTypes/HexahedralMesh/HexahedralMesh.hh>
#endif
#ifdef ENABLE_OPENVOLUMEMESH_TETRAHEDRAL_SUPPORT
#include <ObjectTypes/TetrahedralMesh/TetrahedralMesh.hh>
#endif
#include "OVMPropertyVisualizer.hh"
......
......@@ -68,6 +68,10 @@
#include <ObjectTypes/HexahedralMesh/HexahedralMesh.hh>
#endif /* ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT */
#ifdef ENABLE_OPENVOLUMEMESH_TETRAHEDRAL_SUPPORT
#include <ObjectTypes/TetrahedralMesh/TetrahedralMesh.hh>
#endif
/**
* @brief Returns the PropertyModel
......@@ -154,6 +158,13 @@ PropertyModel* __PropertyModelFactory::getModel(int objectID)
propertyModel = new OVMPropertyModel<HexahedralMesh>(mesh, objectID);
}
#endif /* ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT */
#ifdef ENABLE_OPENVOLUMEMESH_TETRAHEDRAL_SUPPORT
else if ( object->dataType(DATA_TETRAHEDRAL_MESH) )
{
TetrahedralMesh* mesh = PluginFunctions::tetrahedralMesh(object);
propertyModel = new OVMPropertyModel<TetrahedralMesh>(mesh, objectID);
}
#endif
else
{
return 0;
......
......@@ -76,10 +76,13 @@
#include <ObjectTypes/PolyMesh/PolyMesh.hh>
#ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT
#include <ObjectTypes/PolyhedralMesh/PolyhedralMesh.hh>
#include <ObjectTypes/PolyhedralMesh/PolyhedralMesh.hh>
#endif
#ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT
#include <ObjectTypes/HexahedralMesh/HexahedralMesh.hh>
#include <ObjectTypes/HexahedralMesh/HexahedralMesh.hh>
#endif
#ifdef ENABLE_OPENVOLUMEMESH_TETRAHEDRAL_SUPPORT
#include <ObjectTypes/TetrahedralMesh/TetrahedralMesh.hh>
#endif
//== IMPLEMENTATION ==========================================================
......@@ -215,9 +218,12 @@ void PropertyVisPlugin::updateGUI()
datatype |= DataType(DATA_POLYHEDRAL_MESH);
#endif
#ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT
datatype |= DataType(DATA_HEXAHEDRAL_MESH);
datatype |= DataType(DATA_HEXAHEDRAL_MESH);
#endif
#ifdef ENABLE_OPENVOLUMEMESH_TETRAHEDRAL_SUPPORT
datatype |= DataType(DATA_TETRAHEDRAL_MESH);
#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