Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CGoGN
CGoGN
Commits
b3f60268
Commit
b3f60268
authored
Feb 18, 2013
by
untereiner
Browse files
yet another modification on renderExplod plugin
parent
c3df6df0
Changes
2
Hide whitespace changes
Inline
Side-by-side
SCHNApps/Plugins/renderExplod/src/renderExplod.cpp
View file @
b3f60268
...
...
@@ -297,13 +297,37 @@ void RenderExplodPlugin::changeVolumesScaleFactor(View* view, MapHandlerGen* map
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)
// {
//
// MapHandler<PFP3>* mh = static_cast<MapHandler<PFP3>*>(QObject::sender());
// if(mh == NULL)
// 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);
// if(!position.isValid())
// return;
...
...
@@ -311,18 +335,24 @@ void RenderExplodPlugin::attributeModified(unsigned int orbit, QString nameAttr)
// PFP3::MAP* map = mh->getMap();
//
// m_renderExplod->updateData<PFP3>(*map,position);
//
//
// if(computeNormalLastParameters.contains(map->getName()))
//
// {
//
// ComputeNormalParameters& params = computeNormalLastParameters[map->getName()];
//
// if(params.positionName == nameAttr && params.autoUpdate)
//
// computeNormal(map->getName(), params.positionName, params.normalName);
//
// }
//
}
// if(computeNormalLastParameters.contains(map->getName()))
// {
// ComputeNormalParameters& params = computeNormalLastParameters[map->getName()];
// if(params.positionName == nameAttr && params.autoUpdate)
// computeNormal(map->getName(), params.positionName, params.normalName);
// }
}
}
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());
// if(mh == NULL)
// return;
...
...
SCHNApps/bin/init.py
View file @
b3f60268
#
importPlugin = schnapps.loadPlugin("ImportSurface");
#
renderPlugin = schnapps.loadPlugin("RenderD");
#
renderVectorPlugin = schnapps.loadPlugin("RenderVectorD");
#
differentialPropertiesPlugin = schnapps.loadPlugin("DifferentialProperties");
#
subdivisionPlugin = schnapps.loadPlugin("SubdivideSurface");
#
surfaceDeformationPlugin = schnapps.loadPlugin("SurfaceDeformation");
importPlugin
=
schnapps
.
loadPlugin
(
"ImportSurface"
);
renderPlugin
=
schnapps
.
loadPlugin
(
"RenderD"
);
renderVectorPlugin
=
schnapps
.
loadPlugin
(
"RenderVectorD"
);
differentialPropertiesPlugin
=
schnapps
.
loadPlugin
(
"DifferentialProperties"
);
subdivisionPlugin
=
schnapps
.
loadPlugin
(
"SubdivideSurface"
);
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(), renderVectorPlugin.getName());
#
schnapps.linkViewAndPlugin(v.getName(), surfaceDeformationPlugin.getName());
schnapps
.
linkViewAndPlugin
(
v
.
getName
(),
renderPlugin
.
getName
());
schnapps
.
linkViewAndPlugin
(
v
.
getName
(),
renderVectorPlugin
.
getName
());
schnapps
.
linkViewAndPlugin
(
v
.
getName
(),
surfaceDeformationPlugin
.
getName
());
#
schnapps.linkViewAndMap(v.getName(), obj.getName());
schnapps
.
linkViewAndMap
(
v
.
getName
(),
obj
.
getName
());
#
differentialPropertiesPlugin.computeNormal(obj.getName());
#
differentialPropertiesPlugin.computeCurvature(obj.getName());
differentialPropertiesPlugin
.
computeNormal
(
obj
.
getName
());
differentialPropertiesPlugin
.
computeCurvature
(
obj
.
getName
());
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment