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
Thomas Pitiot
CGoGN
Commits
74edf8e4
Commit
74edf8e4
authored
Apr 25, 2014
by
Sylvain Thery
Browse files
Merge branch 'develop' of cgogn:~kraemer/CGoGN into develop
parents
73c2b1f3
dfe198e1
Changes
5
Hide whitespace changes
Inline
Side-by-side
include/Topology/generic/dart.h
View file @
74edf8e4
...
...
@@ -65,7 +65,7 @@ struct Dart
static
Dart
create
(
unsigned
int
i
)
{
Dart
d
;
d
.
index
=
i
;
return
d
;
}
Dart
(
unsigned
int
v
)
:
index
(
v
)
{}
explicit
Dart
(
unsigned
int
v
)
:
index
(
v
)
{}
bool
isNil
()
const
{
return
index
==
0xffffffff
;
}
...
...
include/Topology/generic/genericmap.hpp
View file @
74edf8e4
...
...
@@ -248,7 +248,7 @@ inline AttributeMultiVector<Dart>* GenericMap::addRelation(const std::string& na
// set new relation to fix point for all the darts of the map
for
(
unsigned
int
i
=
cont
.
begin
();
i
<
cont
.
end
();
cont
.
next
(
i
))
(
*
amv
)[
i
]
=
i
;
(
*
amv
)[
i
]
=
Dart
(
i
)
;
return
amv
;
}
...
...
include/Topology/gmap/embeddedGMap2.h
View file @
74edf8e4
...
...
@@ -46,29 +46,29 @@ public:
/**
* create a new face with managed embeddings
*/
virtual
Dart
newFace
(
unsigned
int
nbEdges
,
bool
withBoundary
=
true
)
;
Dart
newFace
(
unsigned
int
nbEdges
,
bool
withBoundary
=
true
)
;
/**
* The attributes attached to the old vertex are duplicated on both resulting vertices
* No attribute is attached to the new edge
*/
virtual
void
splitVertex
(
Dart
d
,
Dart
e
)
;
void
splitVertex
(
Dart
d
,
Dart
e
)
;
/**
* The attributes attached to the face of d are kept on the resulting face
*/
virtual
Dart
deleteVertex
(
Dart
d
)
;
Dart
deleteVertex
(
Dart
d
)
;
/**
* No attribute is attached to the new vertex
* The attributes attached to the old edge are duplicated on both resulting edges
*/
virtual
Dart
cutEdge
(
Dart
d
)
;
Dart
cutEdge
(
Dart
d
)
;
/**
* The attributes attached to the edge of d are kept on the resulting edge
*/
virtual
bool
uncutEdge
(
Dart
d
)
;
bool
uncutEdge
(
Dart
d
)
;
/**
* Check if the edge of d can be collapsed or not based on some topological conditions
...
...
@@ -82,17 +82,17 @@ public:
* See 'collapseDegeneratedFace' to see what can happen to edges attributes
* Nothing has to be done for the faces (some degenerate ones can be deleted)
*/
virtual
Dart
collapseEdge
(
Dart
d
,
bool
delDegenerateFaces
=
true
)
;
Dart
collapseEdge
(
Dart
d
,
bool
delDegenerateFaces
=
true
)
;
/**
* No cell is created or deleted
*/
virtual
bool
flipEdge
(
Dart
d
)
;
bool
flipEdge
(
Dart
d
)
;
/**
* No cell is created or deleted
*/
virtual
bool
flipBackEdge
(
Dart
d
)
;
bool
flipBackEdge
(
Dart
d
)
;
// /**
// * The attributes attached to the vertex of dart d are kept on the resulting vertex
...
...
@@ -110,42 +110,42 @@ public:
* 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
*/
virtual
void
sewFaces
(
Dart
d
,
Dart
e
,
bool
withBoundary
=
true
)
;
void
sewFaces
(
Dart
d
,
Dart
e
,
bool
withBoundary
=
true
)
;
/**
* 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
*/
virtual
void
unsewFaces
(
Dart
d
)
;
void
unsewFaces
(
Dart
d
)
;
/**
* The attributes attached to the edge of d are kept on the resulting edge
*/
virtual
bool
collapseDegeneratedFace
(
Dart
d
);
bool
collapseDegeneratedFace
(
Dart
d
);
/**
* No attribute is attached to the new edge
* The attributes attached to the old face are duplicated on both resulting faces
*/
virtual
void
splitFace
(
Dart
d
,
Dart
e
)
;
void
splitFace
(
Dart
d
,
Dart
e
)
;
/**
* The attributes attached to the face of dart d are kept on the resulting face
*/
virtual
bool
mergeFaces
(
Dart
d
)
;
bool
mergeFaces
(
Dart
d
)
;
/**
* The attributes attached to the vertices of the face of d are kept on the resulting vertices
* The attributes attached to the edges of the face of d are kept on the resulting edges
*/
virtual
bool
mergeVolumes
(
Dart
d
,
Dart
e
)
;
bool
mergeVolumes
(
Dart
d
,
Dart
e
)
;
/**
* No attribute is attached to the new face
*/
virtual
unsigned
int
closeHole
(
Dart
d
,
bool
forboundary
=
true
);
unsigned
int
closeHole
(
Dart
d
,
bool
forboundary
=
true
);
virtual
bool
check
()
;
bool
check
()
;
}
;
}
// namespace CGoGN
...
...
include/Topology/gmap/gmap2.h
View file @
74edf8e4
...
...
@@ -99,23 +99,23 @@ public:
* @param withBoudary create the face and its boundary (default true)
* @return return a dart of the face
*/
virtual
Dart
newFace
(
unsigned
int
nbEdges
,
bool
withBoundary
=
true
)
;
Dart
newFace
(
unsigned
int
nbEdges
,
bool
withBoundary
=
true
)
;
//! Delete a face erasing all its darts
/*! @param d a dart of the face
*/
virtual
void
deleteFace
(
Dart
d
);
void
deleteFace
(
Dart
d
);
//! Delete a connected component of the map
/*! @param d a dart of the connected component
*/
virtual
void
deleteCC
(
Dart
d
)
;
void
deleteCC
(
Dart
d
)
;
//! Fill a hole with a face
/*! \pre Dart d is boundary marked
* @param d a dart of the face to fill
*/
virtual
void
fillHole
(
Dart
d
)
;
void
fillHole
(
Dart
d
)
;
//@}
/*! @name Topological Operators
...
...
@@ -128,7 +128,7 @@ public:
* @param d first dart in vertex v
* @param e second dart in vertex v
*/
virtual
void
splitVertex
(
Dart
d
,
Dart
e
);
void
splitVertex
(
Dart
d
,
Dart
e
);
//! Delete the vertex of d (works only for internal vertices)
/*! Does not create a hole -> all the faces
...
...
@@ -136,19 +136,19 @@ public:
* @param d a dart of the vertex to delete
* @return a dart of the resulting face (NIL if the deletion has not been executed)
*/
virtual
Dart
deleteVertex
(
Dart
d
)
;
Dart
deleteVertex
(
Dart
d
)
;
//! Cut the edge of d by inserting a new vertex
/*! @param d a dart of the edge to cut
* @return a dart of the new vertex
*/
virtual
Dart
cutEdge
(
Dart
d
);
Dart
cutEdge
(
Dart
d
);
//! Undo the cut of the edge of d
/*! @param d a dart of the edge to uncut
* @return true if the uncut has been executed, false otherwise
*/
virtual
bool
uncutEdge
(
Dart
d
);
bool
uncutEdge
(
Dart
d
);
//! Collapse an edge (that is deleted) possibly merging its vertices
/*! If delDegenerateFaces is true, the method checks that no degenerate
...
...
@@ -160,7 +160,7 @@ public:
* @param delDegenerateFaces a boolean (default to true)
* @return a dart of the resulting vertex
*/
virtual
Dart
collapseEdge
(
Dart
d
,
bool
delDegenerateFaces
=
true
);
Dart
collapseEdge
(
Dart
d
,
bool
delDegenerateFaces
=
true
);
/**
* Flip the edge of d (rotation in phi1 order)
...
...
@@ -168,7 +168,7 @@ public:
* @param d a dart of the edge to flip
* @return true if the flip has been executed, false otherwise
*/
virtual
bool
flipEdge
(
Dart
d
);
bool
flipEdge
(
Dart
d
);
/**
* Flip the edge of d (rotation in phi_1 order)
...
...
@@ -176,7 +176,7 @@ public:
* @param d a dart of the edge to flip
* @return true if the flipBack has been executed, false otherwise
*/
virtual
bool
flipBackEdge
(
Dart
d
);
bool
flipBackEdge
(
Dart
d
);
// //! Insert an edge after a dart in the vertex orbit
// /*! \pre Dart d and e MUST be different and belong to distinct face
...
...
@@ -198,7 +198,7 @@ public:
* @param e a dart of the second face
* @param withBoundary: if false, faces must have beta2 fixed points (only for construction: import/primitives)
*/
virtual
void
sewFaces
(
Dart
d
,
Dart
e
,
bool
withBoundary
=
true
);
void
sewFaces
(
Dart
d
,
Dart
e
,
bool
withBoundary
=
true
);
//! Unsew two faces
/*! \pre Edge of dart d MUST NOT be a boundary edge
...
...
@@ -219,7 +219,7 @@ public:
* @param d first dart in face f
* @param e second dart in face f
*/
virtual
void
splitFace
(
Dart
d
,
Dart
e
);
void
splitFace
(
Dart
d
,
Dart
e
);
//! Merge the two faces incident to the edge of d.
/*! Works only for non-boundary edges.
...
...
@@ -227,7 +227,7 @@ public:
* @param d a dart in the first face
* @return true if the merge has been executed, false otherwise
*/
virtual
bool
mergeFaces
(
Dart
d
);
bool
mergeFaces
(
Dart
d
);
/**
* Extract a pair of sewed triangles and sew their adjacent faces
...
...
@@ -252,13 +252,13 @@ public:
* @param e a dart of the second face
* @return true if the merge has been executed, false otherwise
*/
virtual
bool
mergeVolumes
(
Dart
d
,
Dart
e
);
bool
mergeVolumes
(
Dart
d
,
Dart
e
);
//!
/*!
*
*/
virtual
void
splitSurface
(
std
::
vector
<
Dart
>&
vd
,
bool
firstSideClosed
=
true
,
bool
secondSideClosed
=
true
);
void
splitSurface
(
std
::
vector
<
Dart
>&
vd
,
bool
firstSideClosed
=
true
,
bool
secondSideClosed
=
true
);
//@}
...
...
src/Topology/gmap/embeddedGMap2.cpp
View file @
74edf8e4
...
...
@@ -102,11 +102,11 @@ void EmbeddedGMap2::splitVertex(Dart d, Dart e)
if
(
isOrbitEmbedded
<
FACE
>
())
{
unsigned
int
f1Emb
=
getEmbedding
<
FACE
>
(
dd
)
;
copy
DartEmbedding
<
FACE
>
(
phi1
(
dd
),
f1Emb
)
;
copy
DartEmbedding
<
FACE
>
(
beta0
(
phi1
(
dd
)),
f1Emb
)
;
set
DartEmbedding
<
FACE
>
(
phi1
(
dd
),
f1Emb
)
;
set
DartEmbedding
<
FACE
>
(
beta0
(
phi1
(
dd
)),
f1Emb
)
;
unsigned
int
f2Emb
=
getEmbedding
<
FACE
>
(
ee
)
;
copy
DartEmbedding
<
FACE
>
(
phi1
(
ee
),
f2Emb
)
;
copy
DartEmbedding
<
FACE
>
(
beta0
(
phi1
(
ee
)),
f2Emb
)
;
set
DartEmbedding
<
FACE
>
(
phi1
(
ee
),
f2Emb
)
;
set
DartEmbedding
<
FACE
>
(
beta0
(
phi1
(
ee
)),
f2Emb
)
;
}
}
...
...
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