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
2cf2e5ff
Commit
2cf2e5ff
authored
Feb 24, 2012
by
Pierre Kraemer
Browse files
change "mark" function of TraversorCell to "skip" (more explicit)
parent
588b0692
Changes
6
Hide whitespace changes
Inline
Side-by-side
include/Algo/Modelisation/subdivision.hpp
View file @
2cf2e5ff
...
...
@@ -46,10 +46,6 @@ Dart trianguleFace(typename PFP::MAP& map, Dart d)
if
(
map
.
phi1
(
d1
)
==
d
)
CGoGNout
<<
"Warning: triangulation of a face with only two edges"
<<
CGoGNendl
;
std
::
cout
<<
"d = "
<<
d
<<
std
::
endl
;
std
::
cout
<<
"map.phi1(d) = "
<<
map
.
phi1
(
d
)
<<
std
::
endl
;
std
::
cout
<<
"map.phi_1(d) = "
<<
map
.
phi_1
(
d
)
<<
std
::
endl
;
map
.
splitFace
(
d
,
d1
)
;
map
.
cutEdge
(
map
.
phi_1
(
d
))
;
Dart
x
=
map
.
phi2
(
map
.
phi_1
(
d
))
;
...
...
@@ -76,7 +72,7 @@ void trianguleFaces(typename PFP::MAP& map, EMBV& attributs, const FunctorSelect
Dart
fit
=
cd
;
do
{
t
.
mark
(
fit
);
t
.
skip
(
fit
);
fit
=
map
.
phi2_1
(
fit
);
}
while
(
fit
!=
cd
);
}
...
...
@@ -105,7 +101,7 @@ void trianguleFaces(
Dart
fit
=
cd
;
do
{
t
.
mark
(
fit
);
t
.
skip
(
fit
);
fit
=
map
.
phi2_1
(
fit
);
}
while
(
fit
!=
cd
);
}
...
...
include/Algo/Render/GL2/mapRender.h
View file @
2cf2e5ff
...
...
@@ -179,6 +179,7 @@ protected:
template
<
typename
VEC3
>
bool
inTriangle
(
const
VEC3
&
P
,
const
VEC3
&
normal
,
const
VEC3
&
Ta
,
const
VEC3
&
Tb
,
const
VEC3
&
Tc
);
public:
/**
* creation of indices table of triangles (optimized order)
* @param tableIndices the table where indices are stored
...
...
@@ -210,8 +211,6 @@ protected:
*/
template
<
typename
PFP
>
void
initBoundaries
(
typename
PFP
::
MAP
&
map
,
const
FunctorSelect
&
good
,
std
::
vector
<
GLuint
>&
tableIndices
,
unsigned
int
thread
=
0
)
;
public:
/**
* initialization of the VBO indices primitives
* computed by a traversal of the map
...
...
include/Topology/generic/traversorCell.h
View file @
2cf2e5ff
...
...
@@ -55,7 +55,7 @@ public:
Dart
next
()
;
void
mark
(
Dart
d
);
void
skip
(
Dart
d
);
}
;
template
<
typename
MAP
>
...
...
include/Topology/generic/traversorCell.hpp
View file @
2cf2e5ff
...
...
@@ -116,7 +116,7 @@ Dart TraversorCell<MAP>::next()
}
template
<
typename
MAP
>
void
TraversorCell
<
MAP
>::
mark
(
Dart
d
)
void
TraversorCell
<
MAP
>::
skip
(
Dart
d
)
{
if
(
dmark
)
dmark
->
markOrbit
(
m_orbit
,
d
)
;
...
...
include/Topology/map/map2MR/map2MR_PrimalRegular.h
View file @
2cf2e5ff
...
...
@@ -47,8 +47,6 @@ public:
std
::
string
mapTypeName
()
{
return
"Map2MR_PrimalRegular"
;
}
bool
isOddVertex
(
Dart
d
)
;
void
addNewLevel
(
bool
embedNewVertices
)
;
void
addSynthesisFilter
(
Multiresolution
::
MRFilter
*
f
)
{
synthesisFilters
.
push_back
(
f
)
;
}
...
...
src/Topology/map/map2MR/map2MR_PrimalRegular.cpp
View file @
2cf2e5ff
...
...
@@ -33,12 +33,6 @@ Map2MR_PrimalRegular::Map2MR_PrimalRegular() :
initMR
()
;
}
bool
Map2MR_PrimalRegular
::
isOddVertex
(
Dart
d
)
{
assert
(
getDartLevel
(
d
)
<=
getCurrentLevel
()
||
!
"isOddVertex : called with a dart inserted after current level"
)
;
return
getDartLevel
(
d
)
==
getCurrentLevel
()
;
}
void
Map2MR_PrimalRegular
::
addNewLevel
(
bool
embedNewVertices
)
{
pushLevel
()
;
...
...
@@ -58,7 +52,7 @@ void Map2MR_PrimalRegular::addNewLevel(bool embedNewVertices)
TraversorE
<
Map2MR_PrimalRegular
>
travE
(
*
this
)
;
for
(
Dart
d
=
travE
.
begin
();
d
!=
travE
.
end
();
d
=
travE
.
next
())
{
if
(
!
shareVertexEmbeddings
)
if
(
!
shareVertexEmbeddings
&&
embedNewVertices
)
{
if
(
getEmbedding
(
VERTEX
,
d
)
==
EMBNULL
)
embedNewCell
(
VERTEX
,
d
)
;
...
...
@@ -67,8 +61,8 @@ void Map2MR_PrimalRegular::addNewLevel(bool embedNewVertices)
}
cutEdge
(
d
)
;
travE
.
mark
(
d
)
;
travE
.
mark
(
phi1
(
d
))
;
travE
.
skip
(
d
)
;
travE
.
skip
(
phi1
(
d
))
;
if
(
embedNewVertices
)
embedNewCell
(
VERTEX
,
phi1
(
d
))
;
...
...
@@ -91,19 +85,19 @@ void Map2MR_PrimalRegular::addNewLevel(bool embedNewVertices)
Dart
dd
=
phi1
(
old
)
;
Dart
e
=
phi1
(
phi1
(
dd
))
;
splitFace
(
dd
,
e
)
;
travF
.
mark
(
dd
)
;
travF
.
skip
(
dd
)
;
dd
=
e
;
e
=
phi1
(
phi1
(
dd
))
;
splitFace
(
dd
,
e
)
;
travF
.
mark
(
dd
)
;
travF
.
skip
(
dd
)
;
dd
=
e
;
e
=
phi1
(
phi1
(
dd
))
;
splitFace
(
dd
,
e
)
;
travF
.
mark
(
dd
)
;
travF
.
skip
(
dd
)
;
travF
.
mark
(
e
)
;
travF
.
skip
(
e
)
;
}
else
// if subdividing a polygonal face
{
...
...
@@ -113,7 +107,7 @@ void Map2MR_PrimalRegular::addNewLevel(bool embedNewVertices)
Dart
ne
=
alpha1
(
dd
)
;
cutEdge
(
ne
)
;
// cut the new edge to insert the central vertex
travF
.
mark
(
dd
)
;
travF
.
skip
(
dd
)
;
if
(
embedNewVertices
)
embedNewCell
(
VERTEX
,
phi1
(
ne
))
;
...
...
@@ -123,10 +117,10 @@ void Map2MR_PrimalRegular::addNewLevel(bool embedNewVertices)
{
// linked to the central vertex
Dart
tmp
=
phi1
(
ne
)
;
splitFace
(
tmp
,
dd
)
;
travF
.
mark
(
tmp
)
;
travF
.
skip
(
tmp
)
;
dd
=
phi1
(
phi1
(
dd
))
;
}
travF
.
mark
(
ne
)
;
travF
.
skip
(
ne
)
;
}
}
...
...
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