Commit 45110e7a authored by Jan Möbius's avatar Jan Möbius
Browse files

Splitted OpenVolumemesh into separate type dir

parent 4e0cdaba
include (plugin)
if (EXISTS ${CMAKE_SOURCE_DIR}/ObjectTypes/PolyhedralMesh)
add_definitions (-DENABLE_OPENVOLUMEMESH_SUPPORT)
add_definitions (-DENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT)
add_definitions (-DOVM_FORCE_STATIC_CAST)
endif()
if (EXISTS ${CMAKE_SOURCE_DIR}/ObjectTypes/HexahedralMesh)
add_definitions (-DENABLE_OPENVOLUMEMESH_SUPPORT)
add_definitions (-DENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT)
add_definitions (-DOVM_FORCE_STATIC_CAST)
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)
add_definitions (-DOVM_FORCE_STATIC_CAST)
endif()
endif()
endif()
openflipper_plugin (INSTALLDATA Icons
DIRS OpenMesh OpenVolumeMesh Widgets
DEPS OpenMesh OpenVolumeMesh
OPT_TYPES SKELETON BSPLINECURVE
OPT_TYPES SKELETON BSPLINECURVE POLYHEDRALMESH HEXAHEDRALMESH TETRAHEDRALMESH
TYPES POLYMESH TRIANGLEMESH)
......@@ -345,7 +345,7 @@ QWidget* MultiObjectPropertyModel::createWidgetForType(const TypeInfoWrapper& in
// OpenVolumeMesh
// ----------------------------------------
#ifdef ENABLE_OPENVOLUMEMESH_SUPPORT
#if defined(ENABLE_HEXAHEDRALMESH_SUPPORT)
if (OVMPropertyModel<HexahedralMesh>::isBoolType(info))
return new BooleanWidget();
if (OVMPropertyModel<HexahedralMesh>::isIntType(info))
......@@ -412,6 +412,7 @@ void range2_om(const Mesh* mesh, const PropertyInfo& info, T& min, T&max)
(mesh, mesh->n_faces(), info.propName(), min, max);
}
#if defined(ENABLE_HEXAHEDRALMESH_SUPPORT) || defined(ENABLE_POLYHEDRALMESH_SUPPORT) || defined(ENABLE_TETRAHEDRALMESH_SUPPORT)
template <typename Mesh, typename T>
void range2_ovm(Mesh* mesh, const PropertyInfo& info, T& min, T&max)
{
......@@ -448,6 +449,7 @@ void range2_ovm(Mesh* mesh, const PropertyInfo& info, T& min, T&max)
(prop, mesh->n_vertices(), min, max);
}
}
#endif
template <typename T>
void range1(const BaseObject* obj, const PropertyInfo& info, T& min, T& max)
......@@ -459,12 +461,12 @@ void range1(const BaseObject* obj, const PropertyInfo& info, T& min, T& max)
if (obj->dataType(DATA_POLY_MESH))
range2_om(polyMesh(obj->id()), info, min, max);
#ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT
#ifdef ENABLE_POLYHEDRALMESH_SUPPORT
if (obj->dataType(DATA_POLYHEDRAL_MESH))
range2_ovm(polyhedralMesh(obj->id()), info, min, max);
#endif
#ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT
#ifdef ENABLE_HEXAHEDRALMESH_SUPPORT
if (obj->dataType(DATA_HEXAHEDRAL_MESH))
range2_ovm(hexahedralMesh(obj->id()), info, min, max);
#endif
......@@ -476,13 +478,13 @@ void MultiObjectPropertyModel::setRange(const PropertyInfo& info, QWidget* widge
bool isDoubleType = info.typeinfo() == OMPropertyModel<TriMesh>::proptype_double;
#ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT
#ifdef ENABLE_HEXAHEDRALMESH_SUPPORT
isDoubleType |= OVMPropertyModel<HexahedralMesh>::isDoubleType(info.typeinfo());
#endif
bool isIntType = info.typeinfo() == OMPropertyModel<TriMesh>::proptype_int;
#ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT
#ifdef ENABLE_HEXAHEDRALMESH_SUPPORT
isIntType |= OVMPropertyModel<HexahedralMesh>::isIntType(info.typeinfo());
#endif
......
......@@ -47,7 +47,7 @@
* *
\*===========================================================================*/
#ifdef ENABLE_OPENVOLUMEMESH_SUPPORT
#if defined(ENABLE_HEXAHEDRALMESH_SUPPORT) || defined(ENABLE_POLYHEDRALMESH_SUPPORT) || defined(ENABLE_TETRAHEDRALMESH_SUPPORT)
#ifndef OVM_PROPERTY_MODEL_H
#define OVM_PROPERTY_MODEL_H
......@@ -258,4 +258,4 @@ INITIALIZE_PROPTYPES(Vertex)
#endif /* OVM_PROPERTY_MODEL_H */
#endif /* ENABLE_OPENVOLUMEMESH_SUPPORT */
#endif
......@@ -47,8 +47,6 @@
* *
\*===========================================================================*/
#ifdef ENABLE_OPENVOLUMEMESH_SUPPORT
#define OVM_PROPERTY_MODEL_CC
#include "OVMPropertyModel.hh"
......@@ -961,4 +959,3 @@ supportedPropertyTypes.insert(proptype_##primitive##_Vec3f); \
}
#endif /* ENABLE_OPENVOLUMEMESH_SUPPORT */
......@@ -47,7 +47,6 @@
* *
\*===========================================================================*/
#ifdef ENABLE_OPENVOLUMEMESH_SUPPORT
#ifndef OVM_PROPERTY_VISUALIZER_HH
#define OVM_PROPERTY_VISUALIZER_HH
......@@ -245,5 +244,4 @@ void Classname::visualizeVertexProp(bool _setDrawMode)\
#endif /* OVM_PROPERTY_VISUALIZER_HH */
#endif /* ENABLE_OPENVOLUMEMESH_SUPPORT */
......@@ -47,8 +47,6 @@
* *
\*===========================================================================*/
#ifdef ENABLE_OPENVOLUMEMESH_SUPPORT
#ifndef OVM_PROPERTY_VISUALIZER_BOOLEAN_HH
#define OVM_PROPERTY_VISUALIZER_BOOLEAN_HH
......@@ -95,4 +93,3 @@ protected:
#endif /* OVM_PROPERTY_VISUALIZER_BOOLEAN_HH */
#endif /* ENABLE_OPENVOLUMEMESH_SUPPORT */
......@@ -47,7 +47,6 @@
* *
\*===========================================================================*/
#ifdef ENABLE_OPENVOLUMEMESH_SUPPORT
#define OVM_PROPERTY_VISUALIZER_BOOLEAN_CC
......@@ -204,4 +203,3 @@ QString OVMPropertyVisualizerBoolean<MeshT>::getPropertyText(unsigned int index)
return OVMPropertyVisualizer<MeshT>::template getPropertyText_<bool>(index);
}
#endif /* ENABLE_OPENVOLUMEMESH_SUPPORT */
......@@ -47,8 +47,6 @@
* *
\*===========================================================================*/
#ifdef ENABLE_OPENVOLUMEMESH_SUPPORT
#ifndef OVM_PROPERTY_VISUALIZER_DOUBLE_HH
#define OVM_PROPERTY_VISUALIZER_DOUBLE_HH
......@@ -100,4 +98,3 @@ protected:
#endif /* OVM_PROPERTY_VISUALIZER_DOUBLE_HH */
#endif /* ENABLE_OPENVOLUMEMESH_SUPPORT */
......@@ -47,8 +47,6 @@
* *
\*===========================================================================*/
#ifdef ENABLE_OPENVOLUMEMESH_SUPPORT
#define OVM_PROPERTY_VISUALIZER_DOUBLE_CC
#include "OVMPropertyVisualizerDouble.hh"
......@@ -273,4 +271,3 @@ std::unique_ptr<ACG::IColorCoder> OVMPropertyVisualizerDouble<MeshT>::buildColor
return doubleWidget->buildColorCoder();
}
#endif /* ENABLE_OPENVOLUMEMESH_SUPPORT */
......@@ -47,8 +47,6 @@
* *
\*===========================================================================*/
#ifdef ENABLE_OPENVOLUMEMESH_SUPPORT
#ifndef OVM_PROPERTY_VISUALIZER_INTEGER_HH
#define OVM_PROPERTY_VISUALIZER_INTEGER_HH
......@@ -104,5 +102,3 @@ protected:
#endif
#endif /* OVM_PROPERTY_VISUALIZER_INTEGER_HH */
#endif /* ENABLE_OPENVOLUMEMESH_SUPPORT */
......@@ -47,8 +47,6 @@
* *
\*===========================================================================*/
#ifdef ENABLE_OPENVOLUMEMESH_SUPPORT
#define OVM_PROPERTY_VISUALIZER_ITEGER_CC
#include "OVMPropertyVisualizerInteger.hh"
......@@ -271,4 +269,3 @@ std::unique_ptr<ACG::IColorCoder> OVMPropertyVisualizerInteger<MeshT, T>::buildC
return integerWidget->buildColorCoder();
}
#endif /* ENABLE_OPENVOLUMEMESH_SUPPORT */
......@@ -47,17 +47,15 @@
* *
\*===========================================================================*/
#ifdef ENABLE_OPENVOLUMEMESH_SUPPORT
#define OVM_PROPERTY_VISUALIZER_CC
#ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT
#ifdef ENABLE_POLYHEDRALMESH_SUPPORT
#include <ObjectTypes/PolyhedralMesh/PolyhedralMesh.hh>
#endif
#ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT
#ifdef ENABLE_HEXAHEDRALMESH_SUPPORT
#include <ObjectTypes/HexahedralMesh/HexahedralMesh.hh>
#endif
#ifdef ENABLE_OPENVOLUMEMESH_TETRAHEDRAL_SUPPORT
#ifdef ENABLE_TETRAHEDRALMESH_SUPPORT
#include <ObjectTypes/TetrahedralMesh/TetrahedralMesh.hh>
#endif
......@@ -451,4 +449,3 @@ void OVMPropertyVisualizer<MeshT>::showHistogram(ACG::QtWidgets::QtHistogramWidg
}
}
#endif /* ENABLE_OPENVOLUMEMESH_SUPPORT */
......@@ -47,8 +47,6 @@
* *
\*===========================================================================*/
#ifdef ENABLE_OPENVOLUMEMESH_SUPPORT
#ifndef OVM_PROPERTY_VISUALIZER_VECTOR_HH
#define OVM_PROPERTY_VISUALIZER_VECTOR_HH
......@@ -112,4 +110,3 @@ protected:
#endif /* OVM_PROPERTY_VISUALIZER_VECTOR_HH */
#endif /* ENABLE_OPENVOLUMEMESH_SUPPORT */
......@@ -47,8 +47,6 @@
* *
\*===========================================================================*/
#ifdef ENABLE_OPENVOLUMEMESH_SUPPORT
#ifndef OVM_PROPERTY_VISUALIZER_VECTOR_FIELD_DIFFERENCE_HH
#define OVM_PROPERTY_VISUALIZER_VECTOR_FIELD_DIFFERENCE_HH
......@@ -100,5 +98,3 @@ private:
#endif /* OVM_PROPERTY_VISUALIZER_VECTOR_FIELD_DIFFERENCE_HH */
#endif /* ENABLE_OPENVOLUMEMESH_SUPPORT */
......@@ -47,7 +47,6 @@
* *
\*===========================================================================*/
#ifdef ENABLE_OPENVOLUMEMESH_SUPPORT
#define OVM_PROPERTY_VISZUALIZTER_VECTOR_FIELD_DIFFERENCE_CC
......@@ -270,4 +269,3 @@ void OVMPropertyVisualizerVectorFieldDifference<MeshT>::visualizeVertexProp(bool
}
}
#endif /* ENABLE_OPENVOLUMEMESH_SUPPORT */
......@@ -47,7 +47,6 @@
* *
\*===========================================================================*/
#ifdef ENABLE_OPENVOLUMEMESH_SUPPORT
#define OVM_PROPERTY_VISUALIZER_VECTOR_CC
......@@ -545,4 +544,3 @@ void OVMPropertyVisualizerVector<MeshT>::setVertexPropertyFromText(unsigned int
prop[vh] = this->strToVec3d(text);
}
#endif /* ENABLE_OPENVOLUMEMESH_SUPPORT */
......@@ -52,17 +52,17 @@
#include "MultiObjectPropertyModel.hh"
#include "OpenMesh/OMPropertyModel.hh"
#ifdef ENABLE_OPENVOLUMEMESH_SUPPORT
#if defined(ENABLE_HEXAHEDRALMESH_SUPPORT) || defined(ENABLE_POLYHEDRALMESH_SUPPORT) || defined(ENABLE_TETRAHEDRALMESH_SUPPORT)
#include "OpenVolumeMesh/OVMPropertyModel.hh"
#endif /* ENABLE_OPENVOLUMEMESH_SUPPORT */
#ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT
#endif /* ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT */
#ifdef ENABLE_POLYHEDRALMESH_SUPPORT
#endif /* ENABLE_POLYHEDRALMESH_SUPPORT */
#ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT
#endif /* ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT */
#ifdef ENABLE_HEXAHEDRALMESH_SUPPORT
#endif /* ENABLE_HEXAHEDRALMESH_SUPPORT */
#ifdef ENABLE_OPENVOLUMEMESH_TETRAHEDRAL_SUPPORT
#ifdef ENABLE_TETRAHEDRALMESH_SUPPORT
#include <ObjectTypes/TetrahedralMesh/TetrahedralMesh.hh>
#endif
......@@ -138,21 +138,21 @@ PropertyModel* __PropertyModelFactory::getModel(int objectID)
PolyMesh* mesh = PluginFunctions::polyMesh(object);
propertyModel = new OMPropertyModel<PolyMesh>(mesh, objectID);
}
#ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT
#ifdef ENABLE_POLYHEDRALMESH_SUPPORT
else if ( object->dataType(DATA_POLYHEDRAL_MESH) )
{
PolyhedralMesh* mesh = PluginFunctions::polyhedralMesh(object);
propertyModel = new OVMPropertyModel<PolyhedralMesh>(mesh, objectID);
}
#endif /* ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT */
#ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT
#endif /* ENABLE_POLYHEDRALMESH_SUPPORT */
#ifdef ENABLE_HEXAHEDRALMESH_SUPPORT
else if ( object->dataType(DATA_HEXAHEDRAL_MESH) )
{
HexahedralMesh* mesh = PluginFunctions::hexahedralMesh(object);
propertyModel = new OVMPropertyModel<HexahedralMesh>(mesh, objectID);
}
#endif /* ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT */
#ifdef ENABLE_OPENVOLUMEMESH_TETRAHEDRAL_SUPPORT
#endif /* ENABLE_HEXAHEDRALMESH_SUPPORT */
#ifdef ENABLE_TETRAHEDRALMESH_SUPPORT
else if ( object->dataType(DATA_TETRAHEDRAL_MESH) )
{
TetrahedralMesh* mesh = PluginFunctions::tetrahedralMesh(object);
......
......@@ -59,13 +59,13 @@
#include "PropertyModelFactory.hh"
#ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT
#ifdef ENABLE_POLYHEDRALMESH_SUPPORT
#include <ObjectTypes/PolyhedralMesh/PolyhedralMesh.hh>
#endif
#ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT
#ifdef ENABLE_HEXAHEDRALMESH_SUPPORT
#include <ObjectTypes/HexahedralMesh/HexahedralMesh.hh>
#endif
#ifdef ENABLE_OPENVOLUMEMESH_TETRAHEDRAL_SUPPORT
#ifdef ENABLE_TETRAHEDRALMESH_SUPPORT
#include <ObjectTypes/TetrahedralMesh/TetrahedralMesh.hh>
#endif
......@@ -198,13 +198,13 @@ void PropertyVisPlugin::slotObjectUpdated( int _identifier, const UpdateType& _t
void PropertyVisPlugin::updateGUI()
{
DataType datatype = DataType(DATA_TRIANGLE_MESH | DATA_POLY_MESH);
#ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT
#ifdef ENABLE_POLYHEDRALMESH_SUPPORT
datatype |= DataType(DATA_POLYHEDRAL_MESH);
#endif
#ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT
#ifdef ENABLE_HEXAHEDRALMESH_SUPPORT
datatype |= DataType(DATA_HEXAHEDRAL_MESH);
#endif
#ifdef ENABLE_OPENVOLUMEMESH_TETRAHEDRAL_SUPPORT
#ifdef ENABLE_TETRAHEDRALMESH_SUPPORT
datatype |= DataType(DATA_TETRAHEDRAL_MESH);
#endif
objectListItemModel_.refresh(datatype);
......
......@@ -61,11 +61,11 @@
#include <ObjectTypes/TriangleMesh/TriangleMesh.hh>
#include <ObjectTypes/PolyMesh/PolyMesh.hh>
#ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT
#ifdef ENABLE_HEXAHEDRALMESH_SUPPORT
#include <ObjectTypes/HexahedralMesh/HexahedralMesh.hh>
#endif
#ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT
#ifdef ENABLE_POLYHEDRALMESH_SUPPORT
#include <ObjectTypes/PolyhedralMesh/PolyhedralMesh.hh>
#endif
......@@ -205,11 +205,11 @@ static DataType supportedDataTypes()
{
DataType res = DATA_TRIANGLE_MESH | DATA_POLY_MESH;
#ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT
#ifdef ENABLE_POLYHEDRALMESH_SUPPORT
res |= DATA_POLYHEDRAL_MESH;
#endif
#ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT
#ifdef ENABLE_HEXAHEDRALMESH_SUPPORT
res |= DATA_HEXAHEDRAL_MESH;
#endif
......
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