Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
David Cazier
CGoGN
Commits
464b5025
Commit
464b5025
authored
Nov 09, 2011
by
Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
embeddedgmap3 : gestion volumes dans les sewfaces unsewfaces
parent
68944bbf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
13 deletions
+59
-13
include/Algo/Render/GL1/topo_render.hpp
include/Algo/Render/GL1/topo_render.hpp
+4
-4
include/Topology/gmap/embeddedGMap3.h
include/Topology/gmap/embeddedGMap3.h
+19
-9
src/Topology/gmap/embeddedGMap3.cpp
src/Topology/gmap/embeddedGMap3.cpp
+36
-0
No files found.
include/Algo/Render/GL1/topo_render.hpp
View file @
464b5025
...
...
@@ -436,16 +436,16 @@ void renderTopoGMD3(typename PFP::MAP& map, const typename PFP::TVEC3& positions
vecVolCenters
.
reserve
(
vecDartFaces
.
size
()
/
4
);
// = nb of volumes for a tetra mesh
DartMarker
mark
(
map
);
// marker for darts
//
CellMarker mVol(map, VOLUME);
DartMarker
mVol
(
map
);
CellMarker
mVol
(
map
,
VOLUME
);
//
DartMarker mVol(map);
//compute barycenter and get a dart by face
for
(
Dart
d
=
map
.
begin
();
d
!=
map
.
end
();
map
.
next
(
d
))
{
if
(
!
mVol
.
isMarked
(
d
))
{
//
mVol.mark(d);
mVol
.
markOrbit
(
VOLUME
,
d
);
mVol
.
mark
(
d
);
//
mVol.markOrbit(VOLUME,d);
CellMarkerStore
markVert
(
map
,
VERTEX
);
//marker for vertices
VEC3
center
(
0
);
...
...
include/Topology/gmap/embeddedGMap3.h
View file @
464b5025
...
...
@@ -39,21 +39,31 @@ class EmbeddedGMap3 : public GMap3
public:
typedef
GMap3
TOPO_MAP
;
//!
/*!
*
/**
* The attributes attached to the vertices of the edge of d are kept on the vertices of the resulting edge
* The attributes attached to the edge of d are kept on the resulting edge
* The attributes attached to the volume of d are kept on the resulting volume
*/
void
sewFaces
(
Dart
d
,
Dart
e
);
/**
* The attributes attached to the vertices of the old edge of d are duplicated on the vertices of both resulting edges
* The attributes attached to the old edge are duplicated on both resulting edges
* The attributes attached to the old volume are duplicated on both volume if a new one is created
*/
virtual
void
unsewFaces
(
Dart
d
);
//!
/*!
*
/**
* The attributes attached to the vertices of the vertices of the face of d are kept on the vertices of the resulting face
* The attributes attached to the edges of the face of d are kept on the resulting face
* The attributes attached to the face of d are kept on the resulting face
*/
virtual
void
sewVolumes
(
Dart
d
,
Dart
e
);
//!
/*!
*
/**
* The attributes attached to the vertices of the old face of d are duplicated on the vertices of both resulting faces
* The attributes attached to the old edges of the old face of d are duplicated on the edges of both resulting faces
* The attributes attached to the old face d are duplicated on both resulting faces
*/
virtual
void
unsewVolumes
(
Dart
d
);
...
...
src/Topology/gmap/embeddedGMap3.cpp
View file @
464b5025
...
...
@@ -30,6 +30,33 @@
namespace
CGoGN
{
void
EmbeddedGMap3
::
sewFaces
(
Dart
d
,
Dart
e
)
{
GMap3
::
sewFaces
(
d
,
e
);
unsigned
int
vEmb
;
if
(
isOrbitEmbedded
(
VERTEX
))
{
vEmb
=
getEmbedding
(
VERTEX
,
d
);
embedOrbit
(
VERTEX
,
d
,
vEmb
)
;
vEmb
=
getEmbedding
(
VERTEX
,
beta0
(
d
));
embedOrbit
(
VERTEX
,
beta0
(
d
),
vEmb
)
;
}
if
(
isOrbitEmbedded
(
EDGE
))
{
vEmb
=
getEmbedding
(
EDGE
,
d
);
embedOrbit
(
EDGE
,
e
,
vEmb
)
;
}
if
(
isOrbitEmbedded
(
VOLUME
))
{
vEmb
=
getEmbedding
(
VOLUME
,
d
);
embedOrbit
(
VOLUME
,
e
,
vEmb
)
;
}
}
void
EmbeddedGMap3
::
unsewFaces
(
Dart
d
)
{
Dart
e
=
beta2
(
d
);
...
...
@@ -58,6 +85,15 @@ void EmbeddedGMap3::unsewFaces(Dart d)
embedNewCell
(
EDGE
,
e
);
copyCell
(
EDGE
,
e
,
d
);
}
if
(
isOrbitEmbedded
(
VOLUME
))
{
if
(
!
sameVolume
(
d
,
e
))
{
embedNewCell
(
VOLUME
,
e
);
copyCell
(
VOLUME
,
e
,
d
);
}
}
}
void
EmbeddedGMap3
::
sewVolumes
(
Dart
d
,
Dart
e
)
...
...
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