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
Sauvage
CGoGN
Commits
366ba117
Commit
366ba117
authored
Feb 08, 2012
by
Pierre Kraemer
Browse files
debug next() in MR case
parent
13408457
Changes
4
Hide whitespace changes
Inline
Side-by-side
include/Topology/generic/genericmap.h
View file @
366ba117
...
...
@@ -164,32 +164,32 @@ public:
****************************************/
/**
* get the current
level of multi-
resolution (use only in MRMaps)
* get the current resolution
level
(use only in MRMaps)
*/
unsigned
int
getCurrentLevel
()
;
/**
* set the current
level of multi-
resolution (use only in MRMaps)
* set the current resolution
level
(use only in MRMaps)
*/
void
setCurrentLevel
(
unsigned
int
l
)
;
/**
* store current
level of multi-
resolution on a stack (use only in MRMaps)
* store current resolution
level
on a stack (use only in MRMaps)
*/
void
pushLevel
()
;
/**
*
g
et
back level of multi-resolution
of the stack
in current
(use only in MRMaps)
*
s
et
as current the resolution level of the top
of the stack (use only in MRMaps)
*/
void
popLevel
()
;
/**
* get the max
level of multi-
resolution (use only in MRMaps)
* get the max
imum
resolution
level
(use only in MRMaps)
*/
unsigned
int
getMaxLevel
()
;
/**
* add a
level of multi-
resolution (use only in MRMaps)
* add a resolution
level
(use only in MRMaps)
*/
void
addLevel
()
;
...
...
@@ -213,7 +213,6 @@ protected:
void
deleteDart
(
Dart
d
)
;
public:
/**
* get the index of dart in topological table
*/
...
...
include/Topology/generic/genericmap.hpp
View file @
366ba117
...
...
@@ -46,7 +46,7 @@ inline void GenericMap::setCurrentLevel(unsigned int l)
if
(
l
<
m_mrDarts
.
size
())
m_mrCurrentLevel
=
l
;
else
CGoGNout
<<
"try to access inexisting resolution level"
<<
CGoGNendl
;
CGoGNout
<<
"
setCurrentLevel :
try to access inexisting resolution level"
<<
CGoGNendl
;
}
inline
void
GenericMap
::
pushLevel
()
...
...
@@ -281,8 +281,10 @@ inline void GenericMap::next(Dart& d)
{
if
(
m_isMultiRes
)
{
while
((
d
.
index
!=
m_mrattribs
.
end
()
)
&&
(
getDartLevel
(
d
.
index
)
>
m_mrCurrentLevel
))
do
{
m_mrattribs
.
next
(
d
.
index
)
;
}
while
((
d
.
index
!=
m_mrattribs
.
end
()
)
&&
(
getDartLevel
(
d
.
index
)
>
m_mrCurrentLevel
))
;
}
else
m_attribs
[
DART
].
next
(
d
.
index
)
;
...
...
include/Topology/map/map2MR/map2MR_Primal.h
View file @
366ba117
...
...
@@ -25,12 +25,12 @@
#ifndef __MAP2MR_PRIMAL__
#define __MAP2MR_PRIMAL__
#include
"Topology/map/
m
ap2.h"
#include
"Topology/map/
embeddedM
ap2.h"
namespace
CGoGN
{
class
Map2MR_Primal
:
p
rotect
ed
Map2
class
Map2MR_Primal
:
p
ublic
Embedd
edMap2
{
public:
Map2MR_Primal
()
;
...
...
@@ -96,12 +96,24 @@ public:
* SUBDIVISION *
***************************************************/
/**
* subdivide the edge of d to the next level
*/
void
subdivideEdge
(
Dart
d
)
;
/**
* subdivide the face of d to the next level
*/
void
subdivideFace
(
Dart
d
)
;
/**
* coarsen the edge of d from the next level
*/
void
coarsenEdge
(
Dart
d
)
;
/**
* coarsen the face of d from the next level
*/
void
coarsenFace
(
Dart
d
)
;
}
;
...
...
src/Topology/generic/genericmap.cpp
View file @
366ba117
...
...
@@ -155,13 +155,13 @@ void GenericMap::clear(bool removeAttrib)
if
(
m_isMultiRes
)
{
m_mrattribs
.
clear
(
true
);
m_mr
Levels
=
NULL
;
unsigned
int
nb
=
m_mrDarts
.
size
();
for
(
unsigned
int
i
=
0
;
i
<
nb
;
++
i
)
m_mrDarts
[
i
]
=
NULL
;
m_mr
CurrentLevel
=
0
;
m_mrLevelStack
.
clear
();
m_mrattribs
.
clear
(
true
)
;
m_mr
Darts
.
clear
()
;
m_mrLevels
=
m_mrattribs
.
addAttribute
<
unsigned
char
>
(
"MRLevel"
)
;
addLevel
()
;
set
CurrentLevel
(
0
)
;
m_mrLevelStack
.
clear
()
;
}
}
...
...
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