Commit b3f60268 authored by untereiner's avatar untereiner

yet another modification on renderExplod plugin

parent c3df6df0
...@@ -297,13 +297,37 @@ void RenderExplodPlugin::changeVolumesScaleFactor(View* view, MapHandlerGen* map ...@@ -297,13 +297,37 @@ void RenderExplodPlugin::changeVolumesScaleFactor(View* view, MapHandlerGen* map
void RenderExplodPlugin::attributeModified(unsigned int orbit, QString nameAttr) void RenderExplodPlugin::attributeModified(unsigned int orbit, QString nameAttr)
{ {
MapHandler<PFP3>* mh = static_cast<MapHandler<PFP3>*>(QObject::sender());
//On cherche la carte et on la met a jour puis updateGL();
//pour toutes les vues
//on va mettre a jour la carte QObject::senter() si elle est enregistree dans le parameterSet de cette vue
// if(orbit == VERTEX) // if(orbit == VERTEX)
// { // {
//
// MapHandler<PFP3>* mh = static_cast<MapHandler<PFP3>*>(QObject::sender()); // MapHandler<PFP3>* mh = static_cast<MapHandler<PFP3>*>(QObject::sender());
// if(mh == NULL) // if(mh == NULL)
// return; // return;
// //
// foreach(ParameterSet* params, h_viewParams)
// {
// QHash<QString, PerMapParameterSet*>::const_iterator i = params->perMap.constBegin();
// while (i != params->perMap.constEnd())
// {
// PerMapParameterSet* p = params->perMap[mh->getName()];
//
// p->updateRender();
//
// ++i;
// }
//
// }
// VertexAttribute<PFP2::VEC3> position = mh->getAttribute<PFP3::VEC3, VERTEX>(nameAttr); // VertexAttribute<PFP2::VEC3> position = mh->getAttribute<PFP3::VEC3, VERTEX>(nameAttr);
// if(!position.isValid()) // if(!position.isValid())
// return; // return;
...@@ -311,18 +335,24 @@ void RenderExplodPlugin::attributeModified(unsigned int orbit, QString nameAttr) ...@@ -311,18 +335,24 @@ void RenderExplodPlugin::attributeModified(unsigned int orbit, QString nameAttr)
// PFP3::MAP* map = mh->getMap(); // PFP3::MAP* map = mh->getMap();
// //
// m_renderExplod->updateData<PFP3>(*map,position); // m_renderExplod->updateData<PFP3>(*map,position);
//
//// if(computeNormalLastParameters.contains(map->getName())) // if(computeNormalLastParameters.contains(map->getName()))
//// { // {
//// ComputeNormalParameters& params = computeNormalLastParameters[map->getName()]; // ComputeNormalParameters& params = computeNormalLastParameters[map->getName()];
//// if(params.positionName == nameAttr && params.autoUpdate) // if(params.positionName == nameAttr && params.autoUpdate)
//// computeNormal(map->getName(), params.positionName, params.normalName); // computeNormal(map->getName(), params.positionName, params.normalName);
//// } // }
// } }
} }
void RenderExplodPlugin::connectivityModified() void RenderExplodPlugin::connectivityModified()
{ {
//On cherche la carte et on la met a jour puis updateGL();
//pour toutes les vues
//on va mettre a jour la carte QObject::senter() si elle est enregistree dans le parameterSet de cette vue
// MapHandler<PFP3>* mh = static_cast<MapHandler<PFP3>*>(QObject::sender()); // MapHandler<PFP3>* mh = static_cast<MapHandler<PFP3>*>(QObject::sender());
// if(mh == NULL) // if(mh == NULL)
// return; // return;
......
#importPlugin = schnapps.loadPlugin("ImportSurface"); importPlugin = schnapps.loadPlugin("ImportSurface");
#renderPlugin = schnapps.loadPlugin("RenderD"); renderPlugin = schnapps.loadPlugin("RenderD");
#renderVectorPlugin = schnapps.loadPlugin("RenderVectorD"); renderVectorPlugin = schnapps.loadPlugin("RenderVectorD");
#differentialPropertiesPlugin = schnapps.loadPlugin("DifferentialProperties"); differentialPropertiesPlugin = schnapps.loadPlugin("DifferentialProperties");
#subdivisionPlugin = schnapps.loadPlugin("SubdivideSurface"); subdivisionPlugin = schnapps.loadPlugin("SubdivideSurface");
#surfaceDeformationPlugin = schnapps.loadPlugin("SurfaceDeformation"); surfaceDeformationPlugin = schnapps.loadPlugin("SurfaceDeformation");
#obj = importPlugin.importFromFile("/home/kraemer/Media/Data/surface/lowRes/iphi_good_9k.off"); obj = importPlugin.importFromFile("/home/kraemer/Media/Data/surface/lowRes/iphi_good_9k.off");
#v = schnapps.getView("view_0"); v = schnapps.getView("view_0");
#schnapps.linkViewAndPlugin(v.getName(), renderPlugin.getName()); schnapps.linkViewAndPlugin(v.getName(), renderPlugin.getName());
#schnapps.linkViewAndPlugin(v.getName(), renderVectorPlugin.getName()); schnapps.linkViewAndPlugin(v.getName(), renderVectorPlugin.getName());
#schnapps.linkViewAndPlugin(v.getName(), surfaceDeformationPlugin.getName()); schnapps.linkViewAndPlugin(v.getName(), surfaceDeformationPlugin.getName());
#schnapps.linkViewAndMap(v.getName(), obj.getName()); schnapps.linkViewAndMap(v.getName(), obj.getName());
#differentialPropertiesPlugin.computeNormal(obj.getName()); differentialPropertiesPlugin.computeNormal(obj.getName());
#differentialPropertiesPlugin.computeCurvature(obj.getName()); differentialPropertiesPlugin.computeCurvature(obj.getName());
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