Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
CGoGN
CGoGN
Commits
5b65878e
Commit
5b65878e
authored
Nov 06, 2013
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
surface selection almost ok
parent
54850cac
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
11 deletions
+43
-11
SCHNApps/Plugins/surface_selection/include/surface_selection.h
...pps/Plugins/surface_selection/include/surface_selection.h
+1
-0
SCHNApps/Plugins/surface_selection/src/surface_selection.cpp
SCHNApps/Plugins/surface_selection/src/surface_selection.cpp
+37
-7
SCHNApps/src/controlDock_mapTab.cpp
SCHNApps/src/controlDock_mapTab.cpp
+5
-3
SCHNApps/src/view.cpp
SCHNApps/src/view.cpp
+0
-1
No files found.
SCHNApps/Plugins/surface_selection/include/surface_selection.h
View file @
5b65878e
...
...
@@ -63,6 +63,7 @@ private slots:
void
selectedMapChanged
(
MapHandlerGen
*
prev
,
MapHandlerGen
*
cur
);
void
mapAdded
(
MapHandlerGen
*
map
);
void
mapRemoved
(
MapHandlerGen
*
map
);
void
updateSelectedCellsRendering
();
// slots called from MapHandler signals
void
attributeAdded
(
unsigned
int
orbit
,
const
QString
&
name
);
...
...
SCHNApps/Plugins/surface_selection/src/surface_selection.cpp
View file @
5b65878e
...
...
@@ -38,6 +38,7 @@ bool Surface_Selection_Plugin::enable()
connect
(
m_schnapps
,
SIGNAL
(
selectedMapChanged
(
MapHandlerGen
*
,
MapHandlerGen
*
)),
this
,
SLOT
(
selectedMapChanged
(
MapHandlerGen
*
,
MapHandlerGen
*
)));
connect
(
m_schnapps
,
SIGNAL
(
mapAdded
(
MapHandlerGen
*
)),
this
,
SLOT
(
mapAdded
(
MapHandlerGen
*
)));
connect
(
m_schnapps
,
SIGNAL
(
mapRemoved
(
MapHandlerGen
*
)),
this
,
SLOT
(
mapRemoved
(
MapHandlerGen
*
)));
connect
(
m_schnapps
,
SIGNAL
(
selectedCellSelectorChanged
(
CellSelectorGen
*
)),
this
,
SLOT
(
updateSelectedCellsRendering
()));
foreach
(
MapHandlerGen
*
map
,
m_schnapps
->
getMapSet
().
values
())
mapAdded
(
map
);
...
...
@@ -53,10 +54,10 @@ void Surface_Selection_Plugin::disable()
delete
m_selectedVerticesVBO
;
delete
m_selectionSphereVBO
;
disconnect
(
m_schnapps
,
SIGNAL
(
selectedViewChanged
(
View
*
,
View
*
)),
this
,
SLOT
(
selectedViewChanged
(
View
*
,
View
*
)));
disconnect
(
m_schnapps
,
SIGNAL
(
selectedMapChanged
(
MapHandlerGen
*
,
MapHandlerGen
*
)),
this
,
SLOT
(
selectedMapChanged
(
MapHandlerGen
*
,
MapHandlerGen
*
)));
disconnect
(
m_schnapps
,
SIGNAL
(
mapAdded
(
MapHandlerGen
*
)),
this
,
SLOT
(
mapAdded
(
MapHandlerGen
*
)));
disconnect
(
m_schnapps
,
SIGNAL
(
mapRemoved
(
MapHandlerGen
*
)),
this
,
SLOT
(
mapRemoved
(
MapHandlerGen
*
)));
disconnect
(
m_schnapps
,
SIGNAL
(
selectedCellSelectorChanged
(
CellSelectorGen
*
)),
this
,
SLOT
(
updateSelectedCellsRendering
()));
}
void
Surface_Selection_Plugin
::
draw
(
View
*
view
)
...
...
@@ -257,12 +258,7 @@ void Surface_Selection_Plugin::mousePress(View* view, QMouseEvent* event)
break
;
}
}
const
std
::
vector
<
Dart
>&
selectedCells
=
selector
->
getSelectedCells
();
std
::
vector
<
PFP2
::
VEC3
>
selectedPoints
;
for
(
std
::
vector
<
Dart
>::
const_iterator
it
=
selectedCells
.
begin
();
it
!=
selectedCells
.
end
();
++
it
)
selectedPoints
.
push_back
(
p
.
positionAttribute
[
*
it
]);
m_selectedVerticesVBO
->
updateData
(
selectedPoints
);
updateSelectedCellsRendering
();
}
break
;
}
...
...
@@ -408,6 +404,40 @@ void Surface_Selection_Plugin::mapRemoved(MapHandlerGen* map)
disconnect
(
map
,
SIGNAL
(
attributeAdded
(
unsigned
int
,
const
QString
&
)),
this
,
SLOT
(
attributeAdded
(
unsigned
int
,
const
QString
&
)));
}
void
Surface_Selection_Plugin
::
updateSelectedCellsRendering
()
{
MapHandlerGen
*
mh
=
m_schnapps
->
getSelectedMap
();
const
MapParameters
&
p
=
h_parameterSet
[
mh
];
if
(
p
.
positionAttribute
.
isValid
())
{
unsigned
int
orbit
=
m_schnapps
->
getCurrentOrbit
();
CellSelectorGen
*
selector
=
m_schnapps
->
getSelectedSelector
(
orbit
);
const
std
::
vector
<
Dart
>&
selectedCells
=
selector
->
getSelectedCells
();
switch
(
orbit
)
{
case
VERTEX
:
{
std
::
vector
<
PFP2
::
VEC3
>
selectedPoints
;
for
(
std
::
vector
<
Dart
>::
const_iterator
it
=
selectedCells
.
begin
();
it
!=
selectedCells
.
end
();
++
it
)
selectedPoints
.
push_back
(
p
.
positionAttribute
[
*
it
]);
m_selectedVerticesVBO
->
updateData
(
selectedPoints
);
break
;
}
case
EDGE
:
{
break
;
}
case
FACE
:
{
break
;
}
}
}
foreach
(
View
*
view
,
l_views
)
{
if
(
view
->
isLinkedToMap
(
mh
))
view
->
updateGL
();
}
}
...
...
SCHNApps/src/controlDock_mapTab.cpp
View file @
5b65878e
...
...
@@ -23,9 +23,7 @@ ControlDock_MapTab::ControlDock_MapTab(SCHNApps* s) :
connect
(
list_maps
,
SIGNAL
(
itemChanged
(
QListWidgetItem
*
)),
this
,
SLOT
(
mapCheckStateChanged
(
QListWidgetItem
*
)));
connect
(
list_vertexAttributes
,
SIGNAL
(
itemChanged
(
QListWidgetItem
*
)),
this
,
SLOT
(
vertexAttributeCheckStateChanged
(
QListWidgetItem
*
)));
connect
(
m_schnapps
,
SIGNAL
(
mapAdded
(
MapHandlerGen
*
)),
this
,
SLOT
(
mapAdded
(
MapHandlerGen
*
)));
connect
(
m_schnapps
,
SIGNAL
(
mapRemoved
(
MapHandlerGen
*
)),
this
,
SLOT
(
mapRemoved
(
MapHandlerGen
*
)));
connect
(
m_schnapps
,
SIGNAL
(
selectedViewChanged
(
View
*
,
View
*
)),
this
,
SLOT
(
selectedViewChanged
(
View
*
,
View
*
)));
connect
(
tabWidget_mapInfo
,
SIGNAL
(
currentChanged
(
int
)),
this
,
SLOT
(
selectedSelectorChanged
()));
connect
(
list_dartSelectors
,
SIGNAL
(
itemSelectionChanged
()),
this
,
SLOT
(
selectedSelectorChanged
()));
connect
(
list_dartSelectors
,
SIGNAL
(
itemChanged
(
QListWidgetItem
*
)),
this
,
SLOT
(
selectorCheckStateChanged
(
QListWidgetItem
*
)));
...
...
@@ -51,6 +49,10 @@ ControlDock_MapTab::ControlDock_MapTab(SCHNApps* s) :
connect
(
list_volumeSelectors
,
SIGNAL
(
itemChanged
(
QListWidgetItem
*
)),
this
,
SLOT
(
selectorCheckStateChanged
(
QListWidgetItem
*
)));
connect
(
button_volumeAddSelector
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
addSelector
()));
connect
(
button_volumeRemoveSelector
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
removeSelector
()));
connect
(
m_schnapps
,
SIGNAL
(
mapAdded
(
MapHandlerGen
*
)),
this
,
SLOT
(
mapAdded
(
MapHandlerGen
*
)));
connect
(
m_schnapps
,
SIGNAL
(
mapRemoved
(
MapHandlerGen
*
)),
this
,
SLOT
(
mapRemoved
(
MapHandlerGen
*
)));
connect
(
m_schnapps
,
SIGNAL
(
selectedViewChanged
(
View
*
,
View
*
)),
this
,
SLOT
(
selectedViewChanged
(
View
*
,
View
*
)));
}
unsigned
int
ControlDock_MapTab
::
getCurrentOrbit
()
...
...
SCHNApps/src/view.cpp
View file @
5b65878e
...
...
@@ -35,7 +35,6 @@ View::View(const QString& name, SCHNApps* s, const QGLWidget* shareWidget) :
m_currentCamera
=
m_schnapps
->
addCamera
();
connect
(
m_schnapps
,
SIGNAL
(
selectedMapChanged
(
MapHandlerGen
*
,
MapHandlerGen
*
)),
this
,
SLOT
(
selectedMapChanged
(
MapHandlerGen
*
,
MapHandlerGen
*
)));
connect
(
m_schnapps
,
SIGNAL
(
selectedCellSelectorChanged
(
CellSelectorGen
*
)),
this
,
SLOT
(
updateGL
()));
}
View
::~
View
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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