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
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hurstel
CGoGN
Commits
8c66db32
Commit
8c66db32
authored
May 12, 2014
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of cgogn.u-strasbg.fr:~kraemer/CGoGN into develop
parents
248431e8
5fa57ec1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
132 additions
and
37 deletions
+132
-37
SCHNApps/include/mapHandler.h
SCHNApps/include/mapHandler.h
+4
-31
SCHNApps/src/mapHandler.cpp
SCHNApps/src/mapHandler.cpp
+90
-0
include/Topology/generic/mapImpl/mapMono.h
include/Topology/generic/mapImpl/mapMono.h
+6
-2
include/Topology/generic/mapImpl/mapMono.hpp
include/Topology/generic/mapImpl/mapMono.hpp
+13
-1
include/Topology/generic/mapImpl/mapMulti.h
include/Topology/generic/mapImpl/mapMulti.h
+6
-2
include/Topology/generic/mapImpl/mapMulti.hpp
include/Topology/generic/mapImpl/mapMulti.hpp
+13
-1
No files found.
SCHNApps/include/mapHandler.h
View file @
8c66db32
...
...
@@ -99,39 +99,11 @@ public:
const
AttributeSet
&
getAttributeSet
(
unsigned
int
orbit
)
const
{
return
m_attribs
[
orbit
];
}
void
notifyAttributeModification
(
const
AttributeHandlerGen
&
attr
)
{
QString
nameAttr
=
QString
::
fromStdString
(
attr
.
name
());
if
(
m_vbo
.
contains
(
nameAttr
))
m_vbo
[
nameAttr
]
->
updateData
(
attr
);
emit
(
attributeModified
(
attr
.
getOrbit
(),
nameAttr
));
foreach
(
View
*
view
,
l_views
)
view
->
updateGL
();
}
void
notifyConnectivityModification
()
{
if
(
m_render
)
{
m_render
->
setPrimitiveDirty
(
Algo
::
Render
::
GL2
::
POINTS
);
m_render
->
setPrimitiveDirty
(
Algo
::
Render
::
GL2
::
LINES
);
m_render
->
setPrimitiveDirty
(
Algo
::
Render
::
GL2
::
TRIANGLES
);
m_render
->
setPrimitiveDirty
(
Algo
::
Render
::
GL2
::
BOUNDARY
);
}
for
(
unsigned
int
orbit
=
0
;
orbit
<
NB_ORBITS
;
++
orbit
)
{
foreach
(
CellSelectorGen
*
cs
,
m_cellSelectors
[
orbit
])
cs
->
rebuild
();
}
void
notifyAttributeModification
(
const
AttributeHandlerGen
&
attr
);
emit
(
connectivityModified
()
);
void
notifyConnectivityModification
(
);
foreach
(
View
*
view
,
l_views
)
view
->
updateGL
();
}
void
clear
(
bool
removeAttrib
);
/*********************************************************
* MANAGE VBOs
...
...
@@ -184,6 +156,7 @@ signals:
void
attributeAdded
(
unsigned
int
orbit
,
const
QString
&
nameAttr
);
void
attributeModified
(
unsigned
int
orbit
,
QString
nameAttr
);
void
attributeRemoved
(
unsigned
int
orbit
,
const
QString
&
nameAttr
);
void
vboAdded
(
Utils
::
VBO
*
vbo
);
void
vboRemoved
(
Utils
::
VBO
*
vbo
);
...
...
SCHNApps/src/mapHandler.cpp
View file @
8c66db32
...
...
@@ -29,6 +29,96 @@ MapHandlerGen::~MapHandlerGen()
delete
vbo
;
}
/*********************************************************
* MANAGE ATTRIBUTES
*********************************************************/
void
MapHandlerGen
::
notifyAttributeModification
(
const
AttributeHandlerGen
&
attr
)
{
QString
nameAttr
=
QString
::
fromStdString
(
attr
.
name
());
if
(
m_vbo
.
contains
(
nameAttr
))
m_vbo
[
nameAttr
]
->
updateData
(
attr
);
emit
(
attributeModified
(
attr
.
getOrbit
(),
nameAttr
));
foreach
(
View
*
view
,
l_views
)
view
->
updateGL
();
}
void
MapHandlerGen
::
notifyConnectivityModification
()
{
if
(
m_render
)
{
m_render
->
setPrimitiveDirty
(
Algo
::
Render
::
GL2
::
POINTS
);
m_render
->
setPrimitiveDirty
(
Algo
::
Render
::
GL2
::
LINES
);
m_render
->
setPrimitiveDirty
(
Algo
::
Render
::
GL2
::
TRIANGLES
);
m_render
->
setPrimitiveDirty
(
Algo
::
Render
::
GL2
::
BOUNDARY
);
}
for
(
unsigned
int
orbit
=
0
;
orbit
<
NB_ORBITS
;
++
orbit
)
{
foreach
(
CellSelectorGen
*
cs
,
m_cellSelectors
[
orbit
])
cs
->
rebuild
();
}
emit
(
connectivityModified
());
foreach
(
View
*
view
,
l_views
)
view
->
updateGL
();
}
void
MapHandlerGen
::
clear
(
bool
removeAttrib
)
{
if
(
m_render
)
{
m_render
->
setPrimitiveDirty
(
Algo
::
Render
::
GL2
::
POINTS
);
m_render
->
setPrimitiveDirty
(
Algo
::
Render
::
GL2
::
LINES
);
m_render
->
setPrimitiveDirty
(
Algo
::
Render
::
GL2
::
TRIANGLES
);
m_render
->
setPrimitiveDirty
(
Algo
::
Render
::
GL2
::
BOUNDARY
);
}
for
(
unsigned
int
orbit
=
0
;
orbit
<
NB_ORBITS
;
++
orbit
)
{
foreach
(
CellSelectorGen
*
cs
,
m_cellSelectors
[
orbit
])
cs
->
rebuild
();
}
std
::
vector
<
std
::
string
>
attrs
[
NB_ORBITS
];
for
(
unsigned
int
orbit
=
0
;
orbit
<
NB_ORBITS
;
++
orbit
)
{
if
(
m_map
->
isOrbitEmbedded
(
orbit
))
{
AttributeContainer
&
cont
=
m_map
->
getAttributeContainer
(
orbit
);
cont
.
getAttributesNames
(
attrs
[
orbit
]);
}
}
m_map
->
clear
(
removeAttrib
);
for
(
unsigned
int
orbit
=
0
;
orbit
<
NB_ORBITS
;
++
orbit
)
{
for
(
unsigned
int
i
=
0
;
i
<
attrs
[
orbit
].
size
();
++
i
)
{
QString
name
=
QString
::
fromStdString
(
attrs
[
orbit
][
i
]);
if
(
removeAttrib
)
{
if
(
orbit
==
VERTEX
)
deleteVBO
(
name
);
emit
(
attributeRemoved
(
orbit
,
name
));
}
else
{
if
(
orbit
==
VERTEX
)
updateVBO
(
name
);
emit
(
attributeModified
(
orbit
,
name
));
}
}
}
emit
(
connectivityModified
());
}
/*********************************************************
* MANAGE VBOs
*********************************************************/
...
...
include/Topology/generic/mapImpl/mapMono.h
View file @
8c66db32
...
...
@@ -126,9 +126,13 @@ public:
/**
* Apply a functor on each dart of the map
* @param f a
ref to the functor obj
* @param f a
callable taking a Dart parameter
*/
bool
foreach_dart
(
FunctorType
&
f
)
;
template
<
typename
FUNC
>
void
foreach_dart
(
FUNC
f
)
;
template
<
typename
FUNC
>
void
foreach_dart
(
FUNC
&
f
)
;
/****************************************
* SAVE & LOAD *
...
...
include/Topology/generic/mapImpl/mapMono.hpp
View file @
8c66db32
...
...
@@ -228,7 +228,19 @@ inline void MapMono::next(Dart& d) const
m_attribs
[
DART
].
next
(
d
.
index
)
;
}
inline
bool
MapMono
::
foreach_dart
(
FunctorType
&
f
)
template
<
typename
FUNC
>
inline
void
MapMono
::
foreach_dart
(
FUNC
f
)
{
for
(
Dart
d
=
begin
();
d
!=
end
();
next
(
d
))
{
if
(
f
(
d
))
return
true
;
}
return
false
;
}
template
<
typename
FUNC
>
inline
void
MapMono
::
foreach_dart
(
FUNC
&
f
)
{
for
(
Dart
d
=
begin
();
d
!=
end
();
next
(
d
))
{
...
...
include/Topology/generic/mapImpl/mapMulti.h
View file @
8c66db32
...
...
@@ -280,9 +280,13 @@ public:
/**
* Apply a functor on each dart of the map
* @param f a
ref to the functor obj
* @param f a
callable taking a Dart parameter
*/
bool
foreach_dart
(
FunctorType
&
f
)
;
template
<
typename
FUNC
>
void
foreach_dart
(
FUNC
f
)
;
template
<
typename
FUNC
>
void
foreach_dart
(
FUNC
&
f
)
;
/****************************************
* SAVE & LOAD *
...
...
include/Topology/generic/mapImpl/mapMulti.hpp
View file @
8c66db32
...
...
@@ -439,7 +439,19 @@ inline void MapMulti::next(Dart& d) const
d
.
index
=
m_mrattribs
.
end
();
}
inline
bool
MapMulti
::
foreach_dart
(
FunctorType
&
f
)
template
<
typename
FUNC
>
inline
void
MapMulti
::
foreach_dart
(
FUNC
f
)
{
for
(
Dart
d
=
begin
();
d
!=
end
();
next
(
d
))
{
if
(
f
(
d
))
return
true
;
}
return
false
;
}
template
<
typename
FUNC
>
inline
void
MapMulti
::
foreach_dart
(
FUNC
&
f
)
{
for
(
Dart
d
=
begin
();
d
!=
end
();
next
(
d
))
{
...
...
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