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
Hurstel
CGoGN
Commits
5d77c85c
Commit
5d77c85c
authored
Oct 25, 2013
by
Pierre Kraemer
Browse files
bug fix in map handler
parent
71054826
Changes
3
Hide whitespace changes
Inline
Side-by-side
SCHNApps/Plugins/surface_deformation/src/surface_deformation.cpp
View file @
5d77c85c
...
...
@@ -136,34 +136,41 @@ void Surface_Deformation_Plugin::keyPress(View* view, QKeyEvent* event)
{
case
Qt
::
Key_D
:
{
MapHandlerGen
*
mh
=
m_schnapps
->
getSelectedMap
();
const
MapParameters
&
p
=
h_parameterSet
[
mh
];
if
(
!
m_dragging
)
if
(
mh
)
{
if
(
p
.
handleSelector
&&
!
p
.
handleSelector
->
getSelectedCells
().
empty
())
const
MapParameters
&
p
=
h_parameterSet
[
mh
];
if
(
!
m_dragging
)
{
m_dragging
=
true
;
if
(
p
.
handleSelector
&&
!
p
.
handleSelector
->
getSelectedCells
().
empty
())
{
m_dragging
=
true
;
m_draginit
=
false
;
view
->
setMouseTracking
(
true
);
}
}
else
{
m_dragging
=
false
;
m_draginit
=
false
;
view
->
setMouseTracking
(
tru
e
);
view
->
setMouseTracking
(
fals
e
);
}
}
else
{
m_dragging
=
false
;
m_draginit
=
false
;
view
->
setMouseTracking
(
false
);
}
break
;
}
case
Qt
::
Key_R
:
{
// ParameterSet* params = h_viewParams[view];
// MapHandlerGen* map = params->selectedMap;
// if(map)
// {
// asRigidAsPossible(view, map);
// PerMapParameterSet* perMap = params->perMap[map->getName()];
// params->selectedMap->notifyAttributeModification(perMap->positionAttribute);
// view->updateGL();
// }
MapHandlerGen
*
mh
=
m_schnapps
->
getSelectedMap
();
if
(
mh
)
{
const
MapParameters
&
p
=
h_parameterSet
[
mh
];
if
(
p
.
initialized
)
{
asRigidAsPossible
(
mh
);
mh
->
notifyAttributeModification
(
p
.
positionAttribute
);
static_cast
<
MapHandler
<
PFP2
>*>
(
mh
)
->
updateBB
(
p
.
positionAttribute
);
view
->
updateGL
();
}
}
break
;
}
}
...
...
@@ -208,10 +215,11 @@ void Surface_Deformation_Plugin::mouseMove(View* view, QMouseEvent* event)
// matchDiffCoord(map);
if
(
p
.
initialized
)
{
asRigidAsPossible
(
mh
);
mh
->
notifyAttributeModification
(
p
.
positionAttribute
);
static_cast
<
MapHandler
<
PFP2
>*>
(
mh
)
->
updateBB
(
p
.
positionAttribute
);
mh
->
notifyAttributeModification
(
p
.
positionAttribute
);
static_cast
<
MapHandler
<
PFP2
>*>
(
mh
)
->
updateBB
(
p
.
positionAttribute
);
}
}
view
->
updateGL
();
...
...
SCHNApps/include/mapHandler.h
View file @
5d77c85c
...
...
@@ -111,9 +111,12 @@ public:
void
notifyConnectivityModification
()
{
m_render
->
setPrimitiveDirty
(
Algo
::
Render
::
GL2
::
POINTS
);
m_render
->
setPrimitiveDirty
(
Algo
::
Render
::
GL2
::
LINES
);
m_render
->
setPrimitiveDirty
(
Algo
::
Render
::
GL2
::
TRIANGLES
);
if
(
m_render
)
{
m_render
->
setPrimitiveDirty
(
Algo
::
Render
::
GL2
::
POINTS
);
m_render
->
setPrimitiveDirty
(
Algo
::
Render
::
GL2
::
LINES
);
m_render
->
setPrimitiveDirty
(
Algo
::
Render
::
GL2
::
TRIANGLES
);
}
emit
(
connectivityModified
());
...
...
include/Algo/Import/import2tables.h
View file @
5d77c85c
...
...
@@ -113,6 +113,8 @@ public:
bool
importPlySLFgeneric
(
const
std
::
string
&
filename
,
std
::
vector
<
std
::
string
>&
attrNames
);
bool
importPlySLFgenericBin
(
const
std
::
string
&
filename
,
std
::
vector
<
std
::
string
>&
attrNames
);
bool
importFromVoxelGrid
(
const
VoxelGrid
&
grid
);
#ifdef WITH_ASSIMP
bool
importASSIMP
(
const
std
::
string
&
filename
,
std
::
vector
<
std
::
string
>&
attrNames
);
#endif
...
...
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