mirror of https://github.com/CGAL/cgal
Continue to work on LCC operations for CMap and GMap...
This commit is contained in:
parent
a0fb8e0a26
commit
e571639c94
|
|
@ -3801,9 +3801,12 @@ namespace CGAL {
|
|||
}
|
||||
|
||||
/** Create an edge.
|
||||
* if closed==true, the edge has no 2-free dart.
|
||||
* (note that for CMap there is no differente between true and false, but
|
||||
* this is not the case for GMap)
|
||||
* @return a dart of the new edge.
|
||||
*/
|
||||
Dart_handle make_edge()
|
||||
Dart_handle make_edge(bool /*closed*/=false)
|
||||
{
|
||||
Dart_handle d1 = create_dart();
|
||||
Dart_handle d2 = create_dart();
|
||||
|
|
@ -3812,13 +3815,17 @@ namespace CGAL {
|
|||
}
|
||||
|
||||
/** Create an edge given 2 Attribute_handle<0>.
|
||||
* Note that this function can be used only if 0-attributes are non void
|
||||
* @param h0 the first vertex handle.
|
||||
* @param h1 the second vertex handle.
|
||||
* Note that this function can be used only if 0-attributes are non void
|
||||
* if closed==true, the edge has no 2-free dart.
|
||||
* (note that for CMap there is no differente between true and false, but
|
||||
* this is not the case for GMap)
|
||||
* @return the dart of the new edge incident to h0.
|
||||
*/
|
||||
Dart_handle make_segment(typename Attribute_handle<0>::type h0,
|
||||
typename Attribute_handle<0>::type h1)
|
||||
typename Attribute_handle<0>::type h1,
|
||||
bool /*closed*/=false)
|
||||
{
|
||||
Dart_handle d1 = this->make_edge();
|
||||
|
||||
|
|
|
|||
|
|
@ -2950,30 +2950,47 @@ namespace CGAL {
|
|||
}
|
||||
|
||||
/** Create an edge.
|
||||
* if closed==true, the edge has no 2-free dart.
|
||||
* @return a dart of the new edge.
|
||||
*/
|
||||
Dart_handle make_edge()
|
||||
Dart_handle make_edge(bool closed=false)
|
||||
{
|
||||
Dart_handle d1 = create_dart();
|
||||
Dart_handle d2 = create_dart();
|
||||
Dart_handle d1=create_dart();
|
||||
Dart_handle d2=create_dart();
|
||||
basic_link_alpha<0>(d1, d2);
|
||||
if (closed)
|
||||
{
|
||||
Dart_handle d3=create_dart();
|
||||
Dart_handle d4=create_dart();
|
||||
basic_link_alpha<0>(d3, d4);
|
||||
basic_link_alpha<2>(d1, d3);
|
||||
basic_link_alpha<2>(d2, d4);
|
||||
}
|
||||
|
||||
return d1;
|
||||
}
|
||||
|
||||
/** Create an edge given 2 Attribute_handle<0>.
|
||||
* Note that this function can be used only if 0-attributes are non void
|
||||
* @param h0 the first vertex handle.
|
||||
* @param h1 the second vertex handle.
|
||||
* Note that this function can be used only if 0-attributes are non void
|
||||
* if closed==true, the edge has no 2-free dart.
|
||||
* @return the dart of the new edge incident to h0.
|
||||
*/
|
||||
Dart_handle make_segment(typename Attribute_handle<0>::type h0,
|
||||
typename Attribute_handle<0>::type h1)
|
||||
typename Attribute_handle<0>::type h1,
|
||||
bool closed=false)
|
||||
{
|
||||
Dart_handle d1 = this->make_edge();
|
||||
Dart_handle d1 = this->make_edge(closed);
|
||||
|
||||
set_dart_attribute<0>(d1,h0);
|
||||
set_dart_attribute<0>(this->alpha<0>(d1),h1);
|
||||
|
||||
if (closed)
|
||||
{
|
||||
set_dart_attribute<0>(this->alpha<2>(d1),h0);
|
||||
set_dart_attribute<0>(this->alpha<0,2>(d1),h1);
|
||||
}
|
||||
|
||||
return d1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -496,12 +496,15 @@ namespace CGAL {
|
|||
/** Create a segment given 2 points.
|
||||
* @param p0 the first point.
|
||||
* @param p1 the second point.
|
||||
* if closed==true, the edge has no 2-free dart.
|
||||
* @return the dart of the new segment incident to p0.
|
||||
*/
|
||||
Dart_handle make_segment(const Point& p0,const Point& p1)
|
||||
Dart_handle make_segment(const Point& p0,const Point& p1,
|
||||
bool closed=false)
|
||||
{
|
||||
return make_segment(create_vertex_attribute(p0),
|
||||
create_vertex_attribute(p1));
|
||||
create_vertex_attribute(p1),
|
||||
closed);
|
||||
}
|
||||
|
||||
/** Create a triangle given 3 points.
|
||||
|
|
|
|||
|
|
@ -101,12 +101,10 @@ namespace CGAL {
|
|||
CGAL_assertion(v1 < initVertices.size());
|
||||
CGAL_assertion(v2 < initVertices.size());
|
||||
|
||||
d1 = alcc.create_dart(initVertices[v1]);
|
||||
d2 = alcc.create_dart(initVertices[v2]);
|
||||
alcc.template link_beta<2>(d1, d2);
|
||||
d1 = alcc.make_segment(initVertices[v1], initVertices[v2], true);
|
||||
|
||||
testVertices[v1].push_back(d1);
|
||||
testVertices[v2].push_back(d2);
|
||||
testVertices[v2].push_back(alcc.template opposite<2>(d1));
|
||||
}
|
||||
|
||||
// LCC associating directions and darts.
|
||||
|
|
|
|||
Loading…
Reference in New Issue