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

Splitted OpenVolumemesh into separate type dir

parent 16f80f35
include (plugin) include (plugin)
SET( CURRENT_PLUGIN_DEPS "")
if (EXISTS ${CMAKE_SOURCE_DIR}/ObjectTypes/TSplineMesh) if (EXISTS ${CMAKE_SOURCE_DIR}/ObjectTypes/TSplineMesh)
add_definitions (-DENABLE_TSPLINEMESH_SUPPORT) add_definitions (-DENABLE_TSPLINEMESH_SUPPORT)
endif () endif ()
if (EXISTS ${CMAKE_SOURCE_DIR}/ObjectTypes/PolyhedralMesh) openflipper_plugin ( TYPES PLANE POLYMESH TRIANGLEMESH
add_definitions (-DENABLE_OPENVOLUMEMESH_SUPPORT) OPTDEPS OpenVolumeMesh
add_definitions (-DENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT) OPT_TYPES POLYLINE SKELETON HEXAHEDRALMESH POLYHEDRALMESH TETRAHEDRALMESH
list( APPEND CURRENT_PLUGIN_DEPS OpenVolumeMesh )
endif()
if (EXISTS ${CMAKE_SOURCE_DIR}/ObjectTypes/HexahedralMesh)
add_definitions (-DENABLE_OPENVOLUMEMESH_SUPPORT)
add_definitions (-DENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT)
list( APPEND CURRENT_PLUGIN_DEPS OpenVolumeMesh )
endif()
if (EXISTS ${CMAKE_SOURCE_DIR}/ObjectTypes/TetrahedralMesh)
add_definitions (-DENABLE_OPENVOLUMEMESH_SUPPORT)
add_definitions (-DENABLE_OPENVOLUMEMESH_TETRAHEDRAL_SUPPORT)
list( APPEND CURRENT_PLUGIN_DEPS OpenVolumeMesh )
endif()
list(REMOVE_DUPLICATES CURRENT_PLUGIN_DEPS )
openflipper_plugin ( DEPS ${CURRENT_PLUGIN_DEPS}
TYPES PLANE POLYMESH TRIANGLEMESH
OPT_TYPES POLYLINE SKELETON
TRANSLATION_LANGUAGES de_DE TRANSLATION_LANGUAGES de_DE
INSTALLDATA Icons VsiMetadata ) INSTALLDATA Icons VsiMetadata )
......
...@@ -72,15 +72,15 @@ ...@@ -72,15 +72,15 @@
#include <ObjectTypes/Skeleton/Helper/SkeletonTransform.hh> #include <ObjectTypes/Skeleton/Helper/SkeletonTransform.hh>
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT #ifdef ENABLE_HEXAHEDRALMESH_SUPPORT
#include <ObjectTypes/HexahedralMesh/HexahedralMesh.hh> #include <ObjectTypes/HexahedralMesh/HexahedralMesh.hh>
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_TETRAHEDRAL_SUPPORT #ifdef ENABLE_TETRAHEDRALMESH_SUPPORT
#include <ObjectTypes/TetrahedralMesh/TetrahedralMesh.hh> #include <ObjectTypes/TetrahedralMesh/TetrahedralMesh.hh>
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT #ifdef ENABLE_POLYHEDRALMESH_SUPPORT
#include <ObjectTypes/PolyhedralMesh/PolyhedralMesh.hh> #include <ObjectTypes/PolyhedralMesh/PolyhedralMesh.hh>
#endif #endif
...@@ -598,17 +598,17 @@ void MovePlugin::moveObject(ACG::Matrix4x4d mat, int _id) { ...@@ -598,17 +598,17 @@ void MovePlugin::moveObject(ACG::Matrix4x4d mat, int _id) {
} else if ( object->dataType() == DATA_SKELETON ) { } else if ( object->dataType() == DATA_SKELETON ) {
transformSkeleton(mat , *PluginFunctions::skeleton(object) ); transformSkeleton(mat , *PluginFunctions::skeleton(object) );
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT #ifdef ENABLE_HEXAHEDRALMESH_SUPPORT
} else if ( object->dataType() == DATA_HEXAHEDRAL_MESH ) { } else if ( object->dataType() == DATA_HEXAHEDRAL_MESH ) {
HexahedralMeshObject* obj = PluginFunctions::hexahedralMeshObject(object); HexahedralMeshObject* obj = PluginFunctions::hexahedralMeshObject(object);
transformVolumeMesh(mat , *obj->mesh() , obj->normals() ); transformVolumeMesh(mat , *obj->mesh() , obj->normals() );
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_TETRAHEDRAL_SUPPORT #ifdef ENABLE_TETRAHEDRALMESH_SUPPORT
} else if ( object->dataType() == DATA_TETRAHEDRAL_MESH ) { } else if ( object->dataType() == DATA_TETRAHEDRAL_MESH ) {
TetrahedralMeshObject* obj = PluginFunctions::tetrahedralMeshObject(object); TetrahedralMeshObject* obj = PluginFunctions::tetrahedralMeshObject(object);
transformVolumeMesh(mat , *obj->mesh() , obj->normals() ); transformVolumeMesh(mat , *obj->mesh() , obj->normals() );
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT #ifdef ENABLE_POLYHEDRALMESH_SUPPORT
} else if ( object->dataType() == DATA_POLYHEDRAL_MESH ) { } else if ( object->dataType() == DATA_POLYHEDRAL_MESH ) {
PolyhedralMeshObject* obj = PluginFunctions::polyhedralMeshObject(object); PolyhedralMeshObject* obj = PluginFunctions::polyhedralMeshObject(object);
transformVolumeMesh(mat , *obj->mesh() , obj->normals() ); transformVolumeMesh(mat , *obj->mesh() , obj->normals() );
...@@ -1399,15 +1399,15 @@ void MovePlugin::slotMoveManipToCOG() { ...@@ -1399,15 +1399,15 @@ void MovePlugin::slotMoveManipToCOG() {
else if ( object->dataType( DATA_TSPLINE_MESH ) ) else if ( object->dataType( DATA_TSPLINE_MESH ) )
object->manipulatorNode()->set_center( MeshInfo::cog(PluginFunctions::tsplineMesh(object)) ); object->manipulatorNode()->set_center( MeshInfo::cog(PluginFunctions::tsplineMesh(object)) );
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT #ifdef ENABLE_HEXAHEDRALMESH_SUPPORT
else if ( object->dataType( DATA_HEXAHEDRAL_MESH ) ) else if ( object->dataType( DATA_HEXAHEDRAL_MESH ) )
object->manipulatorNode()->set_center( cogVolumeMesh(*PluginFunctions::hexahedralMesh(object)) ); object->manipulatorNode()->set_center( cogVolumeMesh(*PluginFunctions::hexahedralMesh(object)) );
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_TETRAHEDRAL_SUPPORT #ifdef ENABLE_TETRAHEDRALMESH_SUPPORT
else if ( object->dataType( DATA_TETRAHEDRAL_MESH ) ) else if ( object->dataType( DATA_TETRAHEDRAL_MESH ) )
object->manipulatorNode()->set_center( cogVolumeMesh(*PluginFunctions::tetrahedralMesh(object)) ); object->manipulatorNode()->set_center( cogVolumeMesh(*PluginFunctions::tetrahedralMesh(object)) );
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT #ifdef ENABLE_POLYHEDRALMESH_SUPPORT
else if ( object->dataType( DATA_POLYHEDRAL_MESH ) ) else if ( object->dataType( DATA_POLYHEDRAL_MESH ) )
object->manipulatorNode()->set_center( cogVolumeMesh(*PluginFunctions::polyhedralMesh(object)) ); object->manipulatorNode()->set_center( cogVolumeMesh(*PluginFunctions::polyhedralMesh(object)) );
#endif #endif
...@@ -1467,15 +1467,15 @@ void MovePlugin::slotRotate() { ...@@ -1467,15 +1467,15 @@ void MovePlugin::slotRotate() {
if (object->dataType(DATA_TSPLINE_MESH)) if (object->dataType(DATA_TSPLINE_MESH))
transformMesh(m, (*PluginFunctions::tsplineMesh(object))); transformMesh(m, (*PluginFunctions::tsplineMesh(object)));
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT #ifdef ENABLE_HEXAHEDRALMESH_SUPPORT
if (object->dataType(DATA_HEXAHEDRAL_MESH)) if (object->dataType(DATA_HEXAHEDRAL_MESH))
transformVolumeMesh(m, (*PluginFunctions::hexahedralMesh(object)), (PluginFunctions::hexahedralMeshObject(object)->normals())); transformVolumeMesh(m, (*PluginFunctions::hexahedralMesh(object)), (PluginFunctions::hexahedralMeshObject(object)->normals()));
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_TETRAHEDRAL_SUPPORT #ifdef ENABLE_TETRAHEDRALMESH_SUPPORT
if (object->dataType(DATA_TETRAHEDRAL_MESH)) if (object->dataType(DATA_TETRAHEDRAL_MESH))
transformVolumeMesh(m, (*PluginFunctions::tetrahedralMesh(object)), (PluginFunctions::tetrahedralMeshObject(object)->normals())); transformVolumeMesh(m, (*PluginFunctions::tetrahedralMesh(object)), (PluginFunctions::tetrahedralMeshObject(object)->normals()));
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT #ifdef ENABLE_POLYHEDRALMESH_SUPPORT
if (object->dataType(DATA_POLYHEDRAL_MESH)) if (object->dataType(DATA_POLYHEDRAL_MESH))
transformVolumeMesh(m, (*PluginFunctions::polyhedralMesh(object)), (PluginFunctions::polyhedralMeshObject(object)->normals())); transformVolumeMesh(m, (*PluginFunctions::polyhedralMesh(object)), (PluginFunctions::polyhedralMeshObject(object)->normals()));
#endif #endif
...@@ -1523,15 +1523,15 @@ void MovePlugin::slotRotate() { ...@@ -1523,15 +1523,15 @@ void MovePlugin::slotRotate() {
if (o_it->dataType(DATA_TSPLINE_MESH)) if (o_it->dataType(DATA_TSPLINE_MESH))
transformMesh(m, (*PluginFunctions::tsplineMesh(o_it))); transformMesh(m, (*PluginFunctions::tsplineMesh(o_it)));
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT #ifdef ENABLE_HEXAHEDRALMESH_SUPPORT
if (object->dataType(DATA_HEXAHEDRAL_MESH)) if (object->dataType(DATA_HEXAHEDRAL_MESH))
transformVolumeMesh(m, (*PluginFunctions::hexahedralMesh(object)), (PluginFunctions::hexahedralMeshObject(object)->normals())); transformVolumeMesh(m, (*PluginFunctions::hexahedralMesh(object)), (PluginFunctions::hexahedralMeshObject(object)->normals()));
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_TETRAHEDRAL_SUPPORT #ifdef ENABLE_TETRAHEDRALMESH_SUPPORT
if (object->dataType(DATA_TETRAHEDRAL_MESH)) if (object->dataType(DATA_TETRAHEDRAL_MESH))
transformVolumeMesh(m, (*PluginFunctions::tetrahedralMesh(object)), (PluginFunctions::tetrahedralMeshObject(object)->normals())); transformVolumeMesh(m, (*PluginFunctions::tetrahedralMesh(object)), (PluginFunctions::tetrahedralMeshObject(object)->normals()));
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT #ifdef ENABLE_POLYHEDRALMESH_SUPPORT
if (object->dataType(DATA_POLYHEDRAL_MESH)) if (object->dataType(DATA_POLYHEDRAL_MESH))
transformVolumeMesh(m, (*PluginFunctions::polyhedralMesh(object)), (PluginFunctions::polyhedralMeshObject(object)->normals())); transformVolumeMesh(m, (*PluginFunctions::polyhedralMesh(object)), (PluginFunctions::polyhedralMeshObject(object)->normals()));
#endif #endif
...@@ -1619,15 +1619,15 @@ void MovePlugin::slotScale() { ...@@ -1619,15 +1619,15 @@ void MovePlugin::slotScale() {
if (object->dataType(DATA_TSPLINE_MESH)) if (object->dataType(DATA_TSPLINE_MESH))
transformMesh(m, (*PluginFunctions::tsplineMesh(object))); transformMesh(m, (*PluginFunctions::tsplineMesh(object)));
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT #ifdef ENABLE_HEXAHEDRALMESH_SUPPORT
if (object->dataType(DATA_HEXAHEDRAL_MESH)) if (object->dataType(DATA_HEXAHEDRAL_MESH))
transformVolumeMesh(m, (*PluginFunctions::hexahedralMesh(object)), (PluginFunctions::hexahedralMeshObject(object)->normals())); transformVolumeMesh(m, (*PluginFunctions::hexahedralMesh(object)), (PluginFunctions::hexahedralMeshObject(object)->normals()));
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_TETRAHEDRAL_SUPPORT #ifdef ENABLE_TETRAHEDRALMESH_SUPPORT
if (object->dataType(DATA_TETRAHEDRAL_MESH)) if (object->dataType(DATA_TETRAHEDRAL_MESH))
transformVolumeMesh(m, (*PluginFunctions::tetrahedralMesh(object)), (PluginFunctions::tetrahedralMeshObject(object)->normals())); transformVolumeMesh(m, (*PluginFunctions::tetrahedralMesh(object)), (PluginFunctions::tetrahedralMeshObject(object)->normals()));
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT #ifdef ENABLE_POLYHEDRALMESH_SUPPORT
if (object->dataType(DATA_POLYHEDRAL_MESH)) if (object->dataType(DATA_POLYHEDRAL_MESH))
transformVolumeMesh(m, (*PluginFunctions::polyhedralMesh(object)), (PluginFunctions::polyhedralMeshObject(object)->normals())); transformVolumeMesh(m, (*PluginFunctions::polyhedralMesh(object)), (PluginFunctions::polyhedralMeshObject(object)->normals()));
#endif #endif
...@@ -1673,15 +1673,15 @@ void MovePlugin::slotScale() { ...@@ -1673,15 +1673,15 @@ void MovePlugin::slotScale() {
if (o_it->dataType(DATA_TSPLINE_MESH)) if (o_it->dataType(DATA_TSPLINE_MESH))
transformMesh(m, (*PluginFunctions::tsplineMesh(o_it))); transformMesh(m, (*PluginFunctions::tsplineMesh(o_it)));
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT #ifdef ENABLE_HEXAHEDRALMESH_SUPPORT
if (object->dataType(DATA_HEXAHEDRAL_MESH)) if (object->dataType(DATA_HEXAHEDRAL_MESH))
transformVolumeMesh(m, (*PluginFunctions::hexahedralMesh(object)), (PluginFunctions::hexahedralMeshObject(object)->normals())); transformVolumeMesh(m, (*PluginFunctions::hexahedralMesh(object)), (PluginFunctions::hexahedralMeshObject(object)->normals()));
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_TETRAHEDRAL_SUPPORT #ifdef ENABLE_TETRAHEDRALMESH_SUPPORT
if (object->dataType(DATA_TETRAHEDRAL_MESH)) if (object->dataType(DATA_TETRAHEDRAL_MESH))
transformVolumeMesh(m, (*PluginFunctions::tetrahedralMesh(object)), (PluginFunctions::tetrahedralMeshObject(object)->normals())); transformVolumeMesh(m, (*PluginFunctions::tetrahedralMesh(object)), (PluginFunctions::tetrahedralMeshObject(object)->normals()));
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT #ifdef ENABLE_POLYHEDRALMESH_SUPPORT
if (object->dataType(DATA_POLYHEDRAL_MESH)) if (object->dataType(DATA_POLYHEDRAL_MESH))
transformVolumeMesh(m, (*PluginFunctions::polyhedralMesh(object)), (PluginFunctions::polyhedralMeshObject(object)->normals())); transformVolumeMesh(m, (*PluginFunctions::polyhedralMesh(object)), (PluginFunctions::polyhedralMeshObject(object)->normals()));
#endif #endif
...@@ -1772,7 +1772,7 @@ void MovePlugin::slotMoveToOrigin() { ...@@ -1772,7 +1772,7 @@ void MovePlugin::slotMoveToOrigin() {
} }
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT #ifdef ENABLE_HEXAHEDRALMESH_SUPPORT
if ( o_it->dataType( DATA_HEXAHEDRAL_MESH )) { if ( o_it->dataType( DATA_HEXAHEDRAL_MESH )) {
HexahedralMesh& mesh = *PluginFunctions::hexahedralMesh(*o_it); HexahedralMesh& mesh = *PluginFunctions::hexahedralMesh(*o_it);
cog += cogVolumeMesh(mesh) * double(mesh.n_vertices()); cog += cogVolumeMesh(mesh) * double(mesh.n_vertices());
...@@ -1780,7 +1780,7 @@ void MovePlugin::slotMoveToOrigin() { ...@@ -1780,7 +1780,7 @@ void MovePlugin::slotMoveToOrigin() {
} }
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_TETRAHEDRAL_SUPPORT #ifdef ENABLE_TETRAHEDRALMESH_SUPPORT
if ( o_it->dataType( DATA_TETRAHEDRAL_MESH )) { if ( o_it->dataType( DATA_TETRAHEDRAL_MESH )) {
TetrahedralMesh& mesh = *PluginFunctions::tetrahedralMesh(*o_it); TetrahedralMesh& mesh = *PluginFunctions::tetrahedralMesh(*o_it);
cog += cogVolumeMesh(mesh) * double(mesh.n_vertices()); cog += cogVolumeMesh(mesh) * double(mesh.n_vertices());
...@@ -1788,7 +1788,7 @@ void MovePlugin::slotMoveToOrigin() { ...@@ -1788,7 +1788,7 @@ void MovePlugin::slotMoveToOrigin() {
} }
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT #ifdef ENABLE_POLYHEDRALMESH_SUPPORT
if ( o_it->dataType( DATA_POLYHEDRAL_MESH )) { if ( o_it->dataType( DATA_POLYHEDRAL_MESH )) {
PolyhedralMesh& mesh = *PluginFunctions::polyhedralMesh(*o_it); PolyhedralMesh& mesh = *PluginFunctions::polyhedralMesh(*o_it);
cog += cogVolumeMesh(mesh) * double(mesh.n_vertices()); cog += cogVolumeMesh(mesh) * double(mesh.n_vertices());
...@@ -1843,7 +1843,7 @@ void MovePlugin::slotMoveToOrigin() { ...@@ -1843,7 +1843,7 @@ void MovePlugin::slotMoveToOrigin() {
} }
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT #ifdef ENABLE_HEXAHEDRALMESH_SUPPORT
if ( o_it->dataType( DATA_HEXAHEDRAL_MESH )) { if ( o_it->dataType( DATA_HEXAHEDRAL_MESH )) {
HexahedralMesh& mesh = *PluginFunctions::hexahedralMesh(*o_it); HexahedralMesh& mesh = *PluginFunctions::hexahedralMesh(*o_it);
...@@ -1858,7 +1858,7 @@ void MovePlugin::slotMoveToOrigin() { ...@@ -1858,7 +1858,7 @@ void MovePlugin::slotMoveToOrigin() {
} }
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_TETRAHEDRAL_SUPPORT #ifdef ENABLE_TETRAHEDRALMESH_SUPPORT
if ( o_it->dataType( DATA_TETRAHEDRAL_MESH )) { if ( o_it->dataType( DATA_TETRAHEDRAL_MESH )) {
TetrahedralMesh& mesh = *PluginFunctions::tetrahedralMesh(*o_it); TetrahedralMesh& mesh = *PluginFunctions::tetrahedralMesh(*o_it);
...@@ -1873,7 +1873,7 @@ void MovePlugin::slotMoveToOrigin() { ...@@ -1873,7 +1873,7 @@ void MovePlugin::slotMoveToOrigin() {
} }
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT #ifdef ENABLE_POLYHEDRALMESH_SUPPORT
if ( o_it->dataType( DATA_POLYHEDRAL_MESH )) { if ( o_it->dataType( DATA_POLYHEDRAL_MESH )) {
PolyhedralMesh& mesh = *PluginFunctions::polyhedralMesh(*o_it); PolyhedralMesh& mesh = *PluginFunctions::polyhedralMesh(*o_it);
...@@ -1966,7 +1966,7 @@ void MovePlugin::unifyBoundingBox(Unificationtype u) ...@@ -1966,7 +1966,7 @@ void MovePlugin::unifyBoundingBox(Unificationtype u)
} }
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT #ifdef ENABLE_HEXAHEDRALMESH_SUPPORT
if ( o_it->dataType( DATA_HEXAHEDRAL_MESH )) { if ( o_it->dataType( DATA_HEXAHEDRAL_MESH )) {
HexahedralMesh& mesh = *PluginFunctions::hexahedralMesh(*o_it); HexahedralMesh& mesh = *PluginFunctions::hexahedralMesh(*o_it);
getBBVolumeMesh(mesh,bb_min_tmp,bb_max_tmp); getBBVolumeMesh(mesh,bb_min_tmp,bb_max_tmp);
...@@ -1975,7 +1975,7 @@ void MovePlugin::unifyBoundingBox(Unificationtype u) ...@@ -1975,7 +1975,7 @@ void MovePlugin::unifyBoundingBox(Unificationtype u)
} }
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_TETRAHEDRAL_SUPPORT #ifdef ENABLE_TETRAHEDRALMESH_SUPPORT
if ( o_it->dataType( DATA_TETRAHEDRAL_MESH )) { if ( o_it->dataType( DATA_TETRAHEDRAL_MESH )) {
TetrahedralMesh& mesh = *PluginFunctions::tetrahedralMesh(*o_it); TetrahedralMesh& mesh = *PluginFunctions::tetrahedralMesh(*o_it);
getBBVolumeMesh(mesh,bb_min_tmp,bb_max_tmp); getBBVolumeMesh(mesh,bb_min_tmp,bb_max_tmp);
...@@ -1984,7 +1984,7 @@ void MovePlugin::unifyBoundingBox(Unificationtype u) ...@@ -1984,7 +1984,7 @@ void MovePlugin::unifyBoundingBox(Unificationtype u)
} }
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT #ifdef ENABLE_POLYHEDRALMESH_SUPPORT
if ( o_it->dataType( DATA_POLYHEDRAL_MESH )) { if ( o_it->dataType( DATA_POLYHEDRAL_MESH )) {
PolyhedralMesh& mesh = *PluginFunctions::polyhedralMesh(*o_it); PolyhedralMesh& mesh = *PluginFunctions::polyhedralMesh(*o_it);
getBBVolumeMesh(mesh,bb_min_tmp,bb_max_tmp); getBBVolumeMesh(mesh,bb_min_tmp,bb_max_tmp);
...@@ -2007,15 +2007,15 @@ void MovePlugin::unifyBoundingBox(Unificationtype u) ...@@ -2007,15 +2007,15 @@ void MovePlugin::unifyBoundingBox(Unificationtype u)
else if ( o_it->dataType( DATA_TSPLINE_MESH ) ) else if ( o_it->dataType( DATA_TSPLINE_MESH ) )
unifyBB(*PluginFunctions::tsplineMesh(*o_it),bb_min,bb_max, u); unifyBB(*PluginFunctions::tsplineMesh(*o_it),bb_min,bb_max, u);
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT #ifdef ENABLE_HEXAHEDRALMESH_SUPPORT
else if ( o_it->dataType( DATA_HEXAHEDRAL_MESH ) ) else if ( o_it->dataType( DATA_HEXAHEDRAL_MESH ) )
unifyBBVolumeMesh(*PluginFunctions::hexahedralMesh(*o_it),(PluginFunctions::hexahedralMeshObject(*o_it)->normals()),bb_min,bb_max, u); unifyBBVolumeMesh(*PluginFunctions::hexahedralMesh(*o_it),(PluginFunctions::hexahedralMeshObject(*o_it)->normals()),bb_min,bb_max, u);
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_TETRAHEDRAL_SUPPORT #ifdef ENABLE_TETRAHEDRALMESH_SUPPORT
else if ( o_it->dataType( DATA_TETRAHEDRAL_MESH ) ) else if ( o_it->dataType( DATA_TETRAHEDRAL_MESH ) )
unifyBBVolumeMesh(*PluginFunctions::tetrahedralMesh(*o_it),(PluginFunctions::tetrahedralMeshObject(*o_it)->normals()),bb_min,bb_max, u); unifyBBVolumeMesh(*PluginFunctions::tetrahedralMesh(*o_it),(PluginFunctions::tetrahedralMeshObject(*o_it)->normals()),bb_min,bb_max, u);
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT #ifdef ENABLE_POLYHEDRALMESH_SUPPORT
else if ( o_it->dataType( DATA_POLYHEDRAL_MESH ) ) else if ( o_it->dataType( DATA_POLYHEDRAL_MESH ) )
unifyBBVolumeMesh(*PluginFunctions::polyhedralMesh(*o_it),(PluginFunctions::polyhedralMeshObject(*o_it)->normals()),bb_min,bb_max, u); unifyBBVolumeMesh(*PluginFunctions::polyhedralMesh(*o_it),(PluginFunctions::polyhedralMeshObject(*o_it)->normals()),bb_min,bb_max, u);
#endif #endif
...@@ -2028,15 +2028,15 @@ void MovePlugin::unifyBoundingBox(Unificationtype u) ...@@ -2028,15 +2028,15 @@ void MovePlugin::unifyBoundingBox(Unificationtype u)
else if ( o_it->dataType( DATA_TSPLINE_MESH ) ) else if ( o_it->dataType( DATA_TSPLINE_MESH ) )
unifyBB(*PluginFunctions::tsplineMesh(*o_it), u); unifyBB(*PluginFunctions::tsplineMesh(*o_it), u);
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT #ifdef ENABLE_HEXAHEDRALMESH_SUPPORT
else if ( o_it->dataType( DATA_HEXAHEDRAL_MESH ) ) else if ( o_it->dataType( DATA_HEXAHEDRAL_MESH ) )
unifyBBVolumeMesh(*PluginFunctions::hexahedralMesh(*o_it),(PluginFunctions::hexahedralMeshObject(*o_it)->normals()), u); unifyBBVolumeMesh(*PluginFunctions::hexahedralMesh(*o_it),(PluginFunctions::hexahedralMeshObject(*o_it)->normals()), u);
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_TETRAHEDRAL_SUPPORT #ifdef ENABLE_TETRAHEDRALMESH_SUPPORT
else if ( o_it->dataType( DATA_TETRAHEDRAL_MESH ) ) else if ( o_it->dataType( DATA_TETRAHEDRAL_MESH ) )
unifyBBVolumeMesh(*PluginFunctions::tetrahedralMesh(*o_it),(PluginFunctions::tetrahedralMeshObject(*o_it)->normals()), u); unifyBBVolumeMesh(*PluginFunctions::tetrahedralMesh(*o_it),(PluginFunctions::tetrahedralMeshObject(*o_it)->normals()), u);
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT #ifdef ENABLE_POLYHEDRALMESH_SUPPORT
else if ( o_it->dataType( DATA_POLYHEDRAL_MESH ) ) else if ( o_it->dataType( DATA_POLYHEDRAL_MESH ) )
unifyBBVolumeMesh(*PluginFunctions::polyhedralMesh(*o_it),(PluginFunctions::polyhedralMeshObject(*o_it)->normals()), u); unifyBBVolumeMesh(*PluginFunctions::polyhedralMesh(*o_it),(PluginFunctions::polyhedralMeshObject(*o_it)->normals()), u);
#endif #endif
...@@ -2292,7 +2292,7 @@ void MovePlugin::transformSkeleton( ACG::Matrix4x4d _mat , Skeleton& _skeleton ...@@ -2292,7 +2292,7 @@ void MovePlugin::transformSkeleton( ACG::Matrix4x4d _mat , Skeleton& _skeleton
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_SUPPORT #if defined(ENABLE_HEXAHEDRALMESH_SUPPORT) || defined(ENABLE_POLYHEDRALMESH_SUPPORT) || defined(ENABLE_TETRAHEDRALMESH_SUPPORT)
/** \brief Transform a volume mesh with the given transformation matrix /** \brief Transform a volume mesh with the given transformation matrix
* *
* Note: The normals have to be transformed with the inverse * Note: The normals have to be transformed with the inverse
...@@ -2593,7 +2593,7 @@ void MovePlugin::updateSelectionType() { ...@@ -2593,7 +2593,7 @@ void MovePlugin::updateSelectionType() {
} }
#ifdef ENABLE_OPENVOLUMEMESH_SUPPORT #if defined(ENABLE_HEXAHEDRALMESH_SUPPORT) || defined(ENABLE_POLYHEDRALMESH_SUPPORT) || defined(ENABLE_TETRAHEDRALMESH_SUPPORT)
bool functionExistsVolumeMeshV; bool functionExistsVolumeMeshV;
emit functionExists("volumemeshselection", "vertexTypeActive()", functionExistsVolumeMeshV); emit functionExists("volumemeshselection", "vertexTypeActive()", functionExistsVolumeMeshV);
bool functionExistsVolumeMeshE; bool functionExistsVolumeMeshE;
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
#include <ObjectTypes/Skeleton/Skeleton.hh> #include <ObjectTypes/Skeleton/Skeleton.hh>
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_SUPPORT #if defined(ENABLE_HEXAHEDRALMESH_SUPPORT) || defined(ENABLE_POLYHEDRALMESH_SUPPORT) || defined(ENABLE_TETRAHEDRALMESH_SUPPORT)
#include <OpenVolumeMesh/Attribs/NormalAttrib.hh> #include <OpenVolumeMesh/Attribs/NormalAttrib.hh>
#endif #endif
...@@ -356,26 +356,26 @@ public: ...@@ -356,26 +356,26 @@ public:
void transformSkeleton( ACG::Matrix4x4d _mat , Skeleton& _skeleton ); void transformSkeleton( ACG::Matrix4x4d _mat , Skeleton& _skeleton );
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_SUPPORT #if defined(ENABLE_HEXAHEDRALMESH_SUPPORT) || defined(ENABLE_POLYHEDRALMESH_SUPPORT) || defined(ENABLE_TETRAHEDRALMESH_SUPPORT)
/// Transform a volume mesh with the given transformation matrix /// Transform a volume mesh with the given transformation matrix
template< typename VolumeMeshT > template< typename VolumeMeshT >
void transformVolumeMesh(ACG::Matrix4x4d _mat , VolumeMeshT& _mesh , OpenVolumeMesh::NormalAttrib<VolumeMeshT>& _normalAttrib ); void transformVolumeMesh(ACG::Matrix4x4d _mat , VolumeMeshT& _mesh , OpenVolumeMesh::NormalAttrib<VolumeMeshT>& _normalAttrib );
/// Calculate center of gravity of a volume mesh /// Calculate center of gravity of a volume mesh
template< typename VolumeMeshT > template< typename VolumeMeshT >
ACG::Vec3d cogVolumeMesh( VolumeMeshT& _mesh ); ACG::Vec3d cogVolumeMesh( VolumeMeshT& _mesh );
/// get bounding box diagonal of a volume mesh /// get bounding box diagonal of a volume mesh
template< typename VolumeMeshT > template< typename VolumeMeshT >
void getBBVolumeMesh( VolumeMeshT& _mesh, ACG::Vec3d& _bb_min, ACG::Vec3d& _bb_max ); void getBBVolumeMesh( VolumeMeshT& _mesh, ACG::Vec3d& _bb_min, ACG::Vec3d& _bb_max );
/// scale volume mesh to have a boundingboxdiagonal of one /// scale volume mesh to have a boundingboxdiagonal of one
template< typename VolumeMeshT > template< typename VolumeMeshT >
void unifyBBVolumeMesh(VolumeMeshT& _mesh, OpenVolumeMesh::NormalAttrib<VolumeMeshT>& _normalAttrib, Unificationtype u = MovePlugin::DIAGONAL); void unifyBBVolumeMesh(VolumeMeshT& _mesh, OpenVolumeMesh::NormalAttrib<VolumeMeshT>& _normalAttrib, Unificationtype u = MovePlugin::DIAGONAL);
/// Scales volume mesh such that bounding box diagonal has unit length /// Scales volume mesh such that bounding box diagonal has unit length
template< typename VolumeMeshT > template< typename VolumeMeshT >
void unifyBBVolumeMesh( VolumeMeshT& _mesh, OpenVolumeMesh::NormalAttrib<VolumeMeshT>& _normalAttrib, ACG::Vec3d& _bb_min, ACG::Vec3d& _bb_max, Unificationtype u = MovePlugin::DIAGONAL ); void unifyBBVolumeMesh( VolumeMeshT& _mesh, OpenVolumeMesh::NormalAttrib<VolumeMeshT>& _normalAttrib, ACG::Vec3d& _bb_min, ACG::Vec3d& _bb_max, Unificationtype u = MovePlugin::DIAGONAL );
#endif #endif
/** Get the Matrix of the last active Manipulator ( Identity if not found or hidden Manipulator ) /** Get the Matrix of the last active Manipulator ( Identity if not found or hidden Manipulator )
......
...@@ -57,13 +57,13 @@ ...@@ -57,13 +57,13 @@
#endif #endif
#include <MeshTools/MeshFunctions.hh> #include <MeshTools/MeshFunctions.hh>
#ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT #ifdef ENABLE_HEXAHEDRALMESH_SUPPORT
#include <ObjectTypes/HexahedralMesh/HexahedralMesh.hh> #include <ObjectTypes/HexahedralMesh/HexahedralMesh.hh>
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_TETRAHEDRAL_SUPPORT #ifdef ENABLE_TETRAHEDRALMESH_SUPPORT
#include <ObjectTypes/TetrahedralMesh/TetrahedralMesh.hh> #include <ObjectTypes/TetrahedralMesh/TetrahedralMesh.hh>
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT #ifdef ENABLE_POLYHEDRALMESH_SUPPORT
#include <ObjectTypes/PolyhedralMesh/PolyhedralMesh.hh> #include <ObjectTypes/PolyhedralMesh/PolyhedralMesh.hh>
#endif #endif
...@@ -208,7 +208,7 @@ void MovePlugin::translate( int _objectId , Vector _vector) { ...@@ -208,7 +208,7 @@ void MovePlugin::translate( int _objectId , Vector _vector) {
line.point(i) = line.point(i) + _vector; line.point(i) = line.point(i) + _vector;
} }
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT #ifdef ENABLE_HEXAHEDRALMESH_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));
...@@ -218,7 +218,7 @@ void MovePlugin::translate( int _objectId , Vector _vector) { ...@@ -218,7 +218,7 @@ void MovePlugin::translate( int _objectId , Vector _vector) {
mesh.set_vertex(*v_it, mesh.vertex(*v_it) + _vector ); mesh.set_vertex(*v_it, mesh.vertex(*v_it) + _vector );
} }
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_TETRAHEDRAL_SUPPORT #ifdef ENABLE_TETRAHEDRALMESH_SUPPORT
else if ( object->dataType(DATA_TETRAHEDRAL_MESH) ) { else if ( object->dataType(DATA_TETRAHEDRAL_MESH) ) {
TetrahedralMesh& mesh = (*PluginFunctions::tetrahedralMesh(object)); TetrahedralMesh& mesh = (*PluginFunctions::tetrahedralMesh(object));
...@@ -228,7 +228,7 @@ void MovePlugin::translate( int _objectId , Vector _vector) { ...@@ -228,7 +228,7 @@ void MovePlugin::translate( int _objectId , Vector _vector) {
mesh.set_vertex(*v_it, mesh.vertex(*v_it) + _vector ); mesh.set_vertex(*v_it, mesh.vertex(*v_it) + _vector );
} }
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT #ifdef ENABLE_POLYHEDRALMESH_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));
...@@ -309,7 +309,7 @@ void MovePlugin::translate( int _objectId , IdList _vHandles, Vector _vector ){ ...@@ -309,7 +309,7 @@ void MovePlugin::translate( int _objectId , IdList _vHandles, Vector _vector ){
line.point( _vHandles[i] ) = line.point( _vHandles[i] ) + _vector; line.point( _vHandles[i] ) = line.point( _vHandles[i] ) + _vector;
} }
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT #ifdef ENABLE_HEXAHEDRALMESH_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));
...@@ -319,7 +319,7 @@ void MovePlugin::translate( int _objectId , IdList _vHandles, Vector _vector ){ ...@@ -319,7 +319,7 @@ void MovePlugin::translate( int _objectId , IdList _vHandles, Vector _vector ){
} }
} }
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_TETRAHEDRAL_SUPPORT #ifdef ENABLE_TETRAHEDRALMESH_SUPPORT
else if ( object->dataType(DATA_TETRAHEDRAL_MESH) ) { else if ( object->dataType(DATA_TETRAHEDRAL_MESH) ) {
TetrahedralMesh& mesh = (*PluginFunctions::tetrahedralMesh(object)); TetrahedralMesh& mesh = (*PluginFunctions::tetrahedralMesh(object));
...@@ -329,7 +329,7 @@ void MovePlugin::translate( int _objectId , IdList _vHandles, Vector _vector ){ ...@@ -329,7 +329,7 @@ void MovePlugin::translate( int _objectId , IdList _vHandles, Vector _vector ){
} }
} }
#endif #endif
#ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT #ifdef ENABLE_POLYHEDRALMESH_SUPPORT
else if ( object->dataType(DATA_POLYHEDRAL_MESH) ) { else if ( object->dataType(DATA_POLYHEDRAL_MESH) ) {
<