Commit 45b833de authored by Jan Möbius's avatar Jan Möbius

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@2766 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 3759ff99
......@@ -257,6 +257,7 @@ int visible_count();
/** @name Mesh Property handling
* @{ */
//=======================================
/*
template < class MeshT , typename propT >
bool get_property_handle(MeshT* _mesh , QString _name, OpenMesh::VPropHandleT< propT > & _property );
......@@ -265,7 +266,7 @@ bool get_property_handle(MeshT* _mesh , QString _name, OpenMesh::FPropHandleT< p
template < class MeshT , typename propT >
bool get_property_handle(MeshT* _mesh , QString _name, OpenMesh::HPropHandleT< propT > & _property );
*/
/** @} */
//=======================================
......@@ -632,9 +633,11 @@ BaseObject* objectRoot();
}
/*
#if defined(INCLUDE_TEMPLATES) && !defined(PLUGINFUNCTIONS_C)
#define PLUGINFUNCTIONS_TEMPLATES
#include "PluginFunctionsT.cc"
#endif
*/
#endif //PLUGINFUNCTIONS_HH
......@@ -65,10 +65,10 @@ void LaplaceLengthPlugin::computeLaplaceLength(MeshT* _mesh) {
OpenMesh::VPropHandleT< ACG::Vec3d > laplace_vector_property;
OpenMesh::VPropHandleT< double > laplace_length_property;
if(!PluginFunctions::get_property_handle( _mesh , "Laplace Vector" , laplace_vector_property))
if(!_mesh->get_property_handle( laplace_vector_property , "Laplace Vector" ))
_mesh->add_property( laplace_vector_property, "Laplace Vector" );
if(!PluginFunctions::get_property_handle( _mesh , UNIFORM_LAPLACE_NAME , laplace_length_property))
if(!_mesh->get_property_handle( laplace_length_property , UNIFORM_LAPLACE_NAME ))
_mesh->add_property( laplace_length_property, UNIFORM_LAPLACE_NAME );
......@@ -109,12 +109,12 @@ void LaplaceLengthPlugin::computeLaplaceSquaredLength(MeshT* _mesh) {
OpenMesh::VPropHandleT< ACG::Vec3d > laplace_property;
OpenMesh::VPropHandleT< double > laplace_squared;
if(!PluginFunctions::get_property_handle( _mesh , "Laplace Vector" , laplace_property)) {
if(!_mesh->get_property_handle( laplace_property , "Laplace Vector" )) {
std::cerr << "LaplaceLengthPlugin : Unable to get Laplace Vector property" << std::endl;
return;
}
if(!PluginFunctions::get_property_handle( _mesh , UNIFORM_LAPLACE_SQUARED_NAME , laplace_squared))
if(!_mesh->get_property_handle( laplace_squared , UNIFORM_LAPLACE_SQUARED_NAME ))
_mesh->add_property( laplace_squared, UNIFORM_LAPLACE_SQUARED_NAME );
QTime time;
......
......@@ -139,7 +139,7 @@ void TextureControlPlugin::doUpdateTexture ( int _textureid, MeshT& _mesh )
if (textures_[_textureid].dimension == 1) {
OpenMesh::HPropHandleT< double > texture;
if ( ! PluginFunctions::get_property_handle(&_mesh,textures_[_textureid].name,texture) ) {
if ( ! _mesh.get_property_handle(texture, textures_[_textureid].name.toStdString() ) ) {
emit log(LOGERR,"Unable to get property " + textures_[_textureid].name );
return;
}
......@@ -149,7 +149,7 @@ void TextureControlPlugin::doUpdateTexture ( int _textureid, MeshT& _mesh )
} else if ( textures_[_textureid].dimension == 2 ) {
OpenMesh::HPropHandleT< OpenMesh::Vec2d > texture2D;
if ( ! PluginFunctions::get_property_handle(&_mesh, textures_[_textureid].name, texture2D) ) {
if ( ! _mesh.get_property_handle( texture2D, textures_[_textureid].name.toStdString() ) ) {
emit log(LOGERR,"Unable to get property " + textures_[_textureid].name);
return;
}
......@@ -162,7 +162,7 @@ void TextureControlPlugin::doUpdateTexture ( int _textureid, MeshT& _mesh )
if ( textures_[_textureid].dimension == 1 ) {
OpenMesh::VPropHandleT< double > texture;
if ( ! PluginFunctions::get_property_handle(&_mesh,textures_[_textureid].name,texture) ) {
if ( ! _mesh.get_property_handle(texture,textures_[_textureid].name.toStdString() ) ) {
emit log(LOGERR,"Unable to get property " + textures_[_textureid].name );
return;
}
......@@ -172,7 +172,7 @@ void TextureControlPlugin::doUpdateTexture ( int _textureid, MeshT& _mesh )
} else if ( textures_[_textureid].dimension == 2 ) {
OpenMesh::VPropHandleT< OpenMesh::Vec2d > texture2D;
if ( ! PluginFunctions::get_property_handle(&_mesh,textures_[_textureid].name,texture2D) ) {
if ( ! _mesh.get_property_handle(texture2D,textures_[_textureid].name.toStdString() ) ) {
emit log(LOGERR,"Unable to get property " + textures_[_textureid].name );
return;
}
......@@ -182,7 +182,7 @@ void TextureControlPlugin::doUpdateTexture ( int _textureid, MeshT& _mesh )
} /*else if ( textures_[_textureid].dimension == 3 ) {
OpenMesh::VPropHandleT< OpenMesh::Vec3d > scalarField3D;
if ( ! PluginFunctions::get_property_handle(&_mesh,textures_[_textureid].name,scalarField3D) ) {
if ( ! _mesh.get_property_handle(scalarField3D,textures_[_textureid].name) ) {
emit log(LOGERR,"Unable to get property " + textures_[_textureid].name );
return;
}
......
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