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
1e81b6fd
Commit
1e81b6fd
authored
Jul 17, 2013
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resolve bug between MR and DartBrowser
parent
e26736d1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
7 deletions
+43
-7
include/Container/containerBrowser.h
include/Container/containerBrowser.h
+1
-0
include/Container/containerBrowser.hpp
include/Container/containerBrowser.hpp
+24
-7
include/Topology/generic/genericmap.h
include/Topology/generic/genericmap.h
+10
-0
include/Topology/generic/genericmap.hpp
include/Topology/generic/genericmap.hpp
+8
-0
No files found.
include/Container/containerBrowser.h
View file @
1e81b6fd
...
...
@@ -42,6 +42,7 @@ class DartContainerBrowserSelector : public ContainerBrowser
protected:
AttributeContainer
*
m_cont
;
const
FunctorSelect
*
m_selector
;
AttribMap
&
m_map
;
public:
DartContainerBrowserSelector
(
AttribMap
&
m
,
const
FunctorSelect
&
fs
);
...
...
include/Container/containerBrowser.hpp
View file @
1e81b6fd
...
...
@@ -29,9 +29,17 @@ namespace CGoGN
{
inline
DartContainerBrowserSelector
::
DartContainerBrowserSelector
(
AttribMap
&
m
,
const
FunctorSelect
&
fs
)
inline
DartContainerBrowserSelector
::
DartContainerBrowserSelector
(
AttribMap
&
m
,
const
FunctorSelect
&
fs
)
:
m_map
(
m
)
{
m_cont
=
&
(
m
.
getAttributeContainer
<
DART
>
());
if
(
GenericMap
::
isMultiRes
())
{
m_cont
=
&
(
m
.
getMRAttributeContainer
());
}
else
{
m_cont
=
&
(
m
.
getAttributeContainer
<
DART
>
());
}
m_selector
=
fs
.
copy
();
}
...
...
@@ -42,11 +50,20 @@ inline DartContainerBrowserSelector::~DartContainerBrowserSelector()
inline
unsigned
int
DartContainerBrowserSelector
::
begin
()
const
{
unsigned
int
it
=
m_cont
->
realBegin
()
;
while
(
(
it
!=
m_cont
->
realEnd
())
&&
!
m_selector
->
operator
()(
Dart
(
it
))
)
m_cont
->
realNext
(
it
);
return
it
;
if
(
GenericMap
::
isMultiRes
())
{
unsigned
int
it
=
m_cont
->
realBegin
()
;
while
(
(
it
!=
m_cont
->
realEnd
())
&&
!
m_selector
->
operator
()(
m_map
.
indexDart
(
it
))
)
m_cont
->
realNext
(
it
);
return
it
;
}
else
{
unsigned
int
it
=
m_cont
->
realBegin
()
;
while
(
(
it
!=
m_cont
->
realEnd
())
&&
!
m_selector
->
operator
()(
Dart
(
it
))
)
m_cont
->
realNext
(
it
);
return
it
;
}
}
inline
unsigned
int
DartContainerBrowserSelector
::
end
()
const
...
...
include/Topology/generic/genericmap.h
View file @
1e81b6fd
...
...
@@ -320,6 +320,16 @@ public:
*/
unsigned
int
dartIndex
(
Dart
d
)
const
;
/**
* get the Dart of index in topological table
*/
Dart
indexDart
(
unsigned
int
index
)
const
;
/**
* @brief are we in MR ?
*/
static
bool
isMultiRes
()
{
return
m_isMultiRes
;
}
/**
* get the insertion level of a dart (use only in MRMaps)
*/
...
...
include/Topology/generic/genericmap.hpp
View file @
1e81b6fd
...
...
@@ -236,6 +236,14 @@ inline unsigned int GenericMap::dartIndex(Dart d) const
return
d
.
index
;
}
inline
Dart
GenericMap
::
indexDart
(
unsigned
int
index
)
const
{
if
(
m_isMultiRes
)
return
Dart
(
(
*
m_mrDarts
[
m_mrCurrentLevel
])[
index
])
;
return
Dart
(
index
);
}
inline
unsigned
int
GenericMap
::
getDartLevel
(
Dart
d
)
const
{
return
(
*
m_mrLevels
)[
d
.
index
]
;
...
...
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