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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
KennethVanhoey
CGoGN
Commits
b73e64da
Commit
b73e64da
authored
Feb 08, 2012
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add initMR function to be called by MRmaps classes at construction
parent
366ba117
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
26 deletions
+28
-26
include/Topology/generic/genericmap.h
include/Topology/generic/genericmap.h
+10
-5
include/Topology/generic/genericmap.hpp
include/Topology/generic/genericmap.hpp
+1
-1
src/Topology/generic/genericmap.cpp
src/Topology/generic/genericmap.cpp
+17
-20
No files found.
include/Topology/generic/genericmap.h
View file @
b73e64da
...
...
@@ -113,22 +113,22 @@ protected:
#endif
/**
* container for m
r-darts that store indices in attribs[DART] for each level
* container for m
ultiresolution darts
*/
AttributeContainer
m_mrattribs
;
/**
* pointer
to indices mvectors
(one for each level)
* pointer
s to attributes that store indices in m_attribs[DART]
(one for each level)
*/
std
::
vector
<
AttributeMultiVector
<
unsigned
int
>*
>
m_mrDarts
;
/**
* pointer
s to mvector of
levels
* pointer
to attribute that stores darts insertion
levels
*/
AttributeMultiVector
<
unsigned
char
>*
m_mrLevels
;
AttributeMultiVector
<
unsigned
int
>*
m_mrLevels
;
/**
* current level
of multiresoltion
* current level
in multiresolution map
*/
unsigned
int
m_mrCurrentLevel
;
...
...
@@ -146,6 +146,11 @@ public:
virtual
std
::
string
mapTypeName
()
=
0
;
/**
* initialize the multiresolution attribute container
*/
void
initMR
()
;
/**
* Clear the map
* @param removeAttrib
...
...
include/Topology/generic/genericmap.hpp
View file @
b73e64da
...
...
@@ -67,7 +67,7 @@ inline unsigned int GenericMap::getMaxLevel()
inline
unsigned
int
GenericMap
::
getDartLevel
(
Dart
d
)
{
return
m_mrLevels
->
operator
[](
d
.
index
)
;
return
m_mrLevels
->
operator
[](
d
.
index
)
;
}
/****************************************
...
...
src/Topology/generic/genericmap.cpp
View file @
b73e64da
...
...
@@ -90,16 +90,6 @@ GenericMap::GenericMap() : m_nbThreads(1)
#ifndef CGoGN_FORCE_MR
m_isMultiRes
=
false
;
#endif
if
(
m_isMultiRes
)
{
m_mrDarts
.
reserve
(
16
)
;
m_mrLevelStack
.
reserve
(
16
)
;
m_mrLevels
=
m_mrattribs
.
addAttribute
<
unsigned
char
>
(
"MRLevel"
)
;
addLevel
()
;
setCurrentLevel
(
0
)
;
}
}
GenericMap
::~
GenericMap
()
...
...
@@ -132,6 +122,21 @@ GenericMap::~GenericMap()
}
}
void
GenericMap
::
initMR
()
{
m_isMultiRes
=
true
;
m_mrattribs
.
clear
(
true
)
;
m_mrDarts
.
clear
()
;
m_mrDarts
.
reserve
(
16
)
;
m_mrLevelStack
.
clear
()
;
m_mrLevelStack
.
reserve
(
16
)
;
m_mrLevels
=
m_mrattribs
.
addAttribute
<
unsigned
int
>
(
"MRLevel"
)
;
addLevel
()
;
setCurrentLevel
(
0
)
;
}
void
GenericMap
::
clear
(
bool
removeAttrib
)
{
if
(
removeAttrib
)
...
...
@@ -154,15 +159,7 @@ void GenericMap::clear(bool removeAttrib)
}
if
(
m_isMultiRes
)
{
m_mrattribs
.
clear
(
true
)
;
m_mrDarts
.
clear
()
;
m_mrLevels
=
m_mrattribs
.
addAttribute
<
unsigned
char
>
(
"MRLevel"
)
;
addLevel
()
;
setCurrentLevel
(
0
)
;
m_mrLevelStack
.
clear
()
;
}
initMR
()
;
}
/****************************************
...
...
@@ -551,7 +548,7 @@ void GenericMap::update_topo_shortcuts()
std
::
string
sub
=
names
[
i
].
substr
(
0
,
7
);
if
(
sub
==
"MRLevel"
)
m_mrLevels
=
m_mrattribs
.
getDataVector
<
unsigned
char
>
(
i
);
m_mrLevels
=
m_mrattribs
.
getDataVector
<
unsigned
int
>
(
i
);
if
(
sub
==
"MRdart_"
)
{
...
...
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