Commit b35452d1 authored by Jan Möbius's avatar Jan Möbius

Make plugin work without splatcloud objecttype

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free-Staging@18198 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 03bbb0c2
include (plugin)
if (EXISTS ${CMAKE_SOURCE_DIR}/ObjectTypes/SplatCloud)
add_definitions (-DENABLE_SPLATCLOUD_SUPPORT)
endif()
openflipper_plugin (DIRS PoissonReconstruction INSTALLDATA Icons )
......@@ -50,7 +50,10 @@
#include <OpenFlipper/common/GlobalOptions.hh>
#include <ObjectTypes/TriangleMesh/TriangleMesh.hh>
#include <ObjectTypes/PolyMesh/PolyMesh.hh>
#include <ObjectTypes/SplatCloud/SplatCloud.hh>
#ifdef ENABLE_SPLATCLOUD_SUPPORT
#include <ObjectTypes/SplatCloud/SplatCloud.hh>
#endif
#include "PoissonReconstructionT.hh"
......@@ -189,6 +192,7 @@ void PoissonPlugin::poissonReconstruct(IdList _ids, int _depth)
}
}
//Splat cloud
#ifdef ENABLE_SPLATCLOUD_SUPPORT
else if( obj->dataType() == DATA_SPLATCLOUD)
{
......@@ -213,6 +217,7 @@ void PoissonPlugin::poissonReconstruct(IdList _ids, int _depth)
pt_data.push_back( cloud->normals( i )[2] );
}
}
#endif
else
emit log(LOGERR,QString("ObjectType of Object with id %1 is unsupported").arg(*idIter));
}
......@@ -257,7 +262,14 @@ void PoissonPlugin::slotPoissonReconstruct(){
return;
IdList ids;
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::TARGET_OBJECTS,(DATA_TRIANGLE_MESH | DATA_POLY_MESH | DATA_SPLATCLOUD )) ;o_it != PluginFunctions::objectsEnd(); ++o_it)
DataType restriction = (DATA_TRIANGLE_MESH | DATA_POLY_MESH);
#ifdef ENABLE_SPLATCLOUD_SUPPORT
restriction |= DATA_SPLATCLOUD;
#endif
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::TARGET_OBJECTS, restriction ) ;o_it != PluginFunctions::objectsEnd(); ++o_it)
{
ids.push_back(o_it->id());
std::cerr << "Added " << o_it->id() << std::endl;
......
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