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
David Cazier
CGoGN
Commits
52a85abe
Commit
52a85abe
authored
Jul 17, 2013
by
untereiner
Browse files
Merge cgogn:~thery/CGoGN
parents
af6dcd3c
1e81b6fd
Changes
4
Hide whitespace changes
Inline
Side-by-side
include/Container/containerBrowser.h
View file @
52a85abe
...
...
@@ -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 @
52a85abe
...
...
@@ -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 @
52a85abe
...
...
@@ -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 @
52a85abe
...
...
@@ -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
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