Commit 5d2e1459 authored by Jan Möbius's avatar Jan Möbius

Move plugin extension to support volume meshes.

closes #1717

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@17635 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 407b7f68
......@@ -12,5 +12,16 @@ if (EXISTS ${CMAKE_SOURCE_DIR}/ObjectTypes/Skeleton)
add_definitions (-DENABLE_SKELETON_SUPPORT)
endif ()
openflipper_plugin ( TRANSLATION_LANGUAGES de_DE
INSTALLDATA Icons VsiMetadata )
if (EXISTS ${CMAKE_SOURCE_DIR}/ObjectTypes/PolyhedralMesh)
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()
openflipper_plugin ( TRANSLATION_LANGUAGES de_DE
INSTALLDATA Icons VsiMetadata )
This diff is collapsed.
......@@ -67,6 +67,10 @@
#include <ObjectTypes/Skeleton/Skeleton.hh>
#endif
#ifdef ENABLE_OPENVOLUMEMESH_SUPPORT
#include <OpenVolumeMesh/Attribs/NormalAttrib.hh>
#endif
#include "MoveToolbar.hh"
#include "MoveProps.hh"
#include "MoveObjectMarker.hh"
......@@ -98,6 +102,7 @@ public:
static const SelectionType VERTEX = 1;
static const SelectionType EDGE = 2;
static const SelectionType FACE = 4;
static const SelectionType CELL = 8;
signals:
// BaseInterface
......@@ -341,6 +346,28 @@ public:
void transformSkeleton( ACG::Matrix4x4d _mat , Skeleton& _skeleton );
#endif
#ifdef ENABLE_OPENVOLUMEMESH_SUPPORT
/// Transform a volume mesh with the given transformation matrix
template< typename VolumeMeshT >
void transformVolumeMesh(ACG::Matrix4x4d _mat , VolumeMeshT& _mesh , OpenVolumeMesh::NormalAttrib<VolumeMeshT>& _normalAttrib );
/// Calculate center of gravity of a volume mesh
template< typename VolumeMeshT >
ACG::Vec3d cogVolumeMesh( VolumeMeshT& _mesh );
/// get bounding box diagonal of a volume mesh
template< typename VolumeMeshT >
void getBBVolumeMesh( VolumeMeshT& _mesh, ACG::Vec3d& _bb_min, ACG::Vec3d& _bb_max );
/// scale volume mesh to have a boundingboxdiagonal of one
template< typename VolumeMeshT >
void unifyBBDiagVolumeMesh(VolumeMeshT& _mesh, OpenVolumeMesh::NormalAttrib<VolumeMeshT>& _normalAttrib);
/// Scales volume mesh such that bounding box diagonal has unit length
template< typename VolumeMeshT >
void unifyBBDiagVolumeMesh( VolumeMeshT& _mesh, OpenVolumeMesh::NormalAttrib<VolumeMeshT>& _normalAttrib, ACG::Vec3d& _bb_min, ACG::Vec3d& _bb_max );
#endif
/** Get the Matrix of the last active Manipulator ( Identity if not found or hidden Manipulator )
*
* @param _reset reset the transformation matrix of the manipulator to identity)
......@@ -493,6 +520,9 @@ public slots :
/// transform current selection of an Object by a given matrix
bool transformEdgeSelection( int _objectId , Matrix4x4 _matrix );
/// transform current selection of an Object by a given matrix
bool transformCellSelection( int _objectId , Matrix4x4 _matrix );
/// Transform handle region using the given transformation matrix
void transformHandleRegion(int _objectId, Matrix4x4 _matrix);
......
This diff is collapsed.
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