From 68daecef6e6b23a17a5d159399ec5446bc9d4017 Mon Sep 17 00:00:00 2001 From: Thijs van Lankveld Date: Mon, 25 Feb 2013 18:26:51 +0100 Subject: [PATCH 001/138] Very first version of conforming triangulation 3. --- .../Conforming_Delaunay_triangulation_3.h | 1264 +++++++++++++++++ .../Conforming_triangulation_cell_base_3.h | 179 +++ .../Conforming_triangulation_vertex_base_3.h | 69 + .../CGAL/Delaunay_triangulation_utils_3.h | 402 ++++++ .../include/CGAL/Encroaching_collecter_3.h | 123 ++ .../CGAL/Triangulation_segment_traverser_3.h | 695 +++++++++ .../Conforming_triangulation_3/copyright | 2 + .../description.txt | 3 + .../Conforming_triangulation_3/license.txt | 1 + .../Conforming_triangulation_3/maintainer | 1 + 10 files changed, 2739 insertions(+) create mode 100644 Conforming_triangulation_3/include/CGAL/Conforming_Delaunay_triangulation_3.h create mode 100644 Conforming_triangulation_3/include/CGAL/Conforming_triangulation_cell_base_3.h create mode 100644 Conforming_triangulation_3/include/CGAL/Conforming_triangulation_vertex_base_3.h create mode 100644 Conforming_triangulation_3/include/CGAL/Delaunay_triangulation_utils_3.h create mode 100644 Conforming_triangulation_3/include/CGAL/Encroaching_collecter_3.h create mode 100644 Conforming_triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h create mode 100644 Conforming_triangulation_3/package_info/Conforming_triangulation_3/copyright create mode 100644 Conforming_triangulation_3/package_info/Conforming_triangulation_3/description.txt create mode 100644 Conforming_triangulation_3/package_info/Conforming_triangulation_3/license.txt create mode 100644 Conforming_triangulation_3/package_info/Conforming_triangulation_3/maintainer diff --git a/Conforming_triangulation_3/include/CGAL/Conforming_Delaunay_triangulation_3.h b/Conforming_triangulation_3/include/CGAL/Conforming_Delaunay_triangulation_3.h new file mode 100644 index 00000000000..c981418b4fe --- /dev/null +++ b/Conforming_triangulation_3/include/CGAL/Conforming_Delaunay_triangulation_3.h @@ -0,0 +1,1264 @@ +//The conforming Delaunay triangulation structure. +//Copyright (C) 2012 Utrecht University +// +//This program is free software: you can redistribute it and/or modify +//it under the terms of the GNU General Public License as published by +//the Free Software Foundation, either version 3 of the License, or +//(at your option) any later version. +// +//This program is distributed in the hope that it will be useful, +//but WITHOUT ANY WARRANTY; without even the implied warranty of +//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//GNU General Public License for more details. +// +//You should have received a copy of the GNU General Public License +//along with this program. If not, see . +// +// Author(s): Thijs van Lankveld + +// Based on CGAL/Delaunay_triangulation_3.h +// +// For the love of something, why is the 3D triangulation package so badly written? + +#ifndef CGAL_CONFORMING_DELAUNAY_TRIANGULATION_3_H +#define CGAL_CONFORMING_DELAUNAY_TRIANGULATION_3_H + +#include + +#include +#include + +#include "Delaunay_triangulation_utils_3.h" +#include "Conforming_triangulation_cell_base_3.h" +#include "Conforming_triangulation_vertex_base_3.h" +#include "Encroaching_collecter_3.h" + +CGAL_BEGIN_NAMESPACE + +#ifndef CGAL_CONSTRAINED_TRIANGULATION_2_H +struct No_intersection_tag{}; +struct Exact_intersections_tag{}; // To be used with an exact number type. +struct Exact_predicates_tag{}; // To be used with filtered exact number type. +#endif + +template < class Tr > class Natural_neighbors_3; + +template < class Gt, + class Tds = Triangulation_data_structure_3 < Conforming_triangulation_vertex_base_3, + Conforming_triangulation_cell_base_3 >, + class Itag = No_intersection_tag > +class Conforming_Delaunay_triangulation_3: public Delaunay_triangulation_utils_3 { + typedef Triangulation_data_structure Tds; + + typedef Conforming_Delaunay_triangulation_3 cDT; + typedef Delaunay_triangulation_utils_3 DT; + typedef Triangulation_3 Tr; + + friend class Natural_neighbors_3; + +public: + typedef Tds Triangulation_data_structure; + typedef Gt Geom_traits; + typedef Itag Intersection_tag; + + typedef typename Gt::FT FT; + + typedef typename Gt::Point_3 Point; + typedef typename Gt::Vector_3 Vector; + typedef typename Gt::Segment_3 Segment; + typedef typename Gt::Triangle_3 Triangle; + typedef typename Gt::Tetrahedron_3 Tetrahedron; + typedef typename Gt::Plane_3 Plane; + + typedef typename DT::Cell_handle Cell_handle; + typedef typename DT::Vertex_handle Vertex_handle; + + typedef typename DT::Cell Cell; + typedef typename DT::Vertex Vertex; + typedef typename DT::Facet Facet; + typedef typename DT::Edge Edge; + + typedef typename DT::Bi_vertex Bi_vertex; + + typedef std::pair Constraint_1; + + typedef typename DT::Cell_circulator Cell_circulator; + typedef typename DT::Facet_circulator Facet_circulator; + typedef typename DT::Cell_iterator Cell_iterator; + typedef typename DT::Facet_iterator Facet_iterator; + typedef typename DT::Edge_iterator Edge_iterator; + typedef typename DT::Vertex_iterator Vertex_iterator; + + typedef typename DT::Finite_vertices_iterator Finite_vertices_iterator; + typedef typename DT::Finite_cells_iterator Finite_cells_iterator; + typedef typename DT::Finite_facets_iterator Finite_facets_iterator; + typedef typename DT::Finite_edges_iterator Finite_edges_iterator; + + typedef typename DT::All_cells_iterator All_cells_iterator; + + typedef typename DT::Cell_traverser Cell_traverser; + + typedef typename DT::Locate_type Locate_type; + +private: + typedef std::list Point_list; + typedef typename Point_list::iterator Points_iterator; + typedef std::back_insert_iterator Points_output; + +public: + typedef Encroaching_collecter_3 Encroaching_collecter; + +#ifndef CGAL_CFG_USING_BASE_MEMBER_BUG_2 + using DT::cw; + using DT::ccw; + using DT::geom_traits; + using DT::number_of_vertices; + using DT::dimension; + using DT::finite_facets_begin; + using DT::finite_facets_end; + using DT::finite_vertices_begin; + using DT::finite_vertices_end; + using DT::finite_cells_begin; + using DT::finite_cells_end; + using DT::finite_edges_begin; + using DT::finite_edges_end; + using DT::tds; + using DT::infinite_vertex; + using DT::insert; + using DT::next_around_edge; + using DT::vertex_triple_index; + using DT::mirror_vertex; + using DT::move_point; + using DT::coplanar; + using DT::coplanar_orientation; + using DT::orientation; +#endif + +protected: + // Visitor that should be run before and after inserting a point + // to maintain the conforming edges in the triangulation. + template < class Tr > + class Conforming_visitor { + typedef std::pair CBV; + + mutable std::list _conforming; + + protected: + Tr *_tr; + + public: + Conforming_visitor(Tr* tr): _tr(tr) {} + + // Store and remove the conforming edges from a collection of cells. + template + void process_cells_in_conflict(InputIterator start, InputIterator end) const { + for (InputIterator it = start; it != end; ++it) { + for (int i = 0; i < _tr->dimension(); ++i) { + for (int j = i+1; j < _tr->dimension()+1; ++j) { + if ((*it)->is_conforming(i, j)) { + _conforming.push_back(CBV(_tr->to_bi_vertex(*it, i, j), (*it)->is_marked(i, j))); + _tr->set_conforming(*it, i, j, false); + } + } + } + } + } + + // Reinsert the conforming edges into the triangulation. + void reinsert_vertices(Vertex_handle) { + while (!_conforming.empty()) { + CBV b = _conforming.front(); + _conforming.pop_front(); + if (b.second) + _tr->insert_marked(b.first); + else + _tr->insert_conforming(b.first); + } + } + + // Reinsert the conforming edges into the triangulation + // under the assumption that no Steiner points need to be added. + void reinsert_no_steiner() { + Cell_handle c; int li, lj; + while (!_conforming.empty()) { + CBV b = _conforming.front(); + _conforming.pop_front(); + CGAL_triangulation_assertion_code(bool ok =) + _tr->is_edge(b.first.first, b.first.second, c, li, lj); + CGAL_triangulation_assertion(ok); + + if (b.second) + _tr->mark_edge(c, li, lj); + else + _tr->set_conforming(c, li, lj, true); + } + } + + Vertex_handle replace_vertex(Cell_handle c, int index, const Point&) {return c->vertex(index);} + void hide_point(Cell_handle, const Point&) {} + }; // class Conforming_visitor + + friend class Conflict_tester_3; + friend class Conflict_tester_2; + friend class Encroaching_collecter; + + Conforming_visitor conforming_visitor; + +protected: + // PREDICATES + + // Checks if point c is encroaching upon the segment ab. + // A point is encroaching if it is inside the ball with diameter ab. + bool is_encroaching(const Point& a, const Point& b, const Point& c) const { + CGAL_triangulation_assertion(a != b); + CGAL_triangulation_assertion(a != c); + CGAL_triangulation_assertion(b != c); + return side_of_bounded_sphere(a, b, c) != ON_UNBOUNDED_SIDE; + } + +public: + // CONSTRUCTORS + Conforming_Delaunay_triangulation_3(const Gt& gt = Gt()): DT(gt), conforming_visitor(this) {} + + // Copy constructor duplicates vertices and cells. + Conforming_Delaunay_triangulation_3(const Conforming_Delaunay_triangulation_3& tr): DT(tr), conforming_visitor(this) { + CGAL_triangulation_postcondition(is_valid()); + } + + // Create a conforming 3D Delaunay triangulation from a number of constraints. + template < class InputIterator > + Conforming_Delaunay_triangulation_3(InputIterator begin, InputIterator end, const Gt& gt = Gt()): + DT(gt), conforming_visitor(this) { + insert_conforming(first, last); + CGAL_triangulation_postcondition(is_valid()); + } + +protected: + // Compute the intersection of ab with a line or plane. + bool compute_intersection(const Line& ab, const Line& l, Point& p) const { + Object result = Gt().intersect_3_object()(ab, l); + return assign(p, result); + } + bool compute_intersection(const Line& ab, const Plane& pl, Point& p) const { + Object result = Gt().intersect_3_object()(ab, pl); + return assign(p, result); + } + + // Compute the intersection of ab with either a line (edge) or plane (facet). + bool compute_intersection(Locate_type lt, Cell_handle c, int li, int lj, Vertex_handle va, Vertex_handle vb, Point& p) const { + if (lt == EDGE) + return compute_intersection(Line(va->point(), vb->point()), + Line(c->vertex(li)->point(), c->vertex(lj)->point()), p); + else + return compute_intersection(Line(va->point(), vb->point()), plane(c, li), p); + } + + // Insert the intersection of segment ab with either a facet or an edge. + Vertex_handle intersect(Cell_handle c, Locate_type lt, int li, int lj, Vertex_handle va, Vertex_handle vb) { + return intersect(c, lt, li, lj, va, vb, Itag());} + Vertex_handle intersect(Cell_handle c, Locate_type lt, int li, int lj, Vertex_handle va, Vertex_handle vb, No_intersection_tag); + Vertex_handle intersect(Cell_handle c, Locate_type lt, int li, int lj, Vertex_handle va, Vertex_handle vb, Exact_intersections_tag); + Vertex_handle intersect(Cell_handle c, Locate_type lt, int li, int lj, Vertex_handle va, Vertex_handle vb, Exact_predicates_tag); + + // Split segment ab based on a reference point. + Point construct_split_point(Vertex_handle va, Vertex_handle vb, const Point& ref); + +protected: + // Conform an edge to important encroaching points. + void conform_segment(Vertex_handle va, Vertex_handle vb, Points_iterator encr_begin, Points_iterator encr_end); + + // Mark a segment that it is assumed to already be in the triangulation. + void mark_segment(Vertex_handle va, Vertex_handle vb); + // Insert a marked segment; + // this includes conforming the segment and marking its subsegments as conforming. + void insert_marked(Vertex_handle va, Vertex_handle vb); + void insert_marked(const Bi_vertex& m) {insert_marked(m.first, m.second);} + + // Mark an existing edge or facet as (un)constrained. + void set_conforming(Cell_handle c, int li, int lj, bool C); + void set_conforming(const Edge& e, bool C) {set_conforming(e.first, e.second, e.third, C);} + void mark_edge(Cell_handle c, int li, int lj); + void mark_edge(const Edge& e) {mark_edge(e.first, e.second, e.third);} + +protected: + // Restore the conforming edges of a facet based on the neighboring cell. + void restore_conforming(Cell_handle c, int li); + void restore_conforming(const Facet& f) {restore_conforming(f.first, f.second);} + +public: + // INSERT POINT + + virtual Vertex_handle insert(const Point& p, Locate_type lt, Cell_handle c, int li, int lj); + +public: + // INSERT CONFORMING + + // Insert a conforming segment. + void insert_conforming(Vertex_handle va, Vertex_handle vb) { + Point_list encr; conform_segment(va, vb, encr.begin(), encr.end());} + void insert_conforming(const Bi_vertex& c) { + insert_conforming(c.first, c.second);} + void insert_conforming(const Point& a, const Point& b, Cell_handle hint = Cell_handle()); + void insert_conforming(const Constraint_1& c, Cell_handle hint = Cell_handle()) { + insert_conforming(c.first, c.second, hint);} + + // Insert a number of conforming segments, presented as a collection of pairs of Point_3. + template < class InputIterator > + int insert_conforming(InputIterator begin, InputIterator end, Cell_handle hint = Cell_handle()); + + // Insert a loop of conforming segments, presented as a collection of Point_3. + template < class InputIterator > + int insert_conforming_loop(InputIterator begin, InputIterator end, Cell_handle hint = Cell_handle()); + template < class InputIterator > + int insert_marked_loop(InputIterator begin, InputIterator end, Cell_handle hint = Cell_handle()); + template < class InputIterator > + int remove_conforming_loop(InputIterator begin, InputIterator end, Cell_handle hint = Cell_handle()); + +protected: + template < class InputIterator, class OutputIterator > + void insert_loop_points(InputIterator begin, InputIterator end, OutputIterator out, Cell_handle hint = Cell_handle()); + +public: + // REMOVE + + // Vertices that are incident to a conforming edge cannot be removed. + bool remove(Vertex_handle v); + + // Remove a conforming edge or segment. + bool remove_conforming(Cell_handle c, int li, int lj); + bool remove_conforming(const Edge& e) { + return remove_conforming(e.first, e.second, e.third);} + bool remove_conforming(Vertex_handle va, Vertex_handle vb); + bool remove_conforming(Bi_vertex c) { + return remove_conforming(c.first, c.second);} + +public: + // QUERY CONFORMING + + // Check if an edge is conforming. + bool is_conforming(Cell_handle c, int li, int lj) const {return c->is_conforming(li, lj);} + bool is_conforming(const Edge& e) const {return is_conforming(e.first, e.second, e.third);} + + // Check if an edge is marked. + bool is_marked(Cell_handle c, int li, int lj) const {return c->is_marked(li, lj);} + bool is_marked(const Edge& e) const {return is_marked(e.first, e.second, e.third);} + + // Check if a vertex is incident to a conforming edge. + bool are_there_incident_conforming(Vertex_handle v) const; + + // Check if the triangulation contains an edge ac on the segment ab, where c(li, lj) is that edge. + bool includes_edge(Vertex_handle va, Vertex_handle vb, Vertex_handle& vc, Cell_handle& c, int& li, int& lj) const; + + // Check if the triangulation is valid. + virtual bool is_valid(bool verbose = false, int level = 0) const; + virtual bool is_valid(Cell_handle c, bool verbose = false, int level = 0) const; + +private: + // Collect the points encroaching upon the segment ac, where c is the first point on the ray ab. + // encroaching must point to a Point. + // Returns true if a conforming edge or constrained facet was encountered and the intersection inserted. + template + bool collect_encroaching(Vertex_handle va, Vertex_handle vb, OutputIterator encroaching, Vertex_handle& vc); + + // Sort the points encroaching upon the segment ab to the from of the collection. + // begin and end must point to Point. + Points_iterator sort_encroaching(Points_iterator begin, Points_iterator end, const Point& a, const Point& b) const; +}; // Conforming_Delaunay_triangulation_3 + +template < class Gt, class Tds, class Itag > +typename Conforming_Delaunay_triangulation_3::Vertex_handle +Conforming_Delaunay_triangulation_3:: +intersect(Cell_handle c, Locate_type lt, int li, int lj, Vertex_handle va, Vertex_handle vb, No_intersection_tag) { + std::cerr << " sorry, this triangulation does not deal with" << std::endl + << " intersecting conforming edges" << std::endl; + CGAL_triangulation_assertion(false); + return Vertex_handle(); +} + +template < class Gt, class Tds, class Itag > +typename Conforming_Delaunay_triangulation_3::Vertex_handle +Conforming_Delaunay_triangulation_3:: +intersect(Cell_handle c, Locate_type lt, int li, int lj, Vertex_handle va, Vertex_handle vb, Exact_intersections_tag) { + // Compute the intersection of the segment ab and a facet or edge of cell c. + // Note that no further check is made whether this intersection actually occurs inside the segment(s) or triangle. + Point p; + CGAL_triangulation_assertion_code( bool ok = ) + compute_intersection(lt, c, li, lj, va, vb, p); + CGAL_triangulation_assertion(ok); + Vertex_handle v = insert(p, c); + v->steiner() = true; + return v; +} + +template < class Gt, class Tds, class Itag > +typename Conforming_Delaunay_triangulation_3::Vertex_handle +Conforming_Delaunay_triangulation_3:: +intersect(Cell_handle c, Locate_type lt, int li, int lj, Vertex_handle va, Vertex_handle vb, Exact_predicates_tag) { + // Compute the intersection of the segment ab and a facet or edge of cell c. + // Note that no further check is made whether this intersection actually occurs inside the segment(s) or triangle. + Point p; + bool ok = compute_intersection(lt, c, li, lj, va, vb, p); + if (ok) { + Vertex_handle v = insert(p, c); + v->steiner() = true; + return v; + } + + // Return the vertex closest to the intersection. + Vertex_handle closest; + switch (lt) { + case EDGE: { + Line ab(va->point(), vb->point()); + Line ij(c->vertex(li)->point(), c->vertex(lj)->point()); + FT dist2 = squared_distance(va->point(), ij); + FT db = squared_distance(vb->point(), ij); + FT di = squared_distance(c->vertex(li)->point(), ab); + FT dj = squared_distance(c->vertex(lj)->point(), ab); + closest = va; + if (db < dist2) {dist2 = db; closest = vb;} + if (di < dist2) {dist2 = di; closest = c->vertex(li);} + if (dj < dist2) {dist2 = dj; closest = c->vertex(lj);} + } + case FACET: { + Line ab(va->point(), vb->point()); + Plane p = plane(c, li); + FT dist2 = squared_distance(va->point(), p); + FT db = squared_distance(vb->point(), p); + FT d1 = squared_distance(c->vertex((li+1)&3)->point(), ab); + FT d2 = squared_distance(c->vertex((li+2)&3)->point(), ab); + FT d3 = squared_distance(c->vertex((li+3)&3)->point(), ab); + closest = va; + if (db < dist2) {dist2 = db; closest = vb;} + if (d1 < dist2) {dist2 = d1; closest = c->vertex((li+1)&3);} + if (d2 < dist2) {dist2 = d2; closest = c->vertex((li+2)&3);} + if (d3 < dist2) {dist2 = d3; closest = c->vertex((li+3)&3);} + } + default: + CGAL_triangulation_assertion(false); + } + + closest->steiner() = true; + return closest; +} + +template < class Gt, class Tds, class Itag > +typename Conforming_Delaunay_triangulation_3::Point +Conforming_Delaunay_triangulation_3:: +construct_split_point(Vertex_handle va, Vertex_handle vb, const Point& ref) { + // Blend of Si's and Shewchuk's segment recovery. + // We are actually interested in constructing a layer of protecting Steiner points around each acute vertex, + // such that no new Steiner point is inserted inside this layer. + // Shewchuk and Si place the protecting Steiner points on a ball around the acute vertex. + // However, determining if a vertex is acute is expensive. Additionally, the main purpose of the protecting points + // is to place new points outside the diametral ball with their acute vertex. + // This is always done if we place new Steiner points on the projection of the reference point onto the segment. + // To guarantee a minimum edge length, we never place a Steiner point closer to an endpoint than to the reference. + +#ifdef SPLIT_P_PROJ + // Place the split point at the midpoint, unless the reference encroaches upon the resulting edges. + // In that case, the split point is taken such that its projection onto ap or bp is p. + Point s = midpoint(va->point(), vb->point()); + + typename Geom_traits::Side_of_bounded_sphere_3 side_of_bounded_sphere = geom_traits().side_of_bounded_sphere_3_object(); + + if (side_of_bounded_sphere(va->point(), mid, ref) == ON_BOUNDED_SIDE) { + Object result = Gt().intersect_3_object()(Line(va->point(), vb->point()), Plane(ref, va->point() - ref)); + CGAL_triangulation_assertion(assign(s, result)); + } + else if (side_of_bounded_sphere(vb->point(), mid, ref) == ON_BOUNDED_SIDE) { + Object result = Gt().intersect_3_object()(Line(va->point(), vb->point()), Plane(ref, vb->point() - ref)); + CGAL_triangulation_assertion(assign(s, result)); + } + + return s; +#endif + + // Place the split point at the projection of the reference onto ab, unless that is too close to a or b, or it is not on the edge. + // In that case, the split point is the midpoint between a and b. + Line l(va->point(), vb->point()); + Point s = l.projection(ref); + + // The following will enforce a minimum edge length. + if (has_larger_distance_to_point(s, ref, va->point()) || has_larger_distance_to_point(s, ref, vb->point())) + s = midpoint(va->point(), vb->point()); + + // Note that for inexact construction kernels, this assertion may fail for both projections and midpoints. + //CGAL_triangulation_assertion(l.has_on(s)); + + // This method doesn't actually produce a correct bounding ball, because the Steiner points may be inserted closer to the endpoint than the reference point.. + + return s; + +#ifdef SPLIT_SI + // Si's point segment recovery. + typedef Gt::Sphere_3 Sphere; + Point s; + Object result; + if (c == Vertex_handle()) { + // Rule 1. + FT sd, r = squared_distance(a->point(), b->point()); + if (4*(sd = squared_distance(a->point(), p->point())) < r) { + result = Gt().intersect_3_object()(Sphere(a->point(), sd), Segment(a->point(), b->point())); + } + else if (4*(sd = squared_distance(b->point(), p->point())) < r) { + result = Gt().intersect_3_object()(Sphere(b->point(), sd), Segment(a->point(), b->point())); + } + else { + Vertex_handle v = insert(midpoint(a->point(), b->point()), a->cell()); + return v; + } + if (!assign(s, result)) return Vertex_handle(); + } + else { + // Rule 2. + FT r = squared_distance(c->point(), p->point()); + result = Gt().intersect_3_object()(Sphere(c->point(), r), Segment(a->point(), b->point())); + if (!assign(s, result)) return Vertex_handle(); + + FT sd = squared_distance(s, p->point()); + if (sd > squared_distance(s, b->point())) { + //Rule 3. + if (4*sd < squared_distance(s, a->point())) { + result = Gt().intersect_3_object()(Sphere(s, sd), Segment(a->point(), b->point())); + if (!assign(s, result)) + return Vertex_handle(); + } + else { + s = midpoint(a->point(), s); + } + } + } + + return s; +#endif +} + +template < class Gt, class Tds, class Itag > +void Conforming_Delaunay_triangulation_3:: +conform_segment(Vertex_handle va, Vertex_handle vb, Points_iterator encr_begin, Points_iterator encr_end) { + CGAL_triangulation_precondition(va != vb); + // This insertion method is an adjustment of the segment insertion + // in the paper "Constrained Delaunay tetrahedral mesh generation and refinement" by Si (2010). + // The points of the tetrahedra intersected by ab (encroaching points) are collected; + // from these points, the point making the largest circumsphere with ab is the reference point. + // The reference point indicates where ab is split and the subsegments each get a subset + // of the encroaching points and then the process is repeated. + + // Set the initial part of the segment that is already in the triangulation to conforming. + Vertex_handle vi; + Cell_handle c; + int li, lj; + while (includes_edge(va, vb, vi, c, li, lj)) { + set_conforming(c, li, lj, true); + va = vi; + if (va == vb) + return; + } + + // If the edge is not in the triangulation, there must be encroaching points. + // Collect the points encroaching upon and close to ab. + if (encr_begin == encr_end) { + Point_list encroaching; + bool intersect = collect_encroaching(va, vb, std::back_inserter(encroaching), vi); + + if (!intersect && encroaching.empty()) { + // There are occurrences where none of the vertices of the cells intersected by ab encroach upon ab. + // In this case, we insert the midpoint of ab. + vi = insert(midpoint(va->point(), vb->point()), va->cell()); + vi->steiner() = true; + intersect = true; + } + + // Insert ai, and if needed ib. + conform_segment(va, vi, encroaching.begin(), encroaching.end()); + if (vi != vb) { + conform_segment(vi, vb, encr_begin, encr_end); + } + return; + } + + // Find the reference point. + // This is the encroaching point closest to the segment. + FT sr, radius2 = 0; + Point ref; + for (Points_iterator it = encr_begin; it != encr_end; ++it) { + CGAL_triangulation_assertion(!collinear(va->point(), *it, vb->point())); + sr = squared_radius(va->point(), *it, vb->point()); + if (radius2 < sr) { + radius2 = sr; + ref = *it; + } + } + CGAL_triangulation_assertion(radius2 > 0); + + // Split the edge based on its reference point. + Point s = construct_split_point(va, vb, ref); + Vertex_handle vs = insert(s, va->cell()); + vs->steiner() = true; + + // Sort the encroaching points to encroaching upon as, sb, and only ab. + Points_iterator after_as = sort_encroaching(encr_begin, encr_end, va->point(), vs->point()); + Points_iterator after_sb = sort_encroaching(after_as, encr_end, vs->point(), vb->point()); + + // Insert the segments on both sides of s as constraints. + conform_segment(va, vs, encr_begin, after_as); + conform_segment(vs, vb, after_as, after_sb); +} + +template < class Gt, class Tds, class Itag > +void Conforming_Delaunay_triangulation_3:: +mark_segment(Vertex_handle va, Vertex_handle vb) { + Vertex_handle vi; + Cell_handle c; + int li, lj; + while (va != vb) { + // All segments must be in the triangulation. + CGAL_triangulation_assertion_code(bool ok = ) + includes_edge(va, vb, vi, c, li, lj); + CGAL_triangulation_assertion(ok); + + mark_edge(c, li, lj); + + va = vi; + } +} + +template < class Gt, class Tds, class Itag > +void Conforming_Delaunay_triangulation_3:: +insert_marked(Vertex_handle va, Vertex_handle vb) { + // Insert the segment and then mark all parts of the segment. + insert_conforming(va, vb); + mark_segment(va, vb); +} + +template < class Gt, class Tds, class Itag > +void typename Conforming_Delaunay_triangulation_3:: +set_conforming(Cell_handle c, int li, int lj, bool C) { + // The cell is already in the triangulation, so the edge is already Delaunay. + Vertex_handle vi = c->vertex(li), vj = c->vertex(lj); + switch (dimension()) { + case 3: { + // Constrain the edge in all its incident cells. + Cell_circulator it = incident_cells(c, li, lj), start(it); + do { + it->set_conforming(it->index(vi), it->index(vj), C); + ++it; + } while (it != start); + break; + } + case 2: { + // Constrain the edge in both cells that share it. + Cell_handle n = c->neighbor(3-li-lj); + n->set_conforming(n->index(vi), n->index(vj), C); + } + case 1: { + // Constrain the edge in the cell itself. + c->set_conforming(li, lj, C); + break; + } + } +} + +template < class Gt, class Tds, class Itag > +void typename Conforming_Delaunay_triangulation_3:: +mark_edge(Cell_handle c, int li, int lj) { + // The cell is already in the triangulation, so the edge is already Delaunay. + Vertex_handle vi = c->vertex(li), vj = c->vertex(lj); + switch (dimension()) { + case 3: { + // Constrain the edge in all its incident cells. + Cell_circulator it = incident_cells(c, li, lj), start(it); + do { + it->mark(it->index(vi), it->index(vj)); + it++; + } while (it != start); + break; + } + case 2: { + // Constrain the edge in both cells that share it. + Cell_handle n = c->neighbor(3-li-lj); + n->mark(n->index(vi), n->index(vj)); + } + case 1: { + // Constrain the edge in the cell itself. + c->mark(li, lj); + break; + } + } +} + +template < class Gt, class Tds, class Itag > +template < class InputIterator > +int typename Conforming_Delaunay_triangulation_3:: +insert_conforming_loop(InputIterator begin, InputIterator end, Cell_handle hint) { + // Insert the points in the loop. + std::list segments; + insert_loop_points(begin, end, std::back_inserter(segments), hint); + + // Insert the segments in the loop. + for (std::list::iterator it = segments.begin(); it != segments.end(); ++it) + insert_conforming(*it); + + return segments.size(); +} + +template < class Gt, class Tds, class Itag > +template < class InputIterator > +int typename Conforming_Delaunay_triangulation_3:: +insert_marked_loop(InputIterator begin, InputIterator end, Cell_handle hint) { + // Insert the points in the loop. + std::list segments; + insert_loop_points(begin, end, std::back_inserter(segments), hint); + + // Insert the segments in the loop. + for (std::list::iterator it = segments.begin(); it != segments.end(); ++it) + insert_marked(*it); + + return segments.size(); +} + +template < class Gt, class Tds, class Itag > +template < class InputIterator > +int typename Conforming_Delaunay_triangulation_3:: +remove_conforming_loop(InputIterator begin, InputIterator end, Cell_handle hint) { + // Insert the points in the loop. + std::list segments; + insert_loop_points(begin, end, std::back_inserter(segments), hint); + + // Insert the segments in the loop. + for (std::list::iterator it = segments.begin(); it != segments.end(); ++it) + remove_conforming(*it); + + return segments.size(); +} + +template < class Gt, class Tds, class Itag > +template < class InputIterator, class OutputIterator > +void typename Conforming_Delaunay_triangulation_3:: +insert_loop_points(InputIterator begin, InputIterator end, OutputIterator out, Cell_handle hint) { + if (begin == end) + return; + + // Insert the points in the loop. + Vertex_handle prev = insert(*begin, hint), first(prev); + hint = prev->cell(); + for (InputIterator it = ++begin; it != end; ++it) { + Vertex_handle cur = insert(*it, hint); + if (prev != cur) + *out++ = Bi_vertex(prev, cur); + hint = cur->cell(); + prev = cur; + } + if (first != prev) + *out++ = Bi_vertex(prev, first); +} + +template < class Gt, class Tds, class Itag > +void Conforming_Delaunay_triangulation_3:: +restore_conforming(Cell_handle c, int li) { + // Restore the conforming edges of facet i of c, based on its neighboring cell. + Cell_handle n = c->neighbor(li); + Vertex_handle v1, v2; Edge e; + for (int j = 0; j < dimension()+1; ++j) { + if (j != li) { + e = opposite_edge(c, li, (li+j)&3); + v1 = c->vertex(e.second); + v2 = c->vertex(e.third); + if (n->is_marked(n->index(v1), n->index(v2))) + e.first->mark(e.second, e.third); + else + e.first->set_conforming(e.second, e.third, n->is_conforming(n->index(v1), n->index(v2))); + } + } +} + +template < class Gt, class Tds, class Itag > +typename Conforming_Delaunay_triangulation_3::Vertex_handle +Conforming_Delaunay_triangulation_3:: +insert(const Point& p, Locate_type lt, Cell_handle c, int li, int lj) { + switch (dimension()) { + case 3: { + Conflict_tester_3 tester(p, this); + Vertex_handle v = insert_in_conflict(p, lt, c, li, lj, tester, conforming_visitor); + return v; + } // dim 3 + case 2: { + Conflict_tester_2 tester(p, this); + Vertex_handle v = insert_in_conflict(p, lt, c, li, lj, tester, conforming_visitor); + return v; + } // dim 2 + default : + // dimension <= 1 + // Do not use the generic insert. + return Tr::insert(p, c); + } +} + +template < class Gt, class Tds, class Itag > +void Conforming_Delaunay_triangulation_3:: +insert_conforming(const Point& a, const Point& b, Cell_handle hint) { + // Insert the two points and then conform the segment between them. + Vertex_handle va = insert(a, hint); + Vertex_handle vb = insert(b, va->cell()); + if (va != vb) + insert_conforming(va, vb); +} + +template < class Gt, class Tds, class Itag > +template < class InputIterator > +int Conforming_Delaunay_triangulation_3:: +insert_conforming(InputIterator begin, InputIterator end, Cell_handle hint) { + // Insert the points. + std::list segments; + for (InputIterator it = begin; it != end; ++it) { + Vertex_handle va = insert(it->first, hint); + hint = va->cell(); + if (it->first != it->second) { + Vertex_handle vb = insert(it->second, hint); + hint = vb->cell(); + segments.push_back(Bi_vertex(va, vb)); + } + } + + // Insert the segments + for (std::list::iterator it = segment.begin(); it != segments.end(); ++it) + insert_conforming(*it); + + return segment.size(); +} + +template < class Gt, class Tds, class Itag > +bool Conforming_Delaunay_triangulation_3:: +remove(Vertex_handle v) { + // The vertex cannot be removed if it is incident to a conforming edge. + if (are_there_incident_conforming(v)) + return false; + + // Collect the opposite facets as seen from the outside. + std::vector cells; cells.reserve(32); + incident_cells(v, std::back_inserter(cells)); + std::vector boundary; boundary.reserve(cells.size()); + + for (std::vector::const_iterator it = cells.begin(); it != cells.end(); ++it) { + Cell_handle n = (*it)->neighbor((*it)->index(v)); + boundary.push_back(Facet(n, n->index(*it))); + } + cells.clear(); + + // Remove the vertex. +#ifdef CGAL_DELAUNAY_3_OLD_REMOVE + if (dimension() == 3 && !test_dim_down(v)) { + remove_3D_ear(v); + } else { +#endif + cDT tmp; + Vertex_remover remover(tmp); + Tr::remove(v, remover); +#ifdef CGAL_DELAUNAY_3_OLD_REMOVE + } +#endif + + // Reinsert any conforming edges on the boundary of the retriangulated region. + for (std::vector::iterator it = boundary.begin(); it != boundary.end(); ++it) { + restore_conforming(mirror_facet(*it)); + } + + CGAL_triangulation_expensive_postcondition(is_valid()); + return true; +} + +template < class Gt, class Tds, class Itag > +bool Conforming_Delaunay_triangulation_3:: +remove_conforming(Cell_handle c, int li, int lj) { + // Mark the edge as non-conforming + set_conforming(c, li, lj, false); + return true; +} + +template < class Gt, class Tds, class Itag > +bool Conforming_Delaunay_triangulation_3:: +remove_conforming(Vertex_handle va, Vertex_handle vb) { + CGAL_triangulation_precondition(va != vb); + // All the parts of the segment ab that are constrained and + // not incident to a constrained facet are marked unconstrained. + // The return is true if the whole segment ab is covered by unconstrained edges; + // otherwise, returns false; + + // Check if first part of the segment is an edge in the triangulation. + Vertex_handle vi; + Cell_handle c; + int li, lj; + bool complete = true; + if (includes_edge(va, vb, vi, c, li, lj)) { + // Remove the first part. + if (!remove_conforming(c, li, lj)) + complete = false; + if (vi != vb) { + // Remove the next part. + if (!remove_conforming(vi, vb)) + complete = false; + } + return complete; + } + + return false; +} + +template < class Gt, class Tds, class Itag > +bool Conforming_Delaunay_triangulation_3:: +are_there_incident_conforming(Vertex_handle v) const { + if (dimension() > 0) { + std::vector edges; + edges.reserve(32); + finite_incident_edges(v, std::back_inserter(edges)); + for (std::vector::iterator it = edges.begin(); it != edges.end(); ++it) + if (is_conforming(*it)) + return true; + } + + return false; +} + +template < class Gt, class Tds, class Itag > +bool Conforming_Delaunay_triangulation_3:: +includes_edge(Vertex_handle va, Vertex_handle vb, Vertex_handle& vc, Cell_handle& c, int& li, int& lj) const { + CGAL_triangulation_precondition(!is_infinite(va) && !is_infinite(vb)); + + // Returns true if the line segment ab contains an edge e + // incident to a, false otherwise. + // If true, vc becomes the vertex of e distinct from a, + // c is a cell incident to e where e = (c, li, lj). + Vertex_handle v; + std::vector edges; edges.reserve(64); + finite_incident_edges(va, std::back_inserter(edges)); + for (std::vector::const_iterator it = edges.begin(); it != edges.end(); ++it) { + // Find the other vertex of the edge. + v = it->first->vertex(it->second); + if (v == va) v = it->first->vertex(it->third); + + if (is_infinite(v)) + continue; + + // Check if this edge is (part of) ab. + if (v == vb) { + vc = vb; + c = it->first; + li = it->second; + lj = it->third; + return true; + } + else if (sign((va->point() - v->point()) * (vb->point() - v->point())) == NEGATIVE && + collinear(va->point(), v->point(), vb->point())/* && + collinear_are_ordered_along_line(va->point(), v->point(), vb->point())*/) { + vc = v; + c = it->first; + li = it->second; + lj = it->third; + return true; + } + } + return false; +} + +template < class Gt, class Tds, class Itag > +bool Conforming_Delaunay_triangulation_3:: +is_valid(bool verbose, int level) const { + if (!tds().is_valid(verbose,level)) { + if (verbose) + std::cerr << "invalid data structure" << std::endl; + CGAL_triangulation_assertion(false); + return false; + } + + if (infinite_vertex() == Vertex_handle()) { + if (verbose) + std::cerr << "no infinite vertex" << std::endl; + CGAL_triangulation_assertion(false); + return false; + } + + int inf; + Cell_handle n; + Vertex_handle v1, v2; + switch (dimension()) { + case 3: { + for (All_cells_iterator it = all_cells_begin(); it != all_cells_end(); ++it) { + for (int i = 0; i < 4; ++i) { + if (!it->neighbor(i)->has_neighbor(it)) { + if (verbose) + std::cerr << "inconsistent neighbors " << std::endl; + CGAL_triangulation_assertion(false); + return false; + } + } + if (it->has_vertex(infinite_vertex(), inf)) { + for (int i = 0; i < 4; ++i) { + if (i != inf) { + if (is_conforming(it, i, inf)) { + if (verbose) + std::cerr << "conforming infinite edge " << std::endl; + CGAL_triangulation_assertion(false); + return false; + } + } + } + } + else { + is_valid_finite(it); + for (int i = 0; i < 4; ++i) { + n = it->neighbor(i); + if (!is_infinite(n->vertex(n->index(it)))) { + if (side_of_sphere(it, n->vertex(n->index(it))->point()) == ON_BOUNDED_SIDE) { + if (verbose) + std::cerr << "non-empty sphere " << std::endl; + CGAL_triangulation_assertion(false); + return false; + } + } + } + } + } + for (Finite_edges_iterator it = finite_edges_begin(); it != finite_edges_end(); ++it) { + v1 = it->first->vertex(it->second); + v2 = it->first->vertex(it->third); + bool conforming = is_conforming(*it); + + Cell_circulator cit = incident_cells(it->first, it->second, it->third, it->first), start(cit); + do { + if (cit->is_marked(cit->index(v1), cit->index(v2))) { + if (verbose) + std::cerr << "marked edge " << std::endl; + CGAL_triangulation_assertion(false); + return false; + } + + if (cit->is_conforming(cit->index(v1), cit->index(v2)) != conforming) { + if (verbose) + std::cerr << "inconsistent conforming edge " << std::endl; + CGAL_triangulation_assertion(false); + return false; + } + cit++; + } while (cit != start); + } + break; + } + case 2: { + for (All_facets_iterator it = all_facets_begin(); it != all_facets_end(); ++it) { + for (int i = 0; i < 3; ++i) { + if (!it->first->neighbor(i)->has_neighbor(it->first)) { + if (verbose) + std::cerr << "inconsistent neighbors " << std::endl; + CGAL_triangulation_assertion(false); + return false; + } + } + if (it->first->has_vertex(infinite_vertex(), inf) && inf < 3) { + for (int i = 0; i < 3; ++i) { + if (i != inf) { + if (is_conforming(it->first, i, 3)) { + if (verbose) + std::cerr << "conforming infinite edge " << std::endl; + CGAL_triangulation_assertion(false); + return false; + } + } + } + } + else { + is_valid_finite(it->first); + for (int i = 0; i < 3; ++i) { + n = it->first->neighbor(i); + if(!is_infinite(n->vertex(n->index(it->first)))) { + if (side_of_circle(it->first, 3, n->vertex(n->index(it->first))->point()) == ON_BOUNDED_SIDE) { + if (verbose) + std::cerr << "non-empty circle " << std::endl; + CGAL_triangulation_assertion(false); + return false; + } + } + + Edge o = opposite_edge(it->first, i, 3); + if (o.first->is_marked(o.second, o.third)) { + if (verbose) + std::cerr << "marked edge " << std::endl; + CGAL_triangulation_assertion(false); + return false; + } + + if (is_conforming(o) != + is_conforming(n, n->index(o.first->vertex(o.second)), n->index(o.first->vertex(o.third)))) { + if (verbose) + std::cerr << "inconsistent conforming edge " << std::endl; + CGAL_triangulation_assertion(false); + return false; + } + } + } + } + break; + } + case 1: { + for (Finite_edges_iterator it = finite_edges_begin(); it != finite_edges_end(); ++it) + is_valid_finite(it->first); + break; + } + } + if (verbose) + std::cerr << "valid conforming Delaunay triangulation" << std::endl; + return true; +} + +template < class Gt, class Tds, class Itag > +bool Conforming_Delaunay_triangulation_3:: +is_valid(Cell_handle c, bool verbose, int level) const { + if (!DT::is_valid(c, verbose, level)) { + CGAL_triangulation_assertion(false); + return false; + } + + switch (dimension()) { + case 3: { + for (int i = 0; i < 4; ++i) { + for (int j = i+1; j < 4; ++j) { + Vertex_handle v1 = c->vertex(i), v2 = c->vertex(j); + if (is_infinite(v1) || is_infinite(v2)) { + if (is_conforming(c, i, j)) { + if (verbose) + std::cerr << "conforming infinite edge " << std::endl; + CGAL_triangulation_assertion(false); + return false; + } + } + else { + bool conforming = is_conforming(c, i, j); + + Cell_circulator cit = incident_cells(c, i, j, c), start(cit); + do { + if (cit->is_marked(cit->index(v1), cit->index(v2))) { + if (verbose) + std::cerr << "marked edge " << std::endl; + CGAL_triangulation_assertion(false); + return false; + } + + if (cit->is_conforming(cit->index(v1), cit->index(v2)) != conforming) { + if (verbose) + std::cerr << "inconsistent conforming edge " << std::endl; + CGAL_triangulation_assertion(false); + return false; + } + cit++; + } while (cit != start); + } + } + } + break; + } + case 2: { + for (int v=0; v<3; ++v) { + int i = (v+1)%3, + j = (v+2)%3; + + Vertex_handle v1 = c->vertex(i), v2 = c->vertex(j); + if (is_infinite(v1) || is_infinite(v2)) { + if (is_conforming(c, i, j)) { + if (verbose) + std::cerr << "conforming infinite edge " << std::endl; + CGAL_triangulation_assertion(false); + return false; + } + } + else { + if (c->is_marked(i, j)) { + if (verbose) + std::cerr << "marked edge " << std::endl; + CGAL_triangulation_assertion(false); + return false; + } + + Cell_handle n = c->neighbor(v); + if (c->is_conforming(i, j) != n->is_conforming(n->index(v1), n->index(v2))) { + if (verbose) + std::cerr << "inconsistent conforming edge " << std::endl; + CGAL_triangulation_assertion(false); + return false; + } + } + } + break; + } + } + if (verbose) + std::cerr << "valid Delaunay cell" << std::endl; + return true; +} + +template < class Gt, class Tds, class Itag > +template +bool Conforming_Delaunay_triangulation_3:: +collect_encroaching(Vertex_handle va, Vertex_handle vb, OutputIterator encroaching, Vertex_handle& vc) { + CGAL_triangulation_precondition(va != vb); + CGAL_triangulation_precondition(!is_infinite(va) && !is_infinite(vb)); + CGAL_triangulation_precondition(dimension() >= 2); + + // Fill encroaching with the points that are encroaching upon the segment ab. + // vc is set to the first vertex on ab starting from a; + // if ab intersects an edge or facet the intersection is inserted and true returned. + + // This is done by traversing cells from a towards b until either b is found, + // or any other collinear vertex, or an intersecting constraint. + Locate_type lt; int li, lj; + Encroaching_collecter cit(va, vb->point(), this, encroaching); + while (cit.has_next()) { + // Walk to the next cell. + ++cit; + + cit.traversed(lt, li, lj); + + // Stop when either a new vertex is reached, or a barrier (a conforming edge) is encountered. + if (lt == VERTEX) { + vc = cit->vertex(li); + if (va == vc) + continue; + return false; + } + + if (cit.barrier_hit()) { + vc = intersect(cit, lt, li, lj, va, vb); + return true; + } + } + + // The cell must contain the target. + CGAL_triangulation_assertion(cit->has_vertex(vb)); + vc = vb; + return false; +} + +template < class Gt, class Tds, class Itag > +typename Conforming_Delaunay_triangulation_3::Points_iterator +Conforming_Delaunay_triangulation_3:: +sort_encroaching(Points_iterator begin, Points_iterator end, const Point& a, const Point& b) const { + // Sorts the points encroaching upon ab to the front of the collection. + // Returns an iterator to the first point not encroaching upon ab. + Point temp; + Points_iterator middle = end; + for (Points_iterator it = begin; it != middle;) { + if (collinear(a, b, *it) || !is_encroaching(a, b, *it)) { + if (it != --middle) { + // Swap the current point to the back. + temp = *middle; + *middle = *it; + *it = temp; + } + } + else + ++it; + } + return middle; +} + +CGAL_END_NAMESPACE + +#endif // CGAL_CONFORMING_DELAUNAY_TRIANGULATION_3_H \ No newline at end of file diff --git a/Conforming_triangulation_3/include/CGAL/Conforming_triangulation_cell_base_3.h b/Conforming_triangulation_3/include/CGAL/Conforming_triangulation_cell_base_3.h new file mode 100644 index 00000000000..435baa885fe --- /dev/null +++ b/Conforming_triangulation_3/include/CGAL/Conforming_triangulation_cell_base_3.h @@ -0,0 +1,179 @@ +//A tetrahedral cell in a conforming Delaunay triangulation. +//Copyright (C) 2012 Utrecht University +// +//This program is free software: you can redistribute it and/or modify +//it under the terms of the GNU General Public License as published by +//the Free Software Foundation, either version 3 of the License, or +//(at your option) any later version. +// +//This program is distributed in the hope that it will be useful, +//but WITHOUT ANY WARRANTY; without even the implied warranty of +//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//GNU General Public License for more details. +// +//You should have received a copy of the GNU General Public License +//along with this program. If not, see . +// +// Author(s): Thijs van Lankveld + +// Based on CGAL/Triangulation_cell_base_3.h +// + +// Note that a constrained 3D Delaunay triangulation is partially conforming and guided. +// 1-dimensional constraints are specified by segments. +// 2-demensional constraints are specified by closure complete polygons. +// The constrained 3D DT must contain a collection of edges and faces that exactly cover +// each constrained segment or polygon. For example, a constrained edge will not necessarily +// be maintained as vertices are inserted, but after updating the triangulation to the vertex +// insertion, the constrained edge must be the union of one or more constrained edges. + +#ifndef CGAL_CONFORMING_TRIANGULATION_CELL_BASE_3_H +#define CGAL_CONFORMING_TRIANGULATION_CELL_BASE_3_H + +#include +#include +#include + +CGAL_BEGIN_NAMESPACE + +template < typename Gt, typename Cb = Triangulation_cell_base_3 > +class Conforming_triangulation_cell_base_3: public Cb { +public: + typedef typename Cb::Vertex_handle Vertex_handle; + typedef typename Cb::Cell_handle Cell_handle; + + typedef Gt Geom_traits; + typedef typename Geom_traits::Point_3 Point; + + typedef Point* Point_container; + typedef Point* Point_iterator; + typedef const Point* Point_const_iterator; + + template < typename TDS2 > + struct Rebind_TDS { + typedef typename Cb::template Rebind_TDS::Other Cb2; + typedef Conforming_triangulation_cell_base_3 Other; + }; // Rebind_TDS + +protected: + // The edge states. + bool EF[6]; + bool mm[6]; + +public: + Conforming_triangulation_cell_base_3(): Cb() {clear_conforming();} + Conforming_triangulation_cell_base_3(const Vertex_handle& v0, const Vertex_handle& v1, + const Vertex_handle& v2, const Vertex_handle& v3) + : Cb(v0, v1, v2, v3) {clear_conforming();} + Conforming_triangulation_cell_base_3(const Vertex_handle& v0, const Vertex_handle& v1, + const Vertex_handle& v2, const Vertex_handle& v3, + const Cell_handle& n0, const Cell_handle& n1, + const Cell_handle& n2, const Cell_handle& n3) + : Cb(v0, v1, v2, v3, n0, n1, n2, n3) {clear_conforming();} + + bool is_conforming(int i, int j) const {return EF[getEdgeIndex(i,j)];} + bool is_marked(int i, int j) const {return mm[getEdgeIndex(i,j)];} + + void set_conforming(bool c0, bool c1, bool c2, bool c3, bool c4, bool c5) { + EF[0] = c0; + EF[1] = c1; + EF[2] = c2; + EF[3] = c3; + EF[4] = c4; + EF[5] = c5; + clear_marked(); + } + void set_conforming(int i, int j, bool c) { + int index = getEdgeIndex(i,j); + EF[index] = c; + mm[index] = false; + } + void mark(int i, int j) { + int index = getEdgeIndex(i,j); + EF[index] = true; + mm[index] = true; + } + + void clear_conforming() {set_conforming(false, false, false, false, false, false);} + void clear_marked() { + mm[0] = false; + mm[1] = false; + mm[2] = false; + mm[3] = false; + mm[4] = false; + mm[5] = false; + } + virtual void clear() {clear_conforming();} + + bool has_conforming() const {return EF[0] || EF[1] || EF[2] || EF[3] || EF[4] || EF[5];} + + virtual void reorient() { + bool tmp = EF[1]; + EF[1] = EF[3]; + EF[3] = tmp; + tmp = mm[1]; + mm[1] = mm[3]; + mm[3] = tmp; + } + + virtual std::istream& read_cell(std::istream& is); + virtual std::ostream& write_cell(std::ostream& os) const; + +private: + int getEdgeIndex(int i, int j) const { + CGAL_triangulation_precondition(i>=0 && i<=3); + CGAL_triangulation_precondition(j>=0 && j<=3); + CGAL_triangulation_precondition(i != j); + return (i==0 || j==0) ? i+j-1 : i+j; + } +}; // Conforming_triangulation_cell_base_3 + +template < class Gt, class Cb > +inline std::istream& operator>>(std::istream& is, Conforming_triangulation_cell_base_3& c) { + is >> static_cast(c); + return c.read_cell(is); +} + +template < class Gt, class Cb > +inline std::ostream& operator<<(std::ostream &os, const Conforming_triangulation_cell_base_3& c) { + os << static_cast(c); + return c.write_cell(os); +} + +template < class Gt, class Cb > +std::istream& Conforming_triangulation_cell_base_3::read_cell(std::istream& is) { + char s; + for (int i = 0; i < 4; ++i) { + for (int j = i+1; j < 4; ++j) { + if (is_ascii(is)) + is >> s; + else + read(is, s); + if (s == 'C') + set_conforming(i, j, true); + } + } + + return is; +} + +template < class Gt, class Cb > +std::ostream& Conforming_triangulation_cell_base_3::write_cell(std::ostream& os) const { + for (int i = 0; i < 4; ++i) { + for (int j = i+1; j < 4; ++j) { + if (is_conforming(i, j)) { + os << "C"; + } + else + os << "N"; + if (is_ascii(os)) + os << ' '; + } + } + + return os; +} + +CGAL_END_NAMESPACE + +#endif // CGAL_CONFORMING_TRIANGULATION_CELL_BASE_3_H \ No newline at end of file diff --git a/Conforming_triangulation_3/include/CGAL/Conforming_triangulation_vertex_base_3.h b/Conforming_triangulation_3/include/CGAL/Conforming_triangulation_vertex_base_3.h new file mode 100644 index 00000000000..bd1902b9fed --- /dev/null +++ b/Conforming_triangulation_3/include/CGAL/Conforming_triangulation_vertex_base_3.h @@ -0,0 +1,69 @@ +//A vertex in the conforming Delaunay triangulation structure. +//Copyright (C) 2012 Utrecht University +// +//This program is free software: you can redistribute it and/or modify +//it under the terms of the GNU General Public License as published by +//the Free Software Foundation, either version 3 of the License, or +//(at your option) any later version. +// +//This program is distributed in the hope that it will be useful, +//but WITHOUT ANY WARRANTY; without even the implied warranty of +//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//GNU General Public License for more details. +// +//You should have received a copy of the GNU General Public License +//along with this program. If not, see . +// +// Author(s): Thijs van Lankveld + +#ifndef CGAL_CONFORMING_TRIANGULATION_VERTEX_BASE_3_H +#define CGAL_CONFORMING_TRIANGULATION_VERTEX_BASE_3_H + +#include + +CGAL_BEGIN_NAMESPACE + +template < typename GT, typename Vb = Triangulation_vertex_base_3 > +class Conforming_triangulation_vertex_base_3: public Vb { + bool _s; + +public: + typedef typename Vb::Cell_handle Cell_handle; + typedef typename Vb::Point Point; + + template < typename TDS2 > struct Rebind_TDS { + typedef typename Vb::template Rebind_TDS::Other Vb2; + typedef Conforming_triangulation_vertex_base_3 Other; + }; + + Conforming_triangulation_vertex_base_3(): Vb(), _s(false) {} + Conforming_triangulation_vertex_base_3(const Point& p): Vb(p), _s(false) {} + Conforming_triangulation_vertex_base_3(const Point& p, bool s): Vb(p), _s(s) {} + Conforming_triangulation_vertex_base_3(const Point& p, Cell_handle c): Vb(p, c), _s(false) {} + Conforming_triangulation_vertex_base_3(const Point& p, bool s, Cell_handle c): Vb(p, c), _s(s) {} + Conforming_triangulation_vertex_base_3(Cell_handle c): Vb(c), _s(false) {} + + const bool& steiner() const {return _s;} + bool& steiner() {return _s;} +}; + +template < class GT, class Vb > +std::istream& +operator>>(std::istream &is, Conforming_triangulation_vertex_base_3 &v) { + is >> static_cast(v); + if (is_ascii(is)) is >> v.steiner(); + else read(is, v.steiner()); + return is; +} + +template < class GT, class Vb > +std::ostream& +operator<<(std::ostream &os, const Conforming_triangulation_vertex_base_3 &v) { + os << static_cast(v); + if (is_ascii(os)) os << ' '; + return os << v.steiner(); +} + +CGAL_END_NAMESPACE + +#endif // CGAL_CONFORMING_TRIANGULATION_VERTEX_BASE_3_H diff --git a/Conforming_triangulation_3/include/CGAL/Delaunay_triangulation_utils_3.h b/Conforming_triangulation_3/include/CGAL/Delaunay_triangulation_utils_3.h new file mode 100644 index 00000000000..c9442b475dc --- /dev/null +++ b/Conforming_triangulation_3/include/CGAL/Delaunay_triangulation_utils_3.h @@ -0,0 +1,402 @@ +//Some additional utilities for the Delaunay triangulation structure. +//Copyright (C) 2012 Utrecht University +// +//This program is free software: you can redistribute it and/or modify +//it under the terms of the GNU General Public License as published by +//the Free Software Foundation, either version 3 of the License, or +//(at your option) any later version. +// +//This program is distributed in the hope that it will be useful, +//but WITHOUT ANY WARRANTY; without even the implied warranty of +//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//GNU General Public License for more details. +// +//You should have received a copy of the GNU General Public License +//along with this program. If not, see . +// +// Author(s): Thijs van Lankveld + +// Based on CGAL/Delaunay_triangulation_3.h +// +// For the love of something, why is the 3D triangulation package so badly written? + +#ifndef CGAL_DELAUNAY_TRIANGULATION_3_UTILS_H +#define CGAL_DELAUNAY_TRIANGULATION_3_UTILS_H + +#include + +#include +#include + +#include +#include "CCDT/Triangulation_segment_traverser_3.h" + +CGAL_BEGIN_NAMESPACE + +template < class DT > class Natural_neighbors_3; + +template < class Gt, class Tds > class Triangulation_cell_traverser_3; + +template < class Gt, + class Tds = Triangulation_data_structure_3 < Triangulation_vertex_base_3, Triangulation_cell_base_3 > > +class Delaunay_triangulation_utils_3: public Delaunay_triangulation_3 { + typedef Triangulation_data_structure Tds; + + typedef Delaunay_triangulation_utils_3 Self; + typedef Delaunay_triangulation_3 DT; + typedef Triangulation_3 Tr; + + friend class Natural_neighbors_3; + +public: + typedef Tds Triangulation_data_structure; + typedef Gt Geom_traits; + + typedef typename Gt::FT FT; + + typedef typename Gt::Point_3 Point; + typedef typename Gt::Vector_3 Vector; + typedef typename Gt::Segment_3 Segment; + typedef typename Gt::Line_3 Line; + typedef typename Gt::Triangle_3 Triangle; + typedef typename Gt::Tetrahedron_3 Tetrahedron; + typedef typename Gt::Plane_3 Plane; + + typedef typename DT::Cell_handle Cell_handle; + typedef typename DT::Vertex_handle Vertex_handle; + + typedef typename DT::Cell Cell; + typedef typename DT::Vertex Vertex; + typedef typename DT::Facet Facet; + typedef typename DT::Edge Edge; + + typedef std::pair Bi_vertex; + typedef Triple Tri_vertex; + + typedef std::pair Constraint_1; + typedef std::vector Constraint_2; + + typedef typename DT::Cell_circulator Cell_circulator; + typedef typename DT::Facet_circulator Facet_circulator; + typedef typename DT::Cell_iterator Cell_iterator; + typedef typename DT::Facet_iterator Facet_iterator; + typedef typename DT::Edge_iterator Edge_iterator; + typedef typename DT::Vertex_iterator Vertex_iterator; + + typedef typename DT::Finite_vertices_iterator Finite_vertices_iterator; + typedef typename DT::Finite_cells_iterator Finite_cells_iterator; + typedef typename DT::Finite_facets_iterator Finite_facets_iterator; + typedef typename DT::Finite_edges_iterator Finite_edges_iterator; + + typedef typename DT::All_cells_iterator All_cells_iterator; + + typedef Triangulation_segment_traverser_3 Cell_traverser; + + typedef typename DT::Locate_type Locate_type; + +#ifndef CGAL_CFG_USING_BASE_MEMBER_BUG_2 + using DT::cw; + using DT::ccw; + using DT::coplanar; + using DT::coplanar_orientation; + using DT::dimension; + using DT::finite_facets_begin; + using DT::finite_facets_end; + using DT::finite_vertices_begin; + using DT::finite_vertices_end; + using DT::finite_cells_begin; + using DT::finite_cells_end; + using DT::finite_edges_begin; + using DT::finite_edges_end; + using DT::geom_traits; + using DT::infinite_vertex; + using DT::is_valid; + using DT::mirror_vertex; + using DT::next_around_edge; + using DT::number_of_vertices; + using DT::orientation; + using DT::remove; + using DT::coplanar_side_of_bounded_circle; + using DT::side_of_oriented_sphere; + using DT::side_of_segment; + using DT::tds; + using DT::vertex_triple_index; +#endif + +protected: + typedef std::list Tri_vertex_collection; + typedef std::list Bi_vertex_collection; + +protected: + // Test whether a newly inserted point conflicts with the existing cells. + class Conflict_tester_3 { + protected: + const Point& _p; + const Self* _tr; + + public: + Conflict_tester_3(const Point& pt, const Self* tr): _p(pt), _tr(tr) {} + bool operator()(const Cell_handle c) const {return _tr->side_of_sphere(c, _p, true) == ON_BOUNDED_SIDE;} + Oriented_side compare_weight(const Point&, const Point&) const {return ZERO;} + bool test_initial_cell(Cell_handle) const {return true;} + }; // class Conflict_tester_3 + + // Test whether a newly inserted point conflicts with the existing cells. + class Conflict_tester_2 { + protected: + const Point& _p; + const Self* _tr; + + public: + Conflict_tester_2(const Point& pt, const Self* tr): _p(pt), _tr(tr) {} + bool operator()(const Cell_handle c) const {return _tr->side_of_circle(c, 3, _p, true) == ON_BOUNDED_SIDE;} + Oriented_side compare_weight(const Point&, const Point&) const {return ZERO;} + bool test_initial_cell(Cell_handle) const {return true;} + }; // class Conflict_tester_2 + + class Hidden_point_visitor { + public: + Hidden_point_visitor() {} + + template < class InputIterator > + void process_cells_in_conflict(InputIterator, InputIterator) const {} + void reinsert_vertices(Vertex_handle) {} + Vertex_handle replace_vertex(Cell_handle c, int index, const Point&) {return c->vertex(index);} + void hide_point(Cell_handle, const Point&) {} + }; // class Hidden_point_visitor + + Hidden_point_visitor hidden_point_visitor; + +public: + // Constructors for bi-vertices. + inline Bi_vertex to_bi_vertex(Cell_handle c, int li, int lj) const {return Bi_vertex(c->vertex(li), c->vertex(lj));} + inline Bi_vertex to_bi_vertex(const Edge& e) const {return to_bi_vertex(e.first, e.second, e.third);} + inline Bi_vertex sort_bi_vertex(Vertex_handle v1, Vertex_handle v2) const {if (v1 < v2) return Bi_vertex(v1, v2); return Bi_vertex(v2, v1);} + inline Bi_vertex sort_bi_vertex(const Bi_vertex& bv) const {return sort_bi_vertex(bv.first, bv.second);} + inline Bi_vertex sort_bi_vertex(Cell_handle c, int li, int lj) const {return sort_bi_vertex(c->vertex(li), c->vertex(lj));} + inline Bi_vertex sort_bi_vertex(const Edge& e) const {return sort_bi_vertex(e.first, e.second, e.third);} + + // Constructors for tri-vertices. + inline Tri_vertex to_tri_vertex(Cell_handle c, int li) const {return Tri_vertex(c->vertex((li+1)&3), c->vertex((li+2)&3), c->vertex((li+3)&3));} + inline Tri_vertex to_tri_vertex(const Facet& f) const {return to_tri_vertex(f.first, f.second);} + inline Tri_vertex sort_tri_vertex(Vertex_handle v1, Vertex_handle v2, Vertex_handle v3) const { + CGAL_triangulation_precondition(v1 != v2 && v1 != v3 && v2 != v3); + if (v1 < v2) { + if (v2 < v3) + return Tri_vertex(v3, v2, v1); + if (v3 < v1) + return Tri_vertex(v2, v1, v3); + return Tri_vertex(v2, v3, v1); + } + else { // v2 < v1 + if (v3 < v2) + return Tri_vertex(v1, v2, v3); + if (v1 < v3) + return Tri_vertex(v3, v1, v2); + return Tri_vertex(v1, v3, v2); + } + } + inline Tri_vertex sort_tri_vertex(const Tri_vertex& tv) const {return sort_tri_vertex(tv.first, tv.second, tv.third);} + inline Tri_vertex sort_tri_vertex(Cell_handle c, int li) const {return sort_tri_vertex(to_tri_vertex(c, li));} + inline Tri_vertex sort_tri_vertex(const Facet& f) const {return sort_tri_vertex(f.first, f.second);} + inline Tri_vertex oriented_tri_vertex(Cell_handle c, int li) const { + CGAL_triangulation_precondition(dimension() == 2 || dimension() == 3); + CGAL_triangulation_precondition((dimension() == 2 && li == 3) || (dimension() == 3 && li >= 0 && li <= 3) ); + CGAL_triangulation_precondition(!is_infinite(c, li)); + if ((li&1) == 0) + return Tri_vertex(c->vertex((li+2)&3), + c->vertex((li+1)&3), + c->vertex((li+3)&3)); + return Tri_vertex(c->vertex((li+1)&3), + c->vertex((li+2)&3), + c->vertex((li+3)&3)); + } + inline Tri_vertex oriented_tri_vertex(const Facet& f) const {return oriented_tri_vertex(f.first, f.second);} + +protected: + // tri_vertex methods similar to Triangulation_3. + Tri_vertex make_tri_vertex(const Facet& f) const { + return Tri_vertex(f.first->vertex(vertex_triple_index(f.second, 0)), + f.first->vertex(vertex_triple_index(f.second, 1)), + f.first->vertex(vertex_triple_index(f.second, 2))); + } + void make_canonical(Tri_vertex& t) const { + int i = (&*(t.first) < &*(t.second))? 0 : 1; + if (i == 0) + i = (&*(t.first) < &*(t.third))? 0 : 2; + else + i = (&*(t.second) < &*(t.third))? 1 : 2; + Vertex_handle tmp; + switch (i) { + case 0: return; + case 1: + tmp = t.first; + t.first = t.second; + t.second = t.third; + t.third = tmp; + return; + default: + tmp = t.first; + t.first = t.third; + t.third = t.second; + t.second = tmp; + } + } + + // PREDICATES + Orientation coplanar_orientation(const Point& p0, const Point& p1, const Point& p2, const Point& p) const { + return Gt().coplanar_orientation_3_object()(p0, p1, p2, p); + } + +public: + // CONSTRUCTORS + Delaunay_triangulation_utils_3(const Gt& gt = Gt()): DT(gt) {} + + // Copy constructor duplicates vertices and cells. + Delaunay_triangulation_utils_3(const Delaunay_triangulation_utils_3& tr): DT(tr) { + CGAL_triangulation_postcondition(is_valid()); + } + + // Create a 3D Delaunay triangulation from a number of points. + template < typename InputIterator > + Delaunay_triangulation_utils_3(InputIterator first, InputIterator last, const Gt& gt = Gt()): DT(gt) { + insert(first, last); + CGAL_triangulation_postcondition(is_valid()); + } + +public: + // INSERT POINT + + Vertex_handle insert(const Point& p, Cell_handle start = Cell_handle()); + virtual Vertex_handle insert(const Point& p, Locate_type lt, Cell_handle c, int li, int lj); + + template < class InputIterator > + int insert(InputIterator first, InputIterator last) { + int n = number_of_vertices(); + + std::vector points(first, last); + std::random_shuffle(points.begin(), points.end()); + spatial_sort(points.begin(), points.end(), geom_traits()); + + Cell_handle hint; + for (std::vector::const_iterator it = points.begin(), end = points.end(); it != end; ++it) + hint = insert(*it, hint)->cell(); + + return number_of_vertices() - n; + } + +public: + // MOVE + + Vertex_handle move_point(Vertex_handle v, const Point& p); + +public: + // Construct the edge of c opposite to ij. + Edge opposite_edge(Cell_handle c, int li, int lj) const { + CGAL_triangulation_precondition(li >= 0 && li < 4); + CGAL_triangulation_precondition(lj >= 0 && lj < 4); + CGAL_triangulation_precondition(li != lj); + + switch (6-li-lj) { // i + j + missing indices = 6. + case 1: return Edge(c, 0, 1); + case 2: return Edge(c, 0, 2); + case 3: return (li == 0 || lj == 0) + ? Edge(c, 1, 2) + : Edge(c, 0, 3); + case 4: return Edge(c, 1, 3); + case 5: return Edge(c, 2, 3); + } + + CGAL_triangulation_assertion(false); + return Edge(); + } + Edge opposite_edge(const Edge& e) const {return opposite_edge(e.first, e.second, e.third);} + + // Give the same facet as seen from the other side. + Facet mirror_facet(Cell_handle c, int li) const {return Facet(c->neighbor(li), c->neighbor(li)->index(c));} + Facet mirror_facet(const Facet& f) const {return mirror_facet(f.first, f.second);} + + // Construct a plane of a facet. + Plane plane(Cell_handle c, int li) const { + /* This should be removed to reduce orientation errors with the inexact kernel*/ + CGAL_triangulation_precondition(dimension() >= 2); + CGAL_triangulation_precondition(dimension() == 3 || li == 3); + CGAL_triangulation_precondition(li >= 0 && li <= 3); + CGAL_triangulation_precondition(!is_infinite(c, li)); + if ((li&1) == 0) + return Plane(c->vertex((li+2)&3)->point(), + c->vertex((li+1)&3)->point(), + c->vertex((li+3)&3)->point()); + return Plane(c->vertex((li+1)&3)->point(), + c->vertex((li+2)&3)->point(), + c->vertex((li+3)&3)->point()); + } + Plane plane(const Facet& f) const {return plane(f.first, f.second);} + + // Construct a line of an edge. + Line line(Cell_handle c, int li, int lj) const { + CGAL_triangulation_precondition(dimension() >= 1); + CGAL_triangulation_precondition(li >= 0 && li <= 3); + CGAL_triangulation_precondition(lj >= 0 && lj <= 3); + CGAL_triangulation_precondition(li != lj); + CGAL_triangulation_precondition(li + lj < dimension() * 2); + CGAL_triangulation_precondition(!is_infinite(c, li, lj)); + return Line(c->vertex(li)->point(), + c->vertex(lj)->point()); + } + Line line(const Edge& e) const {return line(e.first, e.second, e.third);} +}; // Delaunay_triangulation_utils_3 + +template < class Gt, class Tds > +typename Delaunay_triangulation_utils_3::Vertex_handle +Delaunay_triangulation_utils_3:: +insert(const Point& p, Cell_handle start) { + Locate_type lt; + int li, lj; + Cell_handle c = locate(p, lt, li, lj, start); + return insert(p, lt, c, li, lj); +} + +template < class Gt, class Tds > +typename Delaunay_triangulation_utils_3::Vertex_handle +Delaunay_triangulation_utils_3:: +insert(const Point& p, Locate_type lt, Cell_handle c, int li, int lj) { + switch (dimension()) { + case 3: { + Conflict_tester_3 tester(p, this); + Vertex_handle v = insert_in_conflict(p, lt, c, li, lj, tester, hidden_point_visitor); + return v; + }// dim 3 + case 2: { + Conflict_tester_2 tester(p, this); + return insert_in_conflict(p, lt, c, li, lj, tester, hidden_point_visitor); + }//dim 2 + default : + // dimension <= 1 + // Do not use the generic insert. + return Tr::insert(p, c); + } +} + +template < class Gt, class Tds > +typename Delaunay_triangulation_utils_3::Vertex_handle +Delaunay_triangulation_utils_3::move_point(Vertex_handle v, const Point& p) { + CGAL_triangulation_precondition(!is_infinite(v)); + CGAL_triangulation_expensive_precondition(is_vertex(v)); + + // Remember an incident vertex to restart the point location after the removal. + Cell_handle c = v->cell(); + Vertex_handle old_neighbor = c->vertex(c->index(v) == 0 ? 1 : 0); + CGAL_triangulation_assertion(old_neighbor != v); + + if (!remove(v)) + return v; + + if (dimension() <= 0) + return insert(p); + return insert(p, old_neighbor->cell()); +} + +CGAL_END_NAMESPACE + +#endif // CGAL_DELAUNAY_TRIANGULATION_3_UTILS_H diff --git a/Conforming_triangulation_3/include/CGAL/Encroaching_collecter_3.h b/Conforming_triangulation_3/include/CGAL/Encroaching_collecter_3.h new file mode 100644 index 00000000000..a60becee1c8 --- /dev/null +++ b/Conforming_triangulation_3/include/CGAL/Encroaching_collecter_3.h @@ -0,0 +1,123 @@ +//A traverser that collects points encroaching upon its path. +//Copyright (C) 2012 Utrecht University +// +//This program is free software: you can redistribute it and/or modify +//it under the terms of the GNU General Public License as published by +//the Free Software Foundation, either version 3 of the License, or +//(at your option) any later version. +// +//This program is distributed in the hope that it will be useful, +//but WITHOUT ANY WARRANTY; without even the implied warranty of +//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//GNU General Public License for more details. +// +//You should have received a copy of the GNU General Public License +//along with this program. If not, see . +// +// Author(s): Thijs van Lankveld + +// A class that traverses the cells of a triangulation by following a segment from source to target, +// while collecting points that encroach upon the segment. + +#ifndef CGAL_ENCROACHING_COLLECTER_3_H +#define CGAL_ENCROACHING_COLLECTER_3_H + +#include "Triangulation_segment_traverser_3.h" +//#include "Conforming_Delaunay_triangulation_3.h" + +CGAL_BEGIN_NAMESPACE + +template < class Gt, class Tds, class Itag > +class Conforming_Delaunay_triangulation_3; + +template < class Gt, class Tds, class Itag = No_intersection_tag, class Out = std::back_insert_iterator>>> +class Encroaching_collecter_3: public Triangulation_segment_traverser_3 { + typedef Encroaching_collecter_3 Self; + typedef Triangulation_segment_traverser_3 Base; + + typedef typename Gt::Plane_3 Plane; + +public: + typedef Conforming_Delaunay_triangulation_3 CDT; + + typedef typename Tds::Vertex Vertex; + typedef typename Tds::Cell Cell; + typedef typename Tds::Edge Edge; + typedef typename Tds::Facet Facet; + typedef typename Tds::Vertex_handle Vertex_handle; + typedef typename Tds::Cell_handle Cell_handle; + typedef typename Tds::Cell_iterator Cell_iterator; + typedef typename Tds::Cell_circulator Cell_circulator; + typedef typename Tds::Facet_iterator Facet_iterator; + typedef typename Tds::Facet_circulator Facet_circulator; + + typedef typename Gt::Point_3 Point; + typedef typename CDT::Locate_type Locate_type; + typedef typename CDT::Bi_vertex Bi_vertex; + +protected: + Out _out; + + Bi_vertex se; // These are used when the source lies on an edge. + +public: + Encroaching_collecter_3(): Base() {} + Encroaching_collecter_3(Vertex_handle v, const Point& t, const CDT* tr, Out output) + : Base(v, t, tr), _out(output) {if (_lt == CDT::EDGE) se = _tr->sort_bi_vertex(_pos, _li, _lj);} + Encroaching_collecter_3(const Point& s, const Point& t, const CDT* tr, Out output, Cell_handle hint = Cell_handle()) + : Base(s, t, tr, hint), _out(output) {if (_lt == CDT::EDGE) se = _tr->sort_bi_vertex(_pos, _li, _lj);} + + virtual bool barrier_hit() const {return _lt == CDT::EDGE && _pos->is_conforming(_li, _lj) && _tr->sort_bi_vertex(_pos, _li, _lj) != se;} + +protected: + // Traverse to the next cell along the line. + virtual void increment(); +}; + +template < class Gt, class Tds, class Itag, class Out > +void Encroaching_collecter_3::increment() { + // Walk to the next cell. + Base::increment(); + + // Check for encroaching points. + // Which points are checked is based on the type of simplex traversed. + const CDT* _cdt = dynamic_cast(_tr); + switch (_lt) { + case CDT::FACET: + for (int i = 0; i < 4; ++i) + if (i != _li && !_cdt->is_infinite(_pos->vertex(i)) && _cdt->is_encroaching(_source, _target, _pos->vertex(i)->point())) + *_out++ = _pos->vertex(i)->point(); + break; + case CDT::EDGE: { + Vertex_handle vi = _pos->vertex(_li), vj = _pos->vertex(_lj), vk; + Cell_handle c; + + // Check the vertices in the star around the edge. + Facet_circulator fit = _cdt->incident_facets(_pos, _li, _lj), start(fit); + do { + c = fit->first; + vk = c->vertex(6 - c->index(vi) - c->index(vj) - fit->second); + if (!_cdt->is_infinite(vk) && !collinear(_source, _target, vk->point()) && _cdt->is_encroaching(_source, _target, vk->point())) + *_out++ = vk->point(); + ++fit; + } while (fit != start); + + // Check the vertices of the edge. + if (_cdt->is_encroaching(_source, _target, vi->point())) + *_out++ = vi->point(); + if (_cdt->is_encroaching(_source, _target, vj->point())) + *_out++ = vj->point(); + break; + } + case CDT::VERTEX: + CGAL_triangulation_assertion(collinear(_source, _target, _pos->vertex(_li)->point())); + break; + default: + CGAL_triangulation_assertion(false); + break; + } +} + +CGAL_END_NAMESPACE + +#endif // CGAL_ENCROACHING_COLLECTER_3_H \ No newline at end of file diff --git a/Conforming_triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Conforming_triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h new file mode 100644 index 00000000000..fb0506a89ef --- /dev/null +++ b/Conforming_triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -0,0 +1,695 @@ +//A class that follows a straight line through a Delaunay triangulation structure. +//Copyright (C) 2012 Utrecht University +// +//This program is free software: you can redistribute it and/or modify +//it under the terms of the GNU General Public License as published by +//the Free Software Foundation, either version 3 of the License, or +//(at your option) any later version. +// +//This program is distributed in the hope that it will be useful, +//but WITHOUT ANY WARRANTY; without even the implied warranty of +//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//GNU General Public License for more details. +// +//You should have received a copy of the GNU General Public License +//along with this program. If not, see . +// +// Author(s): Thijs van Lankveld + +// A class that traverses the cells of a triangulation by following a segment from source to target. + +#ifndef CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_H +#define CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_H + +#include "Delaunay_triangulation_utils_3.h" + +#include + +CGAL_BEGIN_NAMESPACE + +template < class Gt, class Tds> +class Delaunay_triangulation_utils_3; + +template < class Gt, class Tds > +class Triangulation_segment_traverser_3: public Forward_circulator_base< typename Tds::Cell, std::ptrdiff_t, std::size_t > { + typedef Triangulation_segment_traverser_3 Self; + +public: + typedef Delaunay_triangulation_utils_3 Tr; + + typedef typename Tds::Vertex Vertex; + typedef typename Tds::Cell Cell; + typedef typename Tds::Edge Edge; + typedef typename Tds::Facet Facet; + typedef typename Tds::Vertex_handle Vertex_handle; + typedef typename Tds::Cell_handle Cell_handle; + typedef typename Tds::Cell_iterator Cell_iterator; + typedef typename Tds::Cell_circulator Cell_circulator; + typedef typename Tds::Facet_iterator Facet_iterator; + typedef typename Tds::Facet_circulator Facet_circulator; + + typedef typename Gt::Point_3 Point; + typedef typename Tr::Locate_type Locate_type; + +protected: + // The triangulation being traversed. + const Tr* _tr; + + // The source and target points of the traversal. + Point _source, _target; + + // The cell currently traversed and the previous one. + Cell_handle _pos, _prev; + + // Otherwise, they indicate the simplex through which this cell was entered, + // or the location of the source if it is in this cell. + int _li, _lj; + Locate_type _lt; + + // This bit signifies when a cell containing the target is found. + bool _done; + + // Where possible, facets are checked in a random order. + mutable Random rng; + +public: + Triangulation_segment_traverser_3(): _tr(NULL), _pos(), _prev(), _li(-1), _lj(-1), _lt(Tr::CELL), _done(true) {} + Triangulation_segment_traverser_3(Vertex_handle s, const Point& t, const Tr* tr); + Triangulation_segment_traverser_3(const Point& s, const Point& t, const Tr* tr, Cell_handle hint = Cell_handle()); + + Self& operator++(); + Self operator++(int); + Cell* operator->() {return &*_pos;} + Cell& operator*() {return *_pos;} + Cell_handle handle() {return _pos;} + operator const Cell_handle() const {return _pos;} + bool operator==(const Self& ct) const; + bool operator!=(const Self& ct) const; + + bool operator==(const Cell_handle& ch) const {return ch == _pos;} + bool operator!=(const Cell_handle& ch) const {return ch != _pos;} + + bool operator==(Nullptr_t CGAL_triangulation_assertion_code(n)) const; + bool operator!=(Nullptr_t n) const; + + // Check if a cell containing the target has been reached. + bool has_next() const {return !_done;} + + // Access the current and previous cells. + Cell_handle previous() const {return _prev;} + + // Traverse to a cell containing the target. + Cell_handle traverse(); + + // Get the type of simplex traversed last. + void traversed(Locate_type& lt, int& li, int& lj) const {lt = _lt; li = _li; lj = _lj;} + +protected: + // Traverse to the next cell along the line. + virtual void increment(); + +private: + inline int edgeIndex(int i, int j) const { + CGAL_triangulation_precondition(i>=0 && i<=3); + CGAL_triangulation_precondition(j>=0 && j<=3); + CGAL_triangulation_precondition(i != j); + return (i==0 || j==0) ? i+j-1 : i+j; + } + + inline Orientation coplanar_orientation(const Point& p, const Point& q, const Point& r, const Point& s) { + return Gt().coplanar_orientation_3_object()(p, q, r, s); + } +}; // class Triangulation_segment_traverser_3 + +template < class Gt, class Tds > +inline bool operator==(typename Tds::Cell_handle ch, Triangulation_segment_traverser_3 tci) {return tci == ch;} + +template < class Gt, class Tds > +inline bool operator!=(typename Tds::Cell_handle ch, Triangulation_segment_traverser_3 tci) {return tci != ch;} + +template < class Gt, class Tds > +Triangulation_segment_traverser_3::Triangulation_segment_traverser_3(Vertex_handle s, const Point& t, const Tr* tr) +: _tr(tr), _pos(), _prev(), _lj(-1), _lt(Tr::VERTEX), _done(false) { + CGAL_triangulation_precondition(!_tr->is_infinite(s)); + CGAL_triangulation_precondition(s->point() != t); + CGAL_triangulation_precondition(_tr->dimension() >= 2); + CGAL_triangulation_assertion(_tr->dimension() == 3 || _tr->plane(*_tr->finite_facets_begin()).has_on(_target)); + + _source = s->point(); + _target = t; + + _pos = s->cell(); + int inf; + if (_pos->has_vertex(_tr->infinite_vertex(), inf)) + _pos = _pos->neighbor(inf); + _li = _pos->index(s); + + CGAL_triangulation_postcondition(_pos != Cell_handle()); +} + +template < class Gt, class Tds > +Triangulation_segment_traverser_3::Triangulation_segment_traverser_3(const Point& s, const Point& t, const Tr* tr, Cell_handle hint) +: _tr(tr), _pos(), _prev(), _li(-1), _lj(-1), _done(false) { + CGAL_triangulation_precondition(s != t); + CGAL_triangulation_precondition(_tr->dimension() >= 2); + CGAL_triangulation_assertion(_tr->dimension() == 3 || _tr->plane(*_tr->finite_facets_begin()).has_on(_target)); + + _source = s; + _target = t; + + _pos = _tr->locate(s, _lt, _li, _lj, hint); + + CGAL_triangulation_postcondition(_pos != Cell_handle()); +} + +template < class Gt, class Tds > +inline Triangulation_segment_traverser_3& +Triangulation_segment_traverser_3::operator++() { + CGAL_triangulation_precondition(_pos != Cell_handle()); + increment(); + return *this; +} + +template < class Gt, class Tds > +inline Triangulation_segment_traverser_3 +Triangulation_segment_traverser_3::operator++(int) { + Self tmp(*this); + ++(*this); + return tmp; +} + +template < class Gt, class Tds > +inline bool Triangulation_segment_traverser_3::operator==(const Self& ct) const { + CGAL_triangulation_precondition(_pos != Cell_handle() && ct._pos != Cell_handle()); + return (_pos == ct._pos && + _prev == ct._prev && + _tr == ct._tr && + _li == ct._li && + _lj == ct._lj && + _lt == ct._lt && + _source == ct._source && + _target == ct._target && + _done == ct._done); +} + +template < class Gt, class Tds > +inline bool Triangulation_segment_traverser_3::operator!=(const Self& ct) const { + return !(*this == ct); +} + +template < class Gt, class Tds > +inline bool Triangulation_segment_traverser_3::operator==(Nullptr_t CGAL_triangulation_assertion_code(n)) const { + CGAL_triangulation_assertion(n == NULL); + return _pos == Cell_handle(); +} + +template < class Gt, class Tds > +inline bool Triangulation_segment_traverser_3::operator!=(Nullptr_t n) const { + CGAL_triangulation_assertion(n == NULL); + return !(*this == n); +} + +template < class Gt, class Tds > +inline typename Triangulation_segment_traverser_3::Cell_handle +Triangulation_segment_traverser_3::traverse() { + while (!_done) + increment(); + return _pos; +} + +template < class Gt, class Tds > +void Triangulation_segment_traverser_3::increment() { + CGAL_triangulation_precondition(!_done); + + // Walks to the next cell over a facet intersected by the line from source to target. + // This method is based on Triangulation_3::locate(). + switch (_tr->dimension()) { + case 3: { + // Infinite cells should be handled differently. + int inf; + if (_pos->has_vertex(_tr->infinite_vertex(), inf)) { + // If this cell was reached by traversal from a finite one, it must be the final cell. + Cell_handle fin = _pos->neighbor(inf); + if (fin == _prev) { + _done = true; + // Here, I do not change the _lt etc. because they were already set. + return; + } + + const Point* pts[4]; + for (int i = 0; i != 4; ++i) + if (i != inf) + pts[i] = &(_pos->vertex(i)->point()); + pts[inf] = &_target; + Orientation o[4]; + + // For the remembering stochastic walk, we start trying with a random index: + int li = rng.template get_bits<2>(); + + // Check if the target lies outside the convex hull. + if (orientation(*pts[0], *pts[1], *pts[2], *pts[3]) == POSITIVE) { + // The target lies in an infinite cell. + _done = true; + return; + + // Note that we do not traverse to other infinite cells. + } + + pts[inf] = &_source; + CGAL_triangulation_assertion(orientation(*pts[0], *pts[1], *pts[2], *pts[3]) == POSITIVE); + + // Check if the line enters an adjacent infinite cell. + // This occurs if the target lies on the other side of + // a plane through one of the finite edges and the source point. + for (int j = 0; j != 4; ++j, li = (li+1)&3) { + if (li == inf) { + o[li] = COPLANAR; + continue; + } + + Cell_handle next = _pos->neighbor(li); + if (next == _prev) { + o[li] = POSITIVE; + continue; + } + + const Point* backup = pts[li]; + pts[li] = &_target; + o[li] = orientation(*pts[0], *pts[1], *pts[2], *pts[3]); + + if (o[li] != NEGATIVE) { + pts[li] = backup; + continue; + } + + // The target lies behind the plane through the source and two finite vertices. + // Traverse to the incident infinite cell. + _prev = _pos; + _pos = next; + CGAL_triangulation_assertion(_tr->is_infinite(_pos)); + + _lt = Tr::FACET; + _li = _pos->index(_prev); + return; + } + + // The line enters the convex hull here (or lies on the finite facet). + _prev = _pos; + _pos = fin; + + // Check through which simplex the line traverses. + switch (o[0]+o[1]+o[2]+o[3]) { + case 3: + _lt = Tr::FACET; + _li = _pos->index(_prev); + return; + case 2: + _lt = Tr::EDGE; + for (int i = 0; i < 4; ++i) { + if (o[i] == COPLANAR && i != inf) { + Edge opp = _tr->opposite_edge(_prev, inf, i); + _li = _pos->index(_prev->vertex(opp.second)); + _lj = _pos->index(_prev->vertex(opp.third)); + return; + } + } + CGAL_triangulation_assertion(false); + return; + case 1: + _lt = Tr::VERTEX; + for (int i = 0; i < 4; ++i) { + if (o[i] == POSITIVE) { + _li = _pos->index(_prev->vertex(i)); + return; + } + } + CGAL_triangulation_assertion(false); + return; + default: + CGAL_triangulation_assertion(false); + return; + } + } + + const Point* pts[4] = {&(_pos->vertex(0)->point()), + &(_pos->vertex(1)->point()), + &(_pos->vertex(2)->point()), + &(_pos->vertex(3)->point())}; + + // We check in which direction the target lies + // by comparing its position relative to the planes through the + // source and the edges of the cell. + Orientation o[6]; + bool calc[6] = {false, false, false, false, false, false}; + + if (_lt == Tr::VERTEX) { + // The three planes through the vertex are set to coplanar. + for (int j = 0; j < 4; ++j) { + if (_li != j) { + int ij = edgeIndex(_li, j); + o[ij] = COPLANAR; + calc[ij] = true; + } + } + } + else if (_lt == Tr::EDGE) { + // The plane through the edge is set to coplanar. + int ij = edgeIndex(_li, _lj); + o[ij] = COPLANAR; + calc[ij] = true; + } + + // For the remembering stochastic walk, we start trying with a random facet: + int li = rng.template get_bits<2>(); + + CGAL_triangulation_assertion_code(bool incell = true;) + for (int k = 0; k < 4; ++k, li = (li+1)&3) { + Cell_handle next = _pos->neighbor(li); + if (next == _prev) + continue; + + // Check if the target is outside the cell. + const Point* backup = pts[li]; + pts[li] = &_target; + if (orientation(*pts[0], *pts[1], *pts[2], *pts[3]) != NEGATIVE) { + pts[li] = backup; + continue; + } + + CGAL_triangulation_assertion_code(incell = false;) + + // Check if the target is inside the pyramid. + int lj = rng.template get_bits<2>(); + int or = 0; + for (int l = 0; l < 4; ++l, lj = (lj+1)&3) { + if (li == lj) + continue; + + // We check the orientation of the target compared to the plane + // Through the source and the edge opposite of ij. + int oij = 5 - edgeIndex(li, lj); + if (!calc[oij]) { + const Point* backup2 = pts[lj]; + pts[lj] = &_source; + o[oij] = orientation(*pts[0], *pts[1], *pts[2], *pts[3]); + pts[lj] = backup2; + calc[oij] = true; + } + + or -= o[oij]; + if (o[oij] == POSITIVE) { + // The target is not inside the pyramid. + // Invert the planes. + // This can be safely done because either + // they were not calculated yet, + // or they will no longer be used. + for (int j = 0; j < 4; ++j) { + if (li == j) continue; + int oij = 5 - edgeIndex(li, j); + o[oij] = -o[oij]; + } + or = 0; + break; + } + } + + if (or == 0) { + // Either the target is not inside the pyramid, + // or the pyramid is degenerate. + pts[li] = backup; + continue; + } + + // The target is inside the pyramid. + _prev = _pos; + _pos = next; + + switch (or) { + case 3: + _lt = Tr::FACET; + _li = _pos->index(_prev); + return; + case 2: + _lt = Tr::EDGE; + for (int j = 0; j < 4; ++j) { + if (li != j && o[5-edgeIndex(li, j)] == COPLANAR) { + Edge opp = _tr->opposite_edge(_prev, li, j); + _li = _pos->index(_prev->vertex(opp.second)); + _lj = _pos->index(_prev->vertex(opp.third)); + return; + } + } + CGAL_triangulation_assertion(false); + return; + case 1: + _lt = Tr::VERTEX; + for (int j = 0; j < 4; ++j) { + if (li != j && o[5-edgeIndex(li, j)] == NEGATIVE) { + _li = _pos->index(_prev->vertex(j)); + return; + } + } + CGAL_triangulation_assertion(false); + return; + default: + CGAL_triangulation_assertion(false); + return; + } + } + + // The target lies inside this cell. + CGAL_triangulation_assertion(incell); + _done = true; + return; + } + case 2: { + int inf; + if (_pos->has_vertex(_tr->infinite_vertex(), inf) && inf < 3) { + // If this cell was reached by traversal from a finite one, it must be the final cell. + Cell_handle fin = _pos->neighbor(inf); + if (fin == _prev) { + _done = true; + return; + } + + // Check the neighboring cells. + if (coplanar_orientation(_source, _pos->vertex(_tr->ccw(inf))->point(), _pos->vertex(_tr->cw(inf))->point(), _target) == NEGATIVE) { + Cell_handle tmp = _pos->neighbor(_tr->cw(inf)); + _prev = _pos; + _pos = tmp; + return; + } + if (coplanar_orientation(_source, _pos->vertex(_tr->cw(inf))->point(), _pos->vertex(_tr->ccw(inf))->point(), _target) == NEGATIVE) { + Cell_handle tmp = _pos->neighbor(_tr->ccw(inf)); + _prev = _pos; + _pos = tmp; + return; + } + if (coplanar_orientation(_pos->vertex(_tr->ccw(inf))->point(), _pos->vertex(_tr->cw(inf))->point(), _source, _target) != POSITIVE) { + _prev = _pos; + _pos = fin; + return; + } + + // The target lies in this infinite cell. + _done = true; + return; + } + + const Point* pts[3] = {&(_pos->vertex(0)->point()), + &(_pos->vertex(1)->point()), + &(_pos->vertex(2)->point())}; + + switch (_lt) { + case Tr::VERTEX: { + // First we try the incident edges. + Orientation ocw = coplanar_orientation(*pts[_li], *pts[(_li+2)%3], *pts[(_li+1)%3], _target); + if (_pos->neighbor((_li+1)%3) != _prev && + ocw == NEGATIVE) { + Cell_handle tmp = _pos->neighbor((_li+1)%3); + _prev = _pos; + _pos = tmp; + _li = _pos->index(_prev->vertex(_li)); + return; + } + Orientation occw = coplanar_orientation(*pts[_li], *pts[(_li+1)%3], *pts[(_li+2)%3], _target); + if (_pos->neighbor((_li+2)%3) != _prev && + occw == NEGATIVE) { + Cell_handle tmp = _pos->neighbor((_li+2)%3); + _prev = _pos; + _pos = tmp; + _li = _pos->index(_prev->vertex(_li)); + return; + } + + // Then we try the opposite edge. + if (coplanar_orientation(*pts[(_li+1)%3], *pts[(_li+2)%3], *pts[_li], _target) == NEGATIVE) { + Cell_handle tmp = _pos->neighbor(_li); + _prev = _pos; + _pos = tmp; + + switch (ocw+occw) { + case 2: { + _lt = Tr::EDGE; + _li = _pos->index(_prev->vertex((_li+1)%3)); + _lj = _pos->index(_prev->vertex((_li+2)%3)); + return; + } + case 1: { + _lt = Tr::VERTEX; + if (ocw == COLLINEAR) _li = _pos->index(_prev->vertex((_li+2)%3)); + else _li = _pos->index(_prev->vertex((_li+1)%3)); + return; + } + default: + CGAL_triangulation_assertion(false); + return; + } + } + + // The target lies in this cell. + _done = true; + return; + } + case Tr::EDGE: { + int lk = 3-_li-_lj; + + if (_pos->neighbor(lk) != _prev) { + // Check the edge itself + switch (coplanar_orientation(*pts[_li], *pts[_lj], *pts[lk], _target)) { + case COLLINEAR: { + // The target lies in this cell. + _done = true; + return; + } + case NEGATIVE: { + // The target lies opposite of the edge. + Cell_handle tmp = _pos->neighbor(lk); + _prev = _pos; + _pos = tmp; + _li = _pos->index(_prev->vertex(_li)); + _lj = _pos->index(_prev->vertex(_lj)); + return; + } + default: + break; + } + } + + Orientation o = coplanar_orientation(_source, *pts[lk], *pts[_li], _target); + switch (o) { + case POSITIVE: { + // The ray passes through the edge ik. + if (coplanar_orientation(*pts[lk], *pts[_li], _source, _target) == NEGATIVE) { + Cell_handle tmp = _pos->neighbor(_lj); + _prev = _pos; + _pos = tmp; + + if (collinear(_source, *pts[_li], _target)) { + _lt = Tr::VERTEX; + _li = _pos->index(_prev->vertex(_li)); + } + else { + _lt = Tr::EDGE; + _li = _pos->index(_prev->vertex(_li)); + _lj = _pos->index(_prev->vertex(lk)); + } + return; + } + break; + } + default: { + // The ray passes through the edge jk. + if (coplanar_orientation(*pts[lk], *pts[_lj], _source, _target) == NEGATIVE) { + Cell_handle tmp = _pos->neighbor(_li); + _prev = _pos; + _pos = tmp; + + if (collinear(_source, *pts[_lj], _target)) { + _lt = Tr::VERTEX; + _li = _pos->index(_prev->vertex(_lj)); + } + else if (o == COLLINEAR) { + _lt = Tr::VERTEX; + _li = _pos->index(_prev->vertex(lk)); + } + else { + _lt = Tr::EDGE; + _li = _pos->index(_prev->vertex(lk)); + _lj = _pos->index(_prev->vertex(_lj)); + } + return; + } + break; + } + } + + // The target lies in this cell. + _done = true; + return; + } + case Tr::FACET: { + // We test its edges in a random order until we find a neighbor to go further + int li = rng.get_int(0, 3); + + Orientation o[3]; + bool calc[3] = {false, false, false}; + + for (int j = 0; j != 3; ++j, li = (li+1)%3) { + Cell_handle next = _pos->neighbor(li); + if (next == _prev) + continue; + + // The target should lie on the other side of the edge. + if (coplanar_orientation(*pts[(li+1)%3], *pts[(li+2)%3], *pts[li], _target) != NEGATIVE) + continue; + + // The target should lie inside the wedge. + if (!calc[(li+1)%3]) { + o[(li+1)%3] = coplanar_orientation(_source, *pts[(li+1)%3], *pts[(li+2)%3], _target); + calc[(li+1)%3] = true; + } + if (o[(li+1)%3] == NEGATIVE) continue; + + if (!calc[(li+2)%3]) { + o[(li+2)%3] = coplanar_orientation(_source, *pts[(li+2)%3], *pts[(li+1)%3], _target); + calc[(li+2)%3] = true; + } + if (o[(li+2)%3] == POSITIVE) continue; + + _prev = _pos; + _pos = next; + + switch (o[(li+1)%3]+o[(li+2)%3]) { + case 2: { + _lt = Tr::EDGE; + _li = _pos->index(_prev->vertex((li+1)%3)); + _lj = _pos->index(_prev->vertex((li+2)%3)); + return; + } + case 1: { + _lt = Tr::VERTEX; + if (o[(li+1)%3] == COLLINEAR) _li = _pos->index(_prev->vertex((li+1)%3)); + else _li = _pos->index(_prev->vertex((li+2)%3)); + return; + } + default: + CGAL_triangulation_assertion(false); + return; + } + } + + // The target lies in this cell. + _done = true; + return; + } + default: + CGAL_triangulation_assertion(false); + } + } + } +} + +CGAL_END_NAMESPACE + +#endif // CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_H \ No newline at end of file diff --git a/Conforming_triangulation_3/package_info/Conforming_triangulation_3/copyright b/Conforming_triangulation_3/package_info/Conforming_triangulation_3/copyright new file mode 100644 index 00000000000..dea96f89cdd --- /dev/null +++ b/Conforming_triangulation_3/package_info/Conforming_triangulation_3/copyright @@ -0,0 +1,2 @@ +Utrecht University (The Netherlands) & INRIA Sophia-Antipolis (France) + diff --git a/Conforming_triangulation_3/package_info/Conforming_triangulation_3/description.txt b/Conforming_triangulation_3/package_info/Conforming_triangulation_3/description.txt new file mode 100644 index 00000000000..64a95593a98 --- /dev/null +++ b/Conforming_triangulation_3/package_info/Conforming_triangulation_3/description.txt @@ -0,0 +1,3 @@ +Package Conforming_triangulation_3 : +conforming triangulation data structure +this can be wrapped around any CGAL::Triangulation_3, usually CGAL::Delaunay_triangulation_3 diff --git a/Conforming_triangulation_3/package_info/Conforming_triangulation_3/license.txt b/Conforming_triangulation_3/package_info/Conforming_triangulation_3/license.txt new file mode 100644 index 00000000000..8bb8efcb72b --- /dev/null +++ b/Conforming_triangulation_3/package_info/Conforming_triangulation_3/license.txt @@ -0,0 +1 @@ +GPL (v3 or later) diff --git a/Conforming_triangulation_3/package_info/Conforming_triangulation_3/maintainer b/Conforming_triangulation_3/package_info/Conforming_triangulation_3/maintainer new file mode 100644 index 00000000000..8dc617e8bb8 --- /dev/null +++ b/Conforming_triangulation_3/package_info/Conforming_triangulation_3/maintainer @@ -0,0 +1 @@ +Thijs van Lankveld From df34cc6408f7405f51939d279e59b4d28f3591f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 7 Mar 2013 08:24:51 +0100 Subject: [PATCH 002/138] add an example --- .../conforming_gabriel_3.cpp | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 Conforming_triangulation_3/example/Conforming_triangulation_3/conforming_gabriel_3.cpp diff --git a/Conforming_triangulation_3/example/Conforming_triangulation_3/conforming_gabriel_3.cpp b/Conforming_triangulation_3/example/Conforming_triangulation_3/conforming_gabriel_3.cpp new file mode 100644 index 00000000000..c410f402102 --- /dev/null +++ b/Conforming_triangulation_3/example/Conforming_triangulation_3/conforming_gabriel_3.cpp @@ -0,0 +1,92 @@ +#include +#include +#include + + +typedef CGAL::Exact_predicates_exact_constructions_kernel K; +typedef K::Point_3 Point_3; + +typedef CGAL::Triangulation_vertex_base_with_info_3 > Vb; +typedef CGAL::Conforming_triangulation_cell_base_3 Cb; +typedef CGAL::Triangulation_data_structure_3 < Vb, Cb > Tds; + +typedef CGAL::Conforming_Delaunay_triangulation_3< K, Tds > CDT3; + + +template +std::ptrdiff_t insert_with_info(Triangulation& t, InputIterator first,InputIterator last) +{ + typedef typename Triangulation::Geom_traits Geom_traits; + typedef typename Triangulation::Vertex_handle Vertex_handle; + + std::size_t n = t.number_of_vertices(); + std::vector indices; + std::vector points; + std::vector infos; + std::ptrdiff_t index=0; + for (InputIterator it=first;it!=last;++it){ + std::pair value=*it; + points.push_back( value.first ); + infos.push_back ( value.second ); + indices.push_back(index++); + } + + typedef CGAL::Spatial_sort_traits_adapter_3 Search_traits; + + CGAL::spatial_sort(indices.begin(),indices.end(),Search_traits(&(points[0]),Geom_traits())); + + Vertex_handle hint; + for (typename std::vector::const_iterator + it = indices.begin(), end = indices.end(); + it != end; ++it){ + hint = t.insert(points[*it], hint); + if (hint!=Vertex_handle()) hint->info()=infos[*it]; + } + + return t.number_of_vertices() - n; +} + +int main() +{ + + std::vector< std::pair > points; + points.push_back( std::make_pair(Point_3(0,0,0),0) ); + points.push_back( std::make_pair(Point_3(1,0,0),1) ); + points.push_back( std::make_pair(Point_3(0,1,0),2) ); + points.push_back( std::make_pair(Point_3(0.2,0.2,100),3) ); + points.push_back( std::make_pair(Point_3(0.2,0.2,-100),4) ); + + + std::vector< std::pair > constraints; + constraints.push_back( std::make_pair(0,1) ); + constraints.push_back( std::make_pair(0,2) ); + constraints.push_back( std::make_pair(1,2) ); + constraints.push_back( std::make_pair(3,4) ); + + CDT3 cdt3; + insert_with_info( cdt3, points.begin(), points.end() ); + + + std::vector< CDT3::Vertex_handle > vertices( points.size() ); + + for (CDT3::Finite_vertices_iterator vit=cdt3.finite_vertices_begin(), + vit_end=cdt3.finite_vertices_end();vit!=vit_end;++vit) + { + vertices[ vit->info() ]=vit; + } + + std::cout << cdt3.number_of_vertices() << std::endl; + + for (std::vector< std::pair >::iterator cst_it=constraints.begin(), + cst_end=constraints.end(); + cst_it!=cst_end; ++cst_it) + { + cdt3.insert_conforming( std::make_pair(vertices[cst_it->first], vertices[cst_it->second]) ); + } + + + for(CDT3::Finite_edges_iterator it=cdt3.finite_edges_begin(); it!=cdt3.finite_edges_end(); ++it) + if ( it->first->vertex(it->second)->steiner() || it->first->vertex(it->third)->steiner() ) + std::cout << "edge with steiner endpoint" << std::endl; +} + From c8dd6a5b7a0df1051744e50749015e1f30a86e4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 7 Mar 2013 08:25:40 +0100 Subject: [PATCH 003/138] make the code compiling with g++ --- .../Conforming_Delaunay_triangulation_3.h | 75 +++++++++---------- .../CGAL/Delaunay_triangulation_utils_3.h | 10 ++- .../include/CGAL/Encroaching_collecter_3.h | 18 ++++- .../CGAL/Triangulation_segment_traverser_3.h | 10 +-- 4 files changed, 64 insertions(+), 49 deletions(-) diff --git a/Conforming_triangulation_3/include/CGAL/Conforming_Delaunay_triangulation_3.h b/Conforming_triangulation_3/include/CGAL/Conforming_Delaunay_triangulation_3.h index c981418b4fe..810312507fc 100644 --- a/Conforming_triangulation_3/include/CGAL/Conforming_Delaunay_triangulation_3.h +++ b/Conforming_triangulation_3/include/CGAL/Conforming_Delaunay_triangulation_3.h @@ -35,12 +35,6 @@ CGAL_BEGIN_NAMESPACE -#ifndef CGAL_CONSTRAINED_TRIANGULATION_2_H -struct No_intersection_tag{}; -struct Exact_intersections_tag{}; // To be used with an exact number type. -struct Exact_predicates_tag{}; // To be used with filtered exact number type. -#endif - template < class Tr > class Natural_neighbors_3; template < class Gt, @@ -48,14 +42,14 @@ template < class Gt, Conforming_triangulation_cell_base_3 >, class Itag = No_intersection_tag > class Conforming_Delaunay_triangulation_3: public Delaunay_triangulation_utils_3 { - typedef Triangulation_data_structure Tds; + //typedef Triangulation_data_structure Tds; typedef Conforming_Delaunay_triangulation_3 cDT; typedef Delaunay_triangulation_utils_3 DT; typedef Triangulation_3 Tr; friend class Natural_neighbors_3; - + typedef typename Gt::Line_3 Line; public: typedef Tds Triangulation_data_structure; typedef Gt Geom_traits; @@ -132,6 +126,11 @@ public: using DT::coplanar; using DT::coplanar_orientation; using DT::orientation; + using DT::is_infinite; + using DT::finite_incident_edges; + using DT::incident_cells; + using DT::insert_in_conflict; + using DT::is_valid_finite; #endif protected: @@ -200,7 +199,7 @@ protected: friend class Conflict_tester_3; friend class Conflict_tester_2; - friend class Encroaching_collecter; + friend class Encroaching_collecter_3; Conforming_visitor conforming_visitor; @@ -229,7 +228,7 @@ public: template < class InputIterator > Conforming_Delaunay_triangulation_3(InputIterator begin, InputIterator end, const Gt& gt = Gt()): DT(gt), conforming_visitor(this) { - insert_conforming(first, last); + insert_conforming(begin, end); CGAL_triangulation_postcondition(is_valid()); } @@ -246,7 +245,7 @@ protected: // Compute the intersection of ab with either a line (edge) or plane (facet). bool compute_intersection(Locate_type lt, Cell_handle c, int li, int lj, Vertex_handle va, Vertex_handle vb, Point& p) const { - if (lt == EDGE) + if (lt == DT::EDGE) return compute_intersection(Line(va->point(), vb->point()), Line(c->vertex(li)->point(), c->vertex(lj)->point()), p); else @@ -368,7 +367,7 @@ private: template < class Gt, class Tds, class Itag > typename Conforming_Delaunay_triangulation_3::Vertex_handle Conforming_Delaunay_triangulation_3:: -intersect(Cell_handle c, Locate_type lt, int li, int lj, Vertex_handle va, Vertex_handle vb, No_intersection_tag) { +intersect(Cell_handle /* c */, Locate_type /* lt */, int /* li */, int /* lj */, Vertex_handle /* va */, Vertex_handle /* vb */, No_intersection_tag) { std::cerr << " sorry, this triangulation does not deal with" << std::endl << " intersecting conforming edges" << std::endl; CGAL_triangulation_assertion(false); @@ -407,7 +406,7 @@ intersect(Cell_handle c, Locate_type lt, int li, int lj, Vertex_handle va, Verte // Return the vertex closest to the intersection. Vertex_handle closest; switch (lt) { - case EDGE: { + case DT::EDGE: { Line ab(va->point(), vb->point()); Line ij(c->vertex(li)->point(), c->vertex(lj)->point()); FT dist2 = squared_distance(va->point(), ij); @@ -419,7 +418,7 @@ intersect(Cell_handle c, Locate_type lt, int li, int lj, Vertex_handle va, Verte if (di < dist2) {dist2 = di; closest = c->vertex(li);} if (dj < dist2) {dist2 = dj; closest = c->vertex(lj);} } - case FACET: { + case DT::FACET: { Line ab(va->point(), vb->point()); Plane p = plane(c, li); FT dist2 = squared_distance(va->point(), p); @@ -632,7 +631,7 @@ insert_marked(Vertex_handle va, Vertex_handle vb) { } template < class Gt, class Tds, class Itag > -void typename Conforming_Delaunay_triangulation_3:: +void Conforming_Delaunay_triangulation_3:: set_conforming(Cell_handle c, int li, int lj, bool C) { // The cell is already in the triangulation, so the edge is already Delaunay. Vertex_handle vi = c->vertex(li), vj = c->vertex(lj); @@ -660,7 +659,7 @@ set_conforming(Cell_handle c, int li, int lj, bool C) { } template < class Gt, class Tds, class Itag > -void typename Conforming_Delaunay_triangulation_3:: +void Conforming_Delaunay_triangulation_3:: mark_edge(Cell_handle c, int li, int lj) { // The cell is already in the triangulation, so the edge is already Delaunay. Vertex_handle vi = c->vertex(li), vj = c->vertex(lj); @@ -689,14 +688,14 @@ mark_edge(Cell_handle c, int li, int lj) { template < class Gt, class Tds, class Itag > template < class InputIterator > -int typename Conforming_Delaunay_triangulation_3:: +int Conforming_Delaunay_triangulation_3:: insert_conforming_loop(InputIterator begin, InputIterator end, Cell_handle hint) { // Insert the points in the loop. std::list segments; insert_loop_points(begin, end, std::back_inserter(segments), hint); // Insert the segments in the loop. - for (std::list::iterator it = segments.begin(); it != segments.end(); ++it) + for (typename std::list::iterator it = segments.begin(); it != segments.end(); ++it) insert_conforming(*it); return segments.size(); @@ -704,14 +703,14 @@ insert_conforming_loop(InputIterator begin, InputIterator end, Cell_handle hint) template < class Gt, class Tds, class Itag > template < class InputIterator > -int typename Conforming_Delaunay_triangulation_3:: +int Conforming_Delaunay_triangulation_3:: insert_marked_loop(InputIterator begin, InputIterator end, Cell_handle hint) { // Insert the points in the loop. std::list segments; insert_loop_points(begin, end, std::back_inserter(segments), hint); // Insert the segments in the loop. - for (std::list::iterator it = segments.begin(); it != segments.end(); ++it) + for (typename std::list::iterator it = segments.begin(); it != segments.end(); ++it) insert_marked(*it); return segments.size(); @@ -719,14 +718,14 @@ insert_marked_loop(InputIterator begin, InputIterator end, Cell_handle hint) { template < class Gt, class Tds, class Itag > template < class InputIterator > -int typename Conforming_Delaunay_triangulation_3:: +int Conforming_Delaunay_triangulation_3:: remove_conforming_loop(InputIterator begin, InputIterator end, Cell_handle hint) { // Insert the points in the loop. std::list segments; insert_loop_points(begin, end, std::back_inserter(segments), hint); // Insert the segments in the loop. - for (std::list::iterator it = segments.begin(); it != segments.end(); ++it) + for (typename std::list::iterator it = segments.begin(); it != segments.end(); ++it) remove_conforming(*it); return segments.size(); @@ -734,7 +733,7 @@ remove_conforming_loop(InputIterator begin, InputIterator end, Cell_handle hint) template < class Gt, class Tds, class Itag > template < class InputIterator, class OutputIterator > -void typename Conforming_Delaunay_triangulation_3:: +void Conforming_Delaunay_triangulation_3:: insert_loop_points(InputIterator begin, InputIterator end, OutputIterator out, Cell_handle hint) { if (begin == end) return; @@ -778,12 +777,12 @@ Conforming_Delaunay_triangulation_3:: insert(const Point& p, Locate_type lt, Cell_handle c, int li, int lj) { switch (dimension()) { case 3: { - Conflict_tester_3 tester(p, this); + typename DT::Conflict_tester_3 tester(p, this); Vertex_handle v = insert_in_conflict(p, lt, c, li, lj, tester, conforming_visitor); return v; } // dim 3 case 2: { - Conflict_tester_2 tester(p, this); + typename DT::Conflict_tester_2 tester(p, this); Vertex_handle v = insert_in_conflict(p, lt, c, li, lj, tester, conforming_visitor); return v; } // dim 2 @@ -821,10 +820,10 @@ insert_conforming(InputIterator begin, InputIterator end, Cell_handle hint) { } // Insert the segments - for (std::list::iterator it = segment.begin(); it != segments.end(); ++it) + for (typename std::list::iterator it = segments.begin(); it != segments.end(); ++it) insert_conforming(*it); - return segment.size(); + return segments.size(); } template < class Gt, class Tds, class Itag > @@ -839,7 +838,7 @@ remove(Vertex_handle v) { incident_cells(v, std::back_inserter(cells)); std::vector boundary; boundary.reserve(cells.size()); - for (std::vector::const_iterator it = cells.begin(); it != cells.end(); ++it) { + for (typename std::vector::const_iterator it = cells.begin(); it != cells.end(); ++it) { Cell_handle n = (*it)->neighbor((*it)->index(v)); boundary.push_back(Facet(n, n->index(*it))); } @@ -852,14 +851,14 @@ remove(Vertex_handle v) { } else { #endif cDT tmp; - Vertex_remover remover(tmp); + typename DT::Vertex_remover remover(tmp); Tr::remove(v, remover); #ifdef CGAL_DELAUNAY_3_OLD_REMOVE } #endif // Reinsert any conforming edges on the boundary of the retriangulated region. - for (std::vector::iterator it = boundary.begin(); it != boundary.end(); ++it) { + for (typename std::vector::iterator it = boundary.begin(); it != boundary.end(); ++it) { restore_conforming(mirror_facet(*it)); } @@ -911,7 +910,7 @@ are_there_incident_conforming(Vertex_handle v) const { std::vector edges; edges.reserve(32); finite_incident_edges(v, std::back_inserter(edges)); - for (std::vector::iterator it = edges.begin(); it != edges.end(); ++it) + for (typename std::vector::iterator it = edges.begin(); it != edges.end(); ++it) if (is_conforming(*it)) return true; } @@ -931,7 +930,7 @@ includes_edge(Vertex_handle va, Vertex_handle vb, Vertex_handle& vc, Cell_handle Vertex_handle v; std::vector edges; edges.reserve(64); finite_incident_edges(va, std::back_inserter(edges)); - for (std::vector::const_iterator it = edges.begin(); it != edges.end(); ++it) { + for (typename std::vector::const_iterator it = edges.begin(); it != edges.end(); ++it) { // Find the other vertex of the edge. v = it->first->vertex(it->second); if (v == va) v = it->first->vertex(it->third); @@ -982,7 +981,7 @@ is_valid(bool verbose, int level) const { Vertex_handle v1, v2; switch (dimension()) { case 3: { - for (All_cells_iterator it = all_cells_begin(); it != all_cells_end(); ++it) { + for (All_cells_iterator it = this->all_cells_begin(); it != this->all_cells_end(); ++it) { for (int i = 0; i < 4; ++i) { if (!it->neighbor(i)->has_neighbor(it)) { if (verbose) @@ -1008,7 +1007,7 @@ is_valid(bool verbose, int level) const { for (int i = 0; i < 4; ++i) { n = it->neighbor(i); if (!is_infinite(n->vertex(n->index(it)))) { - if (side_of_sphere(it, n->vertex(n->index(it))->point()) == ON_BOUNDED_SIDE) { + if (this->side_of_sphere(it, n->vertex(n->index(it))->point()) == ON_BOUNDED_SIDE) { if (verbose) std::cerr << "non-empty sphere " << std::endl; CGAL_triangulation_assertion(false); @@ -1044,7 +1043,7 @@ is_valid(bool verbose, int level) const { break; } case 2: { - for (All_facets_iterator it = all_facets_begin(); it != all_facets_end(); ++it) { + for (typename DT::All_facets_iterator it = this->all_facets_begin(); it != this->all_facets_end(); ++it) { for (int i = 0; i < 3; ++i) { if (!it->first->neighbor(i)->has_neighbor(it->first)) { if (verbose) @@ -1070,7 +1069,7 @@ is_valid(bool verbose, int level) const { for (int i = 0; i < 3; ++i) { n = it->first->neighbor(i); if(!is_infinite(n->vertex(n->index(it->first)))) { - if (side_of_circle(it->first, 3, n->vertex(n->index(it->first))->point()) == ON_BOUNDED_SIDE) { + if (this->side_of_circle(it->first, 3, n->vertex(n->index(it->first))->point()) == ON_BOUNDED_SIDE) { if (verbose) std::cerr << "non-empty circle " << std::endl; CGAL_triangulation_assertion(false); @@ -1078,7 +1077,7 @@ is_valid(bool verbose, int level) const { } } - Edge o = opposite_edge(it->first, i, 3); + Edge o = this->opposite_edge(it->first, i, 3); if (o.first->is_marked(o.second, o.third)) { if (verbose) std::cerr << "marked edge " << std::endl; @@ -1217,7 +1216,7 @@ collect_encroaching(Vertex_handle va, Vertex_handle vb, OutputIterator encroachi cit.traversed(lt, li, lj); // Stop when either a new vertex is reached, or a barrier (a conforming edge) is encountered. - if (lt == VERTEX) { + if (lt == DT::VERTEX) { vc = cit->vertex(li); if (va == vc) continue; diff --git a/Conforming_triangulation_3/include/CGAL/Delaunay_triangulation_utils_3.h b/Conforming_triangulation_3/include/CGAL/Delaunay_triangulation_utils_3.h index c9442b475dc..831c49b70fc 100644 --- a/Conforming_triangulation_3/include/CGAL/Delaunay_triangulation_utils_3.h +++ b/Conforming_triangulation_3/include/CGAL/Delaunay_triangulation_utils_3.h @@ -29,7 +29,7 @@ #include #include -#include "CCDT/Triangulation_segment_traverser_3.h" +#include CGAL_BEGIN_NAMESPACE @@ -40,7 +40,7 @@ template < class Gt, class Tds > class Triangulation_cell_traverser_3; template < class Gt, class Tds = Triangulation_data_structure_3 < Triangulation_vertex_base_3, Triangulation_cell_base_3 > > class Delaunay_triangulation_utils_3: public Delaunay_triangulation_3 { - typedef Triangulation_data_structure Tds; + //typedef Triangulation_data_structure Tds; typedef Delaunay_triangulation_utils_3 Self; typedef Delaunay_triangulation_3 DT; @@ -121,6 +121,10 @@ public: using DT::side_of_segment; using DT::tds; using DT::vertex_triple_index; + using DT::locate; + using DT::insert_in_conflict; + using DT::is_infinite; + using DT::insert; #endif protected: @@ -279,7 +283,7 @@ public: spatial_sort(points.begin(), points.end(), geom_traits()); Cell_handle hint; - for (std::vector::const_iterator it = points.begin(), end = points.end(); it != end; ++it) + for (typename std::vector::const_iterator it = points.begin(), end = points.end(); it != end; ++it) hint = insert(*it, hint)->cell(); return number_of_vertices() - n; diff --git a/Conforming_triangulation_3/include/CGAL/Encroaching_collecter_3.h b/Conforming_triangulation_3/include/CGAL/Encroaching_collecter_3.h index a60becee1c8..f0b936df306 100644 --- a/Conforming_triangulation_3/include/CGAL/Encroaching_collecter_3.h +++ b/Conforming_triangulation_3/include/CGAL/Encroaching_collecter_3.h @@ -23,14 +23,20 @@ #define CGAL_ENCROACHING_COLLECTER_3_H #include "Triangulation_segment_traverser_3.h" -//#include "Conforming_Delaunay_triangulation_3.h" CGAL_BEGIN_NAMESPACE +#ifndef CGAL_CONSTRAINED_TRIANGULATION_2_H +/// \todo factorize with CDT2 +struct No_intersection_tag{}; +struct Exact_intersections_tag{}; // To be used with an exact number type. +struct Exact_predicates_tag{}; // To be used with filtered exact number type. +#endif + template < class Gt, class Tds, class Itag > class Conforming_Delaunay_triangulation_3; -template < class Gt, class Tds, class Itag = No_intersection_tag, class Out = std::back_insert_iterator>>> +template < class Gt, class Tds, class Itag = No_intersection_tag, class Out = std::back_insert_iterator > > > class Encroaching_collecter_3: public Triangulation_segment_traverser_3 { typedef Encroaching_collecter_3 Self; typedef Triangulation_segment_traverser_3 Base; @@ -54,7 +60,13 @@ public: typedef typename Gt::Point_3 Point; typedef typename CDT::Locate_type Locate_type; typedef typename CDT::Bi_vertex Bi_vertex; - + using Base::_lt; + using Base::_tr; + using Base::_pos; + using Base::_li; + using Base::_lj; + using Base::_source; + using Base::_target; protected: Out _out; diff --git a/Conforming_triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Conforming_triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index fb0506a89ef..9a6e007d391 100644 --- a/Conforming_triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Conforming_triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -380,7 +380,7 @@ void Triangulation_segment_traverser_3::increment() { // Check if the target is inside the pyramid. int lj = rng.template get_bits<2>(); - int or = 0; + int Or = 0; for (int l = 0; l < 4; ++l, lj = (lj+1)&3) { if (li == lj) continue; @@ -396,7 +396,7 @@ void Triangulation_segment_traverser_3::increment() { calc[oij] = true; } - or -= o[oij]; + Or -= o[oij]; if (o[oij] == POSITIVE) { // The target is not inside the pyramid. // Invert the planes. @@ -408,12 +408,12 @@ void Triangulation_segment_traverser_3::increment() { int oij = 5 - edgeIndex(li, j); o[oij] = -o[oij]; } - or = 0; + Or = 0; break; } } - if (or == 0) { + if (Or == 0) { // Either the target is not inside the pyramid, // or the pyramid is degenerate. pts[li] = backup; @@ -424,7 +424,7 @@ void Triangulation_segment_traverser_3::increment() { _prev = _pos; _pos = next; - switch (or) { + switch (Or) { case 3: _lt = Tr::FACET; _li = _pos->index(_prev); From 3af62e50e6566a3d8df4a3a4295faa3cc09e7058 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 7 Mar 2013 08:30:53 +0100 Subject: [PATCH 004/138] add a function to make constraints conforming Gabriel --- .../Conforming_Delaunay_triangulation_3.h | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/Conforming_triangulation_3/include/CGAL/Conforming_Delaunay_triangulation_3.h b/Conforming_triangulation_3/include/CGAL/Conforming_Delaunay_triangulation_3.h index 810312507fc..6573e728214 100644 --- a/Conforming_triangulation_3/include/CGAL/Conforming_Delaunay_triangulation_3.h +++ b/Conforming_triangulation_3/include/CGAL/Conforming_Delaunay_triangulation_3.h @@ -263,7 +263,9 @@ protected: Point construct_split_point(Vertex_handle va, Vertex_handle vb, const Point& ref); protected: - // Conform an edge to important encroaching points. + // Conform an edge to important encroaching points. + // The boolean indicates whether the edge should be made conforming Gabriel + template void conform_segment(Vertex_handle va, Vertex_handle vb, Points_iterator encr_begin, Points_iterator encr_end); // Mark a segment that it is assumed to already be in the triangulation. @@ -294,7 +296,9 @@ public: // Insert a conforming segment. void insert_conforming(Vertex_handle va, Vertex_handle vb) { - Point_list encr; conform_segment(va, vb, encr.begin(), encr.end());} + Point_list encr; conform_segment(va, vb, encr.begin(), encr.end());} + void insert_conforming_Gabriel(Vertex_handle va, Vertex_handle vb) { + Point_list encr; conform_segment(va, vb, encr.begin(), encr.end());} void insert_conforming(const Bi_vertex& c) { insert_conforming(c.first, c.second);} void insert_conforming(const Point& a, const Point& b, Cell_handle hint = Cell_handle()); @@ -533,6 +537,7 @@ construct_split_point(Vertex_handle va, Vertex_handle vb, const Point& ref) { } template < class Gt, class Tds, class Itag > +template void Conforming_Delaunay_triangulation_3:: conform_segment(Vertex_handle va, Vertex_handle vb, Points_iterator encr_begin, Points_iterator encr_end) { CGAL_triangulation_precondition(va != vb); @@ -547,7 +552,7 @@ conform_segment(Vertex_handle va, Vertex_handle vb, Points_iterator encr_begin, Vertex_handle vi; Cell_handle c; int li, lj; - while (includes_edge(va, vb, vi, c, li, lj)) { + while (includes_edge(va, vb, vi, c, li, lj) && (!make_gabriel || this->is_Gabriel(c, li, lj) ) ) { set_conforming(c, li, lj, true); va = vi; if (va == vb) @@ -569,9 +574,9 @@ conform_segment(Vertex_handle va, Vertex_handle vb, Points_iterator encr_begin, } // Insert ai, and if needed ib. - conform_segment(va, vi, encroaching.begin(), encroaching.end()); + conform_segment(va, vi, encroaching.begin(), encroaching.end()); if (vi != vb) { - conform_segment(vi, vb, encr_begin, encr_end); + conform_segment(vi, vb, encr_begin, encr_end); } return; } @@ -600,8 +605,8 @@ conform_segment(Vertex_handle va, Vertex_handle vb, Points_iterator encr_begin, Points_iterator after_sb = sort_encroaching(after_as, encr_end, vs->point(), vb->point()); // Insert the segments on both sides of s as constraints. - conform_segment(va, vs, encr_begin, after_as); - conform_segment(vs, vb, after_as, after_sb); + conform_segment(va, vs, encr_begin, after_as); + conform_segment(vs, vb, after_as, after_sb); } template < class Gt, class Tds, class Itag > From be8baffe3b5bb18ababebc631bd9e7d2a88cbf15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 7 Mar 2013 08:35:50 +0100 Subject: [PATCH 005/138] update example to use make Gabriel conforming function --- .../conforming_gabriel_3.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/Conforming_triangulation_3/example/Conforming_triangulation_3/conforming_gabriel_3.cpp b/Conforming_triangulation_3/example/Conforming_triangulation_3/conforming_gabriel_3.cpp index c410f402102..103d12e13e9 100644 --- a/Conforming_triangulation_3/example/Conforming_triangulation_3/conforming_gabriel_3.cpp +++ b/Conforming_triangulation_3/example/Conforming_triangulation_3/conforming_gabriel_3.cpp @@ -77,14 +77,27 @@ int main() std::cout << cdt3.number_of_vertices() << std::endl; + std::cout << "Making Delaunay conform" << std::endl; for (std::vector< std::pair >::iterator cst_it=constraints.begin(), cst_end=constraints.end(); cst_it!=cst_end; ++cst_it) { cdt3.insert_conforming( std::make_pair(vertices[cst_it->first], vertices[cst_it->second]) ); } - - + + + for(CDT3::Finite_edges_iterator it=cdt3.finite_edges_begin(); it!=cdt3.finite_edges_end(); ++it) + if ( it->first->vertex(it->second)->steiner() || it->first->vertex(it->third)->steiner() ) + std::cout << "edge with steiner endpoint" << std::endl; + + std::cout << "Making Gabriel conform" << std::endl; + for (std::vector< std::pair >::iterator cst_it=constraints.begin(), + cst_end=constraints.end(); + cst_it!=cst_end; ++cst_it) + { + cdt3.insert_conforming_Gabriel( vertices[cst_it->first], vertices[cst_it->second] ); + } + for(CDT3::Finite_edges_iterator it=cdt3.finite_edges_begin(); it!=cdt3.finite_edges_end(); ++it) if ( it->first->vertex(it->second)->steiner() || it->first->vertex(it->third)->steiner() ) std::cout << "edge with steiner endpoint" << std::endl; From 4f11b90d2e2b268fc41771f866a5bf115943dd61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 7 Mar 2013 08:40:28 +0100 Subject: [PATCH 006/138] CGAL NAMESPACE macro is deprecated --- .../include/CGAL/Conforming_Delaunay_triangulation_3.h | 4 ++-- .../include/CGAL/Conforming_triangulation_cell_base_3.h | 4 ++-- .../include/CGAL/Conforming_triangulation_vertex_base_3.h | 4 ++-- .../include/CGAL/Delaunay_triangulation_utils_3.h | 4 ++-- .../include/CGAL/Encroaching_collecter_3.h | 4 ++-- .../include/CGAL/Triangulation_segment_traverser_3.h | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Conforming_triangulation_3/include/CGAL/Conforming_Delaunay_triangulation_3.h b/Conforming_triangulation_3/include/CGAL/Conforming_Delaunay_triangulation_3.h index 6573e728214..f9f150f0fe7 100644 --- a/Conforming_triangulation_3/include/CGAL/Conforming_Delaunay_triangulation_3.h +++ b/Conforming_triangulation_3/include/CGAL/Conforming_Delaunay_triangulation_3.h @@ -33,7 +33,7 @@ #include "Conforming_triangulation_vertex_base_3.h" #include "Encroaching_collecter_3.h" -CGAL_BEGIN_NAMESPACE +namespace CGAL { template < class Tr > class Natural_neighbors_3; @@ -1263,6 +1263,6 @@ sort_encroaching(Points_iterator begin, Points_iterator end, const Point& a, con return middle; } -CGAL_END_NAMESPACE +} //end of CGAL namespace #endif // CGAL_CONFORMING_DELAUNAY_TRIANGULATION_3_H \ No newline at end of file diff --git a/Conforming_triangulation_3/include/CGAL/Conforming_triangulation_cell_base_3.h b/Conforming_triangulation_3/include/CGAL/Conforming_triangulation_cell_base_3.h index 435baa885fe..936afbd0fe7 100644 --- a/Conforming_triangulation_3/include/CGAL/Conforming_triangulation_cell_base_3.h +++ b/Conforming_triangulation_3/include/CGAL/Conforming_triangulation_cell_base_3.h @@ -34,7 +34,7 @@ #include #include -CGAL_BEGIN_NAMESPACE +namespace CGAL { template < typename Gt, typename Cb = Triangulation_cell_base_3 > class Conforming_triangulation_cell_base_3: public Cb { @@ -174,6 +174,6 @@ std::ostream& Conforming_triangulation_cell_base_3::write_cell(std::ostr return os; } -CGAL_END_NAMESPACE +} //end of CGAL namespace #endif // CGAL_CONFORMING_TRIANGULATION_CELL_BASE_3_H \ No newline at end of file diff --git a/Conforming_triangulation_3/include/CGAL/Conforming_triangulation_vertex_base_3.h b/Conforming_triangulation_3/include/CGAL/Conforming_triangulation_vertex_base_3.h index bd1902b9fed..afd635b24c9 100644 --- a/Conforming_triangulation_3/include/CGAL/Conforming_triangulation_vertex_base_3.h +++ b/Conforming_triangulation_3/include/CGAL/Conforming_triangulation_vertex_base_3.h @@ -21,7 +21,7 @@ #include -CGAL_BEGIN_NAMESPACE +namespace CGAL { template < typename GT, typename Vb = Triangulation_vertex_base_3 > class Conforming_triangulation_vertex_base_3: public Vb { @@ -64,6 +64,6 @@ operator<<(std::ostream &os, const Conforming_triangulation_vertex_base_3 #include -CGAL_BEGIN_NAMESPACE +namespace CGAL { template < class DT > class Natural_neighbors_3; @@ -401,6 +401,6 @@ Delaunay_triangulation_utils_3::move_point(Vertex_handle v, const Point& return insert(p, old_neighbor->cell()); } -CGAL_END_NAMESPACE +} //end of CGAL namespace #endif // CGAL_DELAUNAY_TRIANGULATION_3_UTILS_H diff --git a/Conforming_triangulation_3/include/CGAL/Encroaching_collecter_3.h b/Conforming_triangulation_3/include/CGAL/Encroaching_collecter_3.h index f0b936df306..f371916bb11 100644 --- a/Conforming_triangulation_3/include/CGAL/Encroaching_collecter_3.h +++ b/Conforming_triangulation_3/include/CGAL/Encroaching_collecter_3.h @@ -24,7 +24,7 @@ #include "Triangulation_segment_traverser_3.h" -CGAL_BEGIN_NAMESPACE +namespace CGAL { #ifndef CGAL_CONSTRAINED_TRIANGULATION_2_H /// \todo factorize with CDT2 @@ -130,6 +130,6 @@ void Encroaching_collecter_3::increment() { } } -CGAL_END_NAMESPACE +} //end of CGAL namespace #endif // CGAL_ENCROACHING_COLLECTER_3_H \ No newline at end of file diff --git a/Conforming_triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Conforming_triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 9a6e007d391..fe2c13a2915 100644 --- a/Conforming_triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Conforming_triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -25,7 +25,7 @@ #include -CGAL_BEGIN_NAMESPACE +namespace CGAL { template < class Gt, class Tds> class Delaunay_triangulation_utils_3; @@ -690,6 +690,6 @@ void Triangulation_segment_traverser_3::increment() { } } -CGAL_END_NAMESPACE +} //end of CGAL namespace #endif // CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_H \ No newline at end of file From 2f7eb3aed59e04a726647d7150b2c07c738a3fe0 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 18 Jul 2013 11:05:26 +0200 Subject: [PATCH 007/138] Replace Tds by Tds_ as VC++ later messes it up with Delaunay_triangulation_3::Tds --- .../include/CGAL/Conforming_Delaunay_triangulation_3.h | 8 ++++---- .../include/CGAL/Delaunay_triangulation_utils_3.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Conforming_triangulation_3/include/CGAL/Conforming_Delaunay_triangulation_3.h b/Conforming_triangulation_3/include/CGAL/Conforming_Delaunay_triangulation_3.h index f9f150f0fe7..764c6e6b431 100644 --- a/Conforming_triangulation_3/include/CGAL/Conforming_Delaunay_triangulation_3.h +++ b/Conforming_triangulation_3/include/CGAL/Conforming_Delaunay_triangulation_3.h @@ -38,12 +38,12 @@ namespace CGAL { template < class Tr > class Natural_neighbors_3; template < class Gt, - class Tds = Triangulation_data_structure_3 < Conforming_triangulation_vertex_base_3, + class Tds_ = Triangulation_data_structure_3 < Conforming_triangulation_vertex_base_3, Conforming_triangulation_cell_base_3 >, class Itag = No_intersection_tag > -class Conforming_Delaunay_triangulation_3: public Delaunay_triangulation_utils_3 { +class Conforming_Delaunay_triangulation_3: public Delaunay_triangulation_utils_3 { //typedef Triangulation_data_structure Tds; - + typedef Tds_ Tds; typedef Conforming_Delaunay_triangulation_3 cDT; typedef Delaunay_triangulation_utils_3 DT; typedef Triangulation_3 Tr; @@ -1265,4 +1265,4 @@ sort_encroaching(Points_iterator begin, Points_iterator end, const Point& a, con } //end of CGAL namespace -#endif // CGAL_CONFORMING_DELAUNAY_TRIANGULATION_3_H \ No newline at end of file +#endif // CGAL_CONFORMING_DELAUNAY_TRIANGULATION_3_H diff --git a/Conforming_triangulation_3/include/CGAL/Delaunay_triangulation_utils_3.h b/Conforming_triangulation_3/include/CGAL/Delaunay_triangulation_utils_3.h index 4291de58734..59874fc1fc1 100644 --- a/Conforming_triangulation_3/include/CGAL/Delaunay_triangulation_utils_3.h +++ b/Conforming_triangulation_3/include/CGAL/Delaunay_triangulation_utils_3.h @@ -38,10 +38,10 @@ template < class DT > class Natural_neighbors_3; template < class Gt, class Tds > class Triangulation_cell_traverser_3; template < class Gt, - class Tds = Triangulation_data_structure_3 < Triangulation_vertex_base_3, Triangulation_cell_base_3 > > -class Delaunay_triangulation_utils_3: public Delaunay_triangulation_3 { + class Tds_ = Triangulation_data_structure_3 < Triangulation_vertex_base_3, Triangulation_cell_base_3 > > +class Delaunay_triangulation_utils_3: public Delaunay_triangulation_3 { //typedef Triangulation_data_structure Tds; - + typedef Tds_ Tds; typedef Delaunay_triangulation_utils_3 Self; typedef Delaunay_triangulation_3 DT; typedef Triangulation_3 Tr; From 5640b84b2be76f01ac08ef5b6d41bc8c6fd495f1 Mon Sep 17 00:00:00 2001 From: Thijs van Lankveld Date: Fri, 13 Jun 2014 14:42:51 +0200 Subject: [PATCH 008/138] First setup for the segment traverser small feature. --- .../conforming_gabriel_3.cpp | 105 -- .../Conforming_Delaunay_triangulation_3.h | 1268 ----------------- .../Conforming_triangulation_cell_base_3.h | 179 --- .../Conforming_triangulation_vertex_base_3.h | 69 - .../CGAL/Delaunay_triangulation_utils_3.h | 406 ------ .../include/CGAL/Encroaching_collecter_3.h | 135 -- .../CGAL/Triangulation_segment_traverser_3.h | 695 --------- .../Conforming_triangulation_3/copyright | 2 - .../description.txt | 3 - .../Conforming_triangulation_3/license.txt | 1 - .../Conforming_triangulation_3/maintainer | 1 - .../doc/Triangulation_3/examples.txt | 1 + .../examples/Triangulation_3/README | 5 + .../Triangulation_3/segment_traverser_3.cpp | 45 + .../include/CGAL/Triangulation_3.h | 81 +- .../CGAL/Triangulation_segment_traverser_3.h | 356 +++++ .../Triangulation_segment_traverser_3_impl.h | 665 +++++++++ .../include/CGAL/Triangulation_utils_3.h | 90 +- .../include/CGAL/internal/Dummy_gt.h | 37 + 19 files changed, 1244 insertions(+), 2900 deletions(-) delete mode 100644 Conforming_triangulation_3/example/Conforming_triangulation_3/conforming_gabriel_3.cpp delete mode 100644 Conforming_triangulation_3/include/CGAL/Conforming_Delaunay_triangulation_3.h delete mode 100644 Conforming_triangulation_3/include/CGAL/Conforming_triangulation_cell_base_3.h delete mode 100644 Conforming_triangulation_3/include/CGAL/Conforming_triangulation_vertex_base_3.h delete mode 100644 Conforming_triangulation_3/include/CGAL/Delaunay_triangulation_utils_3.h delete mode 100644 Conforming_triangulation_3/include/CGAL/Encroaching_collecter_3.h delete mode 100644 Conforming_triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h delete mode 100644 Conforming_triangulation_3/package_info/Conforming_triangulation_3/copyright delete mode 100644 Conforming_triangulation_3/package_info/Conforming_triangulation_3/description.txt delete mode 100644 Conforming_triangulation_3/package_info/Conforming_triangulation_3/license.txt delete mode 100644 Conforming_triangulation_3/package_info/Conforming_triangulation_3/maintainer create mode 100644 Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp create mode 100644 Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h create mode 100644 Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h create mode 100644 Triangulation_3/include/CGAL/internal/Dummy_gt.h diff --git a/Conforming_triangulation_3/example/Conforming_triangulation_3/conforming_gabriel_3.cpp b/Conforming_triangulation_3/example/Conforming_triangulation_3/conforming_gabriel_3.cpp deleted file mode 100644 index 103d12e13e9..00000000000 --- a/Conforming_triangulation_3/example/Conforming_triangulation_3/conforming_gabriel_3.cpp +++ /dev/null @@ -1,105 +0,0 @@ -#include -#include -#include - - -typedef CGAL::Exact_predicates_exact_constructions_kernel K; -typedef K::Point_3 Point_3; - -typedef CGAL::Triangulation_vertex_base_with_info_3 > Vb; -typedef CGAL::Conforming_triangulation_cell_base_3 Cb; -typedef CGAL::Triangulation_data_structure_3 < Vb, Cb > Tds; - -typedef CGAL::Conforming_Delaunay_triangulation_3< K, Tds > CDT3; - - -template -std::ptrdiff_t insert_with_info(Triangulation& t, InputIterator first,InputIterator last) -{ - typedef typename Triangulation::Geom_traits Geom_traits; - typedef typename Triangulation::Vertex_handle Vertex_handle; - - std::size_t n = t.number_of_vertices(); - std::vector indices; - std::vector points; - std::vector infos; - std::ptrdiff_t index=0; - for (InputIterator it=first;it!=last;++it){ - std::pair value=*it; - points.push_back( value.first ); - infos.push_back ( value.second ); - indices.push_back(index++); - } - - typedef CGAL::Spatial_sort_traits_adapter_3 Search_traits; - - CGAL::spatial_sort(indices.begin(),indices.end(),Search_traits(&(points[0]),Geom_traits())); - - Vertex_handle hint; - for (typename std::vector::const_iterator - it = indices.begin(), end = indices.end(); - it != end; ++it){ - hint = t.insert(points[*it], hint); - if (hint!=Vertex_handle()) hint->info()=infos[*it]; - } - - return t.number_of_vertices() - n; -} - -int main() -{ - - std::vector< std::pair > points; - points.push_back( std::make_pair(Point_3(0,0,0),0) ); - points.push_back( std::make_pair(Point_3(1,0,0),1) ); - points.push_back( std::make_pair(Point_3(0,1,0),2) ); - points.push_back( std::make_pair(Point_3(0.2,0.2,100),3) ); - points.push_back( std::make_pair(Point_3(0.2,0.2,-100),4) ); - - - std::vector< std::pair > constraints; - constraints.push_back( std::make_pair(0,1) ); - constraints.push_back( std::make_pair(0,2) ); - constraints.push_back( std::make_pair(1,2) ); - constraints.push_back( std::make_pair(3,4) ); - - CDT3 cdt3; - insert_with_info( cdt3, points.begin(), points.end() ); - - - std::vector< CDT3::Vertex_handle > vertices( points.size() ); - - for (CDT3::Finite_vertices_iterator vit=cdt3.finite_vertices_begin(), - vit_end=cdt3.finite_vertices_end();vit!=vit_end;++vit) - { - vertices[ vit->info() ]=vit; - } - - std::cout << cdt3.number_of_vertices() << std::endl; - - std::cout << "Making Delaunay conform" << std::endl; - for (std::vector< std::pair >::iterator cst_it=constraints.begin(), - cst_end=constraints.end(); - cst_it!=cst_end; ++cst_it) - { - cdt3.insert_conforming( std::make_pair(vertices[cst_it->first], vertices[cst_it->second]) ); - } - - - for(CDT3::Finite_edges_iterator it=cdt3.finite_edges_begin(); it!=cdt3.finite_edges_end(); ++it) - if ( it->first->vertex(it->second)->steiner() || it->first->vertex(it->third)->steiner() ) - std::cout << "edge with steiner endpoint" << std::endl; - - std::cout << "Making Gabriel conform" << std::endl; - for (std::vector< std::pair >::iterator cst_it=constraints.begin(), - cst_end=constraints.end(); - cst_it!=cst_end; ++cst_it) - { - cdt3.insert_conforming_Gabriel( vertices[cst_it->first], vertices[cst_it->second] ); - } - - for(CDT3::Finite_edges_iterator it=cdt3.finite_edges_begin(); it!=cdt3.finite_edges_end(); ++it) - if ( it->first->vertex(it->second)->steiner() || it->first->vertex(it->third)->steiner() ) - std::cout << "edge with steiner endpoint" << std::endl; -} - diff --git a/Conforming_triangulation_3/include/CGAL/Conforming_Delaunay_triangulation_3.h b/Conforming_triangulation_3/include/CGAL/Conforming_Delaunay_triangulation_3.h deleted file mode 100644 index 764c6e6b431..00000000000 --- a/Conforming_triangulation_3/include/CGAL/Conforming_Delaunay_triangulation_3.h +++ /dev/null @@ -1,1268 +0,0 @@ -//The conforming Delaunay triangulation structure. -//Copyright (C) 2012 Utrecht University -// -//This program is free software: you can redistribute it and/or modify -//it under the terms of the GNU General Public License as published by -//the Free Software Foundation, either version 3 of the License, or -//(at your option) any later version. -// -//This program is distributed in the hope that it will be useful, -//but WITHOUT ANY WARRANTY; without even the implied warranty of -//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//GNU General Public License for more details. -// -//You should have received a copy of the GNU General Public License -//along with this program. If not, see . -// -// Author(s): Thijs van Lankveld - -// Based on CGAL/Delaunay_triangulation_3.h -// -// For the love of something, why is the 3D triangulation package so badly written? - -#ifndef CGAL_CONFORMING_DELAUNAY_TRIANGULATION_3_H -#define CGAL_CONFORMING_DELAUNAY_TRIANGULATION_3_H - -#include - -#include -#include - -#include "Delaunay_triangulation_utils_3.h" -#include "Conforming_triangulation_cell_base_3.h" -#include "Conforming_triangulation_vertex_base_3.h" -#include "Encroaching_collecter_3.h" - -namespace CGAL { - -template < class Tr > class Natural_neighbors_3; - -template < class Gt, - class Tds_ = Triangulation_data_structure_3 < Conforming_triangulation_vertex_base_3, - Conforming_triangulation_cell_base_3 >, - class Itag = No_intersection_tag > -class Conforming_Delaunay_triangulation_3: public Delaunay_triangulation_utils_3 { - //typedef Triangulation_data_structure Tds; - typedef Tds_ Tds; - typedef Conforming_Delaunay_triangulation_3 cDT; - typedef Delaunay_triangulation_utils_3 DT; - typedef Triangulation_3 Tr; - - friend class Natural_neighbors_3; - typedef typename Gt::Line_3 Line; -public: - typedef Tds Triangulation_data_structure; - typedef Gt Geom_traits; - typedef Itag Intersection_tag; - - typedef typename Gt::FT FT; - - typedef typename Gt::Point_3 Point; - typedef typename Gt::Vector_3 Vector; - typedef typename Gt::Segment_3 Segment; - typedef typename Gt::Triangle_3 Triangle; - typedef typename Gt::Tetrahedron_3 Tetrahedron; - typedef typename Gt::Plane_3 Plane; - - typedef typename DT::Cell_handle Cell_handle; - typedef typename DT::Vertex_handle Vertex_handle; - - typedef typename DT::Cell Cell; - typedef typename DT::Vertex Vertex; - typedef typename DT::Facet Facet; - typedef typename DT::Edge Edge; - - typedef typename DT::Bi_vertex Bi_vertex; - - typedef std::pair Constraint_1; - - typedef typename DT::Cell_circulator Cell_circulator; - typedef typename DT::Facet_circulator Facet_circulator; - typedef typename DT::Cell_iterator Cell_iterator; - typedef typename DT::Facet_iterator Facet_iterator; - typedef typename DT::Edge_iterator Edge_iterator; - typedef typename DT::Vertex_iterator Vertex_iterator; - - typedef typename DT::Finite_vertices_iterator Finite_vertices_iterator; - typedef typename DT::Finite_cells_iterator Finite_cells_iterator; - typedef typename DT::Finite_facets_iterator Finite_facets_iterator; - typedef typename DT::Finite_edges_iterator Finite_edges_iterator; - - typedef typename DT::All_cells_iterator All_cells_iterator; - - typedef typename DT::Cell_traverser Cell_traverser; - - typedef typename DT::Locate_type Locate_type; - -private: - typedef std::list Point_list; - typedef typename Point_list::iterator Points_iterator; - typedef std::back_insert_iterator Points_output; - -public: - typedef Encroaching_collecter_3 Encroaching_collecter; - -#ifndef CGAL_CFG_USING_BASE_MEMBER_BUG_2 - using DT::cw; - using DT::ccw; - using DT::geom_traits; - using DT::number_of_vertices; - using DT::dimension; - using DT::finite_facets_begin; - using DT::finite_facets_end; - using DT::finite_vertices_begin; - using DT::finite_vertices_end; - using DT::finite_cells_begin; - using DT::finite_cells_end; - using DT::finite_edges_begin; - using DT::finite_edges_end; - using DT::tds; - using DT::infinite_vertex; - using DT::insert; - using DT::next_around_edge; - using DT::vertex_triple_index; - using DT::mirror_vertex; - using DT::move_point; - using DT::coplanar; - using DT::coplanar_orientation; - using DT::orientation; - using DT::is_infinite; - using DT::finite_incident_edges; - using DT::incident_cells; - using DT::insert_in_conflict; - using DT::is_valid_finite; -#endif - -protected: - // Visitor that should be run before and after inserting a point - // to maintain the conforming edges in the triangulation. - template < class Tr > - class Conforming_visitor { - typedef std::pair CBV; - - mutable std::list _conforming; - - protected: - Tr *_tr; - - public: - Conforming_visitor(Tr* tr): _tr(tr) {} - - // Store and remove the conforming edges from a collection of cells. - template - void process_cells_in_conflict(InputIterator start, InputIterator end) const { - for (InputIterator it = start; it != end; ++it) { - for (int i = 0; i < _tr->dimension(); ++i) { - for (int j = i+1; j < _tr->dimension()+1; ++j) { - if ((*it)->is_conforming(i, j)) { - _conforming.push_back(CBV(_tr->to_bi_vertex(*it, i, j), (*it)->is_marked(i, j))); - _tr->set_conforming(*it, i, j, false); - } - } - } - } - } - - // Reinsert the conforming edges into the triangulation. - void reinsert_vertices(Vertex_handle) { - while (!_conforming.empty()) { - CBV b = _conforming.front(); - _conforming.pop_front(); - if (b.second) - _tr->insert_marked(b.first); - else - _tr->insert_conforming(b.first); - } - } - - // Reinsert the conforming edges into the triangulation - // under the assumption that no Steiner points need to be added. - void reinsert_no_steiner() { - Cell_handle c; int li, lj; - while (!_conforming.empty()) { - CBV b = _conforming.front(); - _conforming.pop_front(); - CGAL_triangulation_assertion_code(bool ok =) - _tr->is_edge(b.first.first, b.first.second, c, li, lj); - CGAL_triangulation_assertion(ok); - - if (b.second) - _tr->mark_edge(c, li, lj); - else - _tr->set_conforming(c, li, lj, true); - } - } - - Vertex_handle replace_vertex(Cell_handle c, int index, const Point&) {return c->vertex(index);} - void hide_point(Cell_handle, const Point&) {} - }; // class Conforming_visitor - - friend class Conflict_tester_3; - friend class Conflict_tester_2; - friend class Encroaching_collecter_3; - - Conforming_visitor conforming_visitor; - -protected: - // PREDICATES - - // Checks if point c is encroaching upon the segment ab. - // A point is encroaching if it is inside the ball with diameter ab. - bool is_encroaching(const Point& a, const Point& b, const Point& c) const { - CGAL_triangulation_assertion(a != b); - CGAL_triangulation_assertion(a != c); - CGAL_triangulation_assertion(b != c); - return side_of_bounded_sphere(a, b, c) != ON_UNBOUNDED_SIDE; - } - -public: - // CONSTRUCTORS - Conforming_Delaunay_triangulation_3(const Gt& gt = Gt()): DT(gt), conforming_visitor(this) {} - - // Copy constructor duplicates vertices and cells. - Conforming_Delaunay_triangulation_3(const Conforming_Delaunay_triangulation_3& tr): DT(tr), conforming_visitor(this) { - CGAL_triangulation_postcondition(is_valid()); - } - - // Create a conforming 3D Delaunay triangulation from a number of constraints. - template < class InputIterator > - Conforming_Delaunay_triangulation_3(InputIterator begin, InputIterator end, const Gt& gt = Gt()): - DT(gt), conforming_visitor(this) { - insert_conforming(begin, end); - CGAL_triangulation_postcondition(is_valid()); - } - -protected: - // Compute the intersection of ab with a line or plane. - bool compute_intersection(const Line& ab, const Line& l, Point& p) const { - Object result = Gt().intersect_3_object()(ab, l); - return assign(p, result); - } - bool compute_intersection(const Line& ab, const Plane& pl, Point& p) const { - Object result = Gt().intersect_3_object()(ab, pl); - return assign(p, result); - } - - // Compute the intersection of ab with either a line (edge) or plane (facet). - bool compute_intersection(Locate_type lt, Cell_handle c, int li, int lj, Vertex_handle va, Vertex_handle vb, Point& p) const { - if (lt == DT::EDGE) - return compute_intersection(Line(va->point(), vb->point()), - Line(c->vertex(li)->point(), c->vertex(lj)->point()), p); - else - return compute_intersection(Line(va->point(), vb->point()), plane(c, li), p); - } - - // Insert the intersection of segment ab with either a facet or an edge. - Vertex_handle intersect(Cell_handle c, Locate_type lt, int li, int lj, Vertex_handle va, Vertex_handle vb) { - return intersect(c, lt, li, lj, va, vb, Itag());} - Vertex_handle intersect(Cell_handle c, Locate_type lt, int li, int lj, Vertex_handle va, Vertex_handle vb, No_intersection_tag); - Vertex_handle intersect(Cell_handle c, Locate_type lt, int li, int lj, Vertex_handle va, Vertex_handle vb, Exact_intersections_tag); - Vertex_handle intersect(Cell_handle c, Locate_type lt, int li, int lj, Vertex_handle va, Vertex_handle vb, Exact_predicates_tag); - - // Split segment ab based on a reference point. - Point construct_split_point(Vertex_handle va, Vertex_handle vb, const Point& ref); - -protected: - // Conform an edge to important encroaching points. - // The boolean indicates whether the edge should be made conforming Gabriel - template - void conform_segment(Vertex_handle va, Vertex_handle vb, Points_iterator encr_begin, Points_iterator encr_end); - - // Mark a segment that it is assumed to already be in the triangulation. - void mark_segment(Vertex_handle va, Vertex_handle vb); - // Insert a marked segment; - // this includes conforming the segment and marking its subsegments as conforming. - void insert_marked(Vertex_handle va, Vertex_handle vb); - void insert_marked(const Bi_vertex& m) {insert_marked(m.first, m.second);} - - // Mark an existing edge or facet as (un)constrained. - void set_conforming(Cell_handle c, int li, int lj, bool C); - void set_conforming(const Edge& e, bool C) {set_conforming(e.first, e.second, e.third, C);} - void mark_edge(Cell_handle c, int li, int lj); - void mark_edge(const Edge& e) {mark_edge(e.first, e.second, e.third);} - -protected: - // Restore the conforming edges of a facet based on the neighboring cell. - void restore_conforming(Cell_handle c, int li); - void restore_conforming(const Facet& f) {restore_conforming(f.first, f.second);} - -public: - // INSERT POINT - - virtual Vertex_handle insert(const Point& p, Locate_type lt, Cell_handle c, int li, int lj); - -public: - // INSERT CONFORMING - - // Insert a conforming segment. - void insert_conforming(Vertex_handle va, Vertex_handle vb) { - Point_list encr; conform_segment(va, vb, encr.begin(), encr.end());} - void insert_conforming_Gabriel(Vertex_handle va, Vertex_handle vb) { - Point_list encr; conform_segment(va, vb, encr.begin(), encr.end());} - void insert_conforming(const Bi_vertex& c) { - insert_conforming(c.first, c.second);} - void insert_conforming(const Point& a, const Point& b, Cell_handle hint = Cell_handle()); - void insert_conforming(const Constraint_1& c, Cell_handle hint = Cell_handle()) { - insert_conforming(c.first, c.second, hint);} - - // Insert a number of conforming segments, presented as a collection of pairs of Point_3. - template < class InputIterator > - int insert_conforming(InputIterator begin, InputIterator end, Cell_handle hint = Cell_handle()); - - // Insert a loop of conforming segments, presented as a collection of Point_3. - template < class InputIterator > - int insert_conforming_loop(InputIterator begin, InputIterator end, Cell_handle hint = Cell_handle()); - template < class InputIterator > - int insert_marked_loop(InputIterator begin, InputIterator end, Cell_handle hint = Cell_handle()); - template < class InputIterator > - int remove_conforming_loop(InputIterator begin, InputIterator end, Cell_handle hint = Cell_handle()); - -protected: - template < class InputIterator, class OutputIterator > - void insert_loop_points(InputIterator begin, InputIterator end, OutputIterator out, Cell_handle hint = Cell_handle()); - -public: - // REMOVE - - // Vertices that are incident to a conforming edge cannot be removed. - bool remove(Vertex_handle v); - - // Remove a conforming edge or segment. - bool remove_conforming(Cell_handle c, int li, int lj); - bool remove_conforming(const Edge& e) { - return remove_conforming(e.first, e.second, e.third);} - bool remove_conforming(Vertex_handle va, Vertex_handle vb); - bool remove_conforming(Bi_vertex c) { - return remove_conforming(c.first, c.second);} - -public: - // QUERY CONFORMING - - // Check if an edge is conforming. - bool is_conforming(Cell_handle c, int li, int lj) const {return c->is_conforming(li, lj);} - bool is_conforming(const Edge& e) const {return is_conforming(e.first, e.second, e.third);} - - // Check if an edge is marked. - bool is_marked(Cell_handle c, int li, int lj) const {return c->is_marked(li, lj);} - bool is_marked(const Edge& e) const {return is_marked(e.first, e.second, e.third);} - - // Check if a vertex is incident to a conforming edge. - bool are_there_incident_conforming(Vertex_handle v) const; - - // Check if the triangulation contains an edge ac on the segment ab, where c(li, lj) is that edge. - bool includes_edge(Vertex_handle va, Vertex_handle vb, Vertex_handle& vc, Cell_handle& c, int& li, int& lj) const; - - // Check if the triangulation is valid. - virtual bool is_valid(bool verbose = false, int level = 0) const; - virtual bool is_valid(Cell_handle c, bool verbose = false, int level = 0) const; - -private: - // Collect the points encroaching upon the segment ac, where c is the first point on the ray ab. - // encroaching must point to a Point. - // Returns true if a conforming edge or constrained facet was encountered and the intersection inserted. - template - bool collect_encroaching(Vertex_handle va, Vertex_handle vb, OutputIterator encroaching, Vertex_handle& vc); - - // Sort the points encroaching upon the segment ab to the from of the collection. - // begin and end must point to Point. - Points_iterator sort_encroaching(Points_iterator begin, Points_iterator end, const Point& a, const Point& b) const; -}; // Conforming_Delaunay_triangulation_3 - -template < class Gt, class Tds, class Itag > -typename Conforming_Delaunay_triangulation_3::Vertex_handle -Conforming_Delaunay_triangulation_3:: -intersect(Cell_handle /* c */, Locate_type /* lt */, int /* li */, int /* lj */, Vertex_handle /* va */, Vertex_handle /* vb */, No_intersection_tag) { - std::cerr << " sorry, this triangulation does not deal with" << std::endl - << " intersecting conforming edges" << std::endl; - CGAL_triangulation_assertion(false); - return Vertex_handle(); -} - -template < class Gt, class Tds, class Itag > -typename Conforming_Delaunay_triangulation_3::Vertex_handle -Conforming_Delaunay_triangulation_3:: -intersect(Cell_handle c, Locate_type lt, int li, int lj, Vertex_handle va, Vertex_handle vb, Exact_intersections_tag) { - // Compute the intersection of the segment ab and a facet or edge of cell c. - // Note that no further check is made whether this intersection actually occurs inside the segment(s) or triangle. - Point p; - CGAL_triangulation_assertion_code( bool ok = ) - compute_intersection(lt, c, li, lj, va, vb, p); - CGAL_triangulation_assertion(ok); - Vertex_handle v = insert(p, c); - v->steiner() = true; - return v; -} - -template < class Gt, class Tds, class Itag > -typename Conforming_Delaunay_triangulation_3::Vertex_handle -Conforming_Delaunay_triangulation_3:: -intersect(Cell_handle c, Locate_type lt, int li, int lj, Vertex_handle va, Vertex_handle vb, Exact_predicates_tag) { - // Compute the intersection of the segment ab and a facet or edge of cell c. - // Note that no further check is made whether this intersection actually occurs inside the segment(s) or triangle. - Point p; - bool ok = compute_intersection(lt, c, li, lj, va, vb, p); - if (ok) { - Vertex_handle v = insert(p, c); - v->steiner() = true; - return v; - } - - // Return the vertex closest to the intersection. - Vertex_handle closest; - switch (lt) { - case DT::EDGE: { - Line ab(va->point(), vb->point()); - Line ij(c->vertex(li)->point(), c->vertex(lj)->point()); - FT dist2 = squared_distance(va->point(), ij); - FT db = squared_distance(vb->point(), ij); - FT di = squared_distance(c->vertex(li)->point(), ab); - FT dj = squared_distance(c->vertex(lj)->point(), ab); - closest = va; - if (db < dist2) {dist2 = db; closest = vb;} - if (di < dist2) {dist2 = di; closest = c->vertex(li);} - if (dj < dist2) {dist2 = dj; closest = c->vertex(lj);} - } - case DT::FACET: { - Line ab(va->point(), vb->point()); - Plane p = plane(c, li); - FT dist2 = squared_distance(va->point(), p); - FT db = squared_distance(vb->point(), p); - FT d1 = squared_distance(c->vertex((li+1)&3)->point(), ab); - FT d2 = squared_distance(c->vertex((li+2)&3)->point(), ab); - FT d3 = squared_distance(c->vertex((li+3)&3)->point(), ab); - closest = va; - if (db < dist2) {dist2 = db; closest = vb;} - if (d1 < dist2) {dist2 = d1; closest = c->vertex((li+1)&3);} - if (d2 < dist2) {dist2 = d2; closest = c->vertex((li+2)&3);} - if (d3 < dist2) {dist2 = d3; closest = c->vertex((li+3)&3);} - } - default: - CGAL_triangulation_assertion(false); - } - - closest->steiner() = true; - return closest; -} - -template < class Gt, class Tds, class Itag > -typename Conforming_Delaunay_triangulation_3::Point -Conforming_Delaunay_triangulation_3:: -construct_split_point(Vertex_handle va, Vertex_handle vb, const Point& ref) { - // Blend of Si's and Shewchuk's segment recovery. - // We are actually interested in constructing a layer of protecting Steiner points around each acute vertex, - // such that no new Steiner point is inserted inside this layer. - // Shewchuk and Si place the protecting Steiner points on a ball around the acute vertex. - // However, determining if a vertex is acute is expensive. Additionally, the main purpose of the protecting points - // is to place new points outside the diametral ball with their acute vertex. - // This is always done if we place new Steiner points on the projection of the reference point onto the segment. - // To guarantee a minimum edge length, we never place a Steiner point closer to an endpoint than to the reference. - -#ifdef SPLIT_P_PROJ - // Place the split point at the midpoint, unless the reference encroaches upon the resulting edges. - // In that case, the split point is taken such that its projection onto ap or bp is p. - Point s = midpoint(va->point(), vb->point()); - - typename Geom_traits::Side_of_bounded_sphere_3 side_of_bounded_sphere = geom_traits().side_of_bounded_sphere_3_object(); - - if (side_of_bounded_sphere(va->point(), mid, ref) == ON_BOUNDED_SIDE) { - Object result = Gt().intersect_3_object()(Line(va->point(), vb->point()), Plane(ref, va->point() - ref)); - CGAL_triangulation_assertion(assign(s, result)); - } - else if (side_of_bounded_sphere(vb->point(), mid, ref) == ON_BOUNDED_SIDE) { - Object result = Gt().intersect_3_object()(Line(va->point(), vb->point()), Plane(ref, vb->point() - ref)); - CGAL_triangulation_assertion(assign(s, result)); - } - - return s; -#endif - - // Place the split point at the projection of the reference onto ab, unless that is too close to a or b, or it is not on the edge. - // In that case, the split point is the midpoint between a and b. - Line l(va->point(), vb->point()); - Point s = l.projection(ref); - - // The following will enforce a minimum edge length. - if (has_larger_distance_to_point(s, ref, va->point()) || has_larger_distance_to_point(s, ref, vb->point())) - s = midpoint(va->point(), vb->point()); - - // Note that for inexact construction kernels, this assertion may fail for both projections and midpoints. - //CGAL_triangulation_assertion(l.has_on(s)); - - // This method doesn't actually produce a correct bounding ball, because the Steiner points may be inserted closer to the endpoint than the reference point.. - - return s; - -#ifdef SPLIT_SI - // Si's point segment recovery. - typedef Gt::Sphere_3 Sphere; - Point s; - Object result; - if (c == Vertex_handle()) { - // Rule 1. - FT sd, r = squared_distance(a->point(), b->point()); - if (4*(sd = squared_distance(a->point(), p->point())) < r) { - result = Gt().intersect_3_object()(Sphere(a->point(), sd), Segment(a->point(), b->point())); - } - else if (4*(sd = squared_distance(b->point(), p->point())) < r) { - result = Gt().intersect_3_object()(Sphere(b->point(), sd), Segment(a->point(), b->point())); - } - else { - Vertex_handle v = insert(midpoint(a->point(), b->point()), a->cell()); - return v; - } - if (!assign(s, result)) return Vertex_handle(); - } - else { - // Rule 2. - FT r = squared_distance(c->point(), p->point()); - result = Gt().intersect_3_object()(Sphere(c->point(), r), Segment(a->point(), b->point())); - if (!assign(s, result)) return Vertex_handle(); - - FT sd = squared_distance(s, p->point()); - if (sd > squared_distance(s, b->point())) { - //Rule 3. - if (4*sd < squared_distance(s, a->point())) { - result = Gt().intersect_3_object()(Sphere(s, sd), Segment(a->point(), b->point())); - if (!assign(s, result)) - return Vertex_handle(); - } - else { - s = midpoint(a->point(), s); - } - } - } - - return s; -#endif -} - -template < class Gt, class Tds, class Itag > -template -void Conforming_Delaunay_triangulation_3:: -conform_segment(Vertex_handle va, Vertex_handle vb, Points_iterator encr_begin, Points_iterator encr_end) { - CGAL_triangulation_precondition(va != vb); - // This insertion method is an adjustment of the segment insertion - // in the paper "Constrained Delaunay tetrahedral mesh generation and refinement" by Si (2010). - // The points of the tetrahedra intersected by ab (encroaching points) are collected; - // from these points, the point making the largest circumsphere with ab is the reference point. - // The reference point indicates where ab is split and the subsegments each get a subset - // of the encroaching points and then the process is repeated. - - // Set the initial part of the segment that is already in the triangulation to conforming. - Vertex_handle vi; - Cell_handle c; - int li, lj; - while (includes_edge(va, vb, vi, c, li, lj) && (!make_gabriel || this->is_Gabriel(c, li, lj) ) ) { - set_conforming(c, li, lj, true); - va = vi; - if (va == vb) - return; - } - - // If the edge is not in the triangulation, there must be encroaching points. - // Collect the points encroaching upon and close to ab. - if (encr_begin == encr_end) { - Point_list encroaching; - bool intersect = collect_encroaching(va, vb, std::back_inserter(encroaching), vi); - - if (!intersect && encroaching.empty()) { - // There are occurrences where none of the vertices of the cells intersected by ab encroach upon ab. - // In this case, we insert the midpoint of ab. - vi = insert(midpoint(va->point(), vb->point()), va->cell()); - vi->steiner() = true; - intersect = true; - } - - // Insert ai, and if needed ib. - conform_segment(va, vi, encroaching.begin(), encroaching.end()); - if (vi != vb) { - conform_segment(vi, vb, encr_begin, encr_end); - } - return; - } - - // Find the reference point. - // This is the encroaching point closest to the segment. - FT sr, radius2 = 0; - Point ref; - for (Points_iterator it = encr_begin; it != encr_end; ++it) { - CGAL_triangulation_assertion(!collinear(va->point(), *it, vb->point())); - sr = squared_radius(va->point(), *it, vb->point()); - if (radius2 < sr) { - radius2 = sr; - ref = *it; - } - } - CGAL_triangulation_assertion(radius2 > 0); - - // Split the edge based on its reference point. - Point s = construct_split_point(va, vb, ref); - Vertex_handle vs = insert(s, va->cell()); - vs->steiner() = true; - - // Sort the encroaching points to encroaching upon as, sb, and only ab. - Points_iterator after_as = sort_encroaching(encr_begin, encr_end, va->point(), vs->point()); - Points_iterator after_sb = sort_encroaching(after_as, encr_end, vs->point(), vb->point()); - - // Insert the segments on both sides of s as constraints. - conform_segment(va, vs, encr_begin, after_as); - conform_segment(vs, vb, after_as, after_sb); -} - -template < class Gt, class Tds, class Itag > -void Conforming_Delaunay_triangulation_3:: -mark_segment(Vertex_handle va, Vertex_handle vb) { - Vertex_handle vi; - Cell_handle c; - int li, lj; - while (va != vb) { - // All segments must be in the triangulation. - CGAL_triangulation_assertion_code(bool ok = ) - includes_edge(va, vb, vi, c, li, lj); - CGAL_triangulation_assertion(ok); - - mark_edge(c, li, lj); - - va = vi; - } -} - -template < class Gt, class Tds, class Itag > -void Conforming_Delaunay_triangulation_3:: -insert_marked(Vertex_handle va, Vertex_handle vb) { - // Insert the segment and then mark all parts of the segment. - insert_conforming(va, vb); - mark_segment(va, vb); -} - -template < class Gt, class Tds, class Itag > -void Conforming_Delaunay_triangulation_3:: -set_conforming(Cell_handle c, int li, int lj, bool C) { - // The cell is already in the triangulation, so the edge is already Delaunay. - Vertex_handle vi = c->vertex(li), vj = c->vertex(lj); - switch (dimension()) { - case 3: { - // Constrain the edge in all its incident cells. - Cell_circulator it = incident_cells(c, li, lj), start(it); - do { - it->set_conforming(it->index(vi), it->index(vj), C); - ++it; - } while (it != start); - break; - } - case 2: { - // Constrain the edge in both cells that share it. - Cell_handle n = c->neighbor(3-li-lj); - n->set_conforming(n->index(vi), n->index(vj), C); - } - case 1: { - // Constrain the edge in the cell itself. - c->set_conforming(li, lj, C); - break; - } - } -} - -template < class Gt, class Tds, class Itag > -void Conforming_Delaunay_triangulation_3:: -mark_edge(Cell_handle c, int li, int lj) { - // The cell is already in the triangulation, so the edge is already Delaunay. - Vertex_handle vi = c->vertex(li), vj = c->vertex(lj); - switch (dimension()) { - case 3: { - // Constrain the edge in all its incident cells. - Cell_circulator it = incident_cells(c, li, lj), start(it); - do { - it->mark(it->index(vi), it->index(vj)); - it++; - } while (it != start); - break; - } - case 2: { - // Constrain the edge in both cells that share it. - Cell_handle n = c->neighbor(3-li-lj); - n->mark(n->index(vi), n->index(vj)); - } - case 1: { - // Constrain the edge in the cell itself. - c->mark(li, lj); - break; - } - } -} - -template < class Gt, class Tds, class Itag > -template < class InputIterator > -int Conforming_Delaunay_triangulation_3:: -insert_conforming_loop(InputIterator begin, InputIterator end, Cell_handle hint) { - // Insert the points in the loop. - std::list segments; - insert_loop_points(begin, end, std::back_inserter(segments), hint); - - // Insert the segments in the loop. - for (typename std::list::iterator it = segments.begin(); it != segments.end(); ++it) - insert_conforming(*it); - - return segments.size(); -} - -template < class Gt, class Tds, class Itag > -template < class InputIterator > -int Conforming_Delaunay_triangulation_3:: -insert_marked_loop(InputIterator begin, InputIterator end, Cell_handle hint) { - // Insert the points in the loop. - std::list segments; - insert_loop_points(begin, end, std::back_inserter(segments), hint); - - // Insert the segments in the loop. - for (typename std::list::iterator it = segments.begin(); it != segments.end(); ++it) - insert_marked(*it); - - return segments.size(); -} - -template < class Gt, class Tds, class Itag > -template < class InputIterator > -int Conforming_Delaunay_triangulation_3:: -remove_conforming_loop(InputIterator begin, InputIterator end, Cell_handle hint) { - // Insert the points in the loop. - std::list segments; - insert_loop_points(begin, end, std::back_inserter(segments), hint); - - // Insert the segments in the loop. - for (typename std::list::iterator it = segments.begin(); it != segments.end(); ++it) - remove_conforming(*it); - - return segments.size(); -} - -template < class Gt, class Tds, class Itag > -template < class InputIterator, class OutputIterator > -void Conforming_Delaunay_triangulation_3:: -insert_loop_points(InputIterator begin, InputIterator end, OutputIterator out, Cell_handle hint) { - if (begin == end) - return; - - // Insert the points in the loop. - Vertex_handle prev = insert(*begin, hint), first(prev); - hint = prev->cell(); - for (InputIterator it = ++begin; it != end; ++it) { - Vertex_handle cur = insert(*it, hint); - if (prev != cur) - *out++ = Bi_vertex(prev, cur); - hint = cur->cell(); - prev = cur; - } - if (first != prev) - *out++ = Bi_vertex(prev, first); -} - -template < class Gt, class Tds, class Itag > -void Conforming_Delaunay_triangulation_3:: -restore_conforming(Cell_handle c, int li) { - // Restore the conforming edges of facet i of c, based on its neighboring cell. - Cell_handle n = c->neighbor(li); - Vertex_handle v1, v2; Edge e; - for (int j = 0; j < dimension()+1; ++j) { - if (j != li) { - e = opposite_edge(c, li, (li+j)&3); - v1 = c->vertex(e.second); - v2 = c->vertex(e.third); - if (n->is_marked(n->index(v1), n->index(v2))) - e.first->mark(e.second, e.third); - else - e.first->set_conforming(e.second, e.third, n->is_conforming(n->index(v1), n->index(v2))); - } - } -} - -template < class Gt, class Tds, class Itag > -typename Conforming_Delaunay_triangulation_3::Vertex_handle -Conforming_Delaunay_triangulation_3:: -insert(const Point& p, Locate_type lt, Cell_handle c, int li, int lj) { - switch (dimension()) { - case 3: { - typename DT::Conflict_tester_3 tester(p, this); - Vertex_handle v = insert_in_conflict(p, lt, c, li, lj, tester, conforming_visitor); - return v; - } // dim 3 - case 2: { - typename DT::Conflict_tester_2 tester(p, this); - Vertex_handle v = insert_in_conflict(p, lt, c, li, lj, tester, conforming_visitor); - return v; - } // dim 2 - default : - // dimension <= 1 - // Do not use the generic insert. - return Tr::insert(p, c); - } -} - -template < class Gt, class Tds, class Itag > -void Conforming_Delaunay_triangulation_3:: -insert_conforming(const Point& a, const Point& b, Cell_handle hint) { - // Insert the two points and then conform the segment between them. - Vertex_handle va = insert(a, hint); - Vertex_handle vb = insert(b, va->cell()); - if (va != vb) - insert_conforming(va, vb); -} - -template < class Gt, class Tds, class Itag > -template < class InputIterator > -int Conforming_Delaunay_triangulation_3:: -insert_conforming(InputIterator begin, InputIterator end, Cell_handle hint) { - // Insert the points. - std::list segments; - for (InputIterator it = begin; it != end; ++it) { - Vertex_handle va = insert(it->first, hint); - hint = va->cell(); - if (it->first != it->second) { - Vertex_handle vb = insert(it->second, hint); - hint = vb->cell(); - segments.push_back(Bi_vertex(va, vb)); - } - } - - // Insert the segments - for (typename std::list::iterator it = segments.begin(); it != segments.end(); ++it) - insert_conforming(*it); - - return segments.size(); -} - -template < class Gt, class Tds, class Itag > -bool Conforming_Delaunay_triangulation_3:: -remove(Vertex_handle v) { - // The vertex cannot be removed if it is incident to a conforming edge. - if (are_there_incident_conforming(v)) - return false; - - // Collect the opposite facets as seen from the outside. - std::vector cells; cells.reserve(32); - incident_cells(v, std::back_inserter(cells)); - std::vector boundary; boundary.reserve(cells.size()); - - for (typename std::vector::const_iterator it = cells.begin(); it != cells.end(); ++it) { - Cell_handle n = (*it)->neighbor((*it)->index(v)); - boundary.push_back(Facet(n, n->index(*it))); - } - cells.clear(); - - // Remove the vertex. -#ifdef CGAL_DELAUNAY_3_OLD_REMOVE - if (dimension() == 3 && !test_dim_down(v)) { - remove_3D_ear(v); - } else { -#endif - cDT tmp; - typename DT::Vertex_remover remover(tmp); - Tr::remove(v, remover); -#ifdef CGAL_DELAUNAY_3_OLD_REMOVE - } -#endif - - // Reinsert any conforming edges on the boundary of the retriangulated region. - for (typename std::vector::iterator it = boundary.begin(); it != boundary.end(); ++it) { - restore_conforming(mirror_facet(*it)); - } - - CGAL_triangulation_expensive_postcondition(is_valid()); - return true; -} - -template < class Gt, class Tds, class Itag > -bool Conforming_Delaunay_triangulation_3:: -remove_conforming(Cell_handle c, int li, int lj) { - // Mark the edge as non-conforming - set_conforming(c, li, lj, false); - return true; -} - -template < class Gt, class Tds, class Itag > -bool Conforming_Delaunay_triangulation_3:: -remove_conforming(Vertex_handle va, Vertex_handle vb) { - CGAL_triangulation_precondition(va != vb); - // All the parts of the segment ab that are constrained and - // not incident to a constrained facet are marked unconstrained. - // The return is true if the whole segment ab is covered by unconstrained edges; - // otherwise, returns false; - - // Check if first part of the segment is an edge in the triangulation. - Vertex_handle vi; - Cell_handle c; - int li, lj; - bool complete = true; - if (includes_edge(va, vb, vi, c, li, lj)) { - // Remove the first part. - if (!remove_conforming(c, li, lj)) - complete = false; - if (vi != vb) { - // Remove the next part. - if (!remove_conforming(vi, vb)) - complete = false; - } - return complete; - } - - return false; -} - -template < class Gt, class Tds, class Itag > -bool Conforming_Delaunay_triangulation_3:: -are_there_incident_conforming(Vertex_handle v) const { - if (dimension() > 0) { - std::vector edges; - edges.reserve(32); - finite_incident_edges(v, std::back_inserter(edges)); - for (typename std::vector::iterator it = edges.begin(); it != edges.end(); ++it) - if (is_conforming(*it)) - return true; - } - - return false; -} - -template < class Gt, class Tds, class Itag > -bool Conforming_Delaunay_triangulation_3:: -includes_edge(Vertex_handle va, Vertex_handle vb, Vertex_handle& vc, Cell_handle& c, int& li, int& lj) const { - CGAL_triangulation_precondition(!is_infinite(va) && !is_infinite(vb)); - - // Returns true if the line segment ab contains an edge e - // incident to a, false otherwise. - // If true, vc becomes the vertex of e distinct from a, - // c is a cell incident to e where e = (c, li, lj). - Vertex_handle v; - std::vector edges; edges.reserve(64); - finite_incident_edges(va, std::back_inserter(edges)); - for (typename std::vector::const_iterator it = edges.begin(); it != edges.end(); ++it) { - // Find the other vertex of the edge. - v = it->first->vertex(it->second); - if (v == va) v = it->first->vertex(it->third); - - if (is_infinite(v)) - continue; - - // Check if this edge is (part of) ab. - if (v == vb) { - vc = vb; - c = it->first; - li = it->second; - lj = it->third; - return true; - } - else if (sign((va->point() - v->point()) * (vb->point() - v->point())) == NEGATIVE && - collinear(va->point(), v->point(), vb->point())/* && - collinear_are_ordered_along_line(va->point(), v->point(), vb->point())*/) { - vc = v; - c = it->first; - li = it->second; - lj = it->third; - return true; - } - } - return false; -} - -template < class Gt, class Tds, class Itag > -bool Conforming_Delaunay_triangulation_3:: -is_valid(bool verbose, int level) const { - if (!tds().is_valid(verbose,level)) { - if (verbose) - std::cerr << "invalid data structure" << std::endl; - CGAL_triangulation_assertion(false); - return false; - } - - if (infinite_vertex() == Vertex_handle()) { - if (verbose) - std::cerr << "no infinite vertex" << std::endl; - CGAL_triangulation_assertion(false); - return false; - } - - int inf; - Cell_handle n; - Vertex_handle v1, v2; - switch (dimension()) { - case 3: { - for (All_cells_iterator it = this->all_cells_begin(); it != this->all_cells_end(); ++it) { - for (int i = 0; i < 4; ++i) { - if (!it->neighbor(i)->has_neighbor(it)) { - if (verbose) - std::cerr << "inconsistent neighbors " << std::endl; - CGAL_triangulation_assertion(false); - return false; - } - } - if (it->has_vertex(infinite_vertex(), inf)) { - for (int i = 0; i < 4; ++i) { - if (i != inf) { - if (is_conforming(it, i, inf)) { - if (verbose) - std::cerr << "conforming infinite edge " << std::endl; - CGAL_triangulation_assertion(false); - return false; - } - } - } - } - else { - is_valid_finite(it); - for (int i = 0; i < 4; ++i) { - n = it->neighbor(i); - if (!is_infinite(n->vertex(n->index(it)))) { - if (this->side_of_sphere(it, n->vertex(n->index(it))->point()) == ON_BOUNDED_SIDE) { - if (verbose) - std::cerr << "non-empty sphere " << std::endl; - CGAL_triangulation_assertion(false); - return false; - } - } - } - } - } - for (Finite_edges_iterator it = finite_edges_begin(); it != finite_edges_end(); ++it) { - v1 = it->first->vertex(it->second); - v2 = it->first->vertex(it->third); - bool conforming = is_conforming(*it); - - Cell_circulator cit = incident_cells(it->first, it->second, it->third, it->first), start(cit); - do { - if (cit->is_marked(cit->index(v1), cit->index(v2))) { - if (verbose) - std::cerr << "marked edge " << std::endl; - CGAL_triangulation_assertion(false); - return false; - } - - if (cit->is_conforming(cit->index(v1), cit->index(v2)) != conforming) { - if (verbose) - std::cerr << "inconsistent conforming edge " << std::endl; - CGAL_triangulation_assertion(false); - return false; - } - cit++; - } while (cit != start); - } - break; - } - case 2: { - for (typename DT::All_facets_iterator it = this->all_facets_begin(); it != this->all_facets_end(); ++it) { - for (int i = 0; i < 3; ++i) { - if (!it->first->neighbor(i)->has_neighbor(it->first)) { - if (verbose) - std::cerr << "inconsistent neighbors " << std::endl; - CGAL_triangulation_assertion(false); - return false; - } - } - if (it->first->has_vertex(infinite_vertex(), inf) && inf < 3) { - for (int i = 0; i < 3; ++i) { - if (i != inf) { - if (is_conforming(it->first, i, 3)) { - if (verbose) - std::cerr << "conforming infinite edge " << std::endl; - CGAL_triangulation_assertion(false); - return false; - } - } - } - } - else { - is_valid_finite(it->first); - for (int i = 0; i < 3; ++i) { - n = it->first->neighbor(i); - if(!is_infinite(n->vertex(n->index(it->first)))) { - if (this->side_of_circle(it->first, 3, n->vertex(n->index(it->first))->point()) == ON_BOUNDED_SIDE) { - if (verbose) - std::cerr << "non-empty circle " << std::endl; - CGAL_triangulation_assertion(false); - return false; - } - } - - Edge o = this->opposite_edge(it->first, i, 3); - if (o.first->is_marked(o.second, o.third)) { - if (verbose) - std::cerr << "marked edge " << std::endl; - CGAL_triangulation_assertion(false); - return false; - } - - if (is_conforming(o) != - is_conforming(n, n->index(o.first->vertex(o.second)), n->index(o.first->vertex(o.third)))) { - if (verbose) - std::cerr << "inconsistent conforming edge " << std::endl; - CGAL_triangulation_assertion(false); - return false; - } - } - } - } - break; - } - case 1: { - for (Finite_edges_iterator it = finite_edges_begin(); it != finite_edges_end(); ++it) - is_valid_finite(it->first); - break; - } - } - if (verbose) - std::cerr << "valid conforming Delaunay triangulation" << std::endl; - return true; -} - -template < class Gt, class Tds, class Itag > -bool Conforming_Delaunay_triangulation_3:: -is_valid(Cell_handle c, bool verbose, int level) const { - if (!DT::is_valid(c, verbose, level)) { - CGAL_triangulation_assertion(false); - return false; - } - - switch (dimension()) { - case 3: { - for (int i = 0; i < 4; ++i) { - for (int j = i+1; j < 4; ++j) { - Vertex_handle v1 = c->vertex(i), v2 = c->vertex(j); - if (is_infinite(v1) || is_infinite(v2)) { - if (is_conforming(c, i, j)) { - if (verbose) - std::cerr << "conforming infinite edge " << std::endl; - CGAL_triangulation_assertion(false); - return false; - } - } - else { - bool conforming = is_conforming(c, i, j); - - Cell_circulator cit = incident_cells(c, i, j, c), start(cit); - do { - if (cit->is_marked(cit->index(v1), cit->index(v2))) { - if (verbose) - std::cerr << "marked edge " << std::endl; - CGAL_triangulation_assertion(false); - return false; - } - - if (cit->is_conforming(cit->index(v1), cit->index(v2)) != conforming) { - if (verbose) - std::cerr << "inconsistent conforming edge " << std::endl; - CGAL_triangulation_assertion(false); - return false; - } - cit++; - } while (cit != start); - } - } - } - break; - } - case 2: { - for (int v=0; v<3; ++v) { - int i = (v+1)%3, - j = (v+2)%3; - - Vertex_handle v1 = c->vertex(i), v2 = c->vertex(j); - if (is_infinite(v1) || is_infinite(v2)) { - if (is_conforming(c, i, j)) { - if (verbose) - std::cerr << "conforming infinite edge " << std::endl; - CGAL_triangulation_assertion(false); - return false; - } - } - else { - if (c->is_marked(i, j)) { - if (verbose) - std::cerr << "marked edge " << std::endl; - CGAL_triangulation_assertion(false); - return false; - } - - Cell_handle n = c->neighbor(v); - if (c->is_conforming(i, j) != n->is_conforming(n->index(v1), n->index(v2))) { - if (verbose) - std::cerr << "inconsistent conforming edge " << std::endl; - CGAL_triangulation_assertion(false); - return false; - } - } - } - break; - } - } - if (verbose) - std::cerr << "valid Delaunay cell" << std::endl; - return true; -} - -template < class Gt, class Tds, class Itag > -template -bool Conforming_Delaunay_triangulation_3:: -collect_encroaching(Vertex_handle va, Vertex_handle vb, OutputIterator encroaching, Vertex_handle& vc) { - CGAL_triangulation_precondition(va != vb); - CGAL_triangulation_precondition(!is_infinite(va) && !is_infinite(vb)); - CGAL_triangulation_precondition(dimension() >= 2); - - // Fill encroaching with the points that are encroaching upon the segment ab. - // vc is set to the first vertex on ab starting from a; - // if ab intersects an edge or facet the intersection is inserted and true returned. - - // This is done by traversing cells from a towards b until either b is found, - // or any other collinear vertex, or an intersecting constraint. - Locate_type lt; int li, lj; - Encroaching_collecter cit(va, vb->point(), this, encroaching); - while (cit.has_next()) { - // Walk to the next cell. - ++cit; - - cit.traversed(lt, li, lj); - - // Stop when either a new vertex is reached, or a barrier (a conforming edge) is encountered. - if (lt == DT::VERTEX) { - vc = cit->vertex(li); - if (va == vc) - continue; - return false; - } - - if (cit.barrier_hit()) { - vc = intersect(cit, lt, li, lj, va, vb); - return true; - } - } - - // The cell must contain the target. - CGAL_triangulation_assertion(cit->has_vertex(vb)); - vc = vb; - return false; -} - -template < class Gt, class Tds, class Itag > -typename Conforming_Delaunay_triangulation_3::Points_iterator -Conforming_Delaunay_triangulation_3:: -sort_encroaching(Points_iterator begin, Points_iterator end, const Point& a, const Point& b) const { - // Sorts the points encroaching upon ab to the front of the collection. - // Returns an iterator to the first point not encroaching upon ab. - Point temp; - Points_iterator middle = end; - for (Points_iterator it = begin; it != middle;) { - if (collinear(a, b, *it) || !is_encroaching(a, b, *it)) { - if (it != --middle) { - // Swap the current point to the back. - temp = *middle; - *middle = *it; - *it = temp; - } - } - else - ++it; - } - return middle; -} - -} //end of CGAL namespace - -#endif // CGAL_CONFORMING_DELAUNAY_TRIANGULATION_3_H diff --git a/Conforming_triangulation_3/include/CGAL/Conforming_triangulation_cell_base_3.h b/Conforming_triangulation_3/include/CGAL/Conforming_triangulation_cell_base_3.h deleted file mode 100644 index 936afbd0fe7..00000000000 --- a/Conforming_triangulation_3/include/CGAL/Conforming_triangulation_cell_base_3.h +++ /dev/null @@ -1,179 +0,0 @@ -//A tetrahedral cell in a conforming Delaunay triangulation. -//Copyright (C) 2012 Utrecht University -// -//This program is free software: you can redistribute it and/or modify -//it under the terms of the GNU General Public License as published by -//the Free Software Foundation, either version 3 of the License, or -//(at your option) any later version. -// -//This program is distributed in the hope that it will be useful, -//but WITHOUT ANY WARRANTY; without even the implied warranty of -//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//GNU General Public License for more details. -// -//You should have received a copy of the GNU General Public License -//along with this program. If not, see . -// -// Author(s): Thijs van Lankveld - -// Based on CGAL/Triangulation_cell_base_3.h -// - -// Note that a constrained 3D Delaunay triangulation is partially conforming and guided. -// 1-dimensional constraints are specified by segments. -// 2-demensional constraints are specified by closure complete polygons. -// The constrained 3D DT must contain a collection of edges and faces that exactly cover -// each constrained segment or polygon. For example, a constrained edge will not necessarily -// be maintained as vertices are inserted, but after updating the triangulation to the vertex -// insertion, the constrained edge must be the union of one or more constrained edges. - -#ifndef CGAL_CONFORMING_TRIANGULATION_CELL_BASE_3_H -#define CGAL_CONFORMING_TRIANGULATION_CELL_BASE_3_H - -#include -#include -#include - -namespace CGAL { - -template < typename Gt, typename Cb = Triangulation_cell_base_3 > -class Conforming_triangulation_cell_base_3: public Cb { -public: - typedef typename Cb::Vertex_handle Vertex_handle; - typedef typename Cb::Cell_handle Cell_handle; - - typedef Gt Geom_traits; - typedef typename Geom_traits::Point_3 Point; - - typedef Point* Point_container; - typedef Point* Point_iterator; - typedef const Point* Point_const_iterator; - - template < typename TDS2 > - struct Rebind_TDS { - typedef typename Cb::template Rebind_TDS::Other Cb2; - typedef Conforming_triangulation_cell_base_3 Other; - }; // Rebind_TDS - -protected: - // The edge states. - bool EF[6]; - bool mm[6]; - -public: - Conforming_triangulation_cell_base_3(): Cb() {clear_conforming();} - Conforming_triangulation_cell_base_3(const Vertex_handle& v0, const Vertex_handle& v1, - const Vertex_handle& v2, const Vertex_handle& v3) - : Cb(v0, v1, v2, v3) {clear_conforming();} - Conforming_triangulation_cell_base_3(const Vertex_handle& v0, const Vertex_handle& v1, - const Vertex_handle& v2, const Vertex_handle& v3, - const Cell_handle& n0, const Cell_handle& n1, - const Cell_handle& n2, const Cell_handle& n3) - : Cb(v0, v1, v2, v3, n0, n1, n2, n3) {clear_conforming();} - - bool is_conforming(int i, int j) const {return EF[getEdgeIndex(i,j)];} - bool is_marked(int i, int j) const {return mm[getEdgeIndex(i,j)];} - - void set_conforming(bool c0, bool c1, bool c2, bool c3, bool c4, bool c5) { - EF[0] = c0; - EF[1] = c1; - EF[2] = c2; - EF[3] = c3; - EF[4] = c4; - EF[5] = c5; - clear_marked(); - } - void set_conforming(int i, int j, bool c) { - int index = getEdgeIndex(i,j); - EF[index] = c; - mm[index] = false; - } - void mark(int i, int j) { - int index = getEdgeIndex(i,j); - EF[index] = true; - mm[index] = true; - } - - void clear_conforming() {set_conforming(false, false, false, false, false, false);} - void clear_marked() { - mm[0] = false; - mm[1] = false; - mm[2] = false; - mm[3] = false; - mm[4] = false; - mm[5] = false; - } - virtual void clear() {clear_conforming();} - - bool has_conforming() const {return EF[0] || EF[1] || EF[2] || EF[3] || EF[4] || EF[5];} - - virtual void reorient() { - bool tmp = EF[1]; - EF[1] = EF[3]; - EF[3] = tmp; - tmp = mm[1]; - mm[1] = mm[3]; - mm[3] = tmp; - } - - virtual std::istream& read_cell(std::istream& is); - virtual std::ostream& write_cell(std::ostream& os) const; - -private: - int getEdgeIndex(int i, int j) const { - CGAL_triangulation_precondition(i>=0 && i<=3); - CGAL_triangulation_precondition(j>=0 && j<=3); - CGAL_triangulation_precondition(i != j); - return (i==0 || j==0) ? i+j-1 : i+j; - } -}; // Conforming_triangulation_cell_base_3 - -template < class Gt, class Cb > -inline std::istream& operator>>(std::istream& is, Conforming_triangulation_cell_base_3& c) { - is >> static_cast(c); - return c.read_cell(is); -} - -template < class Gt, class Cb > -inline std::ostream& operator<<(std::ostream &os, const Conforming_triangulation_cell_base_3& c) { - os << static_cast(c); - return c.write_cell(os); -} - -template < class Gt, class Cb > -std::istream& Conforming_triangulation_cell_base_3::read_cell(std::istream& is) { - char s; - for (int i = 0; i < 4; ++i) { - for (int j = i+1; j < 4; ++j) { - if (is_ascii(is)) - is >> s; - else - read(is, s); - if (s == 'C') - set_conforming(i, j, true); - } - } - - return is; -} - -template < class Gt, class Cb > -std::ostream& Conforming_triangulation_cell_base_3::write_cell(std::ostream& os) const { - for (int i = 0; i < 4; ++i) { - for (int j = i+1; j < 4; ++j) { - if (is_conforming(i, j)) { - os << "C"; - } - else - os << "N"; - if (is_ascii(os)) - os << ' '; - } - } - - return os; -} - -} //end of CGAL namespace - -#endif // CGAL_CONFORMING_TRIANGULATION_CELL_BASE_3_H \ No newline at end of file diff --git a/Conforming_triangulation_3/include/CGAL/Conforming_triangulation_vertex_base_3.h b/Conforming_triangulation_3/include/CGAL/Conforming_triangulation_vertex_base_3.h deleted file mode 100644 index afd635b24c9..00000000000 --- a/Conforming_triangulation_3/include/CGAL/Conforming_triangulation_vertex_base_3.h +++ /dev/null @@ -1,69 +0,0 @@ -//A vertex in the conforming Delaunay triangulation structure. -//Copyright (C) 2012 Utrecht University -// -//This program is free software: you can redistribute it and/or modify -//it under the terms of the GNU General Public License as published by -//the Free Software Foundation, either version 3 of the License, or -//(at your option) any later version. -// -//This program is distributed in the hope that it will be useful, -//but WITHOUT ANY WARRANTY; without even the implied warranty of -//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//GNU General Public License for more details. -// -//You should have received a copy of the GNU General Public License -//along with this program. If not, see . -// -// Author(s): Thijs van Lankveld - -#ifndef CGAL_CONFORMING_TRIANGULATION_VERTEX_BASE_3_H -#define CGAL_CONFORMING_TRIANGULATION_VERTEX_BASE_3_H - -#include - -namespace CGAL { - -template < typename GT, typename Vb = Triangulation_vertex_base_3 > -class Conforming_triangulation_vertex_base_3: public Vb { - bool _s; - -public: - typedef typename Vb::Cell_handle Cell_handle; - typedef typename Vb::Point Point; - - template < typename TDS2 > struct Rebind_TDS { - typedef typename Vb::template Rebind_TDS::Other Vb2; - typedef Conforming_triangulation_vertex_base_3 Other; - }; - - Conforming_triangulation_vertex_base_3(): Vb(), _s(false) {} - Conforming_triangulation_vertex_base_3(const Point& p): Vb(p), _s(false) {} - Conforming_triangulation_vertex_base_3(const Point& p, bool s): Vb(p), _s(s) {} - Conforming_triangulation_vertex_base_3(const Point& p, Cell_handle c): Vb(p, c), _s(false) {} - Conforming_triangulation_vertex_base_3(const Point& p, bool s, Cell_handle c): Vb(p, c), _s(s) {} - Conforming_triangulation_vertex_base_3(Cell_handle c): Vb(c), _s(false) {} - - const bool& steiner() const {return _s;} - bool& steiner() {return _s;} -}; - -template < class GT, class Vb > -std::istream& -operator>>(std::istream &is, Conforming_triangulation_vertex_base_3 &v) { - is >> static_cast(v); - if (is_ascii(is)) is >> v.steiner(); - else read(is, v.steiner()); - return is; -} - -template < class GT, class Vb > -std::ostream& -operator<<(std::ostream &os, const Conforming_triangulation_vertex_base_3 &v) { - os << static_cast(v); - if (is_ascii(os)) os << ' '; - return os << v.steiner(); -} - -} //end of CGAL namespace - -#endif // CGAL_CONFORMING_TRIANGULATION_VERTEX_BASE_3_H diff --git a/Conforming_triangulation_3/include/CGAL/Delaunay_triangulation_utils_3.h b/Conforming_triangulation_3/include/CGAL/Delaunay_triangulation_utils_3.h deleted file mode 100644 index 59874fc1fc1..00000000000 --- a/Conforming_triangulation_3/include/CGAL/Delaunay_triangulation_utils_3.h +++ /dev/null @@ -1,406 +0,0 @@ -//Some additional utilities for the Delaunay triangulation structure. -//Copyright (C) 2012 Utrecht University -// -//This program is free software: you can redistribute it and/or modify -//it under the terms of the GNU General Public License as published by -//the Free Software Foundation, either version 3 of the License, or -//(at your option) any later version. -// -//This program is distributed in the hope that it will be useful, -//but WITHOUT ANY WARRANTY; without even the implied warranty of -//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//GNU General Public License for more details. -// -//You should have received a copy of the GNU General Public License -//along with this program. If not, see . -// -// Author(s): Thijs van Lankveld - -// Based on CGAL/Delaunay_triangulation_3.h -// -// For the love of something, why is the 3D triangulation package so badly written? - -#ifndef CGAL_DELAUNAY_TRIANGULATION_3_UTILS_H -#define CGAL_DELAUNAY_TRIANGULATION_3_UTILS_H - -#include - -#include -#include - -#include -#include - -namespace CGAL { - -template < class DT > class Natural_neighbors_3; - -template < class Gt, class Tds > class Triangulation_cell_traverser_3; - -template < class Gt, - class Tds_ = Triangulation_data_structure_3 < Triangulation_vertex_base_3, Triangulation_cell_base_3 > > -class Delaunay_triangulation_utils_3: public Delaunay_triangulation_3 { - //typedef Triangulation_data_structure Tds; - typedef Tds_ Tds; - typedef Delaunay_triangulation_utils_3 Self; - typedef Delaunay_triangulation_3 DT; - typedef Triangulation_3 Tr; - - friend class Natural_neighbors_3; - -public: - typedef Tds Triangulation_data_structure; - typedef Gt Geom_traits; - - typedef typename Gt::FT FT; - - typedef typename Gt::Point_3 Point; - typedef typename Gt::Vector_3 Vector; - typedef typename Gt::Segment_3 Segment; - typedef typename Gt::Line_3 Line; - typedef typename Gt::Triangle_3 Triangle; - typedef typename Gt::Tetrahedron_3 Tetrahedron; - typedef typename Gt::Plane_3 Plane; - - typedef typename DT::Cell_handle Cell_handle; - typedef typename DT::Vertex_handle Vertex_handle; - - typedef typename DT::Cell Cell; - typedef typename DT::Vertex Vertex; - typedef typename DT::Facet Facet; - typedef typename DT::Edge Edge; - - typedef std::pair Bi_vertex; - typedef Triple Tri_vertex; - - typedef std::pair Constraint_1; - typedef std::vector Constraint_2; - - typedef typename DT::Cell_circulator Cell_circulator; - typedef typename DT::Facet_circulator Facet_circulator; - typedef typename DT::Cell_iterator Cell_iterator; - typedef typename DT::Facet_iterator Facet_iterator; - typedef typename DT::Edge_iterator Edge_iterator; - typedef typename DT::Vertex_iterator Vertex_iterator; - - typedef typename DT::Finite_vertices_iterator Finite_vertices_iterator; - typedef typename DT::Finite_cells_iterator Finite_cells_iterator; - typedef typename DT::Finite_facets_iterator Finite_facets_iterator; - typedef typename DT::Finite_edges_iterator Finite_edges_iterator; - - typedef typename DT::All_cells_iterator All_cells_iterator; - - typedef Triangulation_segment_traverser_3 Cell_traverser; - - typedef typename DT::Locate_type Locate_type; - -#ifndef CGAL_CFG_USING_BASE_MEMBER_BUG_2 - using DT::cw; - using DT::ccw; - using DT::coplanar; - using DT::coplanar_orientation; - using DT::dimension; - using DT::finite_facets_begin; - using DT::finite_facets_end; - using DT::finite_vertices_begin; - using DT::finite_vertices_end; - using DT::finite_cells_begin; - using DT::finite_cells_end; - using DT::finite_edges_begin; - using DT::finite_edges_end; - using DT::geom_traits; - using DT::infinite_vertex; - using DT::is_valid; - using DT::mirror_vertex; - using DT::next_around_edge; - using DT::number_of_vertices; - using DT::orientation; - using DT::remove; - using DT::coplanar_side_of_bounded_circle; - using DT::side_of_oriented_sphere; - using DT::side_of_segment; - using DT::tds; - using DT::vertex_triple_index; - using DT::locate; - using DT::insert_in_conflict; - using DT::is_infinite; - using DT::insert; -#endif - -protected: - typedef std::list Tri_vertex_collection; - typedef std::list Bi_vertex_collection; - -protected: - // Test whether a newly inserted point conflicts with the existing cells. - class Conflict_tester_3 { - protected: - const Point& _p; - const Self* _tr; - - public: - Conflict_tester_3(const Point& pt, const Self* tr): _p(pt), _tr(tr) {} - bool operator()(const Cell_handle c) const {return _tr->side_of_sphere(c, _p, true) == ON_BOUNDED_SIDE;} - Oriented_side compare_weight(const Point&, const Point&) const {return ZERO;} - bool test_initial_cell(Cell_handle) const {return true;} - }; // class Conflict_tester_3 - - // Test whether a newly inserted point conflicts with the existing cells. - class Conflict_tester_2 { - protected: - const Point& _p; - const Self* _tr; - - public: - Conflict_tester_2(const Point& pt, const Self* tr): _p(pt), _tr(tr) {} - bool operator()(const Cell_handle c) const {return _tr->side_of_circle(c, 3, _p, true) == ON_BOUNDED_SIDE;} - Oriented_side compare_weight(const Point&, const Point&) const {return ZERO;} - bool test_initial_cell(Cell_handle) const {return true;} - }; // class Conflict_tester_2 - - class Hidden_point_visitor { - public: - Hidden_point_visitor() {} - - template < class InputIterator > - void process_cells_in_conflict(InputIterator, InputIterator) const {} - void reinsert_vertices(Vertex_handle) {} - Vertex_handle replace_vertex(Cell_handle c, int index, const Point&) {return c->vertex(index);} - void hide_point(Cell_handle, const Point&) {} - }; // class Hidden_point_visitor - - Hidden_point_visitor hidden_point_visitor; - -public: - // Constructors for bi-vertices. - inline Bi_vertex to_bi_vertex(Cell_handle c, int li, int lj) const {return Bi_vertex(c->vertex(li), c->vertex(lj));} - inline Bi_vertex to_bi_vertex(const Edge& e) const {return to_bi_vertex(e.first, e.second, e.third);} - inline Bi_vertex sort_bi_vertex(Vertex_handle v1, Vertex_handle v2) const {if (v1 < v2) return Bi_vertex(v1, v2); return Bi_vertex(v2, v1);} - inline Bi_vertex sort_bi_vertex(const Bi_vertex& bv) const {return sort_bi_vertex(bv.first, bv.second);} - inline Bi_vertex sort_bi_vertex(Cell_handle c, int li, int lj) const {return sort_bi_vertex(c->vertex(li), c->vertex(lj));} - inline Bi_vertex sort_bi_vertex(const Edge& e) const {return sort_bi_vertex(e.first, e.second, e.third);} - - // Constructors for tri-vertices. - inline Tri_vertex to_tri_vertex(Cell_handle c, int li) const {return Tri_vertex(c->vertex((li+1)&3), c->vertex((li+2)&3), c->vertex((li+3)&3));} - inline Tri_vertex to_tri_vertex(const Facet& f) const {return to_tri_vertex(f.first, f.second);} - inline Tri_vertex sort_tri_vertex(Vertex_handle v1, Vertex_handle v2, Vertex_handle v3) const { - CGAL_triangulation_precondition(v1 != v2 && v1 != v3 && v2 != v3); - if (v1 < v2) { - if (v2 < v3) - return Tri_vertex(v3, v2, v1); - if (v3 < v1) - return Tri_vertex(v2, v1, v3); - return Tri_vertex(v2, v3, v1); - } - else { // v2 < v1 - if (v3 < v2) - return Tri_vertex(v1, v2, v3); - if (v1 < v3) - return Tri_vertex(v3, v1, v2); - return Tri_vertex(v1, v3, v2); - } - } - inline Tri_vertex sort_tri_vertex(const Tri_vertex& tv) const {return sort_tri_vertex(tv.first, tv.second, tv.third);} - inline Tri_vertex sort_tri_vertex(Cell_handle c, int li) const {return sort_tri_vertex(to_tri_vertex(c, li));} - inline Tri_vertex sort_tri_vertex(const Facet& f) const {return sort_tri_vertex(f.first, f.second);} - inline Tri_vertex oriented_tri_vertex(Cell_handle c, int li) const { - CGAL_triangulation_precondition(dimension() == 2 || dimension() == 3); - CGAL_triangulation_precondition((dimension() == 2 && li == 3) || (dimension() == 3 && li >= 0 && li <= 3) ); - CGAL_triangulation_precondition(!is_infinite(c, li)); - if ((li&1) == 0) - return Tri_vertex(c->vertex((li+2)&3), - c->vertex((li+1)&3), - c->vertex((li+3)&3)); - return Tri_vertex(c->vertex((li+1)&3), - c->vertex((li+2)&3), - c->vertex((li+3)&3)); - } - inline Tri_vertex oriented_tri_vertex(const Facet& f) const {return oriented_tri_vertex(f.first, f.second);} - -protected: - // tri_vertex methods similar to Triangulation_3. - Tri_vertex make_tri_vertex(const Facet& f) const { - return Tri_vertex(f.first->vertex(vertex_triple_index(f.second, 0)), - f.first->vertex(vertex_triple_index(f.second, 1)), - f.first->vertex(vertex_triple_index(f.second, 2))); - } - void make_canonical(Tri_vertex& t) const { - int i = (&*(t.first) < &*(t.second))? 0 : 1; - if (i == 0) - i = (&*(t.first) < &*(t.third))? 0 : 2; - else - i = (&*(t.second) < &*(t.third))? 1 : 2; - Vertex_handle tmp; - switch (i) { - case 0: return; - case 1: - tmp = t.first; - t.first = t.second; - t.second = t.third; - t.third = tmp; - return; - default: - tmp = t.first; - t.first = t.third; - t.third = t.second; - t.second = tmp; - } - } - - // PREDICATES - Orientation coplanar_orientation(const Point& p0, const Point& p1, const Point& p2, const Point& p) const { - return Gt().coplanar_orientation_3_object()(p0, p1, p2, p); - } - -public: - // CONSTRUCTORS - Delaunay_triangulation_utils_3(const Gt& gt = Gt()): DT(gt) {} - - // Copy constructor duplicates vertices and cells. - Delaunay_triangulation_utils_3(const Delaunay_triangulation_utils_3& tr): DT(tr) { - CGAL_triangulation_postcondition(is_valid()); - } - - // Create a 3D Delaunay triangulation from a number of points. - template < typename InputIterator > - Delaunay_triangulation_utils_3(InputIterator first, InputIterator last, const Gt& gt = Gt()): DT(gt) { - insert(first, last); - CGAL_triangulation_postcondition(is_valid()); - } - -public: - // INSERT POINT - - Vertex_handle insert(const Point& p, Cell_handle start = Cell_handle()); - virtual Vertex_handle insert(const Point& p, Locate_type lt, Cell_handle c, int li, int lj); - - template < class InputIterator > - int insert(InputIterator first, InputIterator last) { - int n = number_of_vertices(); - - std::vector points(first, last); - std::random_shuffle(points.begin(), points.end()); - spatial_sort(points.begin(), points.end(), geom_traits()); - - Cell_handle hint; - for (typename std::vector::const_iterator it = points.begin(), end = points.end(); it != end; ++it) - hint = insert(*it, hint)->cell(); - - return number_of_vertices() - n; - } - -public: - // MOVE - - Vertex_handle move_point(Vertex_handle v, const Point& p); - -public: - // Construct the edge of c opposite to ij. - Edge opposite_edge(Cell_handle c, int li, int lj) const { - CGAL_triangulation_precondition(li >= 0 && li < 4); - CGAL_triangulation_precondition(lj >= 0 && lj < 4); - CGAL_triangulation_precondition(li != lj); - - switch (6-li-lj) { // i + j + missing indices = 6. - case 1: return Edge(c, 0, 1); - case 2: return Edge(c, 0, 2); - case 3: return (li == 0 || lj == 0) - ? Edge(c, 1, 2) - : Edge(c, 0, 3); - case 4: return Edge(c, 1, 3); - case 5: return Edge(c, 2, 3); - } - - CGAL_triangulation_assertion(false); - return Edge(); - } - Edge opposite_edge(const Edge& e) const {return opposite_edge(e.first, e.second, e.third);} - - // Give the same facet as seen from the other side. - Facet mirror_facet(Cell_handle c, int li) const {return Facet(c->neighbor(li), c->neighbor(li)->index(c));} - Facet mirror_facet(const Facet& f) const {return mirror_facet(f.first, f.second);} - - // Construct a plane of a facet. - Plane plane(Cell_handle c, int li) const { - /* This should be removed to reduce orientation errors with the inexact kernel*/ - CGAL_triangulation_precondition(dimension() >= 2); - CGAL_triangulation_precondition(dimension() == 3 || li == 3); - CGAL_triangulation_precondition(li >= 0 && li <= 3); - CGAL_triangulation_precondition(!is_infinite(c, li)); - if ((li&1) == 0) - return Plane(c->vertex((li+2)&3)->point(), - c->vertex((li+1)&3)->point(), - c->vertex((li+3)&3)->point()); - return Plane(c->vertex((li+1)&3)->point(), - c->vertex((li+2)&3)->point(), - c->vertex((li+3)&3)->point()); - } - Plane plane(const Facet& f) const {return plane(f.first, f.second);} - - // Construct a line of an edge. - Line line(Cell_handle c, int li, int lj) const { - CGAL_triangulation_precondition(dimension() >= 1); - CGAL_triangulation_precondition(li >= 0 && li <= 3); - CGAL_triangulation_precondition(lj >= 0 && lj <= 3); - CGAL_triangulation_precondition(li != lj); - CGAL_triangulation_precondition(li + lj < dimension() * 2); - CGAL_triangulation_precondition(!is_infinite(c, li, lj)); - return Line(c->vertex(li)->point(), - c->vertex(lj)->point()); - } - Line line(const Edge& e) const {return line(e.first, e.second, e.third);} -}; // Delaunay_triangulation_utils_3 - -template < class Gt, class Tds > -typename Delaunay_triangulation_utils_3::Vertex_handle -Delaunay_triangulation_utils_3:: -insert(const Point& p, Cell_handle start) { - Locate_type lt; - int li, lj; - Cell_handle c = locate(p, lt, li, lj, start); - return insert(p, lt, c, li, lj); -} - -template < class Gt, class Tds > -typename Delaunay_triangulation_utils_3::Vertex_handle -Delaunay_triangulation_utils_3:: -insert(const Point& p, Locate_type lt, Cell_handle c, int li, int lj) { - switch (dimension()) { - case 3: { - Conflict_tester_3 tester(p, this); - Vertex_handle v = insert_in_conflict(p, lt, c, li, lj, tester, hidden_point_visitor); - return v; - }// dim 3 - case 2: { - Conflict_tester_2 tester(p, this); - return insert_in_conflict(p, lt, c, li, lj, tester, hidden_point_visitor); - }//dim 2 - default : - // dimension <= 1 - // Do not use the generic insert. - return Tr::insert(p, c); - } -} - -template < class Gt, class Tds > -typename Delaunay_triangulation_utils_3::Vertex_handle -Delaunay_triangulation_utils_3::move_point(Vertex_handle v, const Point& p) { - CGAL_triangulation_precondition(!is_infinite(v)); - CGAL_triangulation_expensive_precondition(is_vertex(v)); - - // Remember an incident vertex to restart the point location after the removal. - Cell_handle c = v->cell(); - Vertex_handle old_neighbor = c->vertex(c->index(v) == 0 ? 1 : 0); - CGAL_triangulation_assertion(old_neighbor != v); - - if (!remove(v)) - return v; - - if (dimension() <= 0) - return insert(p); - return insert(p, old_neighbor->cell()); -} - -} //end of CGAL namespace - -#endif // CGAL_DELAUNAY_TRIANGULATION_3_UTILS_H diff --git a/Conforming_triangulation_3/include/CGAL/Encroaching_collecter_3.h b/Conforming_triangulation_3/include/CGAL/Encroaching_collecter_3.h deleted file mode 100644 index f371916bb11..00000000000 --- a/Conforming_triangulation_3/include/CGAL/Encroaching_collecter_3.h +++ /dev/null @@ -1,135 +0,0 @@ -//A traverser that collects points encroaching upon its path. -//Copyright (C) 2012 Utrecht University -// -//This program is free software: you can redistribute it and/or modify -//it under the terms of the GNU General Public License as published by -//the Free Software Foundation, either version 3 of the License, or -//(at your option) any later version. -// -//This program is distributed in the hope that it will be useful, -//but WITHOUT ANY WARRANTY; without even the implied warranty of -//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//GNU General Public License for more details. -// -//You should have received a copy of the GNU General Public License -//along with this program. If not, see . -// -// Author(s): Thijs van Lankveld - -// A class that traverses the cells of a triangulation by following a segment from source to target, -// while collecting points that encroach upon the segment. - -#ifndef CGAL_ENCROACHING_COLLECTER_3_H -#define CGAL_ENCROACHING_COLLECTER_3_H - -#include "Triangulation_segment_traverser_3.h" - -namespace CGAL { - -#ifndef CGAL_CONSTRAINED_TRIANGULATION_2_H -/// \todo factorize with CDT2 -struct No_intersection_tag{}; -struct Exact_intersections_tag{}; // To be used with an exact number type. -struct Exact_predicates_tag{}; // To be used with filtered exact number type. -#endif - -template < class Gt, class Tds, class Itag > -class Conforming_Delaunay_triangulation_3; - -template < class Gt, class Tds, class Itag = No_intersection_tag, class Out = std::back_insert_iterator > > > -class Encroaching_collecter_3: public Triangulation_segment_traverser_3 { - typedef Encroaching_collecter_3 Self; - typedef Triangulation_segment_traverser_3 Base; - - typedef typename Gt::Plane_3 Plane; - -public: - typedef Conforming_Delaunay_triangulation_3 CDT; - - typedef typename Tds::Vertex Vertex; - typedef typename Tds::Cell Cell; - typedef typename Tds::Edge Edge; - typedef typename Tds::Facet Facet; - typedef typename Tds::Vertex_handle Vertex_handle; - typedef typename Tds::Cell_handle Cell_handle; - typedef typename Tds::Cell_iterator Cell_iterator; - typedef typename Tds::Cell_circulator Cell_circulator; - typedef typename Tds::Facet_iterator Facet_iterator; - typedef typename Tds::Facet_circulator Facet_circulator; - - typedef typename Gt::Point_3 Point; - typedef typename CDT::Locate_type Locate_type; - typedef typename CDT::Bi_vertex Bi_vertex; - using Base::_lt; - using Base::_tr; - using Base::_pos; - using Base::_li; - using Base::_lj; - using Base::_source; - using Base::_target; -protected: - Out _out; - - Bi_vertex se; // These are used when the source lies on an edge. - -public: - Encroaching_collecter_3(): Base() {} - Encroaching_collecter_3(Vertex_handle v, const Point& t, const CDT* tr, Out output) - : Base(v, t, tr), _out(output) {if (_lt == CDT::EDGE) se = _tr->sort_bi_vertex(_pos, _li, _lj);} - Encroaching_collecter_3(const Point& s, const Point& t, const CDT* tr, Out output, Cell_handle hint = Cell_handle()) - : Base(s, t, tr, hint), _out(output) {if (_lt == CDT::EDGE) se = _tr->sort_bi_vertex(_pos, _li, _lj);} - - virtual bool barrier_hit() const {return _lt == CDT::EDGE && _pos->is_conforming(_li, _lj) && _tr->sort_bi_vertex(_pos, _li, _lj) != se;} - -protected: - // Traverse to the next cell along the line. - virtual void increment(); -}; - -template < class Gt, class Tds, class Itag, class Out > -void Encroaching_collecter_3::increment() { - // Walk to the next cell. - Base::increment(); - - // Check for encroaching points. - // Which points are checked is based on the type of simplex traversed. - const CDT* _cdt = dynamic_cast(_tr); - switch (_lt) { - case CDT::FACET: - for (int i = 0; i < 4; ++i) - if (i != _li && !_cdt->is_infinite(_pos->vertex(i)) && _cdt->is_encroaching(_source, _target, _pos->vertex(i)->point())) - *_out++ = _pos->vertex(i)->point(); - break; - case CDT::EDGE: { - Vertex_handle vi = _pos->vertex(_li), vj = _pos->vertex(_lj), vk; - Cell_handle c; - - // Check the vertices in the star around the edge. - Facet_circulator fit = _cdt->incident_facets(_pos, _li, _lj), start(fit); - do { - c = fit->first; - vk = c->vertex(6 - c->index(vi) - c->index(vj) - fit->second); - if (!_cdt->is_infinite(vk) && !collinear(_source, _target, vk->point()) && _cdt->is_encroaching(_source, _target, vk->point())) - *_out++ = vk->point(); - ++fit; - } while (fit != start); - - // Check the vertices of the edge. - if (_cdt->is_encroaching(_source, _target, vi->point())) - *_out++ = vi->point(); - if (_cdt->is_encroaching(_source, _target, vj->point())) - *_out++ = vj->point(); - break; - } - case CDT::VERTEX: - CGAL_triangulation_assertion(collinear(_source, _target, _pos->vertex(_li)->point())); - break; - default: - CGAL_triangulation_assertion(false); - break; - } -} - -} //end of CGAL namespace - -#endif // CGAL_ENCROACHING_COLLECTER_3_H \ No newline at end of file diff --git a/Conforming_triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Conforming_triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h deleted file mode 100644 index fe2c13a2915..00000000000 --- a/Conforming_triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ /dev/null @@ -1,695 +0,0 @@ -//A class that follows a straight line through a Delaunay triangulation structure. -//Copyright (C) 2012 Utrecht University -// -//This program is free software: you can redistribute it and/or modify -//it under the terms of the GNU General Public License as published by -//the Free Software Foundation, either version 3 of the License, or -//(at your option) any later version. -// -//This program is distributed in the hope that it will be useful, -//but WITHOUT ANY WARRANTY; without even the implied warranty of -//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//GNU General Public License for more details. -// -//You should have received a copy of the GNU General Public License -//along with this program. If not, see . -// -// Author(s): Thijs van Lankveld - -// A class that traverses the cells of a triangulation by following a segment from source to target. - -#ifndef CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_H -#define CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_H - -#include "Delaunay_triangulation_utils_3.h" - -#include - -namespace CGAL { - -template < class Gt, class Tds> -class Delaunay_triangulation_utils_3; - -template < class Gt, class Tds > -class Triangulation_segment_traverser_3: public Forward_circulator_base< typename Tds::Cell, std::ptrdiff_t, std::size_t > { - typedef Triangulation_segment_traverser_3 Self; - -public: - typedef Delaunay_triangulation_utils_3 Tr; - - typedef typename Tds::Vertex Vertex; - typedef typename Tds::Cell Cell; - typedef typename Tds::Edge Edge; - typedef typename Tds::Facet Facet; - typedef typename Tds::Vertex_handle Vertex_handle; - typedef typename Tds::Cell_handle Cell_handle; - typedef typename Tds::Cell_iterator Cell_iterator; - typedef typename Tds::Cell_circulator Cell_circulator; - typedef typename Tds::Facet_iterator Facet_iterator; - typedef typename Tds::Facet_circulator Facet_circulator; - - typedef typename Gt::Point_3 Point; - typedef typename Tr::Locate_type Locate_type; - -protected: - // The triangulation being traversed. - const Tr* _tr; - - // The source and target points of the traversal. - Point _source, _target; - - // The cell currently traversed and the previous one. - Cell_handle _pos, _prev; - - // Otherwise, they indicate the simplex through which this cell was entered, - // or the location of the source if it is in this cell. - int _li, _lj; - Locate_type _lt; - - // This bit signifies when a cell containing the target is found. - bool _done; - - // Where possible, facets are checked in a random order. - mutable Random rng; - -public: - Triangulation_segment_traverser_3(): _tr(NULL), _pos(), _prev(), _li(-1), _lj(-1), _lt(Tr::CELL), _done(true) {} - Triangulation_segment_traverser_3(Vertex_handle s, const Point& t, const Tr* tr); - Triangulation_segment_traverser_3(const Point& s, const Point& t, const Tr* tr, Cell_handle hint = Cell_handle()); - - Self& operator++(); - Self operator++(int); - Cell* operator->() {return &*_pos;} - Cell& operator*() {return *_pos;} - Cell_handle handle() {return _pos;} - operator const Cell_handle() const {return _pos;} - bool operator==(const Self& ct) const; - bool operator!=(const Self& ct) const; - - bool operator==(const Cell_handle& ch) const {return ch == _pos;} - bool operator!=(const Cell_handle& ch) const {return ch != _pos;} - - bool operator==(Nullptr_t CGAL_triangulation_assertion_code(n)) const; - bool operator!=(Nullptr_t n) const; - - // Check if a cell containing the target has been reached. - bool has_next() const {return !_done;} - - // Access the current and previous cells. - Cell_handle previous() const {return _prev;} - - // Traverse to a cell containing the target. - Cell_handle traverse(); - - // Get the type of simplex traversed last. - void traversed(Locate_type& lt, int& li, int& lj) const {lt = _lt; li = _li; lj = _lj;} - -protected: - // Traverse to the next cell along the line. - virtual void increment(); - -private: - inline int edgeIndex(int i, int j) const { - CGAL_triangulation_precondition(i>=0 && i<=3); - CGAL_triangulation_precondition(j>=0 && j<=3); - CGAL_triangulation_precondition(i != j); - return (i==0 || j==0) ? i+j-1 : i+j; - } - - inline Orientation coplanar_orientation(const Point& p, const Point& q, const Point& r, const Point& s) { - return Gt().coplanar_orientation_3_object()(p, q, r, s); - } -}; // class Triangulation_segment_traverser_3 - -template < class Gt, class Tds > -inline bool operator==(typename Tds::Cell_handle ch, Triangulation_segment_traverser_3 tci) {return tci == ch;} - -template < class Gt, class Tds > -inline bool operator!=(typename Tds::Cell_handle ch, Triangulation_segment_traverser_3 tci) {return tci != ch;} - -template < class Gt, class Tds > -Triangulation_segment_traverser_3::Triangulation_segment_traverser_3(Vertex_handle s, const Point& t, const Tr* tr) -: _tr(tr), _pos(), _prev(), _lj(-1), _lt(Tr::VERTEX), _done(false) { - CGAL_triangulation_precondition(!_tr->is_infinite(s)); - CGAL_triangulation_precondition(s->point() != t); - CGAL_triangulation_precondition(_tr->dimension() >= 2); - CGAL_triangulation_assertion(_tr->dimension() == 3 || _tr->plane(*_tr->finite_facets_begin()).has_on(_target)); - - _source = s->point(); - _target = t; - - _pos = s->cell(); - int inf; - if (_pos->has_vertex(_tr->infinite_vertex(), inf)) - _pos = _pos->neighbor(inf); - _li = _pos->index(s); - - CGAL_triangulation_postcondition(_pos != Cell_handle()); -} - -template < class Gt, class Tds > -Triangulation_segment_traverser_3::Triangulation_segment_traverser_3(const Point& s, const Point& t, const Tr* tr, Cell_handle hint) -: _tr(tr), _pos(), _prev(), _li(-1), _lj(-1), _done(false) { - CGAL_triangulation_precondition(s != t); - CGAL_triangulation_precondition(_tr->dimension() >= 2); - CGAL_triangulation_assertion(_tr->dimension() == 3 || _tr->plane(*_tr->finite_facets_begin()).has_on(_target)); - - _source = s; - _target = t; - - _pos = _tr->locate(s, _lt, _li, _lj, hint); - - CGAL_triangulation_postcondition(_pos != Cell_handle()); -} - -template < class Gt, class Tds > -inline Triangulation_segment_traverser_3& -Triangulation_segment_traverser_3::operator++() { - CGAL_triangulation_precondition(_pos != Cell_handle()); - increment(); - return *this; -} - -template < class Gt, class Tds > -inline Triangulation_segment_traverser_3 -Triangulation_segment_traverser_3::operator++(int) { - Self tmp(*this); - ++(*this); - return tmp; -} - -template < class Gt, class Tds > -inline bool Triangulation_segment_traverser_3::operator==(const Self& ct) const { - CGAL_triangulation_precondition(_pos != Cell_handle() && ct._pos != Cell_handle()); - return (_pos == ct._pos && - _prev == ct._prev && - _tr == ct._tr && - _li == ct._li && - _lj == ct._lj && - _lt == ct._lt && - _source == ct._source && - _target == ct._target && - _done == ct._done); -} - -template < class Gt, class Tds > -inline bool Triangulation_segment_traverser_3::operator!=(const Self& ct) const { - return !(*this == ct); -} - -template < class Gt, class Tds > -inline bool Triangulation_segment_traverser_3::operator==(Nullptr_t CGAL_triangulation_assertion_code(n)) const { - CGAL_triangulation_assertion(n == NULL); - return _pos == Cell_handle(); -} - -template < class Gt, class Tds > -inline bool Triangulation_segment_traverser_3::operator!=(Nullptr_t n) const { - CGAL_triangulation_assertion(n == NULL); - return !(*this == n); -} - -template < class Gt, class Tds > -inline typename Triangulation_segment_traverser_3::Cell_handle -Triangulation_segment_traverser_3::traverse() { - while (!_done) - increment(); - return _pos; -} - -template < class Gt, class Tds > -void Triangulation_segment_traverser_3::increment() { - CGAL_triangulation_precondition(!_done); - - // Walks to the next cell over a facet intersected by the line from source to target. - // This method is based on Triangulation_3::locate(). - switch (_tr->dimension()) { - case 3: { - // Infinite cells should be handled differently. - int inf; - if (_pos->has_vertex(_tr->infinite_vertex(), inf)) { - // If this cell was reached by traversal from a finite one, it must be the final cell. - Cell_handle fin = _pos->neighbor(inf); - if (fin == _prev) { - _done = true; - // Here, I do not change the _lt etc. because they were already set. - return; - } - - const Point* pts[4]; - for (int i = 0; i != 4; ++i) - if (i != inf) - pts[i] = &(_pos->vertex(i)->point()); - pts[inf] = &_target; - Orientation o[4]; - - // For the remembering stochastic walk, we start trying with a random index: - int li = rng.template get_bits<2>(); - - // Check if the target lies outside the convex hull. - if (orientation(*pts[0], *pts[1], *pts[2], *pts[3]) == POSITIVE) { - // The target lies in an infinite cell. - _done = true; - return; - - // Note that we do not traverse to other infinite cells. - } - - pts[inf] = &_source; - CGAL_triangulation_assertion(orientation(*pts[0], *pts[1], *pts[2], *pts[3]) == POSITIVE); - - // Check if the line enters an adjacent infinite cell. - // This occurs if the target lies on the other side of - // a plane through one of the finite edges and the source point. - for (int j = 0; j != 4; ++j, li = (li+1)&3) { - if (li == inf) { - o[li] = COPLANAR; - continue; - } - - Cell_handle next = _pos->neighbor(li); - if (next == _prev) { - o[li] = POSITIVE; - continue; - } - - const Point* backup = pts[li]; - pts[li] = &_target; - o[li] = orientation(*pts[0], *pts[1], *pts[2], *pts[3]); - - if (o[li] != NEGATIVE) { - pts[li] = backup; - continue; - } - - // The target lies behind the plane through the source and two finite vertices. - // Traverse to the incident infinite cell. - _prev = _pos; - _pos = next; - CGAL_triangulation_assertion(_tr->is_infinite(_pos)); - - _lt = Tr::FACET; - _li = _pos->index(_prev); - return; - } - - // The line enters the convex hull here (or lies on the finite facet). - _prev = _pos; - _pos = fin; - - // Check through which simplex the line traverses. - switch (o[0]+o[1]+o[2]+o[3]) { - case 3: - _lt = Tr::FACET; - _li = _pos->index(_prev); - return; - case 2: - _lt = Tr::EDGE; - for (int i = 0; i < 4; ++i) { - if (o[i] == COPLANAR && i != inf) { - Edge opp = _tr->opposite_edge(_prev, inf, i); - _li = _pos->index(_prev->vertex(opp.second)); - _lj = _pos->index(_prev->vertex(opp.third)); - return; - } - } - CGAL_triangulation_assertion(false); - return; - case 1: - _lt = Tr::VERTEX; - for (int i = 0; i < 4; ++i) { - if (o[i] == POSITIVE) { - _li = _pos->index(_prev->vertex(i)); - return; - } - } - CGAL_triangulation_assertion(false); - return; - default: - CGAL_triangulation_assertion(false); - return; - } - } - - const Point* pts[4] = {&(_pos->vertex(0)->point()), - &(_pos->vertex(1)->point()), - &(_pos->vertex(2)->point()), - &(_pos->vertex(3)->point())}; - - // We check in which direction the target lies - // by comparing its position relative to the planes through the - // source and the edges of the cell. - Orientation o[6]; - bool calc[6] = {false, false, false, false, false, false}; - - if (_lt == Tr::VERTEX) { - // The three planes through the vertex are set to coplanar. - for (int j = 0; j < 4; ++j) { - if (_li != j) { - int ij = edgeIndex(_li, j); - o[ij] = COPLANAR; - calc[ij] = true; - } - } - } - else if (_lt == Tr::EDGE) { - // The plane through the edge is set to coplanar. - int ij = edgeIndex(_li, _lj); - o[ij] = COPLANAR; - calc[ij] = true; - } - - // For the remembering stochastic walk, we start trying with a random facet: - int li = rng.template get_bits<2>(); - - CGAL_triangulation_assertion_code(bool incell = true;) - for (int k = 0; k < 4; ++k, li = (li+1)&3) { - Cell_handle next = _pos->neighbor(li); - if (next == _prev) - continue; - - // Check if the target is outside the cell. - const Point* backup = pts[li]; - pts[li] = &_target; - if (orientation(*pts[0], *pts[1], *pts[2], *pts[3]) != NEGATIVE) { - pts[li] = backup; - continue; - } - - CGAL_triangulation_assertion_code(incell = false;) - - // Check if the target is inside the pyramid. - int lj = rng.template get_bits<2>(); - int Or = 0; - for (int l = 0; l < 4; ++l, lj = (lj+1)&3) { - if (li == lj) - continue; - - // We check the orientation of the target compared to the plane - // Through the source and the edge opposite of ij. - int oij = 5 - edgeIndex(li, lj); - if (!calc[oij]) { - const Point* backup2 = pts[lj]; - pts[lj] = &_source; - o[oij] = orientation(*pts[0], *pts[1], *pts[2], *pts[3]); - pts[lj] = backup2; - calc[oij] = true; - } - - Or -= o[oij]; - if (o[oij] == POSITIVE) { - // The target is not inside the pyramid. - // Invert the planes. - // This can be safely done because either - // they were not calculated yet, - // or they will no longer be used. - for (int j = 0; j < 4; ++j) { - if (li == j) continue; - int oij = 5 - edgeIndex(li, j); - o[oij] = -o[oij]; - } - Or = 0; - break; - } - } - - if (Or == 0) { - // Either the target is not inside the pyramid, - // or the pyramid is degenerate. - pts[li] = backup; - continue; - } - - // The target is inside the pyramid. - _prev = _pos; - _pos = next; - - switch (Or) { - case 3: - _lt = Tr::FACET; - _li = _pos->index(_prev); - return; - case 2: - _lt = Tr::EDGE; - for (int j = 0; j < 4; ++j) { - if (li != j && o[5-edgeIndex(li, j)] == COPLANAR) { - Edge opp = _tr->opposite_edge(_prev, li, j); - _li = _pos->index(_prev->vertex(opp.second)); - _lj = _pos->index(_prev->vertex(opp.third)); - return; - } - } - CGAL_triangulation_assertion(false); - return; - case 1: - _lt = Tr::VERTEX; - for (int j = 0; j < 4; ++j) { - if (li != j && o[5-edgeIndex(li, j)] == NEGATIVE) { - _li = _pos->index(_prev->vertex(j)); - return; - } - } - CGAL_triangulation_assertion(false); - return; - default: - CGAL_triangulation_assertion(false); - return; - } - } - - // The target lies inside this cell. - CGAL_triangulation_assertion(incell); - _done = true; - return; - } - case 2: { - int inf; - if (_pos->has_vertex(_tr->infinite_vertex(), inf) && inf < 3) { - // If this cell was reached by traversal from a finite one, it must be the final cell. - Cell_handle fin = _pos->neighbor(inf); - if (fin == _prev) { - _done = true; - return; - } - - // Check the neighboring cells. - if (coplanar_orientation(_source, _pos->vertex(_tr->ccw(inf))->point(), _pos->vertex(_tr->cw(inf))->point(), _target) == NEGATIVE) { - Cell_handle tmp = _pos->neighbor(_tr->cw(inf)); - _prev = _pos; - _pos = tmp; - return; - } - if (coplanar_orientation(_source, _pos->vertex(_tr->cw(inf))->point(), _pos->vertex(_tr->ccw(inf))->point(), _target) == NEGATIVE) { - Cell_handle tmp = _pos->neighbor(_tr->ccw(inf)); - _prev = _pos; - _pos = tmp; - return; - } - if (coplanar_orientation(_pos->vertex(_tr->ccw(inf))->point(), _pos->vertex(_tr->cw(inf))->point(), _source, _target) != POSITIVE) { - _prev = _pos; - _pos = fin; - return; - } - - // The target lies in this infinite cell. - _done = true; - return; - } - - const Point* pts[3] = {&(_pos->vertex(0)->point()), - &(_pos->vertex(1)->point()), - &(_pos->vertex(2)->point())}; - - switch (_lt) { - case Tr::VERTEX: { - // First we try the incident edges. - Orientation ocw = coplanar_orientation(*pts[_li], *pts[(_li+2)%3], *pts[(_li+1)%3], _target); - if (_pos->neighbor((_li+1)%3) != _prev && - ocw == NEGATIVE) { - Cell_handle tmp = _pos->neighbor((_li+1)%3); - _prev = _pos; - _pos = tmp; - _li = _pos->index(_prev->vertex(_li)); - return; - } - Orientation occw = coplanar_orientation(*pts[_li], *pts[(_li+1)%3], *pts[(_li+2)%3], _target); - if (_pos->neighbor((_li+2)%3) != _prev && - occw == NEGATIVE) { - Cell_handle tmp = _pos->neighbor((_li+2)%3); - _prev = _pos; - _pos = tmp; - _li = _pos->index(_prev->vertex(_li)); - return; - } - - // Then we try the opposite edge. - if (coplanar_orientation(*pts[(_li+1)%3], *pts[(_li+2)%3], *pts[_li], _target) == NEGATIVE) { - Cell_handle tmp = _pos->neighbor(_li); - _prev = _pos; - _pos = tmp; - - switch (ocw+occw) { - case 2: { - _lt = Tr::EDGE; - _li = _pos->index(_prev->vertex((_li+1)%3)); - _lj = _pos->index(_prev->vertex((_li+2)%3)); - return; - } - case 1: { - _lt = Tr::VERTEX; - if (ocw == COLLINEAR) _li = _pos->index(_prev->vertex((_li+2)%3)); - else _li = _pos->index(_prev->vertex((_li+1)%3)); - return; - } - default: - CGAL_triangulation_assertion(false); - return; - } - } - - // The target lies in this cell. - _done = true; - return; - } - case Tr::EDGE: { - int lk = 3-_li-_lj; - - if (_pos->neighbor(lk) != _prev) { - // Check the edge itself - switch (coplanar_orientation(*pts[_li], *pts[_lj], *pts[lk], _target)) { - case COLLINEAR: { - // The target lies in this cell. - _done = true; - return; - } - case NEGATIVE: { - // The target lies opposite of the edge. - Cell_handle tmp = _pos->neighbor(lk); - _prev = _pos; - _pos = tmp; - _li = _pos->index(_prev->vertex(_li)); - _lj = _pos->index(_prev->vertex(_lj)); - return; - } - default: - break; - } - } - - Orientation o = coplanar_orientation(_source, *pts[lk], *pts[_li], _target); - switch (o) { - case POSITIVE: { - // The ray passes through the edge ik. - if (coplanar_orientation(*pts[lk], *pts[_li], _source, _target) == NEGATIVE) { - Cell_handle tmp = _pos->neighbor(_lj); - _prev = _pos; - _pos = tmp; - - if (collinear(_source, *pts[_li], _target)) { - _lt = Tr::VERTEX; - _li = _pos->index(_prev->vertex(_li)); - } - else { - _lt = Tr::EDGE; - _li = _pos->index(_prev->vertex(_li)); - _lj = _pos->index(_prev->vertex(lk)); - } - return; - } - break; - } - default: { - // The ray passes through the edge jk. - if (coplanar_orientation(*pts[lk], *pts[_lj], _source, _target) == NEGATIVE) { - Cell_handle tmp = _pos->neighbor(_li); - _prev = _pos; - _pos = tmp; - - if (collinear(_source, *pts[_lj], _target)) { - _lt = Tr::VERTEX; - _li = _pos->index(_prev->vertex(_lj)); - } - else if (o == COLLINEAR) { - _lt = Tr::VERTEX; - _li = _pos->index(_prev->vertex(lk)); - } - else { - _lt = Tr::EDGE; - _li = _pos->index(_prev->vertex(lk)); - _lj = _pos->index(_prev->vertex(_lj)); - } - return; - } - break; - } - } - - // The target lies in this cell. - _done = true; - return; - } - case Tr::FACET: { - // We test its edges in a random order until we find a neighbor to go further - int li = rng.get_int(0, 3); - - Orientation o[3]; - bool calc[3] = {false, false, false}; - - for (int j = 0; j != 3; ++j, li = (li+1)%3) { - Cell_handle next = _pos->neighbor(li); - if (next == _prev) - continue; - - // The target should lie on the other side of the edge. - if (coplanar_orientation(*pts[(li+1)%3], *pts[(li+2)%3], *pts[li], _target) != NEGATIVE) - continue; - - // The target should lie inside the wedge. - if (!calc[(li+1)%3]) { - o[(li+1)%3] = coplanar_orientation(_source, *pts[(li+1)%3], *pts[(li+2)%3], _target); - calc[(li+1)%3] = true; - } - if (o[(li+1)%3] == NEGATIVE) continue; - - if (!calc[(li+2)%3]) { - o[(li+2)%3] = coplanar_orientation(_source, *pts[(li+2)%3], *pts[(li+1)%3], _target); - calc[(li+2)%3] = true; - } - if (o[(li+2)%3] == POSITIVE) continue; - - _prev = _pos; - _pos = next; - - switch (o[(li+1)%3]+o[(li+2)%3]) { - case 2: { - _lt = Tr::EDGE; - _li = _pos->index(_prev->vertex((li+1)%3)); - _lj = _pos->index(_prev->vertex((li+2)%3)); - return; - } - case 1: { - _lt = Tr::VERTEX; - if (o[(li+1)%3] == COLLINEAR) _li = _pos->index(_prev->vertex((li+1)%3)); - else _li = _pos->index(_prev->vertex((li+2)%3)); - return; - } - default: - CGAL_triangulation_assertion(false); - return; - } - } - - // The target lies in this cell. - _done = true; - return; - } - default: - CGAL_triangulation_assertion(false); - } - } - } -} - -} //end of CGAL namespace - -#endif // CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_H \ No newline at end of file diff --git a/Conforming_triangulation_3/package_info/Conforming_triangulation_3/copyright b/Conforming_triangulation_3/package_info/Conforming_triangulation_3/copyright deleted file mode 100644 index dea96f89cdd..00000000000 --- a/Conforming_triangulation_3/package_info/Conforming_triangulation_3/copyright +++ /dev/null @@ -1,2 +0,0 @@ -Utrecht University (The Netherlands) & INRIA Sophia-Antipolis (France) - diff --git a/Conforming_triangulation_3/package_info/Conforming_triangulation_3/description.txt b/Conforming_triangulation_3/package_info/Conforming_triangulation_3/description.txt deleted file mode 100644 index 64a95593a98..00000000000 --- a/Conforming_triangulation_3/package_info/Conforming_triangulation_3/description.txt +++ /dev/null @@ -1,3 +0,0 @@ -Package Conforming_triangulation_3 : -conforming triangulation data structure -this can be wrapped around any CGAL::Triangulation_3, usually CGAL::Delaunay_triangulation_3 diff --git a/Conforming_triangulation_3/package_info/Conforming_triangulation_3/license.txt b/Conforming_triangulation_3/package_info/Conforming_triangulation_3/license.txt deleted file mode 100644 index 8bb8efcb72b..00000000000 --- a/Conforming_triangulation_3/package_info/Conforming_triangulation_3/license.txt +++ /dev/null @@ -1 +0,0 @@ -GPL (v3 or later) diff --git a/Conforming_triangulation_3/package_info/Conforming_triangulation_3/maintainer b/Conforming_triangulation_3/package_info/Conforming_triangulation_3/maintainer deleted file mode 100644 index 8dc617e8bb8..00000000000 --- a/Conforming_triangulation_3/package_info/Conforming_triangulation_3/maintainer +++ /dev/null @@ -1 +0,0 @@ -Thijs van Lankveld diff --git a/Triangulation_3/doc/Triangulation_3/examples.txt b/Triangulation_3/doc/Triangulation_3/examples.txt index 44f09d428a1..d6818e3bfdd 100644 --- a/Triangulation_3/doc/Triangulation_3/examples.txt +++ b/Triangulation_3/doc/Triangulation_3/examples.txt @@ -7,6 +7,7 @@ \example Triangulation_3/info_insert_with_transform_iterator.cpp \example Triangulation_3/simplex.cpp \example Triangulation_3/fast_location_3.cpp +\example Triangulation_3/segment_traverser_3.cpp \example Triangulation_3/find_conflicts_3.cpp \example Triangulation_3/regular_3.cpp \example Triangulation_3/copy_triangulation_3.cpp diff --git a/Triangulation_3/examples/Triangulation_3/README b/Triangulation_3/examples/Triangulation_3/README index d67b701d3d5..968c5a53b65 100644 --- a/Triangulation_3/examples/Triangulation_3/README +++ b/Triangulation_3/examples/Triangulation_3/README @@ -22,6 +22,11 @@ in a triangulation, when he needs to add handles in it. This example shows the use of the Fast_location policy to speed up point location queries in a Delaunay triangulation. +------- segment_traverser_3 -------------------------------------------- + +This example shows how to use a Triangulation_segment_traverser_3 +to traverse the triangulation in a straight line. + ------- tds -------------------------------------------------- Shows how to construct a 3D triangulation data structure by diff --git a/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp b/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp new file mode 100644 index 00000000000..691faa15751 --- /dev/null +++ b/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp @@ -0,0 +1,45 @@ +#include +#include +#include + +#include +#include + +// Define the kernel. +typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; +typedef Kernel::Point_3 Point_3; + +// Define the structure. +typedef CGAL::Delaunay_triangulation_3< Kernel > DT; + +typedef DT::Cell_handle Cell_handle; + +typedef CGAL::Triangulation_segment_traverser_3< DT > Traverser; + +void main() { + std::vector< Point_3 > points; + points.reserve( 6 ); + points.push_back( Point_3(-.9063, .4226, 1.0 ) ); + points.push_back( Point_3( .8192, .5736, 1.0 ) ); + points.push_back( Point_3( .0872,-.9992, 1.0 ) ); + points.push_back( Point_3(-.8192, .5736,-1.0 ) ); + points.push_back( Point_3( .9063, .4226,-1.0 ) ); + points.push_back( Point_3( .0872,-.9962,-1.0 ) ); + + // Construct the Delaunay triangulation. + DT dt( points.begin(), points.end() ); + assert( dt.is_valid() ); + + // Construct a traverser. + Traverser st( dt, Point_3(-3,0,0), Point_3(3,0,0) ); + + // Count the number of finite cells traversed. + unsigned int cells = 0; + while( st.has_next() ) { + if( !dt.is_infinite(st) ) + ++cells; + ++st; + } + + std::cout << "The number of finite cells between " << st.source() << " and " << st.target() << " is " << cells << std::endl; +} \ No newline at end of file diff --git a/Triangulation_3/include/CGAL/Triangulation_3.h b/Triangulation_3/include/CGAL/Triangulation_3.h index b56c13eeb47..1cbee55c57e 100644 --- a/Triangulation_3/include/CGAL/Triangulation_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_3.h @@ -539,6 +539,7 @@ protected: GT _gt; Vertex_handle infinite; //infinite vertex +public: Comparison_result compare_xyz(const Point &p, const Point &q) const { @@ -557,6 +558,9 @@ protected: { return geom_traits().orientation_3_object()(p, q, r, s); } + + // Compute the orientation of a point compared to the oriented plane supporting a half-facet. + Orientation orientation( const Facet& f, const Point& p ) const; bool coplanar(const Point &p, const Point &q, @@ -565,6 +569,21 @@ protected: return orientation(p, q, r, s) == COPLANAR; } + // Check whether the points of four vertices `a`, `b`, `c`, and `d` are coplanar. + bool coplanar( Vertex_handle a, Vertex_handle b, Vertex_handle c, Vertex_handle d ) const { + return coplanar( a->point(), b->point(), c->point(), d->point() ); + } + + // Check whether the points of facet `f` and point `p` are coplanar. + bool coplanar( const Facet& f, const Point& p ) const { + return orientation(f, p) == COPLANAR; + } + + // Check whether the points of facet `f` and vertex `v` are coplanar. + bool coplanar( const Facet& f, Vertex_handle v ) const{ + return orientation(f, v->point()) == COPLANAR; + } + Orientation coplanar_orientation(const Point &p, const Point &q, const Point &r) const { @@ -577,6 +596,7 @@ protected: return coplanar_orientation(p, q, r) == COLLINEAR; } +protected: Segment construct_segment(const Point &p, const Point &q) const { @@ -1034,6 +1054,22 @@ public: Facet mirror_facet(Facet f) const { return _tds.mirror_facet(f);} + + // Gives the edge incident to the same cell that is not incident to any of the input vertices. + Edge opposite_edge( Cell_handle c, int li, int lj ) const; + + // Gives the edge incident to the same cell that is not incident to any of the vertices of the input edge. + Edge opposite_edge( const Edge& e ) const { return opposite_edge( e.first, e.second, e.third ); } + + // Gives the half-facet incident to the opposite cell. + Facet mirror_facet( Cell_handle c, int li ) const { return Facet( c->neighbor(li), c->neighbor(li)->index(c) ); } + + // Gives the opposite half-facet. + Facet mirror_facet( const Facet& f ) const { return mirror_facet( f.first, f.second ); } + + + + // MODIFIERS bool flip(const Facet &f) // returns false if the facet is not flippable @@ -2244,9 +2280,23 @@ operator<< (std::ostream& os, const Triangulation_3 &tr) return os ; } -template < class GT, class Tds, class Lds > -typename Triangulation_3::size_type -Triangulation_3:: + + + + +template +inline Orientation Triangulation_3:: +orientation( const Facet& f, const Point& p ) const { + return Gt().orientation_3_object()( f.first->vertex( vertex_triple_index(f.second, 0) )->point(), + f.first->vertex( vertex_triple_index(f.second, 1) )->point(), + f.first->vertex( vertex_triple_index(f.second, 2) )->point(), + p ); +} + + +template < class GT, class Tds > +typename Triangulation_3::size_type +Triangulation_3:: number_of_finite_cells() const { if ( dimension() < 3 ) return 0; @@ -3339,7 +3389,30 @@ side_of_edge(const Point & p, } } -template < class GT, class Tds, class Lds > + +template +inline +typename Triangulation_3::Edge +Triangulation_3:: +opposite_edge( Cell_handle c, int li, int lj ) const { + CGAL_triangulation_precondition( li >= 0 && li < 4 ); + CGAL_triangulation_precondition( lj >= 0 && lj < 4 ); + CGAL_triangulation_precondition( li != lj ); + + switch( 6-li-lj ) { // i + j + missing indices = 6. + case 1: return Edge( c, 0, 1 ); + case 2: return Edge( c, 0, 2 ); + case 3: return ( li == 0 || lj == 0 ) ? Edge( c, 1, 2 ) : Edge( c, 0, 3 ); + case 4: return Edge( c, 1, 3 ); + case 5: return Edge( c, 2, 3 ); + } + + CGAL_triangulation_assertion( false ); + return Edge(); +} + + +template < class GT, class Tds > bool Triangulation_3:: flip( Cell_handle c, int i ) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h new file mode 100644 index 00000000000..d2fb23730b1 --- /dev/null +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -0,0 +1,356 @@ +//A class that follows a straight line through a Delaunay triangulation structure. +//Copyright (C) 2012 Utrecht University +// +//This program is free software: you can redistribute it and/or modify +//it under the terms of the GNU General Public License as published by +//the Free Software Foundation, either version 3 of the License, or +//(at your option) any later version. +// +//This program is distributed in the hope that it will be useful, +//but WITHOUT ANY WARRANTY; without even the implied warranty of +//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//GNU General Public License for more details. +// +//You should have received a copy of the GNU General Public License +//along with this program. If not, see . +// +// Author(s): Thijs van Lankveld + +#ifndef CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_H +#define CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_H + +#include +#include + +namespace CGAL { + +#ifndef DOXYGEN_RUNNING +/** + * \ingroup PkgConformingTriangulation3Classes + * + * The `Triangulation_segment_traverser_3` iterates over the cells + * of a `Triangulation_3` by following a straight line segment \f$ st \f$. + * + * This class is closely related to `Triangulation_3::locate(...)`. + * However, unlike this `locate(...)` method, all the cells traversed + * by the `Triangulation_segment_traverser_3` intersect the interior of the line + * segment \f$ st \f$. + * + * Traversal starts from a cell containing \f$ s \f$ and it ends in a cell containing + * \f$ t \f$. + * If \f$ st \f$ is coplanar with a facet or collinear with an edge, at most one of the + * incident cells is traversed. + * If \f$ st \f$ intersects an edge or vertex, at most two incident cells are traversed: + * the cells intersecting \f$ st \f$ strictly in their interior. + * + * If \f$ s \f$ lies on the convex hull, traversal starts in an incident cell inside + * the convex hull. Similarly, if \f$ t \f$ lies on the convex hull, traversal ends in + * an adjacent cell inside the convex hull. + * + * Both \f$ s \f$ and \f$ t \f$ may lie outside the convex hull of the triangulation, + * but they must lie within the affine hull of the triangulation. In either case, the + * finite facet of any infinite cells traversed must intersect \f$ st \f$. + * + * The traverser may be applied to any triangulation of dimension > 0. + * However, for triangulations of dimension 1, the functionality is somewhat trivial. + * + * The traverser becomes invalid whenever the triangulation is changed. + * + * \tparam Tr_ is the triangulation type to traverse. + * + * \sa `Triangulation_3` + * \sa `Forward_circulator_base` + */ +#endif // DOXYGEN_RUNNING +template < class Tr_ = void > +class Triangulation_segment_traverser_3 +: public Forward_circulator_base< typename Tr_::Triangulation_data_structure::Cell, + std::ptrdiff_t, std::size_t > { + typedef Tr_ Tr; + typedef typename Tr::Triangulation_data_structure Tds; + typedef typename Tr::Geom_traits Gt; + +public: +/// \name Types +/// \{ + typedef Tr Triangulation; ///< The triangulation type. + typedef Triangulation_segment_traverser_3 TST; ///< A triangulation segment traverser. + typedef typename Tr::Point Point; ///< A point embedded in the vertices of the triangulation. + typedef typename Tr::Segment Segment; ///< A segment connecting two points. + typedef typename Tr::Cell Cell; ///< A cell in the triangulation. + typedef typename Tr::Edge Edge; ///< An edge in the triangulation. + typedef typename Tr::Vertex_handle Vertex_handle; ///< A handle for a vertex in the triangulation. + typedef typename Tr::Cell_handle Cell_handle; ///< A handle for a cell in the triangulation. + typedef typename Tr::Locate_type Locate_type; ///< The simplex containing a geometric object. +/// \} + + template < class Tr2 > + struct Rebind_Tr { + typedef Triangulation_segment_traverser_3 Other; + }; + +protected: +/// \internal \name Protected Attributes +/// \{ + /// \internal The triangulation to traverse. + const Tr& _tr; +/// \} + + // The source and target points of the traversal. + Point _source; + Point _target; + Vertex_handle _s_vertex; + Vertex_handle _t_vertex; + + // The cell currently traversed and the previous one. + Cell_handle _pos, _prev; + + // Otherwise, they indicate the simplex through which this cell was entered, + // or the location of the source if it is in this cell. + int _li, _lj; + Locate_type _lt; + + // This bit signifies when a cell containing the target is found. + bool _done; + + // Where possible, facets are checked in a random order. + mutable Random rng; + +private: + Tds _tds2; + Vertex_handle _s_vert, _t_vert; + +public: +/// \name Constructors +/// \{ + /// Constructs a traverser. + /** \param tr the triangulation to traverse. This triangulation must have dimension > 0. + * \param s the source vertex. This vertex must be initialized and cannot be the infinite vertex. + * \param t the target vertex. This vertex must be initialized and cannot be the infinite vertex. + * It cannot equal `s`. + */ + Triangulation_segment_traverser_3( const Tr& tr, Vertex_handle s, Vertex_handle t ); + + /// Constructs a traverser. + /** \param tr the triangulation to traverse. This triangulation must have dimension > 0. + * \param s the source vertex. This vertex must be initialized and cannot be the infinite vertex. + * \param t the target point. This point must be initialized and it cannot be be at the same location as `s`. + * If `tr` has dimension < 3, `t` must lie inside the affine hull of `tr`. + */ + Triangulation_segment_traverser_3( const Tr& tr, Vertex_handle s, const Point& t ); + + /// Constructs a traverser. + /** \param tr the triangulation to traverse. This triangulation must have dimension > 0. + * \param s the source point. This point must be initialized. If `tr` has dimension < 3, `s` must lie inside + * the affine hull of `tr`. + * \param t the target point. This point must be initialized and it cannot be be at the same location as `s`. + * If `tr` has dimension < 3, `t` must lie inside the affine hull of `tr`. + * \param hint the starting point to search for `s`. + */ + Triangulation_segment_traverser_3( const Tr& tr, const Point& s, const Point& t, Cell_handle hint = Cell_handle() ); + + /// Constructs a traverser. + /** \param tr the triangulation to traverse. This triangulation must have dimension > 0. + * \param S the segment to be traversed. If `tr` has dimension < 3, `S` must lie inside + * the affine hull of `tr`. `S` must not be degenerate, i.e. its source and target must not be equal. + * \param hint the starting point to search for `S`. + */ + Triangulation_segment_traverser_3( const Tr& tr, const Segment& S, Cell_handle hint = Cell_handle() ); +/// \} + +public: +/// \name Accessors +/// \{ + /// Gives the source point of the traversed segment. + /** \return the source point. + */ + const Point& source() const { return _source; } + + /// Gives the target point of the traversed segment. + /** \return the target point. + */ + const Point& target() const { return _target; } + + /// Gives the cell currently traversed. + /** By invariance, this cell is intersected by the segment + * between `source()` and `target()`. + * \return the cell currently traversed. + * \sa `handle()`. + */ + Cell_handle cell() const { return _pos; } + + /// Gives a handle to the cell currently traversed. + /** By invariance, this cell is intersected by the segment + * between `source()` and `target()`. + * \return a handle to the cell currently traversed. + * \sa `cell()`. + */ + Cell_handle handle() { return _pos; } + + /// Gives the cell traversed previously. + /** This cell is uninitialized until the traverser leaves the initial + * cell containing the `source()`. + * By invariance, once initialized, this cell must be intersected by the segment + * between `source()` and `target()`. + * \return the cell traversed previously. + * \sa `handle()`. + */ + Cell_handle previous() const { return _prev; } + + /// Dereference operator. + /** \return a pointer to the cell currently traversed. + */ + Cell* operator->() { return &*_pos; } + + /// Indirection operator. + /** \return the cell currently traversed. + */ + Cell& operator*() { return *_pos; } + + /// Conversion operator. + /** \return a handle to the cell currently traversed. + */ + operator const Cell_handle() const { return _pos; } + + /// Checks if the traverser has reached the final cell, which contains the `target()`. + /** If the `target()` lies on a facet, edge, or vertex, the final cell is the cell containing + * the interior of the segment between `source()` and `target()`. + * \return true iff the current cell contains the `target()`. + */ + bool has_next() const { return !_done; } + + /// Gives the type of simplex traversed last. + /** This simplex indicates where traversal has entered the cell. + * For the first cell, containing the `source()` \f$ s \f$, this indicates the location of \f$ s \f$ in this cell. + */ + void entry( Locate_type& lt, int& li, int& lj ) const { lt = _lt; li = _li; lj = _lj; } +/// \} + +public: +/// \name Mutators +/// \{ + /// Increment postfix operator. + /** The current cell must not contain the `target()`. + * After incrementing the traverser, the current cell intersects the segment + * between `source()` and `target()` closer to the `target()` than the previous cell. + * \sa `operator++(int)`. + */ + TST& operator++(); + + /// Increment prefix operator. + /** The current cell must not contain the `target()`. + * After incrementing the traverser, the current cell intersects the segment + * between `source()` and `target()` closer to the `target()` than the previous cell. + * than the previous cell. + * \sa `operator++()`. + */ + TST operator++( int ); + + /// Traverse to the final cell, which contains the `target()`. + /** \return the final cell. + */ + Cell_handle traverse(); +/// \} + +public: +/// \name Comparison +/// \{ + /// Compares this traverser with `ct`. + /** \param ct the other traverser. + * \return true iff the other traverser traverses the same triangulation along the same line segment + * and has the same current cell. + * \sa `operator!=( const TST& t )`. + */ + bool operator==( const TST& ct ) const; + + /// Compares this traverser with `ct`. + /** \param ct the other traverser. + * \return `false` iff the other traverser traverses the same triangulation along the same line segment + * and has the same current cell. + * \sa `operator==( const TST& t ) const`. + */ + bool operator!=( const TST& ct ) const; + + /// Compares the cell currently traversed with `ch`. + /** \param ch a handle to the other cell. + * \return true iff the cell currently traversed is the same as the one pointed to by `ch`. + * \sa `operator!=( const Cell_handle& ch ) const`. + * \sa `operator==( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_traverser_3 t )`. + */ + bool operator==( const Cell_handle& ch ) const { return ch == _pos; } + + /// Compares the cell currently traversed with `ch`. + /** \param ch a handle to the other cell. + * \return `false` iff the cell currently traversed is the same as the one pointed to by `ch`. + * \sa `operator==( const Cell_handle& ch )`. + * \sa `operator!=( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_traverser_3 t )`. + */ + bool operator!=( const Cell_handle& ch ) const { return ch != _pos; } +/// \} + + bool operator==( Nullptr_t CGAL_triangulation_assertion_code(n) ) const; + bool operator!=( Nullptr_t n ) const; + +protected: +/// \internal \name Protected Member Functions +/// \{ + /// \internal Traverse to the next cell. + /** \internal \sa `traverse()`. + */ + virtual void increment(); +/// \} + +private: + // increment(), if the triangulation is 3D. + void increment_3(); + void increment_3_inf( int inf ); + + // increment(), if the triangulation is 2D. + void increment_2(); + void increment_2_inf( int inf ); + +private: + inline int edgeIndex( int i, int j ) const { + CGAL_triangulation_precondition( i>=0 && i<=3 ); + CGAL_triangulation_precondition( j>=0 && j<=3 ); + CGAL_triangulation_precondition( i != j ); + return ( i==0 || j==0 ) ? i+j-1 : i+j; + } +}; // class Triangulation_segment_traverser_3 + +/// Compares a handle to a cell to a traverser. +/** \param ch the handle to a cell. + * \param t the traverser. + * \return true iff the cell currently traversed by `t` is the same as the one pointed to by `ch`. + * \sa `operator!=( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_traverser_3 t )`. + * \sa `Triangulation_segment_traverser_3::operator==( const Cell_handle& ch )`. + */ +template +inline bool operator==( typename Tr::Cell_handle ch, Triangulation_segment_traverser_3 tci ) { return tci == ch; } + +/// Compares a handle to a cell to a traverser. +/** \param ch the handle to a cell. + * \param t the traverser. + * \return `false` iff the cell currently traversed by `t` is the same as the one pointed to by `ch`. + * \sa `operator==( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_traverser_3 t )`. + * \sa `Triangulation_segment_traverser_3::operator!=( const Cell_handle& ch )`. + */ +template +inline bool operator!=( typename Tr::Cell_handle ch, Triangulation_segment_traverser_3 tci ) { return tci != ch; } + +// Specialization for void +template <> +class Triangulation_segment_traverser_3 { + typedef internal::Dummy_gt Gt; + typedef internal::Dummy_tds_3 Tds; +public: + typedef Triangulation_3 Triangulation; + template + struct Rebind_Tr { typedef Triangulation_segment_traverser_3 Other; }; +}; // class Triangulation_segment_traverser_3 + +} // namespace CGAL + +#include + +#endif // CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_H diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h new file mode 100644 index 00000000000..3134dbef015 --- /dev/null +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h @@ -0,0 +1,665 @@ +//A class that follows a straight line through a Delaunay triangulation structure. +//Copyright (C) 2012 Utrecht University +// +//This program is free software: you can redistribute it and/or modify +//it under the terms of the GNU General Public License as published by +//the Free Software Foundation, either version 3 of the License, or +//(at your option) any later version. +// +//This program is distributed in the hope that it will be useful, +//but WITHOUT ANY WARRANTY; without even the implied warranty of +//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//GNU General Public License for more details. +// +//You should have received a copy of the GNU General Public License +//along with this program. If not, see . +// +// Author(s): Thijs van Lankveld + +#ifndef CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_IMPL_H +#define CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_IMPL_H + +namespace CGAL { + +template +Triangulation_segment_traverser_3:: +Triangulation_segment_traverser_3( const Tr& tr, Vertex_handle s, const Point& t ) +: _tr(tr), _pos(), _prev(), _lj(-1), _lt(Tr::VERTEX), _done(false) { + CGAL_triangulation_precondition( !_tr.is_infinite(s) ); + CGAL_triangulation_precondition( s->point() != t ); + CGAL_triangulation_precondition( _tr.dimension() >= 2 ); + CGAL_triangulation_precondition( _tr.dimension() == 3 || + _tr.orientation( *_tr.finite_facets_begin(), t ) == COPLANAR ); + + _source = s->point(); + _target = t; + _s_vertex = s; + _t_vertex = Vertex_handle(); + _s_vert = s; + _t_vert = _tds2.create_vertex( Vertex(_target) ); + + _pos = s->cell(); + int inf; + if( _pos->has_vertex( _tr.infinite_vertex(), inf ) ) + _pos = _pos->neighbor(inf); + _li = _pos->index(s); + + CGAL_triangulation_postcondition( _pos != Cell_handle() ); +} + +template < class Tr> +Triangulation_segment_traverser_3:: +Triangulation_segment_traverser_3( const Tr& tr, Vertex_handle s, Vertex_handle t ) +: _tr(tr), _pos(), _prev(), _lj(-1), _lt(Tr::VERTEX), _done(false) { + CGAL_triangulation_precondition( !_tr.is_infinite(s) ); + CGAL_triangulation_precondition( !_tr.is_infinite(t) ); + CGAL_triangulation_precondition( s->point() != t->point() ); + CGAL_triangulation_precondition( _tr.dimension() >= 2 ); + + _source = s->point(); + _target = t->point(); + _s_vertex = s; + _t_vertex = t; + _s_vert = s; + _t_vert = t; + + _pos = s->cell(); + int inf; + if( _pos->has_vertex( _tr.infinite_vertex(), inf ) ) + _pos = _pos->neighbor(inf); + _li = _pos->index(s); +} + + +template +Triangulation_segment_traverser_3:: +Triangulation_segment_traverser_3( const Tr& tr, const Point& s, const Point& t, Cell_handle hint ) +: _tr(tr), _pos(), _prev(), _li(-1), _lj(-1), _done(false) { + CGAL_triangulation_precondition( s != t ); + CGAL_triangulation_precondition( _tr.dimension() >= 2 ); + CGAL_triangulation_precondition( _tr.dimension() == 3 || + _tr.coplanar( *_tr.finite_facets_begin(), _target ) ); + + _source = s; + _target = t; + _s_vertex = Vertex_handle(); + _t_vertex = Vertex_handle(); + _s_vert = _tds2.create_vertex( Tr::Vertex(_source) ); + _t_vert = _tds2.create_vertex( Tr::Vertex(_target) ); + + _pos = _tr.locate( s, _lt, _li, _lj, hint ); + + CGAL_triangulation_postcondition( _pos != Cell_handle() ); +} + +template +Triangulation_segment_traverser_3:: +Triangulation_segment_traverser_3( const Tr& tr, const Segment& s, Cell_handle hint ) +: Triangulation_segment_traverser_3( tr, s.source(), s.target(), hint ) {} + +template +inline Triangulation_segment_traverser_3& +Triangulation_segment_traverser_3::operator++() { + CGAL_triangulation_precondition( _pos != Cell_handle() ); + increment(); + return *this; +} + +template +inline Triangulation_segment_traverser_3 +Triangulation_segment_traverser_3::operator++( int ) { + TST tmp( *this ); + ++( *this ); + return tmp; +} + +template +inline typename Triangulation_segment_traverser_3::Cell_handle +Triangulation_segment_traverser_3::traverse() { + while( !_done ) + increment(); + return _pos; +} + +template +inline bool Triangulation_segment_traverser_3:: +operator==( const TST& ct ) const { + CGAL_triangulation_precondition( _pos != Cell_handle() ); + CGAL_triangulation_precondition( ct._pos != Cell_handle() ); + return ( _pos == ct._pos && + _prev == ct._prev && + _tr == ct._tr && + _li == ct._li && + _lj == ct._lj && + _lt == ct._lt && + _source == ct._source && + _target == ct._target && + _s_vertex == ct._s_vertex && + _t_vertex == ct._t_vertex && + _done == ct._done ); +} + +template +inline bool Triangulation_segment_traverser_3:: +operator!=( const TST& ct ) const { + return !( *this == ct ); +} + +template +inline bool Triangulation_segment_traverser_3:: +operator==( Nullptr_t CGAL_triangulation_assertion_code(n) ) const { + CGAL_triangulation_assertion( n == NULL ); + return _pos == Cell_handle(); +} + +template +inline bool Triangulation_segment_traverser_3:: +operator!=( Nullptr_t n ) const { + return !( *this == n ); +} + +template +void Triangulation_segment_traverser_3:: +increment() { + CGAL_triangulation_precondition( !_done ); + // Walks to the next cell over a facet intersected by the line from source to target. + // This method is based on Triangulation_3::locate(). + int inf; + switch( _tr.dimension() ) { + case 3: { + // Infinite cells should be handled differently. + if( _pos->has_vertex( _tr.infinite_vertex(), inf ) ) + increment_3_inf( inf ); + else + increment_3(); + break; + } + case 2: { + if( _pos->has_vertex( _tr.infinite_vertex(), inf ) ) + increment_2_inf( inf ); + else + increment_2(); + break; + } + } +} + +template +void Triangulation_segment_traverser_3:: +increment_3() { + Vertex_handle vert[4] = { _pos->vertex(0), + _pos->vertex(1), + _pos->vertex(2), + _pos->vertex(3) }; + + // We check in which direction the target lies + // by comparing its position relative to the planes through the + // source and the edges of the cell. + Orientation o[6]; + // We keep track of which orientations are calculated. + bool calc[6] = { false, false, false, false, false, false }; + + if( _lt == Tr::VERTEX ) { + // The three planes through the vertex are set to coplanar. + for( int j = 0; j < 4; ++j ) { + if( _li != j ) { + int ij = edgeIndex( _li, j ); + o[ij] = COPLANAR; + calc[ij] = true; + } + } + } + else if( _lt == Tr::EDGE ) { + // The plane through the edge is set to coplanar. + int ij = edgeIndex( _li, _lj ); + o[ij] = COPLANAR; + calc[ij] = true; + } + + // For the remembering stochastic walk, we start trying with a random facet. + int li = rng.template get_bits<2>(); + + CGAL_triangulation_assertion_code( bool incell = true; ) + for( int k = 0; k < 4; ++k, li = _tr.incr_ind(li) ) { + Cell_handle next = _pos->neighbor(li); + if( next == _prev ) + continue; + + if( _t_vertex == _pos->vertex(0) || _t_vertex == _pos->vertex(1) || + _t_vertex == _pos->vertex(2) || _t_vertex == _pos->vertex(3) ) { + // The target is inside the cell. + _done = true; + return; + } + + // Check if the target is outside the cell. + Vertex_handle backup = vert[li]; + vert[li] = _t_vert; + + if( _tr.orientation( vert[0], vert[1], vert[2], vert[3] ) != NEGATIVE ) { + vert[li] = backup; + continue; + } + CGAL_triangulation_assertion_code( incell = false; ) + + // Check if the target is inside the pyramid. + int lj = rng.template get_bits<2>(); + int Or = 0; + for( int l = 0; l < 4; ++l, lj = _tr.incr_ind(lj) ) { + if( li == lj ) + continue; + + // We check the orientation of the target compared to the plane + // Through the source and the edge opposite of ij. + int oij = 5 - edgeIndex( li, lj ); + if( !calc[oij] ) { + Vertex_handle backup2 = vert[lj]; + vert[lj] = _s_vert; + o[oij] = _tr.orientation( vert[0], vert[1], vert[2], vert[3] ); + vert[lj] = backup2; + calc[oij] = true; + } + + Or -= o[oij]; + if( o[oij] == POSITIVE ) { + // The target is not inside the pyramid. + // Invert the planes. + // This can be safely done because either + // they were not calculated yet, + // or they will no longer be used. + for( int j = 0; j < 4; ++j ) { + if( li == j ) continue; + int oij = 5 - edgeIndex( li, j ); + o[oij] = -o[oij]; + } + Or = 0; + break; + } + } + + if( Or == 0 ) { + // Either the target is not inside the pyramid, + // or the pyramid is degenerate. + vert[li] = backup; + continue; + } + + // The target is inside the pyramid. + _prev = _pos; + _pos = next; + + switch( Or ) { + case 3: + _lt = Tr::FACET; + _li = _pos->index(_prev); + return; + case 2: + _lt = Tr::EDGE; + for( int j = 0; j < 4; ++j ) { + if( li != j && o[ 5 - edgeIndex(li, j) ] == COPLANAR) { + Edge opp = _tr.opposite_edge( _prev, li, j ); + _li = _pos->index( _prev->vertex(opp.second) ); + _lj = _pos->index( _prev->vertex(opp.third) ); + return; + } + } + CGAL_triangulation_assertion( false ); + return; + case 1: + _lt = Tr::VERTEX; + for( int j = 0; j < 4; ++j ) { + if( li != j && o[ 5 - edgeIndex(li, j) ] == NEGATIVE ) { + _li = _pos->index( _prev->vertex(j) ); + return; + } + } + CGAL_triangulation_assertion( false ); + return; + default: + CGAL_triangulation_assertion( false ); + return; + } + } + + // The target lies inside this cell. + CGAL_triangulation_assertion( incell ); + _done = true; + return; +} + +template +void Triangulation_segment_traverser_3:: +increment_3_inf( int inf ) { + CGAL_triangulation_precondition( _tr.is_infinite( _pos->vertex(inf) ) ); + + // If this cell was reached by traversal from a finite one, it must be the final cell. + Cell_handle fin = _pos->neighbor(inf); + if( fin == _prev ) { + _done = true; + // Here, I do not change the _lt etc. because they were already set. + return; + } + + Vertex_handle vert[4]; + for( int i = 0; i != 4; ++i ) + if( i != inf ) + vert[i] = _pos->vertex(i); + vert[inf] = _t_vert; + Orientation o[4]; + + // For the remembering stochastic walk, we start trying with a random index: + int li = rng.template get_bits<2>(); + + // Check if the target lies outside the convex hull. + if( _tr.orientation( vert[0], vert[1], vert[2], vert[3] ) == POSITIVE ) { + // The target lies in an infinite cell. + // Note that we do not traverse to other infinite cells. + _done = true; + return; + } + + vert[inf] = _s_vert; + CGAL_triangulation_assertion( _tr.orientation( vert[0], vert[1], vert[2], vert[3] ) == POSITIVE ); + + // Check if the line enters an adjacent infinite cell. + // This occurs if the target lies on the other side of + // a plane through one of the finite edges and the source point. + for( int j = 0; j != 4; ++j, li = _tr.incr_ind(li) ) { + if( li == inf ) { + o[li] = COPLANAR; + continue; + } + + Cell_handle next = _pos->neighbor(li); + if( next == _prev ) { + o[li] = POSITIVE; + continue; + } + + Vertex_handle backup = vert[li]; + vert[li] = _t_vert; + o[li] = _tr.orientation( vert[0], vert[1], vert[2], vert[3] ); + + if( o[li] != NEGATIVE ) { + vert[li] = backup; + continue; + } + + // The target lies behind the plane through the source and two finite vertices. + // Traverse to the incident infinite cell. + _prev = _pos; + _pos = next; + CGAL_triangulation_assertion( _tr.is_infinite(_pos) ); + + _lt = Tr::FACET; + _li = _pos->index(_prev); + return; + } + + // The line enters the convex hull here (or lies on the finite facet). + _prev = _pos; + _pos = fin; + + // Check through which simplex the line traverses. + switch( o[0]+o[1]+o[2]+o[3] ) { + case 3: + _lt = Tr::FACET; + _li = _pos->index(_prev); + return; + case 2: + _lt = Tr::EDGE; + for( int i = 0; i < 4; ++i ) { + if( o[i] == COPLANAR && i != inf ) { + Edge opp = _tr.opposite_edge( _prev, inf, i ); + _li = _pos->index( _prev->vertex(opp.second) ); + _lj = _pos->index( _prev->vertex(opp.third) ); + return; + } + } + CGAL_triangulation_assertion( false ); + return; + case 1: + _lt = Tr::VERTEX; + for( int i = 0; i < 4; ++i ) { + if( o[i] == POSITIVE ) { + _li = _pos->index( _prev->vertex(i) ); + return; + } + } + CGAL_triangulation_assertion( false ); + return; + default: + CGAL_triangulation_assertion( false ); + return; + } +} + +template +void Triangulation_segment_traverser_3:: +increment_2() { + Vertex_handle vert[3] = { _pos->vertex(0), + _pos->vertex(1), + _pos->vertex(2) }; + + switch( _lt ) { + case Tr::VERTEX: { + // First we try the incident edges. + Orientation ocw = _tr.coplanar_orientation( vert[_li], vert[_tr.cw(_li)], vert[_tr.ccw(_li)], _t_vert ); + if( _pos->neighbor( _tr.ccw(_li) ) != _prev && ocw == NEGATIVE) { + Cell_handle tmp = _pos->neighbor( _tr.ccw(_li) ); + _prev = _pos; + _pos = tmp; + _li = _pos->index( _prev->vertex(_li) ); + return; + } + Orientation occw = _tr.coplanar_orientation( vert[_li], vert[_tr.ccw(_li)], vert[_tr.cw(_li)], _t_vert ); + if( _pos->neighbor( _tr.cw(_li) ) != _prev && occw == NEGATIVE) { + Cell_handle tmp = _pos->neighbor( _tr.cw(_li) ); + _prev = _pos; + _pos = tmp; + _li = _pos->index( _prev->vertex(_li) ); + return; + } + + // Then we try the opposite edge. + if( _tr.coplanar_orientation( vert[_tr.ccw(_li)], vert[_tr.cw(_li)], vert[_li], _t_vert ) == NEGATIVE) { + Cell_handle tmp = _pos->neighbor(_li); + _prev = _pos; + _pos = tmp; + + switch( ocw+occw ) { + case 2: + _lt = Tr::EDGE; + _li = _pos->index( _prev->vertex( _tr.ccw(_li) ) ); + _lj = _pos->index( _prev->vertex( _tr.cw(_li) ) ); + return; + case 1: + _lt = Tr::VERTEX; + if( ocw == COLLINEAR ) _li = _pos->index( _prev->vertex( _tr.cw(_li) ) ); + else _li = _pos->index( _prev->vertex( _tr.ccw(_li) ) ); + return; + default: + CGAL_triangulation_assertion(false); + return; + } + } + + // The target lies in this cell. + _done = true; + return; + } + case Tr::EDGE: { + int lk = 3-_li-_lj; + + if( _pos->neighbor(lk) != _prev ) { + // Check the edge itself + switch( _tr.coplanar_orientation( vert[_li], vert[_lj], vert[lk], _t_vert ) ) { + case COLLINEAR: + // The target lies in this cell. + _done = true; + return; + case NEGATIVE: { + // The target lies opposite of the edge. + Cell_handle tmp = _pos->neighbor(lk); + _prev = _pos; + _pos = tmp; + _li = _pos->index( _prev->vertex(_li) ); + _lj = _pos->index( _prev->vertex(_lj) ); + return; + } + default: + break; + } + } + + Orientation o = _tr.coplanar_orientation( _s_vert, vert[lk], vert[_li], _t_vert ); + switch( o ) { + case POSITIVE: { + // The ray passes through the edge ik. + if( _tr.coplanar_orientation( vert[lk], vert[_li], _s_vert, _t_vert ) == NEGATIVE ) { + Cell_handle tmp = _pos->neighbor(_lj); + _prev = _pos; + _pos = tmp; + + if( _tr.collinear( _s_vert, vert[_li], _t_vert ) ) { + _lt = Tr::VERTEX; + _li = _pos->index( _prev->vertex(_li) ); + } + else { + _lt = Tr::EDGE; + _li = _pos->index( _prev->vertex(_li) ); + _lj = _pos->index( _prev->vertex(lk) ); + } + return; + } + break; + } + default: { + // The ray passes through the edge jk. + if( _tr.coplanar_orientation( vert[lk], vert[_lj], _s_vert, _t_vert ) == NEGATIVE ) { + Cell_handle tmp = _pos->neighbor(_li); + _prev = _pos; + _pos = tmp; + + if( _tr.collinear( _s_vert, vert[_lj], _t_vert ) ) { + _lt = Tr::VERTEX; + _li = _pos->index( _prev->vertex(_lj) ); + } + else if( o == COLLINEAR ) { + _lt = Tr::VERTEX; + _li = _pos->index( _prev->vertex(lk) ); + } + else { + _lt = Tr::EDGE; + _li = _pos->index( _prev->vertex(lk) ); + _lj = _pos->index( _prev->vertex(_lj) ); + } + return; + } + break; + } + } + + // The target lies in this cell. + _done = true; + return; + } + case Tr::FACET: { + // We test its edges in a random order until we find a neighbor to go further + int li = rng.get_int(0, 3); + + Orientation o[3]; + bool calc[3] = { false, false, false }; + + for( int j = 0; j != 3; ++j, li = _tr.ccw(li) ) { + Cell_handle next = _pos->neighbor(li); + if( next == _prev ) + continue; + + // The target should lie on the other side of the edge. + if( _tr.coplanar_orientation( vert[_tr.ccw(li)], vert[_tr.cw(li)], vert[li], _t_vert ) != NEGATIVE ) + continue; + + // The target should lie inside the wedge. + if( !calc[_tr.ccw(li)] ) { + o[_tr.ccw(li)] = _tr.coplanar_orientation( _s_vert, vert[_tr.ccw(li)], vert[_tr.cw(li)], _t_vert ); + calc[_tr.ccw(li)] = true; + } + if( o[_tr.ccw(li)] == NEGATIVE ) continue; + + if( !calc[_tr.cw(li)] ) { + o[_tr.cw(li)] = _tr.coplanar_orientation( _s_vert, vert[_tr.cw(li)], vert[_tr.ccw(li)], _t_vert ); + calc[_tr.cw(li)] = true; + } + if( o[_tr.cw(li)] == POSITIVE ) continue; + + _prev = _pos; + _pos = next; + + switch( o[_tr.ccw(li)] + o[_tr.cw(li)] ) { + case 2: + _lt = Tr::EDGE; + _li = _pos->index( _prev->vertex( _tr.ccw(li) ) ); + _lj = _pos->index( _prev->vertex( _tr.cw(li) ) ); + return; + case 1: + _lt = Tr::VERTEX; + if( o[_tr.ccw(li)] == COLLINEAR ) _li = _pos->index( _prev->vertex( _tr.ccw(li) ) ); + else _li = _pos->index( _prev->vertex( _tr.cw(li) ) ); + return; + default: + CGAL_triangulation_assertion( false ); + return; + } + } + + // The target lies in this cell. + _done = true; + return; + } + default: + CGAL_triangulation_assertion( false ); + } +} + +template +void Triangulation_segment_traverser_3:: +increment_2_inf( int inf ) { + CGAL_triangulation_precondition( _tr.is_infinite( _pos->vertex(3) ) ); + CGAL_triangulation_precondition( _tr.is_infinite( _pos->vertex(inf) ) ); + + // If this cell was reached by traversal from a finite one, it must be the final cell. + Cell_handle fin = _pos->neighbor(inf); + if (fin == _prev) { + _done = true; + return; + } + + // Check the neighboring cells. + Gt::Coplanar_orientation_3 coplanar_orientation = Gt().coplanar_orientation_3_object(); + if( _tr.coplanar_orientation( _s_vert, _pos->vertex( _tr.ccw(inf)), _pos->vertex(_tr.cw(inf)), _t_vert ) == NEGATIVE ) { + Cell_handle tmp = _pos->neighbor(_tr.cw(inf)); + _prev = _pos; + _pos = tmp; + return; + } + if( _tr.coplanar_orientation( _s_vert, _pos->vertex( _tr.cw(inf)), _pos->vertex(_tr.ccw(inf)), _t_vert ) == NEGATIVE ) { + Cell_handle tmp = _pos->neighbor(_tr.ccw(inf)); + _prev = _pos; + _pos = tmp; + return; + } + if( _tr.coplanar_orientation( _pos->vertex( _tr.ccw(inf)), _pos->vertex(_tr.cw(inf)), _s_vert, _t_vert ) != POSITIVE ) { + _prev = _pos; + _pos = fin; + return; + } + + // The target lies in this infinite cell. + _done = true; + return; +} + +} //end of CGAL namespace + +#endif // CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_IMPL_H diff --git a/Triangulation_3/include/CGAL/Triangulation_utils_3.h b/Triangulation_3/include/CGAL/Triangulation_utils_3.h index 8695c445461..0ac0c642ffe 100644 --- a/Triangulation_3/include/CGAL/Triangulation_utils_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_utils_3.h @@ -29,55 +29,81 @@ namespace CGAL { // We use the following template class in order to avoid having a static data // member of a non-template class which would require src/Triangulation_3.C . template < class T = void > -struct Triangulation_utils_base_3 -{ - static const char tab_next_around_edge[4][4]; - static const int tab_vertex_triple_index[4][3]; +struct Triangulation_utils_base_3 { + static const char tab_next_around_edge[4][4]; + static const int tab_vertex_triple_index[4][3]; + + static const int index_increment_map[4]; + static const int index_jump_map[4]; + static const int index_decrement_map[4]; }; template < class T > const char Triangulation_utils_base_3::tab_next_around_edge[4][4] = { - {5, 2, 3, 1}, - {3, 5, 0, 2}, - {1, 3, 5, 0}, - {2, 0, 1, 5} }; + { 5, 2, 3, 1 }, + { 3, 5, 0, 2 }, + { 1, 3, 5, 0 }, + { 2, 0, 1, 5 } +}; template < class T > const int Triangulation_utils_base_3::tab_vertex_triple_index[4][3] = { - {1, 3, 2}, - {0, 2, 3}, - {0, 3, 1}, - {0, 1, 2} + { 1, 3, 2 }, + { 0, 2, 3 }, + { 0, 3, 1 }, + { 0, 1, 2 } }; +template < class T > +const int Triangulation_utils_base_3::index_increment_map[4] = { 1, 2, 3, 0 }; + +template < class T > +const int Triangulation_utils_base_3::index_jump_map[4] = { 2, 3, 0, 1 }; + +template < class T > +const int Triangulation_utils_base_3::index_decrement_map[4] = { 3, 0, 1, 2 }; + // We derive from Triangulation_cw_ccw_2 because we still use cw() and ccw() // in the 2D part of the code. Ideally, this should go away when we re-use // T2D entirely. struct Triangulation_utils_3 - : public Triangulation_cw_ccw_2, - public Triangulation_utils_base_3<> -{ - static int next_around_edge(const int i, const int j) - { - // index of the next cell when turning around the - // oriented edge vertex(i) vertex(j) in 3d - CGAL_triangulation_precondition( ( i >= 0 && i < 4 ) && - ( j >= 0 && j < 4 ) && - ( i != j ) ); - return tab_next_around_edge[i][j]; - } +: public Triangulation_cw_ccw_2, + public Triangulation_utils_base_3<> { + static int next_around_edge( const int i, const int j ) { + // index of the next cell when turning around the + // oriented edge vertex(i) vertex(j) in 3d + CGAL_triangulation_precondition( ( i >= 0 && i < 4 ) && + ( j >= 0 && j < 4 ) && + ( i != j ) ); + return tab_next_around_edge[i][j]; + } + static int vertex_triple_index( const int i, const int j ) { + // indexes of the jth vertex of the facet of a cell + // opposite to vertx i + CGAL_triangulation_precondition( ( i >= 0 && i < 4 ) && + ( j >= 0 && j < 3 ) ); + return tab_vertex_triple_index[i][j]; + } - static int vertex_triple_index(const int i, const int j) - { - // indexes of the jth vertex of the facet of a cell - // opposite to vertx i - CGAL_triangulation_precondition( ( i >= 0 && i < 4 ) && - ( j >= 0 && j < 3 ) ); - return tab_vertex_triple_index[i][j]; - } + // Get the index of the next vertex or facet. + static int increment_index( int li ) { + CGAL_triangulation_precondition( li >= 0 && li < 4 ); + return index_increment_map[ li ]; + } + // Get the index of the vertex or facet two places further. + static int jump_index( int li ) { + CGAL_triangulation_precondition( li >= 0 && li < 4 ); + return index_jump_map[ li ]; + } + + // Get the index of the previous vertex or facet. + static int decrement_index( int li ) { + CGAL_triangulation_precondition( li >= 0 && li < 4 ); + return index_decrement_map[ li ]; + } }; } //namespace CGAL diff --git a/Triangulation_3/include/CGAL/internal/Dummy_gt.h b/Triangulation_3/include/CGAL/internal/Dummy_gt.h new file mode 100644 index 00000000000..77c7596fac1 --- /dev/null +++ b/Triangulation_3/include/CGAL/internal/Dummy_gt.h @@ -0,0 +1,37 @@ +// A dummy geometry traits class. +// Copyright (c) 2003 INRIA Sophia-Antipolis (France). +// All rights reserved. +// +//This program is free software: you can redistribute it and/or modify +//it under the terms of the GNU General Public License as published by +//the Free Software Foundation, either version 3 of the License, or +//(at your option) any later version. +// +//This program is distributed in the hope that it will be useful, +//but WITHOUT ANY WARRANTY; without even the implied warranty of +//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//GNU General Public License for more details. +// +//You should have received a copy of the GNU General Public License +//along with this program. If not, see . +// +// Author(s): Thijs van Lankveld + +#ifndef CGAL_INTERNAL_TRIANGULATION_DUMMY_GT_H +#define CGAL_INTERNAL_TRIANGULATION_DUMMY_GT_H + +namespace CGAL { namespace internal { + +// Dummy triangulation which provides all types that a triangulation can use. +struct Dummy_gt { + struct Point_3 {}; + struct Segment_3 {}; + struct Triangle_3 {}; + struct Tetrahedron_3 {}; +}; + +} // namespace internal + +} // namespace CGAL + +#endif // CGAL_INTERNAL_TRIANGULATION_DUMMY_GT_H From c3fe9652f0fef424e2be173bd8603c6059f1ed13 Mon Sep 17 00:00:00 2001 From: Thijs van Lankveld Date: Fri, 13 Jun 2014 17:36:53 +0200 Subject: [PATCH 009/138] First version of the segment traverser, including inclusion in the documentation. --- .../CGAL/Triangulation_segment_traverser_3.h | 320 ++++++++++++++++++ .../doc/Triangulation_3/Doxyfile.in | 8 + .../Triangulation_3/PackageDescription.txt | 8 + .../doc/Triangulation_3/Triangulation_3.txt | 12 + .../Triangulation_3/segment_traverser_3.cpp | 11 +- .../include/CGAL/Triangulation_3.h | 15 + .../CGAL/Triangulation_segment_traverser_3.h | 198 +++++------ .../Triangulation_segment_traverser_3_impl.h | 6 +- 8 files changed, 453 insertions(+), 125 deletions(-) create mode 100644 Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_segment_traverser_3.h diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_segment_traverser_3.h new file mode 100644 index 00000000000..ffbfaeaf851 --- /dev/null +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_segment_traverser_3.h @@ -0,0 +1,320 @@ +//A class that follows a straight line through a Delaunay triangulation structure. +//Copyright (C) 2012 - Utrecht University +// +//This program is free software: you can redistribute it and/or modify +//it under the terms of the GNU General Public License as published by +//the Free Software Foundation, either version 3 of the License, or +//(at your option) any later version. +// +//This program is distributed in the hope that it will be useful, +//but WITHOUT ANY WARRANTY; without even the implied warranty of +//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//GNU General Public License for more details. +// +//You should have received a copy of the GNU General Public License +//along with this program. If not, see . +// +// Author(s): Thijs van Lankveld + +#ifndef CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_H +#define CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_H + +#include +#include + +namespace CGAL { + +/** + * \ingroup PkgTriangulation3UtilityClasses + * + * The `Triangulation_segment_traverser_3` iterates over the cells of a + * `Triangulation_3` by following a straight line segment + * \f$ \overline{st} \f$. + * + * The functionality of this class is closely related to + * `Triangulation_3::locate(...)`. + * However, unlike this `locate(...)` method, all the cells traversed by the + * `Triangulation_segment_traverser_3` intersect the interior of the line + * segment \f$ \overline{st} \f$. + * + * Traversal starts from a cell containing \f$ s \f$ and it ends in a cell + * containing \f$ t \f$. + * If \f$ \overline{st} \f$ is coplanar with a facet or collinear with an + * edge, at most one of the incident cells is traversed. + * If \f$ \overline{st} \f$ intersects an edge or vertex (and + * \f$ \overline{st} \f$ isn't coplanar with any of the incident facets), at + * most two incident cells are traversed: the cells intersecting + * \f$ \overline{st} \f$ strictly in their interior. + * + * If \f$ s \f$ lies on the convex hull, traversal starts in an incident cell + * inside the convex hull. Similarly, if \f$ t \f$ lies on the convex hull, + * traversal ends in an incident cell inside the convex hull. + * + * Both \f$ s \f$ and \f$ t \f$ may lie outside the convex hull of the + * triangulation, but they must lie within the affine hull of the + * triangulation. In either case, the finite facet of any infinite cells + * traversed must intersect \f$ \overline{st} \f$. + * + * The traverser may be applied to triangulations of dimension smaller than 3, + * as long as the dimension is larger than 0. + * However, for triangulations of dimension 1, the functionality is somewhat + * trivial. + * + * The traverser becomes invalid whenever the triangulation is changed. + * + * \tparam Tr is the type of the triangulation to traverse. It must be a + * `Triangulation_3` or one of its subclasses. + * + * \sa `Triangulation_3` + * \sa `Forward_circulator_base` + */ +template < class Tr > +class Triangulation_segment_traverser_3 +: public Forward_circulator_base< typename Tr::Triangulation_data_structure::Cell, + std::ptrdiff_t, std::size_t > { +public: +/// \name Types +/// \{ + typedef Tr Triangulation; ///< defines the triangulation type. + typedef Triangulation_segment_traverser_3 TST; ///< defines the segment traverser type. + typedef typename Tr::Point Point; ///< defines the point type. + typedef typename Tr::Segment Segment; ///< defines the segment type. + typedef typename Tr::Cell Cell; ///< defines the cell type. + typedef typename Tr::Edge Edge; ///< defines the edge type. + typedef typename Tr::Vertex_handle Vertex_handle; ///< defines the handle type for a vertex. + typedef typename Tr::Cell_handle Cell_handle; ///< defines the handle type for a cell. + typedef typename Tr::Locate_type Locate_type; ///< defines the simplex types returned when locating a point. + +/// \} + +protected: +/// \internal \name Protected Attributes +/// \{ + const Tr& _tr; ///< \internal stores the triangulation to traverse. + +/// \} + +public: +/// \name Constructors +/// \{ + /// constructs a traverser. + /** \param tr the triangulation to traverse. + * \param s the source vertex. + * \param t the target vertex. + * \pre both `s` and `t` must be initialized and cannot be the infinite + * vertex. + * \pre `s != t`. + * \pre `tr` must have dimension > 0. + */ + Triangulation_segment_traverser_3( const Tr& tr, Vertex_handle s, Vertex_handle t ); + + /// constructs a traverser. + /** \param tr the triangulation to traverse. + * \param s the source vertex. + * \param t the target point. + * \pre both `s` and `t` must be initialized and `s` cannot be the + * infinite vertex. + * \pre `s != t`. + * \pre `tr` must have dimension > 0. If `tr` has dimension < 3, `t` must + * lie in the affine hull of `tr`. + */ + Triangulation_segment_traverser_3( const Tr& tr, Vertex_handle s, const Point& t ); + + /// constructs a traverser. + /** \param tr the triangulation to traverse. + * \param s the source point. + * \param t the target point. + * \param hint the starting point to locate `s`. + * \pre both `s` and `t` must be initialized. + * \pre `s != t`. + * \pre `tr` must have dimension > 0. If `tr` has dimension < 3, both `s` + * and `t` must lie in the affine hull of `tr`. + */ + Triangulation_segment_traverser_3( const Tr& tr, const Point& s, const Point& t, Cell_handle hint = Cell_handle() ); + + /// constructs a traverser. + /** \param tr the triangulation to traverse. + * \param seg the line segment to traverse. + * \param hint the starting point to locate the source of `seg`. + * \pre `seg` must not be degenerate, i.e. its source and target must not + * be equal. + * \pre `tr` must have dimension > 0. If `tr` has dimension < 3, `seg` + * must lie in the affine hull of `tr`. + */ + Triangulation_segment_traverser_3( const Tr& tr, const Segment& seg, Cell_handle hint = Cell_handle() ); + +/// \} + +public: +/// \name Accessors +/// \{ + /// gives the source point of the segment being traversed. + const Point& source() const { return _source; } + + /// gives the target point of the segment being traversed. + const Point& target() const { return _target; } + + /// gives the cell currently traversed. + /** By invariance, this cell is intersected by the segment between + * `source()` and `target()`. However, it need not be intersected in its + * iterior. + * \return the cell currently traversed. + * \sa `handle()`. + */ + const Cell cell() const { return *_pos; } + + /// gives a handle to the cell currently traversed. + /** By invariance, this cell is intersected by the segment between + * `source()` and `target()`. However, it need not be intersected in its + * iterior. + * \return a handle to the cell currently traversed. + * \sa `cell()`. + */ + Cell_handle handle() { return _pos; } + + /// gives the cell traversed previously. + /** This cell is uninitialized until the traverser leaves the initial + * cell containing the `source()`. + * By invariance, once initialized, this cell must be intersected by the + * segment between `source()` and `target()`. + * \return the cell traversed previously. + * \sa `handle()`. + */ + Cell_handle previous() const { return _prev; } + + /// is the dereference operator. + /** \return a pointer to the cell currently traversed. + */ + Cell* operator->() { return &*_pos; } + + /// is the indirection operator. + /** \return the cell currently traversed. + */ + Cell& operator*() { return *_pos; } + + /// is the conversion operator. + operator const Cell_handle() const { return _pos; } + + /// checks if the traverser has reached the final cell, which contains the `target()`. + /** If the `target()` lies on a facet, edge, or vertex, the final cell is + * the cell containing the interior of the segment between `source()` and + * `target()`. + * \return true iff the current cell contains the `target()`. + */ + bool has_next() const { return !_done; } + + /// indicates how the current cell was entered. + /** For the first cell, containing the `source()` \f$ s \f$, this indicates + * the location of \f$ s \f$ in this cell. + */ + void entry( Locate_type& lt, int& li, int& lj ) const { lt = _lt; li = _li; lj = _lj; } + +/// \} + +public: +/// \name Mutators +/// \{ + /// is the increment postfix operator. + /** After incrementing the traverser, the current cell intersects the + * segment between `source()` and `target()`, incident to the previous + * cell, and closer to the `target()` than the previous cell. + * \sa `operator++(int)`. + * \pre The current cell does not contain the `target()`. + */ + TST& operator++(); + + /// is the increment prefix operator. + /** After incrementing the traverser, the current cell intersects the + * segment between `source()` and `target()`, incident to the previous + * cell, and closer to the `target()` than the previous cell. + * \sa `operator++()`. + * \pre The current cell does not contain the `target()`. + */ + TST operator++( int ); + + /// traverses to the final cell, which contains the `target()`. + /** This is equivalent to calling `operator++()` until `has_next()` is + * `false`. + * \return the final cell. + */ + Cell_handle traverse(); + +/// \} + +public: +/// \name Comparison +/// \{ + /// compares this traverser with `ct`. + /** \param ct the other traverser. + * \return `true` iff the other traverser traverses the same triangulation + * along the same line segment and has the same current cell. + * \sa `operator!=( const TST& t )`. + */ + bool operator==( const TST& ct ) const; + + /// compares this traverser with `ct`. + /** \param ct the other traverser. + * \return `false` iff the other traverser traverses the same + * triangulation along the same line segment and has the same current cell. + * \sa `operator==( const TST& t ) const`. + */ + bool operator!=( const TST& ct ) const; + + /// compares the cell currently traversed with `ch`. + /** \param ch a handle to the cell to compare to. + * \return true iff the cell currently traversed is the same as the one + * pointed to by `ch`. + * \sa `operator!=( const Cell_handle& ch ) const`. + * \sa `operator==( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_traverser_3 t )`. + */ + bool operator==( const Cell_handle& ch ) const { return ch == _pos; } + + /// compares the cell currently traversed with `ch`. + /** \param ch a handle to the cell to compare to. + * \return `false` iff the cell currently traversed is the same as the one + * pointed to by `ch`. + * \sa `operator==( const Cell_handle& ch )`. + * \sa `operator!=( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_traverser_3 t )`. + */ + bool operator!=( const Cell_handle& ch ) const { return ch != _pos; } + +/// \} + +protected: +/// \internal \name Protected Member Functions +/// \{ + /// \internal traverses the triangulation to the next cell. + /** \internal \sa `traverse()`. + */ + virtual void increment(); + +/// \} +}; // class Triangulation_segment_traverser_3 + +/// compares a handle to a cell to a traverser. +/** \param ch the handle to a cell. + * \param t the traverser. + * \return true iff the cell currently traversed by `t` is the same as the one + * pointed to by `ch`. + * \sa `operator!=( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_traverser_3 t )`. + * \sa `Triangulation_segment_traverser_3::operator==( const Cell_handle& ch )`. + */ +template +inline bool operator==( typename Tr::Cell_handle ch, Triangulation_segment_traverser_3 tci ) { return tci == ch; } + +/// compares a handle to a cell to a traverser. +/** \param ch the handle to a cell. + * \param t the traverser. + * \return `false` iff the cell currently traversed by `t` is the same as the + * one pointed to by `ch`. + * \sa `operator==( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_traverser_3 t )`. + * \sa `Triangulation_segment_traverser_3::operator!=( const Cell_handle& ch )`. + */ +template +inline bool operator!=( typename Tr::Cell_handle ch, Triangulation_segment_traverser_3 tci ) { return tci != ch; } + +} // namespace CGAL + +#include + +#endif // CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_H diff --git a/Triangulation_3/doc/Triangulation_3/Doxyfile.in b/Triangulation_3/doc/Triangulation_3/Doxyfile.in index e491b159d08..205f022fd1c 100644 --- a/Triangulation_3/doc/Triangulation_3/Doxyfile.in +++ b/Triangulation_3/doc/Triangulation_3/Doxyfile.in @@ -1,3 +1,11 @@ @INCLUDE = ${CGAL_DOC_PACKAGE_DEFAULTS} PROJECT_NAME = "CGAL ${CGAL_DOC_VERSION} - 3D Triangulations" + + +INPUT = ${CMAKE_SOURCE_DIR}/Triangulation_3/doc/Triangulation_3/ + + +EXTRACT_ALL = false +HIDE_UNDOC_MEMBERS = true +HIDE_UNDOC_CLASSES = true diff --git a/Triangulation_3/doc/Triangulation_3/PackageDescription.txt b/Triangulation_3/doc/Triangulation_3/PackageDescription.txt index a88e0da5726..564cde7b802 100644 --- a/Triangulation_3/doc/Triangulation_3/PackageDescription.txt +++ b/Triangulation_3/doc/Triangulation_3/PackageDescription.txt @@ -6,6 +6,8 @@ /// \defgroup PkgTriangulation3TriangulationClasses Triangulation Classes /// \ingroup PkgTriangulation3 +/// \defgroup PkgTriangulation3UtilityClasses Utility Classes +/// \ingroup PkgTriangulation3 /// \defgroup PkgTriangulation3TraitsClasses Traits Classes /// \ingroup PkgTriangulation3 @@ -99,6 +101,12 @@ is opposite to the vertex with the same index. See - `CGAL::Regular_triangulation_cell_base_with_weighted_circumcenter_3` - `CGAL::Triangulation_simplex_3` +\cgalModifBegin +### Utility Classes ### + +- `CGAL::Triangulation_segment_traverser_3` +\cgalModifEnd + ### Traits Classes ### - `CGAL::Regular_triangulation_euclidean_traits_3` diff --git a/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt b/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt index 8a1cfce402d..b9a2535420e 100644 --- a/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt +++ b/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt @@ -517,6 +517,14 @@ simplices can be stored in a set. \cgalExample{Triangulation_3/fast_location_3.cpp} +\cgalModifBegin +\subsection Triangulation3exsegmenttraverser Traversing the Triangulation Along a Segment + +The package provides a utility class that can be used to traverse the triangulation along a segment. All cells visited by this traverser are guaranteed to intersect the interior of the segment. +\cgalModifEnd + +\cgalExample{Triangulation_3/segment_traverser_3.cpp} + \subsection Triangulation_3FindingtheCellsinConflict Finding the Cells in Conflict with a Point in a Delaunay Triangulation \cgalExample{Triangulation_3/find_conflicts_3.cpp} @@ -1093,6 +1101,10 @@ In 2011, Pedro de Castro and Olivier Devillers implemented in release 3.8 the structural filtering method, improving the efficiency of point location. +\cgalModifBegin +In 2014, Thijs van Lankveld added the segment traverser utility class. +\cgalModifEnd + A new demo of this package was introduced in \cgal 3.8, coded by Fei (Sophie) Che, who was co-mentored by Manuel Caroli and Monique Teillaud in the framework of the Google Summer of Code, 2010. diff --git a/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp b/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp index 691faa15751..a522b33653b 100644 --- a/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp +++ b/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp @@ -34,12 +34,15 @@ void main() { Traverser st( dt, Point_3(-3,0,0), Point_3(3,0,0) ); // Count the number of finite cells traversed. - unsigned int cells = 0; + unsigned int inf = 0, fin = 0; while( st.has_next() ) { - if( !dt.is_infinite(st) ) - ++cells; + if( dt.is_infinite(st) ) + ++inf; + else + ++fin; ++st; } - std::cout << "The number of finite cells between " << st.source() << " and " << st.target() << " is " << cells << std::endl; + std::cout << "While traversing from " << st.source() << " to " << st.target() << std::endl; + std::cout << inf << " infinite and " << fin << " finite cells were visited." << std::endl; } \ No newline at end of file diff --git a/Triangulation_3/include/CGAL/Triangulation_3.h b/Triangulation_3/include/CGAL/Triangulation_3.h index 1cbee55c57e..b79f4df3aa6 100644 --- a/Triangulation_3/include/CGAL/Triangulation_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_3.h @@ -559,6 +559,11 @@ public: return geom_traits().orientation_3_object()(p, q, r, s); } + // Compute whether the orientation of the points of four vertices `a`, `b`, `c`, and `d`. + Orientation orientation( Vertex_handle a, Vertex_handle b, Vertex_handle c, Vertex_handle d ) const { + return orientation( a->point(), b->point(), c->point(), d->point() ); + } + // Compute the orientation of a point compared to the oriented plane supporting a half-facet. Orientation orientation( const Facet& f, const Point& p ) const; @@ -589,6 +594,11 @@ public: { return geom_traits().coplanar_orientation_3_object()(p, q, r); } + + // \internal Compute the orientation of four coplanar vertices `a`, `b`, `c`, and `d`. + Orientation coplanar_orientation( Vertex_handle va, Vertex_handle vb, Vertex_handle vc, Vertex_handle vd ) const { + return geom_traits().coplanar_orientation_3_object()( va->point(), vb->point(), vc->point(), vd->point() ); + } bool collinear(const Point &p, const Point &q, const Point &r) const @@ -596,6 +606,11 @@ public: return coplanar_orientation(p, q, r) == COLLINEAR; } + + bool collinear( Vertex_handle va, Vertex_handle vb, Vertex_handle vc ) const { + return collinear( va->point(), vb->point(), vc->point() ); + } + protected: Segment construct_segment(const Point &p, const Point &q) const diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index d2fb23730b1..e3c12cda26f 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -24,44 +24,6 @@ namespace CGAL { -#ifndef DOXYGEN_RUNNING -/** - * \ingroup PkgConformingTriangulation3Classes - * - * The `Triangulation_segment_traverser_3` iterates over the cells - * of a `Triangulation_3` by following a straight line segment \f$ st \f$. - * - * This class is closely related to `Triangulation_3::locate(...)`. - * However, unlike this `locate(...)` method, all the cells traversed - * by the `Triangulation_segment_traverser_3` intersect the interior of the line - * segment \f$ st \f$. - * - * Traversal starts from a cell containing \f$ s \f$ and it ends in a cell containing - * \f$ t \f$. - * If \f$ st \f$ is coplanar with a facet or collinear with an edge, at most one of the - * incident cells is traversed. - * If \f$ st \f$ intersects an edge or vertex, at most two incident cells are traversed: - * the cells intersecting \f$ st \f$ strictly in their interior. - * - * If \f$ s \f$ lies on the convex hull, traversal starts in an incident cell inside - * the convex hull. Similarly, if \f$ t \f$ lies on the convex hull, traversal ends in - * an adjacent cell inside the convex hull. - * - * Both \f$ s \f$ and \f$ t \f$ may lie outside the convex hull of the triangulation, - * but they must lie within the affine hull of the triangulation. In either case, the - * finite facet of any infinite cells traversed must intersect \f$ st \f$. - * - * The traverser may be applied to any triangulation of dimension > 0. - * However, for triangulations of dimension 1, the functionality is somewhat trivial. - * - * The traverser becomes invalid whenever the triangulation is changed. - * - * \tparam Tr_ is the triangulation type to traverse. - * - * \sa `Triangulation_3` - * \sa `Forward_circulator_base` - */ -#endif // DOXYGEN_RUNNING template < class Tr_ = void > class Triangulation_segment_traverser_3 : public Forward_circulator_base< typename Tr_::Triangulation_data_structure::Cell, @@ -71,18 +33,18 @@ class Triangulation_segment_traverser_3 typedef typename Tr::Geom_traits Gt; public: -/// \name Types -/// \{ - typedef Tr Triangulation; ///< The triangulation type. - typedef Triangulation_segment_traverser_3 TST; ///< A triangulation segment traverser. - typedef typename Tr::Point Point; ///< A point embedded in the vertices of the triangulation. - typedef typename Tr::Segment Segment; ///< A segment connecting two points. - typedef typename Tr::Cell Cell; ///< A cell in the triangulation. - typedef typename Tr::Edge Edge; ///< An edge in the triangulation. - typedef typename Tr::Vertex_handle Vertex_handle; ///< A handle for a vertex in the triangulation. - typedef typename Tr::Cell_handle Cell_handle; ///< A handle for a cell in the triangulation. - typedef typename Tr::Locate_type Locate_type; ///< The simplex containing a geometric object. -/// \} +// \name Types +// \{ + typedef Tr Triangulation; //< The triangulation type. + typedef Triangulation_segment_traverser_3 TST; //< A triangulation segment traverser. + typedef typename Tr::Point Point; //< A point embedded in the vertices of the triangulation. + typedef typename Tr::Segment Segment; //< A segment connecting two points. + typedef typename Tr::Cell Cell; //< A cell in the triangulation. + typedef typename Tr::Edge Edge; //< An edge in the triangulation. + typedef typename Tr::Vertex_handle Vertex_handle; //< A handle for a vertex in the triangulation. + typedef typename Tr::Cell_handle Cell_handle; //< A handle for a cell in the triangulation. + typedef typename Tr::Locate_type Locate_type; //< The simplex containing a geometric object. +// \} template < class Tr2 > struct Rebind_Tr { @@ -90,11 +52,11 @@ public: }; protected: -/// \internal \name Protected Attributes -/// \{ - /// \internal The triangulation to traverse. +// \internal \name Protected Attributes +// \{ + // \internal The triangulation to traverse. const Tr& _tr; -/// \} +// \} // The source and target points of the traversal. Point _source; @@ -121,26 +83,26 @@ private: Vertex_handle _s_vert, _t_vert; public: -/// \name Constructors -/// \{ - /// Constructs a traverser. - /** \param tr the triangulation to traverse. This triangulation must have dimension > 0. +// \name Constructors +// \{ + // Constructs a traverser. + /* \param tr the triangulation to traverse. This triangulation must have dimension > 0. * \param s the source vertex. This vertex must be initialized and cannot be the infinite vertex. * \param t the target vertex. This vertex must be initialized and cannot be the infinite vertex. * It cannot equal `s`. */ Triangulation_segment_traverser_3( const Tr& tr, Vertex_handle s, Vertex_handle t ); - /// Constructs a traverser. - /** \param tr the triangulation to traverse. This triangulation must have dimension > 0. + // Constructs a traverser. + /* \param tr the triangulation to traverse. This triangulation must have dimension > 0. * \param s the source vertex. This vertex must be initialized and cannot be the infinite vertex. * \param t the target point. This point must be initialized and it cannot be be at the same location as `s`. * If `tr` has dimension < 3, `t` must lie inside the affine hull of `tr`. */ Triangulation_segment_traverser_3( const Tr& tr, Vertex_handle s, const Point& t ); - /// Constructs a traverser. - /** \param tr the triangulation to traverse. This triangulation must have dimension > 0. + // Constructs a traverser. + /* \param tr the triangulation to traverse. This triangulation must have dimension > 0. * \param s the source point. This point must be initialized. If `tr` has dimension < 3, `s` must lie inside * the affine hull of `tr`. * \param t the target point. This point must be initialized and it cannot be be at the same location as `s`. @@ -149,46 +111,46 @@ public: */ Triangulation_segment_traverser_3( const Tr& tr, const Point& s, const Point& t, Cell_handle hint = Cell_handle() ); - /// Constructs a traverser. - /** \param tr the triangulation to traverse. This triangulation must have dimension > 0. + // Constructs a traverser. + /* \param tr the triangulation to traverse. This triangulation must have dimension > 0. * \param S the segment to be traversed. If `tr` has dimension < 3, `S` must lie inside * the affine hull of `tr`. `S` must not be degenerate, i.e. its source and target must not be equal. * \param hint the starting point to search for `S`. */ Triangulation_segment_traverser_3( const Tr& tr, const Segment& S, Cell_handle hint = Cell_handle() ); -/// \} +// \} public: -/// \name Accessors -/// \{ - /// Gives the source point of the traversed segment. - /** \return the source point. +// \name Accessors +// \{ + // Gives the source point of the traversed segment. + /* \return the source point. */ const Point& source() const { return _source; } - /// Gives the target point of the traversed segment. - /** \return the target point. + // Gives the target point of the traversed segment. + /* \return the target point. */ const Point& target() const { return _target; } - /// Gives the cell currently traversed. - /** By invariance, this cell is intersected by the segment + // Gives the cell currently traversed. + /* By invariance, this cell is intersected by the segment * between `source()` and `target()`. * \return the cell currently traversed. * \sa `handle()`. */ - Cell_handle cell() const { return _pos; } + const Cell cell() const { return *_pos; } - /// Gives a handle to the cell currently traversed. - /** By invariance, this cell is intersected by the segment + // Gives a handle to the cell currently traversed. + /* By invariance, this cell is intersected by the segment * between `source()` and `target()`. * \return a handle to the cell currently traversed. * \sa `cell()`. */ Cell_handle handle() { return _pos; } - /// Gives the cell traversed previously. - /** This cell is uninitialized until the traverser leaves the initial + // Gives the cell traversed previously. + /* This cell is uninitialized until the traverser leaves the initial * cell containing the `source()`. * By invariance, once initialized, this cell must be intersected by the segment * between `source()` and `target()`. @@ -197,48 +159,48 @@ public: */ Cell_handle previous() const { return _prev; } - /// Dereference operator. - /** \return a pointer to the cell currently traversed. + // Dereference operator. + /* \return a pointer to the cell currently traversed. */ Cell* operator->() { return &*_pos; } - /// Indirection operator. - /** \return the cell currently traversed. + // Indirection operator. + /* \return the cell currently traversed. */ Cell& operator*() { return *_pos; } - /// Conversion operator. - /** \return a handle to the cell currently traversed. + // Conversion operator. + /* \return a handle to the cell currently traversed. */ operator const Cell_handle() const { return _pos; } - /// Checks if the traverser has reached the final cell, which contains the `target()`. - /** If the `target()` lies on a facet, edge, or vertex, the final cell is the cell containing + // Checks if the traverser has reached the final cell, which contains the `target()`. + /* If the `target()` lies on a facet, edge, or vertex, the final cell is the cell containing * the interior of the segment between `source()` and `target()`. * \return true iff the current cell contains the `target()`. */ bool has_next() const { return !_done; } - /// Gives the type of simplex traversed last. - /** This simplex indicates where traversal has entered the cell. + // Gives the type of simplex traversed last. + /* This simplex indicates where traversal has entered the cell. * For the first cell, containing the `source()` \f$ s \f$, this indicates the location of \f$ s \f$ in this cell. */ void entry( Locate_type& lt, int& li, int& lj ) const { lt = _lt; li = _li; lj = _lj; } -/// \} +// \} public: -/// \name Mutators -/// \{ - /// Increment postfix operator. - /** The current cell must not contain the `target()`. +// \name Mutators +// \{ + // Increment postfix operator. + /* The current cell must not contain the `target()`. * After incrementing the traverser, the current cell intersects the segment * between `source()` and `target()` closer to the `target()` than the previous cell. * \sa `operator++(int)`. */ TST& operator++(); - /// Increment prefix operator. - /** The current cell must not contain the `target()`. + // Increment prefix operator. + /* The current cell must not contain the `target()`. * After incrementing the traverser, the current cell intersects the segment * between `source()` and `target()` closer to the `target()` than the previous cell. * than the previous cell. @@ -246,59 +208,59 @@ public: */ TST operator++( int ); - /// Traverse to the final cell, which contains the `target()`. - /** \return the final cell. + // Traverse to the final cell, which contains the `target()`. + /* \return the final cell. */ Cell_handle traverse(); -/// \} +// \} public: -/// \name Comparison -/// \{ - /// Compares this traverser with `ct`. - /** \param ct the other traverser. +// \name Comparison +// \{ + // Compares this traverser with `ct`. + /* \param ct the other traverser. * \return true iff the other traverser traverses the same triangulation along the same line segment * and has the same current cell. * \sa `operator!=( const TST& t )`. */ bool operator==( const TST& ct ) const; - /// Compares this traverser with `ct`. - /** \param ct the other traverser. + // Compares this traverser with `ct`. + /* \param ct the other traverser. * \return `false` iff the other traverser traverses the same triangulation along the same line segment * and has the same current cell. * \sa `operator==( const TST& t ) const`. */ bool operator!=( const TST& ct ) const; - /// Compares the cell currently traversed with `ch`. - /** \param ch a handle to the other cell. + // Compares the cell currently traversed with `ch`. + /* \param ch a handle to the other cell. * \return true iff the cell currently traversed is the same as the one pointed to by `ch`. * \sa `operator!=( const Cell_handle& ch ) const`. * \sa `operator==( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_traverser_3 t )`. */ bool operator==( const Cell_handle& ch ) const { return ch == _pos; } - /// Compares the cell currently traversed with `ch`. - /** \param ch a handle to the other cell. + // Compares the cell currently traversed with `ch`. + /* \param ch a handle to the other cell. * \return `false` iff the cell currently traversed is the same as the one pointed to by `ch`. * \sa `operator==( const Cell_handle& ch )`. * \sa `operator!=( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_traverser_3 t )`. */ bool operator!=( const Cell_handle& ch ) const { return ch != _pos; } -/// \} +// \} bool operator==( Nullptr_t CGAL_triangulation_assertion_code(n) ) const; bool operator!=( Nullptr_t n ) const; protected: -/// \internal \name Protected Member Functions -/// \{ - /// \internal Traverse to the next cell. - /** \internal \sa `traverse()`. +// \internal \name Protected Member Functions +// \{ + // \internal Traverse to the next cell. + /* \internal \sa `traverse()`. */ virtual void increment(); -/// \} +// \} private: // increment(), if the triangulation is 3D. @@ -318,8 +280,8 @@ private: } }; // class Triangulation_segment_traverser_3 -/// Compares a handle to a cell to a traverser. -/** \param ch the handle to a cell. +// Compares a handle to a cell to a traverser. +/* \param ch the handle to a cell. * \param t the traverser. * \return true iff the cell currently traversed by `t` is the same as the one pointed to by `ch`. * \sa `operator!=( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_traverser_3 t )`. @@ -328,8 +290,8 @@ private: template inline bool operator==( typename Tr::Cell_handle ch, Triangulation_segment_traverser_3 tci ) { return tci == ch; } -/// Compares a handle to a cell to a traverser. -/** \param ch the handle to a cell. +// Compares a handle to a cell to a traverser. +/* \param ch the handle to a cell. * \param t the traverser. * \return `false` iff the cell currently traversed by `t` is the same as the one pointed to by `ch`. * \sa `operator==( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_traverser_3 t )`. diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h index 3134dbef015..420a698931c 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h @@ -220,7 +220,7 @@ increment_3() { int li = rng.template get_bits<2>(); CGAL_triangulation_assertion_code( bool incell = true; ) - for( int k = 0; k < 4; ++k, li = _tr.incr_ind(li) ) { + for( int k = 0; k < 4; ++k, li = _tr.increment_index(li) ) { Cell_handle next = _pos->neighbor(li); if( next == _prev ) continue; @@ -245,7 +245,7 @@ increment_3() { // Check if the target is inside the pyramid. int lj = rng.template get_bits<2>(); int Or = 0; - for( int l = 0; l < 4; ++l, lj = _tr.incr_ind(lj) ) { + for( int l = 0; l < 4; ++l, lj = _tr.increment_index(lj) ) { if( li == lj ) continue; @@ -364,7 +364,7 @@ increment_3_inf( int inf ) { // Check if the line enters an adjacent infinite cell. // This occurs if the target lies on the other side of // a plane through one of the finite edges and the source point. - for( int j = 0; j != 4; ++j, li = _tr.incr_ind(li) ) { + for( int j = 0; j != 4; ++j, li = _tr.increment_index(li) ) { if( li == inf ) { o[li] = COPLANAR; continue; From ed45f5e938533429604e6191c9937e6d7fff0c1e Mon Sep 17 00:00:00 2001 From: Thijs van Lankveld Date: Mon, 16 Jun 2014 16:37:58 +0200 Subject: [PATCH 010/138] Segment traverser defined as type in Triangulation_3 --- .../Triangulation_3/CGAL/Triangulation_3.h | 70 +++++++++++++++++++ .../include/CGAL/Triangulation_3.h | 24 +++++++ .../CGAL/Triangulation_segment_traverser_3.h | 27 +++++++ 3 files changed, 121 insertions(+) diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h index 4e756cdc279..0a76fd27961 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h @@ -219,6 +219,11 @@ Concurrency tag (from the TDS). */ typedef TriangulationDataStructure_3::Concurrency_tag Concurrency_tag; +/*! +Iterator over the cells intersected by a line segment. +*/ +typedef unspecified_type Segment_walk_iterator; + /// @} /// \name Creation @@ -1136,6 +1141,71 @@ Point_iterator points_end() const; /// @} +/*!\name Walk Iterator +\cgalModifBegin + +The triangulation defines an iterator that visits the cells intersected by a given line segment. It is non-mutable and unidirectional. It is invalidated by any modification of one of the cells traversed. + +The cells visited comprise a connected region containing both source and target point of the line segment `s`. Each cell falls within one or more of the following categories: +1. a finite cell whose interior intersects `s`. +2. a finite cell with a facet `f` whose interior intersects `s`. If such a cell is visited, its neighbor incident to `f` is not visited. +3. a finite cell with an edge `e` whose interior (partially) ovelaps `s`. If such a cell is visited, none of the other cells incident to `e` are visited. +4. a finite cell with an edge `e` whose interior intersects `s` in a point. This cell must form a connected component together with a number of cells incident to `e`. Exactly two of these cells must also fall in category 1 or 2. +5. a finite cell with a vertex `v` that is an endpoint of `s`. This cell must also fit in either category 1 or 2. +6. a finite cell with a vertex `v` that lies on the iterior of `s`. This cell must form a connected component together with a number of cells incident to `v`. Exactly two of these cells must also fall in category 1 or 2. +7. an infinite cell with a finite facet whose interior intersects the interior of `s`. +8. an infinite cell with a finite edge `e` whose interior intersects the interior of `s`. If such a cell is visited, its infinite neighbor incident to `e` is not visited. +9. an infinite cell with a finite vertex `v` that lies on the interior of `s`. If such a cell is visited, none of the other infinite cells incident to `v` are visited. + +In the special case the segment does not intersect any finite facets, exactly one infinite cell is visited. This cell shares a facet `f` with a finite cell `c` such that `f` is intersected by the line through the source of `s` and the vertex of `c` opposite of `f`. + +Note that for categories 4 and 6, it is not predetermined which incident cells are visited. However, exactly two of the incident cells `c0,c1` visited also fall in category 1 or 2. The remaining incident cells visited make a facet-connected sequence connecting `c0` to `c1`. + +\cgalModifEnd +*/ +/// @{ +/*! +returns an iterator over the cells intersected by the line segment `st`. + +If there is no such cell, the iterator visits exactly one infinite cell. + +\pre `s` and `t` must be different points and neither can be the infinite vertex. +\pre The triangulation must mave dimension at least 2. +*/ +Segment_walk_iterator segment_walk(Vertex_handle s, Vertex_handle t) const; + +/*! +returns an iterator over the cells intersected by the line segment `st`. + +If there is no such cell, the iterator visits exactly one infinite cell. + +\pre `s` and `t` must be different points and `s` cannot be the infinite vertex. +\pre The triangulation must mave dimension at least 2. If the dimension is 2, `t` must lie in the affine hull. +*/ +Segment_walk_iterator segment_walk(Vertex_handle s, const Point& t) const; + +/*! +returns an iterator over the cells intersected by the line segment `st`. + +If there is no such cell, the iterator visits exactly one infinite cell. + +\pre `s` and `t` must be different points. +\pre The triangulation must mave dimension at least 2. If the dimension is 2, both `s` and `t` must lie in the affine hull. +*/ +Segment_walk_iterator segment_walk(const Point& s, const Point& t, Cell_handle hint = Cell_handle()) const; + +/*! +returns an iterator over the cells intersected by the line segment `seg`. + +If there is no such cell, the iterator visits exactly one infinite cell. + +\pre `seg` cannot be degenerate, i.e. it cannot have the same source and target. +\pre The triangulation must mave dimension at least 2. If the dimension is 2, `seg` must lie completely in the affine hull. +*/ +Segment_walk_iterator segment_walk(const Segment& seg, Cell_handle hint = Cell_handle()) const; + +/// @} + /*!\name Cell and Facet Circulators The following circulators respectively visit all cells or all facets incident to a given edge. They are non-mutable and bidirectional. They are invalidated by any modification of one of the cells traversed. */ diff --git a/Triangulation_3/include/CGAL/Triangulation_3.h b/Triangulation_3/include/CGAL/Triangulation_3.h index b79f4df3aa6..bd7aaf21853 100644 --- a/Triangulation_3/include/CGAL/Triangulation_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_3.h @@ -19,6 +19,8 @@ // Sylvain Pion // Clement Jamin +#include + #ifndef CGAL_TRIANGULATION_3_H #define CGAL_TRIANGULATION_3_H @@ -423,6 +425,8 @@ public: typedef Edge_iterator All_edges_iterator; typedef Vertex_iterator All_vertices_iterator; + typedef Triangulation_segment_traverser_3 Segment_walk_iterator; + typedef typename Tds::Simplex Simplex; private: // This class is used to generate the Finite_*_iterators. @@ -2130,6 +2134,26 @@ public: return _tds.incident_edges(v, edges, Finite_filter(this)); } + Segment_walk_iterator + segment_walk(Vertex_handle s, Vertex_handle t) const { + return Segment_walk_iterator( *this, s, t ); + } + + Segment_walk_iterator + segment_walk(Vertex_handle s, const Point& t) const { + return Segment_walk_iterator( *this, s, t ); + } + + Segment_walk_iterator + segment_walk(const Point& s, const Point& t, Cell_handle hint = Cell_handle()) const { + return Segment_walk_iterator( *this, s, t, hint ); + } + + Segment_walk_iterator + segment_walk(const Segment& seg, Cell_handle hint = Cell_handle()) const { + return Segment_walk_iterator( *this, seg, hint ); + } + size_type degree(Vertex_handle v) const { return _tds.degree(v); diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index e3c12cda26f..846508ff722 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -19,6 +19,27 @@ #ifndef CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_H #define CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_H + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + + + + #include #include @@ -300,6 +321,12 @@ inline bool operator==( typename Tr::Cell_handle ch, Triangulation_segment_trave template inline bool operator!=( typename Tr::Cell_handle ch, Triangulation_segment_traverser_3 tci ) { return tci != ch; } + +#ifndef CGAL_TRIANGULATION_3_H +template < class GT, class Tds > +class Triangulation_3; +#endif // CGAL_TRIANGULATION_3_H + // Specialization for void template <> class Triangulation_segment_traverser_3 { From 7508c18322ad17c1d4649982d85361b58760f213 Mon Sep 17 00:00:00 2001 From: Thijs van Lankveld Date: Mon, 30 Jun 2014 11:32:46 +0200 Subject: [PATCH 011/138] Iterator pattern implemented. --- .../Triangulation_3/CGAL/Triangulation_3.h | 47 +- .../CGAL/Triangulation_segment_traverser_3.h | 320 -------- .../Triangulation_3/PackageDescription.txt | 9 - .../examples/Triangulation_3/README | 2 +- .../Triangulation_3/segment_traverser_3.cpp | 5 +- .../include/CGAL/Triangulation_3.h | 26 +- .../CGAL/Triangulation_segment_traverser_3.h | 372 ++++++---- .../Triangulation_segment_traverser_3_impl.h | 701 +++++++++++------- ...o make superclass for inserter pattern.txt | 39 + 9 files changed, 763 insertions(+), 758 deletions(-) delete mode 100644 Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_segment_traverser_3.h create mode 100644 Triangulation_3/include/CGAL/how to make superclass for inserter pattern.txt diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h index 0a76fd27961..b205bf55049 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h @@ -220,9 +220,9 @@ Concurrency tag (from the TDS). typedef TriangulationDataStructure_3::Concurrency_tag Concurrency_tag; /*! -Iterator over the cells intersected by a line segment. +iterator over the cells intersected by a line segment. */ -typedef unspecified_type Segment_walk_iterator; +typedef unspecified_type Segment_cell_iterator; /// @} @@ -1144,7 +1144,7 @@ Point_iterator points_end() const; /*!\name Walk Iterator \cgalModifBegin -The triangulation defines an iterator that visits the cells intersected by a given line segment. It is non-mutable and unidirectional. It is invalidated by any modification of one of the cells traversed. +The triangulation defines an iterator that visits the cells intersected by a line segment. It is a non-mutable and forward iterator. It is invalidated by any modification of one of the cells traversed. The cells visited comprise a connected region containing both source and target point of the line segment `s`. Each cell falls within one or more of the following categories: 1. a finite cell whose interior intersects `s`. @@ -1165,45 +1165,54 @@ Note that for categories 4 and 6, it is not predetermined which incident cells a */ /// @{ /*! -returns an iterator over the cells intersected by the line segment `st`. +returns the iterator that allows to visit the cells intersected by the line segment `st`. -If there is no such cell, the iterator visits exactly one infinite cell. +The starting point of the iterator is an arbitrary cell incident to `s`. + +The iterator remains valid until the first cell incident to `t` is passed. \pre `s` and `t` must be different points and neither can be the infinite vertex. \pre The triangulation must mave dimension at least 2. */ -Segment_walk_iterator segment_walk(Vertex_handle s, Vertex_handle t) const; +Segment_walk_iterator segment_walk_begin(Vertex_handle s, Vertex_handle t) const; /*! -returns an iterator over the cells intersected by the line segment `st`. +returns the past-the-end iterator over the cells intersected by the line segment `st`. -If there is no such cell, the iterator visits exactly one infinite cell. +This iterator cannot be dereferenced. It indicates when `segment_walk_begin` has +passed the target. -\pre `s` and `t` must be different points and `s` cannot be the infinite vertex. -\pre The triangulation must mave dimension at least 2. If the dimension is 2, `t` must lie in the affine hull. +\pre `s` and `t` must be different points and neither can be the infinite vertex. +\pre The triangulation must mave dimension at least 2. */ -Segment_walk_iterator segment_walk(Vertex_handle s, const Point& t) const; +Segment_walk_iterator segment_walk_end(Vertex_handle s, Vertex_handle t) const; /*! -returns an iterator over the cells intersected by the line segment `st`. +returns the iterator that allows to visit the cells intersected by the line segment `st`. If there is no such cell, the iterator visits exactly one infinite cell. +The starting point of the iterator is a cell containing `s`. + +The iterator remains valid until the first cell containing `t` is passed. + +The `hint` is used to locate `s`. + \pre `s` and `t` must be different points. \pre The triangulation must mave dimension at least 2. If the dimension is 2, both `s` and `t` must lie in the affine hull. */ -Segment_walk_iterator segment_walk(const Point& s, const Point& t, Cell_handle hint = Cell_handle()) const; +Segment_walk_iterator segment_walk_begin(const Point& s, const Point& t, Cell_handle hint = Cell_handle()) const; /*! -returns an iterator over the cells intersected by the line segment `seg`. +returns the past-the-end iterator over the cells intersected by the line segment `st`. -If there is no such cell, the iterator visits exactly one infinite cell. +This iterator cannot be dereferenced. It indicates when `segment_walk_begin` has +passed the target. -\pre `seg` cannot be degenerate, i.e. it cannot have the same source and target. -\pre The triangulation must mave dimension at least 2. If the dimension is 2, `seg` must lie completely in the affine hull. +\pre `s` and `t` must be different points and neither can be the infinite vertex. +\pre The triangulation must mave dimension at least 2. */ -Segment_walk_iterator segment_walk(const Segment& seg, Cell_handle hint = Cell_handle()) const; - +Segment_walk_iterator segment_walk_end(const Point& s, const Point& t, Cell_handle hint = Cell_handle()) const; /// @} /*!\name Cell and Facet Circulators diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_segment_traverser_3.h deleted file mode 100644 index ffbfaeaf851..00000000000 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_segment_traverser_3.h +++ /dev/null @@ -1,320 +0,0 @@ -//A class that follows a straight line through a Delaunay triangulation structure. -//Copyright (C) 2012 - Utrecht University -// -//This program is free software: you can redistribute it and/or modify -//it under the terms of the GNU General Public License as published by -//the Free Software Foundation, either version 3 of the License, or -//(at your option) any later version. -// -//This program is distributed in the hope that it will be useful, -//but WITHOUT ANY WARRANTY; without even the implied warranty of -//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//GNU General Public License for more details. -// -//You should have received a copy of the GNU General Public License -//along with this program. If not, see . -// -// Author(s): Thijs van Lankveld - -#ifndef CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_H -#define CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_H - -#include -#include - -namespace CGAL { - -/** - * \ingroup PkgTriangulation3UtilityClasses - * - * The `Triangulation_segment_traverser_3` iterates over the cells of a - * `Triangulation_3` by following a straight line segment - * \f$ \overline{st} \f$. - * - * The functionality of this class is closely related to - * `Triangulation_3::locate(...)`. - * However, unlike this `locate(...)` method, all the cells traversed by the - * `Triangulation_segment_traverser_3` intersect the interior of the line - * segment \f$ \overline{st} \f$. - * - * Traversal starts from a cell containing \f$ s \f$ and it ends in a cell - * containing \f$ t \f$. - * If \f$ \overline{st} \f$ is coplanar with a facet or collinear with an - * edge, at most one of the incident cells is traversed. - * If \f$ \overline{st} \f$ intersects an edge or vertex (and - * \f$ \overline{st} \f$ isn't coplanar with any of the incident facets), at - * most two incident cells are traversed: the cells intersecting - * \f$ \overline{st} \f$ strictly in their interior. - * - * If \f$ s \f$ lies on the convex hull, traversal starts in an incident cell - * inside the convex hull. Similarly, if \f$ t \f$ lies on the convex hull, - * traversal ends in an incident cell inside the convex hull. - * - * Both \f$ s \f$ and \f$ t \f$ may lie outside the convex hull of the - * triangulation, but they must lie within the affine hull of the - * triangulation. In either case, the finite facet of any infinite cells - * traversed must intersect \f$ \overline{st} \f$. - * - * The traverser may be applied to triangulations of dimension smaller than 3, - * as long as the dimension is larger than 0. - * However, for triangulations of dimension 1, the functionality is somewhat - * trivial. - * - * The traverser becomes invalid whenever the triangulation is changed. - * - * \tparam Tr is the type of the triangulation to traverse. It must be a - * `Triangulation_3` or one of its subclasses. - * - * \sa `Triangulation_3` - * \sa `Forward_circulator_base` - */ -template < class Tr > -class Triangulation_segment_traverser_3 -: public Forward_circulator_base< typename Tr::Triangulation_data_structure::Cell, - std::ptrdiff_t, std::size_t > { -public: -/// \name Types -/// \{ - typedef Tr Triangulation; ///< defines the triangulation type. - typedef Triangulation_segment_traverser_3 TST; ///< defines the segment traverser type. - typedef typename Tr::Point Point; ///< defines the point type. - typedef typename Tr::Segment Segment; ///< defines the segment type. - typedef typename Tr::Cell Cell; ///< defines the cell type. - typedef typename Tr::Edge Edge; ///< defines the edge type. - typedef typename Tr::Vertex_handle Vertex_handle; ///< defines the handle type for a vertex. - typedef typename Tr::Cell_handle Cell_handle; ///< defines the handle type for a cell. - typedef typename Tr::Locate_type Locate_type; ///< defines the simplex types returned when locating a point. - -/// \} - -protected: -/// \internal \name Protected Attributes -/// \{ - const Tr& _tr; ///< \internal stores the triangulation to traverse. - -/// \} - -public: -/// \name Constructors -/// \{ - /// constructs a traverser. - /** \param tr the triangulation to traverse. - * \param s the source vertex. - * \param t the target vertex. - * \pre both `s` and `t` must be initialized and cannot be the infinite - * vertex. - * \pre `s != t`. - * \pre `tr` must have dimension > 0. - */ - Triangulation_segment_traverser_3( const Tr& tr, Vertex_handle s, Vertex_handle t ); - - /// constructs a traverser. - /** \param tr the triangulation to traverse. - * \param s the source vertex. - * \param t the target point. - * \pre both `s` and `t` must be initialized and `s` cannot be the - * infinite vertex. - * \pre `s != t`. - * \pre `tr` must have dimension > 0. If `tr` has dimension < 3, `t` must - * lie in the affine hull of `tr`. - */ - Triangulation_segment_traverser_3( const Tr& tr, Vertex_handle s, const Point& t ); - - /// constructs a traverser. - /** \param tr the triangulation to traverse. - * \param s the source point. - * \param t the target point. - * \param hint the starting point to locate `s`. - * \pre both `s` and `t` must be initialized. - * \pre `s != t`. - * \pre `tr` must have dimension > 0. If `tr` has dimension < 3, both `s` - * and `t` must lie in the affine hull of `tr`. - */ - Triangulation_segment_traverser_3( const Tr& tr, const Point& s, const Point& t, Cell_handle hint = Cell_handle() ); - - /// constructs a traverser. - /** \param tr the triangulation to traverse. - * \param seg the line segment to traverse. - * \param hint the starting point to locate the source of `seg`. - * \pre `seg` must not be degenerate, i.e. its source and target must not - * be equal. - * \pre `tr` must have dimension > 0. If `tr` has dimension < 3, `seg` - * must lie in the affine hull of `tr`. - */ - Triangulation_segment_traverser_3( const Tr& tr, const Segment& seg, Cell_handle hint = Cell_handle() ); - -/// \} - -public: -/// \name Accessors -/// \{ - /// gives the source point of the segment being traversed. - const Point& source() const { return _source; } - - /// gives the target point of the segment being traversed. - const Point& target() const { return _target; } - - /// gives the cell currently traversed. - /** By invariance, this cell is intersected by the segment between - * `source()` and `target()`. However, it need not be intersected in its - * iterior. - * \return the cell currently traversed. - * \sa `handle()`. - */ - const Cell cell() const { return *_pos; } - - /// gives a handle to the cell currently traversed. - /** By invariance, this cell is intersected by the segment between - * `source()` and `target()`. However, it need not be intersected in its - * iterior. - * \return a handle to the cell currently traversed. - * \sa `cell()`. - */ - Cell_handle handle() { return _pos; } - - /// gives the cell traversed previously. - /** This cell is uninitialized until the traverser leaves the initial - * cell containing the `source()`. - * By invariance, once initialized, this cell must be intersected by the - * segment between `source()` and `target()`. - * \return the cell traversed previously. - * \sa `handle()`. - */ - Cell_handle previous() const { return _prev; } - - /// is the dereference operator. - /** \return a pointer to the cell currently traversed. - */ - Cell* operator->() { return &*_pos; } - - /// is the indirection operator. - /** \return the cell currently traversed. - */ - Cell& operator*() { return *_pos; } - - /// is the conversion operator. - operator const Cell_handle() const { return _pos; } - - /// checks if the traverser has reached the final cell, which contains the `target()`. - /** If the `target()` lies on a facet, edge, or vertex, the final cell is - * the cell containing the interior of the segment between `source()` and - * `target()`. - * \return true iff the current cell contains the `target()`. - */ - bool has_next() const { return !_done; } - - /// indicates how the current cell was entered. - /** For the first cell, containing the `source()` \f$ s \f$, this indicates - * the location of \f$ s \f$ in this cell. - */ - void entry( Locate_type& lt, int& li, int& lj ) const { lt = _lt; li = _li; lj = _lj; } - -/// \} - -public: -/// \name Mutators -/// \{ - /// is the increment postfix operator. - /** After incrementing the traverser, the current cell intersects the - * segment between `source()` and `target()`, incident to the previous - * cell, and closer to the `target()` than the previous cell. - * \sa `operator++(int)`. - * \pre The current cell does not contain the `target()`. - */ - TST& operator++(); - - /// is the increment prefix operator. - /** After incrementing the traverser, the current cell intersects the - * segment between `source()` and `target()`, incident to the previous - * cell, and closer to the `target()` than the previous cell. - * \sa `operator++()`. - * \pre The current cell does not contain the `target()`. - */ - TST operator++( int ); - - /// traverses to the final cell, which contains the `target()`. - /** This is equivalent to calling `operator++()` until `has_next()` is - * `false`. - * \return the final cell. - */ - Cell_handle traverse(); - -/// \} - -public: -/// \name Comparison -/// \{ - /// compares this traverser with `ct`. - /** \param ct the other traverser. - * \return `true` iff the other traverser traverses the same triangulation - * along the same line segment and has the same current cell. - * \sa `operator!=( const TST& t )`. - */ - bool operator==( const TST& ct ) const; - - /// compares this traverser with `ct`. - /** \param ct the other traverser. - * \return `false` iff the other traverser traverses the same - * triangulation along the same line segment and has the same current cell. - * \sa `operator==( const TST& t ) const`. - */ - bool operator!=( const TST& ct ) const; - - /// compares the cell currently traversed with `ch`. - /** \param ch a handle to the cell to compare to. - * \return true iff the cell currently traversed is the same as the one - * pointed to by `ch`. - * \sa `operator!=( const Cell_handle& ch ) const`. - * \sa `operator==( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_traverser_3 t )`. - */ - bool operator==( const Cell_handle& ch ) const { return ch == _pos; } - - /// compares the cell currently traversed with `ch`. - /** \param ch a handle to the cell to compare to. - * \return `false` iff the cell currently traversed is the same as the one - * pointed to by `ch`. - * \sa `operator==( const Cell_handle& ch )`. - * \sa `operator!=( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_traverser_3 t )`. - */ - bool operator!=( const Cell_handle& ch ) const { return ch != _pos; } - -/// \} - -protected: -/// \internal \name Protected Member Functions -/// \{ - /// \internal traverses the triangulation to the next cell. - /** \internal \sa `traverse()`. - */ - virtual void increment(); - -/// \} -}; // class Triangulation_segment_traverser_3 - -/// compares a handle to a cell to a traverser. -/** \param ch the handle to a cell. - * \param t the traverser. - * \return true iff the cell currently traversed by `t` is the same as the one - * pointed to by `ch`. - * \sa `operator!=( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_traverser_3 t )`. - * \sa `Triangulation_segment_traverser_3::operator==( const Cell_handle& ch )`. - */ -template -inline bool operator==( typename Tr::Cell_handle ch, Triangulation_segment_traverser_3 tci ) { return tci == ch; } - -/// compares a handle to a cell to a traverser. -/** \param ch the handle to a cell. - * \param t the traverser. - * \return `false` iff the cell currently traversed by `t` is the same as the - * one pointed to by `ch`. - * \sa `operator==( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_traverser_3 t )`. - * \sa `Triangulation_segment_traverser_3::operator!=( const Cell_handle& ch )`. - */ -template -inline bool operator!=( typename Tr::Cell_handle ch, Triangulation_segment_traverser_3 tci ) { return tci != ch; } - -} // namespace CGAL - -#include - -#endif // CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_H diff --git a/Triangulation_3/doc/Triangulation_3/PackageDescription.txt b/Triangulation_3/doc/Triangulation_3/PackageDescription.txt index 564cde7b802..0b1ac74fd19 100644 --- a/Triangulation_3/doc/Triangulation_3/PackageDescription.txt +++ b/Triangulation_3/doc/Triangulation_3/PackageDescription.txt @@ -6,9 +6,6 @@ /// \defgroup PkgTriangulation3TriangulationClasses Triangulation Classes /// \ingroup PkgTriangulation3 -/// \defgroup PkgTriangulation3UtilityClasses Utility Classes -/// \ingroup PkgTriangulation3 - /// \defgroup PkgTriangulation3TraitsClasses Traits Classes /// \ingroup PkgTriangulation3 @@ -101,12 +98,6 @@ is opposite to the vertex with the same index. See - `CGAL::Regular_triangulation_cell_base_with_weighted_circumcenter_3` - `CGAL::Triangulation_simplex_3` -\cgalModifBegin -### Utility Classes ### - -- `CGAL::Triangulation_segment_traverser_3` -\cgalModifEnd - ### Traits Classes ### - `CGAL::Regular_triangulation_euclidean_traits_3` diff --git a/Triangulation_3/examples/Triangulation_3/README b/Triangulation_3/examples/Triangulation_3/README index 968c5a53b65..3b75795fc5f 100644 --- a/Triangulation_3/examples/Triangulation_3/README +++ b/Triangulation_3/examples/Triangulation_3/README @@ -24,7 +24,7 @@ point location queries in a Delaunay triangulation. ------- segment_traverser_3 -------------------------------------------- -This example shows how to use a Triangulation_segment_traverser_3 +This example shows how to use a Triangulation_segment_cell_iterator_3 to traverse the triangulation in a straight line. ------- tds -------------------------------------------------- diff --git a/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp b/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp index a522b33653b..33fa19d4a23 100644 --- a/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp +++ b/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp @@ -14,7 +14,7 @@ typedef CGAL::Delaunay_triangulation_3< Kernel > DT; typedef DT::Cell_handle Cell_handle; -typedef CGAL::Triangulation_segment_traverser_3< DT > Traverser; +typedef CGAL::Triangulation_segment_cell_iterator_3< DT > Traverser; void main() { std::vector< Point_3 > points; @@ -35,12 +35,11 @@ void main() { // Count the number of finite cells traversed. unsigned int inf = 0, fin = 0; - while( st.has_next() ) { + for( ; st != st.end(); ++st ) { if( dt.is_infinite(st) ) ++inf; else ++fin; - ++st; } std::cout << "While traversing from " << st.source() << " to " << st.target() << std::endl; diff --git a/Triangulation_3/include/CGAL/Triangulation_3.h b/Triangulation_3/include/CGAL/Triangulation_3.h index bd7aaf21853..c72690ab3c3 100644 --- a/Triangulation_3/include/CGAL/Triangulation_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_3.h @@ -425,7 +425,7 @@ public: typedef Edge_iterator All_edges_iterator; typedef Vertex_iterator All_vertices_iterator; - typedef Triangulation_segment_traverser_3 Segment_walk_iterator; + typedef Triangulation_segment_cell_iterator_3 Segment_cell_iterator; typedef typename Tds::Simplex Simplex; private: @@ -2134,24 +2134,24 @@ public: return _tds.incident_edges(v, edges, Finite_filter(this)); } - Segment_walk_iterator - segment_walk(Vertex_handle s, Vertex_handle t) const { - return Segment_walk_iterator( *this, s, t ); + Segment_cell_iterator + segment_walk_begin(Vertex_handle s, Vertex_handle t) const { + return Segment_cell_iterator( *this, s, t ); } - Segment_walk_iterator - segment_walk(Vertex_handle s, const Point& t) const { - return Segment_walk_iterator( *this, s, t ); + Segment_cell_iterator + segment_walk_end(Vertex_handle s, Vertex_handle t) const { + return Segment_cell_iterator( *this, s, t ).end(); } - Segment_walk_iterator - segment_walk(const Point& s, const Point& t, Cell_handle hint = Cell_handle()) const { - return Segment_walk_iterator( *this, s, t, hint ); + Segment_cell_iterator + segment_walk_begin(const Point& s, const Point& t, Cell_handle hint = Cell_handle()) const { + return Segment_cell_iterator( *this, s, t, hint ); } - Segment_walk_iterator - segment_walk(const Segment& seg, Cell_handle hint = Cell_handle()) const { - return Segment_walk_iterator( *this, seg, hint ); + Segment_cell_iterator + segment_walk_end(const Point& s, const Point& t, Cell_handle hint = Cell_handle()) const { + return Segment_cell_iterator( *this, s, t, hint ).end(); } size_type degree(Vertex_handle v) const diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 846508ff722..02970f1aded 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -37,238 +37,339 @@ #include #include - - +#include #include #include -namespace CGAL { +// If defined, type casting is done statically, +// reducing type-safety overhead. +#define CGAL_TST_ASSUME_CORRECT_TYPES -template < class Tr_ = void > -class Triangulation_segment_traverser_3 -: public Forward_circulator_base< typename Tr_::Triangulation_data_structure::Cell, - std::ptrdiff_t, std::size_t > { +namespace CGAL { + +template < class Tr, class Inc > +class Triangulation_segment_cell_iterator_3; + +namespace internal { + +template < class Tr > +struct Incrementer { + typedef Incrementer Self; + typedef Triangulation_segment_cell_iterator_3 SCI; // describes the type of iterator expected by the incrementer. + Incrementer() {} + void increment( SCI& sci ) { sci.walk_to_next(); } +}; // struct Incrementer + +} // namespace internal + + +// provides an iterator over the cells intersected by a line segment. +/* + * The `Triangulation_segment_traverser_3` iterates over the cells + * of a `Triangulation_3` by following a straight line segment \f$ st \f$. + * + * This class is closely related to `Triangulation_3::locate(...)`. + * However, unlike this `locate(...)` method, all the cells traversed + * by the `Triangulation_segment_traverser_3` intersect the interior of the line + * segment \f$ st \f$. + * + * Traversal starts from a cell containing \f$ s \f$ and it ends in a cell containing + * \f$ t \f$. + * If \f$ st \f$ is coplanar with a facet or collinear with an edge, at most one of the + * incident cells is traversed. + * If \f$ st \f$ intersects an edge or vertex, at most two incident cells are traversed: + * the cells intersecting \f$ st \f$ strictly in their interior. + * + * If \f$ s \f$ lies on the convex hull, traversal starts in an incident cell inside + * the convex hull. Similarly, if \f$ t \f$ lies on the convex hull, traversal ends in + * an adjacent cell inside the convex hull. + * + * Both \f$ s \f$ and \f$ t \f$ may lie outside the convex hull of the triangulation, + * but they must lie within the affine hull of the triangulation. In either case, the + * finite facet of any infinite cells traversed must intersect \f$ st \f$. + * + * The traverser may be applied to any triangulation of dimension > 0. + * However, for triangulations of dimension 1, the functionality is somewhat trivial. + * + * The traverser becomes invalid whenever the triangulation is changed. + * + * \tparam Tr_ is the triangulation type to traverse. + * + * \cgalModels{ForwardIterator} + * + * \sa `Triangulation_3` + * \sa `Forward_circulator_base` + */ +template < class Tr_, class Inc = internal::Incrementer > +class Triangulation_segment_cell_iterator_3 { typedef Tr_ Tr; typedef typename Tr::Triangulation_data_structure Tds; typedef typename Tr::Geom_traits Gt; + typedef Inc Incrementer; public: // \name Types // \{ - typedef Tr Triangulation; //< The triangulation type. - typedef Triangulation_segment_traverser_3 TST; //< A triangulation segment traverser. - typedef typename Tr::Point Point; //< A point embedded in the vertices of the triangulation. - typedef typename Tr::Segment Segment; //< A segment connecting two points. - typedef typename Tr::Cell Cell; //< A cell in the triangulation. - typedef typename Tr::Edge Edge; //< An edge in the triangulation. - typedef typename Tr::Vertex_handle Vertex_handle; //< A handle for a vertex in the triangulation. - typedef typename Tr::Cell_handle Cell_handle; //< A handle for a cell in the triangulation. - typedef typename Tr::Locate_type Locate_type; //< The simplex containing a geometric object. + typedef Tr Triangulation; //< defines the triangulation type. + typedef Triangulation_segment_cell_iterator_3 + Segment_cell_iterator; //< defines the segment cell iterator type. + + typedef typename Tr::Point Point; //< defines the point type. + typedef typename Tr::Segment Segment; //< defines the line segment type. + + typedef typename Tr::Cell Cell; //< defines the type of a cell of the triangulation. + typedef typename Tr::Edge Edge; //< defines the type of an edge of the triangulation. + + typedef typename Tr::Vertex_handle Vertex_handle; //< defines the type of a handle for a vertex in the triangulation. + typedef typename Tr::Cell_handle Cell_handle; //< defines the type of a handle for a cell in the triangulation. + + typedef typename Tr::Locate_type Locate_type; //< defines the simplex type returned from location. + + typedef CGAL::cpp11::tuple + Simplex; //< defines the simplex type. + + typedef Cell value_type; //< defines the value type the iterator refers to. + typedef Cell& reference; //< defines the reference type of the iterator. + typedef Cell* pointer; //< defines the pointer type of the iterator. + typedef std::size_t size_type; //< defines the integral type that can hold the size of a sequence. + typedef std::ptrdiff_t difference_type; //< defines the signed integral type that can hold the distance between two iterators. + typedef std::forward_iterator_tag iterator_category; //< defines the iterator category. // \} - template < class Tr2 > - struct Rebind_Tr { - typedef Triangulation_segment_traverser_3 Other; - }; + // describes the iterator type when applied to another type of triangulation or incrementer. + template < class Tr2, class Inc2 > + struct Rebind { typedef Triangulation_segment_cell_iterator_3 Other; }; + +private: + typedef Segment_cell_iterator SCI; + + friend internal::Incrementer; protected: // \internal \name Protected Attributes // \{ // \internal The triangulation to traverse. const Tr& _tr; + // \} // The source and target points of the traversal. + // These are also stored as vertices for cheaper equality computation. Point _source; Point _target; Vertex_handle _s_vertex; Vertex_handle _t_vertex; - // The cell currently traversed and the previous one. - Cell_handle _pos, _prev; - - // Otherwise, they indicate the simplex through which this cell was entered, - // or the location of the source if it is in this cell. - int _li, _lj; - Locate_type _lt; - - // This bit signifies when a cell containing the target is found. - bool _done; + // The current cell with its entry point and the previous cell with its + // exit point. + // Note that the current cell will be Cell_handle() after incrementing past + // the first cell containing the target. + Simplex _cur, _prev; // Where possible, facets are checked in a random order. mutable Random rng; private: - Tds _tds2; - Vertex_handle _s_vert, _t_vert; + Tds _tds2; // provides a place to store vertices of points. + Vertex_handle _s_vert, _t_vert; // vertices for source and target, irrespective of whether they are points. public: // \name Constructors // \{ - // Constructs a traverser. - /* \param tr the triangulation to traverse. This triangulation must have dimension > 0. + // constructs an iterator. + /* \param tr the triangulation to iterate though. This triangulation must have dimension > 0. * \param s the source vertex. This vertex must be initialized and cannot be the infinite vertex. * \param t the target vertex. This vertex must be initialized and cannot be the infinite vertex. * It cannot equal `s`. */ - Triangulation_segment_traverser_3( const Tr& tr, Vertex_handle s, Vertex_handle t ); + Triangulation_segment_cell_iterator_3( const Tr& tr, Vertex_handle s, Vertex_handle t ); - // Constructs a traverser. - /* \param tr the triangulation to traverse. This triangulation must have dimension > 0. + // constructs an iterator. + /* \param tr the triangulation to iterate though. This triangulation must have dimension > 0. * \param s the source vertex. This vertex must be initialized and cannot be the infinite vertex. * \param t the target point. This point must be initialized and it cannot be be at the same location as `s`. * If `tr` has dimension < 3, `t` must lie inside the affine hull of `tr`. */ - Triangulation_segment_traverser_3( const Tr& tr, Vertex_handle s, const Point& t ); + Triangulation_segment_cell_iterator_3( const Tr& tr, Vertex_handle s, const Point& t ); - // Constructs a traverser. - /* \param tr the triangulation to traverse. This triangulation must have dimension > 0. + // constructs an iterator. + /* \param tr the triangulation to iterate though. This triangulation must have dimension > 0. + * \param s the source point. This point must be initialized and it cannot be be at the same location as `t`. + * \param t the target vertex. This vertex must be initialized and cannot be the infinite vertex. + * If `tr` has dimension < 3, `s` must lie inside the affine hull of `tr`. + * \param hint the starting point to search for `s`. + */ + Triangulation_segment_cell_iterator_3( const Tr& tr, const Point& s, Vertex_handle t, Cell_handle hint = Cell_handle() ); + + // constructs an iterator. + /* \param tr the triangulation to iterate though. This triangulation must have dimension > 0. * \param s the source point. This point must be initialized. If `tr` has dimension < 3, `s` must lie inside * the affine hull of `tr`. * \param t the target point. This point must be initialized and it cannot be be at the same location as `s`. * If `tr` has dimension < 3, `t` must lie inside the affine hull of `tr`. * \param hint the starting point to search for `s`. */ - Triangulation_segment_traverser_3( const Tr& tr, const Point& s, const Point& t, Cell_handle hint = Cell_handle() ); + Triangulation_segment_cell_iterator_3( const Tr& tr, const Point& s, const Point& t, Cell_handle hint = Cell_handle() ); - // Constructs a traverser. - /* \param tr the triangulation to traverse. This triangulation must have dimension > 0. + // constructs an iterator. + /* \param tr the triangulation to iterate though. This triangulation must have dimension > 0. * \param S the segment to be traversed. If `tr` has dimension < 3, `S` must lie inside * the affine hull of `tr`. `S` must not be degenerate, i.e. its source and target must not be equal. * \param hint the starting point to search for `S`. */ - Triangulation_segment_traverser_3( const Tr& tr, const Segment& S, Cell_handle hint = Cell_handle() ); + Triangulation_segment_cell_iterator_3( const Tr& tr, const Segment& S, Cell_handle hint = Cell_handle() ); // \} + // The virtual destructor is mainly defined to indicate to the casting + // operators that this is a dynamic type. + virtual ~Triangulation_segment_cell_iterator_3() {} + +private: + // private constructor that does not initialize the source and target. + Triangulation_segment_cell_iterator_3( const Tr& tr ); + public: // \name Accessors // \{ - // Gives the source point of the traversed segment. + // gives the source point of the segment followed. /* \return the source point. */ const Point& source() const { return _source; } - // Gives the target point of the traversed segment. + // gives the target point of the segment follwoed. /* \return the target point. */ const Point& target() const { return _target; } - // Gives the cell currently traversed. + // gives the current cell. /* By invariance, this cell is intersected by the segment * between `source()` and `target()`. - * \return the cell currently traversed. + * \return the current cell. * \sa `handle()`. */ - const Cell cell() const { return *_pos; } + const Cell cell() const { return *get<0>(_cur); } - // Gives a handle to the cell currently traversed. + // gives a handle to the current cell. /* By invariance, this cell is intersected by the segment * between `source()` and `target()`. - * \return a handle to the cell currently traversed. + * \return a handle to the current cell. * \sa `cell()`. */ - Cell_handle handle() { return _pos; } + Cell_handle handle() { return get<0>(_cur); } - // Gives the cell traversed previously. - /* This cell is uninitialized until the traverser leaves the initial - * cell containing the `source()`. + // gives the previous cell. + /* This cell is uninitialized until the iterator leaves the initial + * cell. * By invariance, once initialized, this cell must be intersected by the segment * between `source()` and `target()`. - * \return the cell traversed previously. + * \return the previous cell. * \sa `handle()`. */ - Cell_handle previous() const { return _prev; } + Cell_handle previous() const { return get<0>(_prev); } - // Dereference operator. - /* \return a pointer to the cell currently traversed. + // provides a dereference operator. + /* \return a pointer to the current cell. */ - Cell* operator->() { return &*_pos; } + Cell* operator->() { return &*get<0>(_cur); } - // Indirection operator. - /* \return the cell currently traversed. + // provides an indirection operator. + /* \return the current cell. */ - Cell& operator*() { return *_pos; } + Cell& operator*() { return *get<0>(_cur); } - // Conversion operator. - /* \return a handle to the cell currently traversed. + // provides a conversion operator. + /* \return a handle to the current cell. */ - operator const Cell_handle() const { return _pos; } + operator const Cell_handle() const { return get<0>(_cur); } - // Checks if the traverser has reached the final cell, which contains the `target()`. + // provides a conversion operator. + /* \return the simplex through wich the current cell was entered. + */ + operator const Simplex() const { return _cur; } + + // checks whether the iterator has reached the final cell, which contains the `target()`. /* If the `target()` lies on a facet, edge, or vertex, the final cell is the cell containing * the interior of the segment between `source()` and `target()`. * \return true iff the current cell contains the `target()`. */ - bool has_next() const { return !_done; } + bool has_next() const { return get<0>(_cur) != Cell_handle(); } - // Gives the type of simplex traversed last. - /* This simplex indicates where traversal has entered the cell. - * For the first cell, containing the `source()` \f$ s \f$, this indicates the location of \f$ s \f$ in this cell. + // gives the simplex through which the current cell was entered. + /* For the first cell, containing the `source()` \f$ s \f$, + * this indicates the location of \f$ s \f$ in this cell. */ - void entry( Locate_type& lt, int& li, int& lj ) const { lt = _lt; li = _li; lj = _lj; } + void entry( Locate_type& lt, int& li, int& lj ) const { lt = get<1>(_cur); li = get<2>(_cur); lj = get<3>(_cur); } + + // gives the simplex through which the previous cell was exited. + /* \pre the current cell is not the initial cell. + */ + void exit( Locate_type& lt, int& li, int& lj ) const { lt = get<1>(_prev); li = get<2>(_prev); lj = get<3>(_prev); } + + // gives the past-the-end iterator associated with this iterator. + SCI end() const; // \} public: // \name Mutators // \{ - // Increment postfix operator. - /* The current cell must not contain the `target()`. - * After incrementing the traverser, the current cell intersects the segment + // provides the increment postfix operator. + /* After incrementing the iterator, the current cell intersects the segment * between `source()` and `target()` closer to the `target()` than the previous cell. * \sa `operator++(int)`. + * \pre The current cell does not contain the `target()`. */ - TST& operator++(); + SCI& operator++(); - // Increment prefix operator. - /* The current cell must not contain the `target()`. - * After incrementing the traverser, the current cell intersects the segment + // provides the increment prefix operator. + /* After incrementing the iterator, the current cell intersects the segment * between `source()` and `target()` closer to the `target()` than the previous cell. * than the previous cell. * \sa `operator++()`. + * \pre The current cell does not contain the `target()`. */ - TST operator++( int ); + SCI operator++( int ); - // Traverse to the final cell, which contains the `target()`. + // iterates to the final cell, which contains the `target()`. /* \return the final cell. */ - Cell_handle traverse(); + Cell_handle complete(); // \} public: // \name Comparison // \{ - // Compares this traverser with `ct`. - /* \param ct the other traverser. - * \return true iff the other traverser traverses the same triangulation along the same line segment + // compares this iterator with `sci`. + /* \param sci the other iterator. + * \return true iff the other iterator iterates the same triangulation along the same line segment * and has the same current cell. - * \sa `operator!=( const TST& t )`. + * \sa `operator!=( const SCI& t )`. */ - bool operator==( const TST& ct ) const; + bool operator==( const SCI& sci ) const; - // Compares this traverser with `ct`. - /* \param ct the other traverser. - * \return `false` iff the other traverser traverses the same triangulation along the same line segment + // compares this iterator with `sci`. + /* \param sci the other iterator. + * \return `false` iff the other iterator iterates the same triangulation along the same line segment * and has the same current cell. - * \sa `operator==( const TST& t ) const`. + * \sa `operator==( const SCI& t ) const`. */ - bool operator!=( const TST& ct ) const; + bool operator!=( const SCI& sci ) const; - // Compares the cell currently traversed with `ch`. + // compares the current cell with `ch`. /* \param ch a handle to the other cell. - * \return true iff the cell currently traversed is the same as the one pointed to by `ch`. + * \return true iff the current cell is the same as the one pointed to by `ch`. * \sa `operator!=( const Cell_handle& ch ) const`. - * \sa `operator==( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_traverser_3 t )`. + * \sa `operator==( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_cell_iterator_3 t )`. */ - bool operator==( const Cell_handle& ch ) const { return ch == _pos; } + bool operator==( const Cell_handle& ch ) const { return ch == get<0>(_cur); } - // Compares the cell currently traversed with `ch`. + // compares the current cell with `ch`. /* \param ch a handle to the other cell. - * \return `false` iff the cell currently traversed is the same as the one pointed to by `ch`. + * \return `false` iff the current cell is the same as the one pointed to by `ch`. * \sa `operator==( const Cell_handle& ch )`. - * \sa `operator!=( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_traverser_3 t )`. + * \sa `operator!=( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_cell_iterator_3 t )`. */ - bool operator!=( const Cell_handle& ch ) const { return ch != _pos; } + bool operator!=( const Cell_handle& ch ) const { return ch != get<0>(_cur); } // \} bool operator==( Nullptr_t CGAL_triangulation_assertion_code(n) ) const; @@ -277,20 +378,34 @@ public: protected: // \internal \name Protected Member Functions // \{ - // \internal Traverse to the next cell. - /* \internal \sa `traverse()`. + // walks to the next cell. + /* \sa `complete()`. */ - virtual void increment(); + void walk_to_next(); + + // increments the iterator. + /* This method may perform more actions based on the superclass. + * \sa `complete()`. + */ + void increment() { + typedef Incrementer::SCI Expected; +#ifdef CGAL_TST_ASSUME_CORRECT_TYPES + Expected& sci = static_cast( *this ); +#else // CGAL_TST_ASSUME_CORRECT_TYPES + Expected& sci = dynamic_cast( *this ); +#endif // CGAL_TST_ASSUME_CORRECT_TYPES + Incrementer().increment( sci ); + } // \} private: - // increment(), if the triangulation is 3D. - void increment_3(); - void increment_3_inf( int inf ); + // walk_to_next(), if the triangulation is 3D. + void walk_to_next_3(); + void walk_to_next_3_inf( int inf ); - // increment(), if the triangulation is 2D. - void increment_2(); - void increment_2_inf( int inf ); + // walk_to_next(), if the triangulation is 2D. + void walk_to_next_2(); + void walk_to_next_2_inf( int inf ); private: inline int edgeIndex( int i, int j ) const { @@ -299,44 +414,27 @@ private: CGAL_triangulation_precondition( i != j ); return ( i==0 || j==0 ) ? i+j-1 : i+j; } -}; // class Triangulation_segment_traverser_3 +}; // class Triangulation_segment_cell_iterator_3 -// Compares a handle to a cell to a traverser. +// compares a handle to a cell to a traverser. /* \param ch the handle to a cell. * \param t the traverser. * \return true iff the cell currently traversed by `t` is the same as the one pointed to by `ch`. - * \sa `operator!=( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_traverser_3 t )`. - * \sa `Triangulation_segment_traverser_3::operator==( const Cell_handle& ch )`. + * \sa `operator!=( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_cell_iterator_3 t )`. + * \sa `Triangulation_segment_cell_iterator_3::operator==( const Cell_handle& ch )`. */ -template -inline bool operator==( typename Tr::Cell_handle ch, Triangulation_segment_traverser_3 tci ) { return tci == ch; } +template < class Tr, class Inc > +inline bool operator==( typename Tr::Cell_handle ch, Triangulation_segment_cell_iterator_3 tci ) { return tci == ch; } -// Compares a handle to a cell to a traverser. +// compares a handle to a cell to a traverser. /* \param ch the handle to a cell. * \param t the traverser. * \return `false` iff the cell currently traversed by `t` is the same as the one pointed to by `ch`. - * \sa `operator==( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_traverser_3 t )`. - * \sa `Triangulation_segment_traverser_3::operator!=( const Cell_handle& ch )`. + * \sa `operator==( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_cell_iterator_3 t )`. + * \sa `Triangulation_segment_cell_iterator_3::operator!=( const Cell_handle& ch )`. */ -template -inline bool operator!=( typename Tr::Cell_handle ch, Triangulation_segment_traverser_3 tci ) { return tci != ch; } - - -#ifndef CGAL_TRIANGULATION_3_H -template < class GT, class Tds > -class Triangulation_3; -#endif // CGAL_TRIANGULATION_3_H - -// Specialization for void -template <> -class Triangulation_segment_traverser_3 { - typedef internal::Dummy_gt Gt; - typedef internal::Dummy_tds_3 Tds; -public: - typedef Triangulation_3 Triangulation; - template - struct Rebind_Tr { typedef Triangulation_segment_traverser_3 Other; }; -}; // class Triangulation_segment_traverser_3 +template < class Tr, class Inc > +inline bool operator!=( typename Tr::Cell_handle ch, Triangulation_segment_cell_iterator_3 tci ) { return tci != ch; } } // namespace CGAL diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h index 420a698931c..35a04e51bf6 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h @@ -21,10 +21,35 @@ namespace CGAL { -template -Triangulation_segment_traverser_3:: -Triangulation_segment_traverser_3( const Tr& tr, Vertex_handle s, const Point& t ) -: _tr(tr), _pos(), _prev(), _lj(-1), _lt(Tr::VERTEX), _done(false) { +template < class Tr, class Inc > +Triangulation_segment_cell_iterator_3:: +Triangulation_segment_cell_iterator_3( const Tr& tr, Vertex_handle s, Vertex_handle t ) +: _tr(tr) { + CGAL_triangulation_precondition( !_tr.is_infinite(s) ); + CGAL_triangulation_precondition( !_tr.is_infinite(t) ); + CGAL_triangulation_precondition( s->point() != t->point() ); + CGAL_triangulation_precondition( _tr.dimension() >= 2 ); + + _source = s->point(); + _target = t->point(); + _s_vertex = s; + _t_vertex = t; + _s_vert = s; + _t_vert = t; + + Cell_handle c = s->cell(); + // If a vertex of an infinite cell, we start inside the convex hull. + int inf; + if( c->has_vertex( _tr.infinite_vertex(), inf ) ) + c = c->neighbor(inf); + + _cur = Simplex( c, Tr::VERTEX, c->index(s), -1 ); +} + +template < class Tr, class Inc > +Triangulation_segment_cell_iterator_3:: +Triangulation_segment_cell_iterator_3( const Tr& tr, Vertex_handle s, const Point& t ) +: _tr(tr) { CGAL_triangulation_precondition( !_tr.is_infinite(s) ); CGAL_triangulation_precondition( s->point() != t ); CGAL_triangulation_precondition( _tr.dimension() >= 2 ); @@ -38,43 +63,41 @@ Triangulation_segment_traverser_3( const Tr& tr, Vertex_handle s, const Point& t _s_vert = s; _t_vert = _tds2.create_vertex( Vertex(_target) ); - _pos = s->cell(); + Cell_handle c = s->cell(); + // If a vertex of an infinite cell, we start inside the convex hull. int inf; - if( _pos->has_vertex( _tr.infinite_vertex(), inf ) ) - _pos = _pos->neighbor(inf); - _li = _pos->index(s); - - CGAL_triangulation_postcondition( _pos != Cell_handle() ); + if( c->has_vertex( _tr.infinite_vertex(), inf ) ) + c = c->neighbor(inf); + + _cur = Simplex( c, Tr::VERTEX, c->index(s), -1 ); } -template < class Tr> -Triangulation_segment_traverser_3:: -Triangulation_segment_traverser_3( const Tr& tr, Vertex_handle s, Vertex_handle t ) -: _tr(tr), _pos(), _prev(), _lj(-1), _lt(Tr::VERTEX), _done(false) { - CGAL_triangulation_precondition( !_tr.is_infinite(s) ); +template < class Tr, class Inc > +Triangulation_segment_cell_iterator_3:: +Triangulation_segment_cell_iterator_3( const Tr& tr, const Point& s, Vertex_handle t, Cell_handle hint ) +: _tr(tr) { CGAL_triangulation_precondition( !_tr.is_infinite(t) ); - CGAL_triangulation_precondition( s->point() != t->point() ); + CGAL_triangulation_precondition( s != t->point() ); CGAL_triangulation_precondition( _tr.dimension() >= 2 ); + CGAL_triangulation_precondition( _tr.dimension() == 3 || + _tr.orientation( *_tr.finite_facets_begin(), s ) == COPLANAR ); - _source = s->point(); + _source = s; _target = t->point(); - _s_vertex = s; + _s_vertex = Vertex_handle(); _t_vertex = t; - _s_vert = s; + _s_vert = _tds2.create_vertex( Vertex(_source) ); _t_vert = t; + + get<0>(_cur) = _tr.locate( s, get<1>(_cur), get<2>(_cur), get<3>(_cur), hint ); - _pos = s->cell(); - int inf; - if( _pos->has_vertex( _tr.infinite_vertex(), inf ) ) - _pos = _pos->neighbor(inf); - _li = _pos->index(s); + CGAL_triangulation_postcondition( get<0>(_cur) != Cell_handle() ); } - -template -Triangulation_segment_traverser_3:: -Triangulation_segment_traverser_3( const Tr& tr, const Point& s, const Point& t, Cell_handle hint ) -: _tr(tr), _pos(), _prev(), _li(-1), _lj(-1), _done(false) { +template < class Tr, class Inc > +Triangulation_segment_cell_iterator_3:: +Triangulation_segment_cell_iterator_3( const Tr& tr, const Point& s, const Point& t, Cell_handle hint ) +: _tr(tr) { CGAL_triangulation_precondition( s != t ); CGAL_triangulation_precondition( _tr.dimension() >= 2 ); CGAL_triangulation_precondition( _tr.dimension() == 3 || @@ -87,162 +110,181 @@ Triangulation_segment_traverser_3( const Tr& tr, const Point& s, const Point& t, _s_vert = _tds2.create_vertex( Tr::Vertex(_source) ); _t_vert = _tds2.create_vertex( Tr::Vertex(_target) ); - _pos = _tr.locate( s, _lt, _li, _lj, hint ); + get<0>(_cur) = _tr.locate( s, get<1>(_cur), get<2>(_cur), get<3>(_cur), hint ); - CGAL_triangulation_postcondition( _pos != Cell_handle() ); + CGAL_triangulation_postcondition( get<0>(_cur) != Cell_handle() ); } -template -Triangulation_segment_traverser_3:: -Triangulation_segment_traverser_3( const Tr& tr, const Segment& s, Cell_handle hint ) -: Triangulation_segment_traverser_3( tr, s.source(), s.target(), hint ) {} +template < class Tr, class Inc > +Triangulation_segment_cell_iterator_3:: +Triangulation_segment_cell_iterator_3( const Tr& tr, const Segment& s, Cell_handle hint ) +: Triangulation_segment_cell_iterator_3( tr, s.source(), s.target(), hint ) {} -template -inline Triangulation_segment_traverser_3& -Triangulation_segment_traverser_3::operator++() { - CGAL_triangulation_precondition( _pos != Cell_handle() ); +template < class Tr, class Inc > +Triangulation_segment_cell_iterator_3:: +Triangulation_segment_cell_iterator_3( const Tr& tr ) +: _tr(tr) {} + +template < class Tr, class Inc > +Triangulation_segment_cell_iterator_3 +Triangulation_segment_cell_iterator_3::end() const { + SCI sci(_tr); + sci._source = _source; + sci._target = _target; + sci._s_vertex = _s_vertex; + sci._t_vertex = _t_vertex; + get<0>(sci._cur) = Cell_handle(); + return sci; +} + +template < class Tr, class Inc > +inline Triangulation_segment_cell_iterator_3& +Triangulation_segment_cell_iterator_3::operator++() { + CGAL_triangulation_precondition( get<0>(_cur) != Cell_handle() ); increment(); return *this; } -template -inline Triangulation_segment_traverser_3 -Triangulation_segment_traverser_3::operator++( int ) { - TST tmp( *this ); +template < class Tr, class Inc > +inline Triangulation_segment_cell_iterator_3 +Triangulation_segment_cell_iterator_3::operator++( int ) { + SCI tmp( *this ); ++( *this ); return tmp; } -template -inline typename Triangulation_segment_traverser_3::Cell_handle -Triangulation_segment_traverser_3::traverse() { - while( !_done ) +template < class Tr, class Inc > +inline typename Triangulation_segment_cell_iterator_3::Cell_handle +Triangulation_segment_cell_iterator_3::complete() { + while( has_next() ) increment(); - return _pos; + return get<0>(_prev); } -template -inline bool Triangulation_segment_traverser_3:: -operator==( const TST& ct ) const { - CGAL_triangulation_precondition( _pos != Cell_handle() ); - CGAL_triangulation_precondition( ct._pos != Cell_handle() ); - return ( _pos == ct._pos && - _prev == ct._prev && - _tr == ct._tr && - _li == ct._li && - _lj == ct._lj && - _lt == ct._lt && - _source == ct._source && - _target == ct._target && - _s_vertex == ct._s_vertex && - _t_vertex == ct._t_vertex && - _done == ct._done ); +template < class Tr, class Inc > +inline bool Triangulation_segment_cell_iterator_3:: +operator==( const SCI& sci ) const { + // To be equal, the iterators must traverse the same triangulations + // along the same line segment and they must have the same current cell. + // Note that to limit cost, we just compare the triangulation pointers. + return ( &_tr == &sci._tr && + ( _s_vertex == Vertex_handle() ? _source == sci._source : _s_vertex == sci._s_vertex ) && + ( _t_vertex == Vertex_handle() ? _target == sci._target : _t_vertex == sci._t_vertex ) && + get<0>(_cur) == get<0>(sci._cur) ); } -template -inline bool Triangulation_segment_traverser_3:: -operator!=( const TST& ct ) const { - return !( *this == ct ); +template < class Tr, class Inc > +inline bool Triangulation_segment_cell_iterator_3:: +operator!=( const SCI& sci ) const { + return !( *this == sci ); } -template -inline bool Triangulation_segment_traverser_3:: +template < class Tr, class Inc > +inline bool Triangulation_segment_cell_iterator_3:: operator==( Nullptr_t CGAL_triangulation_assertion_code(n) ) const { CGAL_triangulation_assertion( n == NULL ); - return _pos == Cell_handle(); + return get<0>(_cur) == Cell_handle(); } -template -inline bool Triangulation_segment_traverser_3:: +template < class Tr, class Inc > +inline bool Triangulation_segment_cell_iterator_3:: operator!=( Nullptr_t n ) const { return !( *this == n ); } -template -void Triangulation_segment_traverser_3:: -increment() { - CGAL_triangulation_precondition( !_done ); +template < class Tr, class Inc > +void Triangulation_segment_cell_iterator_3:: +walk_to_next() { + CGAL_triangulation_precondition( has_next() ); + + // Check if the target is in the current cell. + int ti; + if( get<0>(_cur)->has_vertex( _t_vertex, ti ) ) { + // The target is inside the cell. + _prev = Simplex( get<0>(_cur), Tr::VERTEX, ti, -1 ); + get<0>(_cur) = Cell_handle(); + return; + } + // Walks to the next cell over a facet intersected by the line from source to target. // This method is based on Triangulation_3::locate(). int inf; switch( _tr.dimension() ) { case 3: { // Infinite cells should be handled differently. - if( _pos->has_vertex( _tr.infinite_vertex(), inf ) ) - increment_3_inf( inf ); + if( get<0>(_cur)->has_vertex( _tr.infinite_vertex(), inf ) ) + walk_to_next_3_inf( inf ); else - increment_3(); + walk_to_next_3(); break; } case 2: { - if( _pos->has_vertex( _tr.infinite_vertex(), inf ) ) - increment_2_inf( inf ); + if( get<0>(_cur)->has_vertex( _tr.infinite_vertex(), inf ) ) + walk_to_next_2_inf( inf ); else - increment_2(); + walk_to_next_2(); break; } } } -template -void Triangulation_segment_traverser_3:: -increment_3() { - Vertex_handle vert[4] = { _pos->vertex(0), - _pos->vertex(1), - _pos->vertex(2), - _pos->vertex(3) }; +template < class Tr, class Inc > +void Triangulation_segment_cell_iterator_3:: +walk_to_next_3() { + Vertex_handle vert[4] = { get<0>(_cur)->vertex(0), + get<0>(_cur)->vertex(1), + get<0>(_cur)->vertex(2), + get<0>(_cur)->vertex(3) }; // We check in which direction the target lies // by comparing its position relative to the planes through the // source and the edges of the cell. Orientation o[6]; + Orientation op[4]; int pos = 0; // We keep track of which orientations are calculated. bool calc[6] = { false, false, false, false, false, false }; - if( _lt == Tr::VERTEX ) { + if( get<1>(_cur) == Tr::VERTEX ) { // The three planes through the vertex are set to coplanar. for( int j = 0; j < 4; ++j ) { - if( _li != j ) { - int ij = edgeIndex( _li, j ); + if( get<2>(_cur) != j ) { + int ij = edgeIndex( get<2>(_cur), j ); o[ij] = COPLANAR; calc[ij] = true; } } } - else if( _lt == Tr::EDGE ) { + else if( get<1>(_cur) == Tr::EDGE ) { // The plane through the edge is set to coplanar. - int ij = edgeIndex( _li, _lj ); + int ij = edgeIndex( get<2>(_cur), get<3>(_cur) ); o[ij] = COPLANAR; calc[ij] = true; } // For the remembering stochastic walk, we start trying with a random facet. int li = rng.template get_bits<2>(); - CGAL_triangulation_assertion_code( bool incell = true; ) for( int k = 0; k < 4; ++k, li = _tr.increment_index(li) ) { - Cell_handle next = _pos->neighbor(li); - if( next == _prev ) + // Skip the previous cell. + Cell_handle next = get<0>(_cur)->neighbor(li); + if( next == get<0>(_prev) ) continue; - if( _t_vertex == _pos->vertex(0) || _t_vertex == _pos->vertex(1) || - _t_vertex == _pos->vertex(2) || _t_vertex == _pos->vertex(3) ) { - // The target is inside the cell. - _done = true; - return; - } - - // Check if the target is outside the cell. Vertex_handle backup = vert[li]; vert[li] = _t_vert; - if( _tr.orientation( vert[0], vert[1], vert[2], vert[3] ) != NEGATIVE ) { + // Check if the target is on the opposite side of the supporting plane. + op[li] = _tr.orientation( vert[0], vert[1], vert[2], vert[3] ); + if( op[li] == POSITIVE ) + pos += li; + if( op[li] != NEGATIVE ) { vert[li] = backup; continue; } CGAL_triangulation_assertion_code( incell = false; ) - // Check if the target is inside the pyramid. + // Check if the target is inside the 3-wedge with + // the source as apex and the facet as an intersection. int lj = rng.template get_bits<2>(); int Or = 0; for( int l = 0; l < 4; ++l, lj = _tr.increment_index(lj) ) { @@ -260,7 +302,6 @@ increment_3() { calc[oij] = true; } - Or -= o[oij]; if( o[oij] == POSITIVE ) { // The target is not inside the pyramid. // Invert the planes. @@ -275,6 +316,8 @@ increment_3() { Or = 0; break; } + else + Or -= o[oij]; } if( Or == 0 ) { @@ -285,31 +328,37 @@ increment_3() { } // The target is inside the pyramid. - _prev = _pos; - _pos = next; - + get<0>(_prev) = get<0>(_cur); + get<0>(_cur) = next; switch( Or ) { case 3: - _lt = Tr::FACET; - _li = _pos->index(_prev); + get<1>(_prev) = Tr::FACET; + get<2>(_prev) = li; + get<1>(_cur) = Tr::FACET; + get<2>(_cur) = get<0>(_cur)->index(get<0>(_prev)); return; case 2: - _lt = Tr::EDGE; + get<1>(_prev) = Tr::EDGE; + get<1>(_cur) = Tr::EDGE; for( int j = 0; j < 4; ++j ) { if( li != j && o[ 5 - edgeIndex(li, j) ] == COPLANAR) { - Edge opp = _tr.opposite_edge( _prev, li, j ); - _li = _pos->index( _prev->vertex(opp.second) ); - _lj = _pos->index( _prev->vertex(opp.third) ); + Edge opp = _tr.opposite_edge( get<0>(_prev), li, j ); + get<2>(_prev) = opp.second; + get<3>(_prev) = opp.third; + get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); + get<3>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<3>(_prev) ) ); return; } } CGAL_triangulation_assertion( false ); return; case 1: - _lt = Tr::VERTEX; + get<1>(_prev) = Tr::VERTEX; + get<1>(_cur) = Tr::VERTEX; for( int j = 0; j < 4; ++j ) { if( li != j && o[ 5 - edgeIndex(li, j) ] == NEGATIVE ) { - _li = _pos->index( _prev->vertex(j) ); + get<2>(_prev) = j; + get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex(j) ); return; } } @@ -323,44 +372,68 @@ increment_3() { // The target lies inside this cell. CGAL_triangulation_assertion( incell ); - _done = true; + switch( op[0] + op[1] + op[2] + op[3] ) { + case 4: + CGAL_triangulation_assertion( pos == 6 ); + _prev = Simplex( get<0>(_cur), Tr::CELL, -1, -1 ); + break; + case 3: + _prev = Simplex( get<0>(_cur), Tr::FACET, 6-pos, -1 ); + break; + case 2: + if( pos < 3 ) + _prev = Simplex( get<0>(_cur), Tr::EDGE, 0, pos+1 ); + else if( pos < 5 ) + _prev = Simplex( get<0>(_cur), Tr::EDGE, 1, pos-1 ); + else + _prev = Simplex( get<0>(_cur), Tr::EDGE, 2, 3 ); + break; + case 1: + _prev = Simplex( get<0>(_cur), Tr::VERTEX, pos, -1 ); + break; + default: + _prev = Simplex( get<0>(_cur), Tr::OUTSIDE_AFFINE_HULL, -1, -1 ); + CGAL_triangulation_assertion( false ); + } + get<0>(_cur) = Cell_handle(); return; } -template -void Triangulation_segment_traverser_3:: -increment_3_inf( int inf ) { - CGAL_triangulation_precondition( _tr.is_infinite( _pos->vertex(inf) ) ); +template < class Tr, class Inc > +void Triangulation_segment_cell_iterator_3:: +walk_to_next_3_inf( int inf ) { + CGAL_triangulation_precondition( _tr.is_infinite( get<0>(_cur)->vertex(inf) ) ); // If this cell was reached by traversal from a finite one, it must be the final cell. - Cell_handle fin = _pos->neighbor(inf); - if( fin == _prev ) { - _done = true; - // Here, I do not change the _lt etc. because they were already set. + Cell_handle fin = get<0>(_cur)->neighbor(inf); + if( fin == get<0>(_prev) ) { + _prev = _cur; + get<0>(_cur) = Cell_handle(); return; } Vertex_handle vert[4]; for( int i = 0; i != 4; ++i ) if( i != inf ) - vert[i] = _pos->vertex(i); + vert[i] = get<0>(_cur)->vertex(i); vert[inf] = _t_vert; Orientation o[4]; - // For the remembering stochastic walk, we start trying with a random index: - int li = rng.template get_bits<2>(); - // Check if the target lies outside the convex hull. if( _tr.orientation( vert[0], vert[1], vert[2], vert[3] ) == POSITIVE ) { // The target lies in an infinite cell. // Note that we do not traverse to other infinite cells. - _done = true; + _prev = Simplex( get<0>(_cur), Tr::OUTSIDE_CONVEX_HULL, -1, -1 ); + get<0>(_cur) = Cell_handle(); return; } vert[inf] = _s_vert; CGAL_triangulation_assertion( _tr.orientation( vert[0], vert[1], vert[2], vert[3] ) == POSITIVE ); + // For the remembering stochastic walk, we start trying with a random index: + int li = rng.template get_bits<2>(); + // Check if the line enters an adjacent infinite cell. // This occurs if the target lies on the other side of // a plane through one of the finite edges and the source point. @@ -369,9 +442,10 @@ increment_3_inf( int inf ) { o[li] = COPLANAR; continue; } - - Cell_handle next = _pos->neighbor(li); - if( next == _prev ) { + + // Skip the previous cell. + Cell_handle next = get<0>(_cur)->neighbor(li); + if( next == get<0>(_prev) ) { o[li] = POSITIVE; continue; } @@ -387,42 +461,46 @@ increment_3_inf( int inf ) { // The target lies behind the plane through the source and two finite vertices. // Traverse to the incident infinite cell. - _prev = _pos; - _pos = next; - CGAL_triangulation_assertion( _tr.is_infinite(_pos) ); - - _lt = Tr::FACET; - _li = _pos->index(_prev); + CGAL_triangulation_assertion( _tr.is_infinite( next ) ); + _prev = Simplex( get<0>(_cur), Tr::FACET, li, -1 ); + _cur = Simplex( next, Tr::FACET, next->index( get<0>(_prev) ), -1 ); return; } // The line enters the convex hull here (or lies on the finite facet). - _prev = _pos; - _pos = fin; + get<0>(_prev) = get<0>(_cur); + get<0>(_cur) = fin; // Check through which simplex the line traverses. switch( o[0]+o[1]+o[2]+o[3] ) { case 3: - _lt = Tr::FACET; - _li = _pos->index(_prev); + get<1>(_prev) = Tr::FACET; + get<2>(_prev) = inf; + get<1>(_cur) = Tr::FACET; + get<2>(_cur) = get<0>(_cur)->index(get<0>(_prev)); return; case 2: - _lt = Tr::EDGE; + get<1>(_prev) = Tr::EDGE; + get<1>(_cur) = Tr::EDGE; for( int i = 0; i < 4; ++i ) { if( o[i] == COPLANAR && i != inf ) { - Edge opp = _tr.opposite_edge( _prev, inf, i ); - _li = _pos->index( _prev->vertex(opp.second) ); - _lj = _pos->index( _prev->vertex(opp.third) ); + Edge opp = _tr.opposite_edge( get<0>(_prev), inf, i ); + get<2>(_prev) = opp.second; + get<3>(_prev) = opp.third; + get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); + get<3>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<3>(_prev) ) ); return; } } CGAL_triangulation_assertion( false ); return; case 1: - _lt = Tr::VERTEX; + get<1>(_prev) = Tr::VERTEX; + get<1>(_cur) = Tr::VERTEX; for( int i = 0; i < 4; ++i ) { if( o[i] == POSITIVE ) { - _li = _pos->index( _prev->vertex(i) ); + get<2>(_prev) = i; + get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex(i) ); return; } } @@ -434,77 +512,109 @@ increment_3_inf( int inf ) { } } -template -void Triangulation_segment_traverser_3:: -increment_2() { - Vertex_handle vert[3] = { _pos->vertex(0), - _pos->vertex(1), - _pos->vertex(2) }; - - switch( _lt ) { +template < class Tr, class Inc > +void Triangulation_segment_cell_iterator_3:: +walk_to_next_2() { + Vertex_handle vert[3] = { get<0>(_cur)->vertex(0), + get<0>(_cur)->vertex(1), + get<0>(_cur)->vertex(2) }; + + switch( get<1>(_cur) ) { case Tr::VERTEX: { // First we try the incident edges. - Orientation ocw = _tr.coplanar_orientation( vert[_li], vert[_tr.cw(_li)], vert[_tr.ccw(_li)], _t_vert ); - if( _pos->neighbor( _tr.ccw(_li) ) != _prev && ocw == NEGATIVE) { - Cell_handle tmp = _pos->neighbor( _tr.ccw(_li) ); - _prev = _pos; - _pos = tmp; - _li = _pos->index( _prev->vertex(_li) ); + Orientation ocw = _tr.coplanar_orientation( vert[get<2>(_cur)], vert[_tr.cw(get<2>(_cur))], vert[_tr.ccw(get<2>(_cur))], _t_vert ); + if( get<0>(_cur)->neighbor( _tr.ccw(get<2>(_cur)) ) != get<0>(_prev) && ocw == NEGATIVE) { + Cell_handle tmp = get<0>(_cur)->neighbor( _tr.ccw(get<2>(_cur)) ); + _prev = _cur; + get<0>(_cur) = tmp; + get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex(get<2>(_cur)) ); return; } - Orientation occw = _tr.coplanar_orientation( vert[_li], vert[_tr.ccw(_li)], vert[_tr.cw(_li)], _t_vert ); - if( _pos->neighbor( _tr.cw(_li) ) != _prev && occw == NEGATIVE) { - Cell_handle tmp = _pos->neighbor( _tr.cw(_li) ); - _prev = _pos; - _pos = tmp; - _li = _pos->index( _prev->vertex(_li) ); + Orientation occw = _tr.coplanar_orientation( vert[get<2>(_cur)], vert[_tr.ccw(get<2>(_cur))], vert[_tr.cw(get<2>(_cur))], _t_vert ); + if( get<0>(_cur)->neighbor( _tr.cw(get<2>(_cur)) ) != get<0>(_prev) && occw == NEGATIVE) { + Cell_handle tmp = get<0>(_cur)->neighbor( _tr.cw(get<2>(_cur)) ); + _prev = _cur; + get<0>(_cur) = tmp; + get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex(get<2>(_cur)) ); return; } // Then we try the opposite edge. - if( _tr.coplanar_orientation( vert[_tr.ccw(_li)], vert[_tr.cw(_li)], vert[_li], _t_vert ) == NEGATIVE) { - Cell_handle tmp = _pos->neighbor(_li); - _prev = _pos; - _pos = tmp; + Orientation op = _tr.coplanar_orientation( vert[_tr.ccw(get<2>(_cur))], vert[_tr.cw(get<2>(_cur))], vert[get<2>(_cur)], _t_vert ); + if( op == NEGATIVE) { + Cell_handle tmp = get<0>(_cur)->neighbor(get<2>(_cur)); + get<0>(_prev) = get<0>(_cur); + get<0>(_cur) = tmp; switch( ocw+occw ) { case 2: - _lt = Tr::EDGE; - _li = _pos->index( _prev->vertex( _tr.ccw(_li) ) ); - _lj = _pos->index( _prev->vertex( _tr.cw(_li) ) ); + get<1>(_prev) = Tr::EDGE; + get<2>(_prev) = _tr.ccw( get<2>(_cur) ); + get<3>(_prev) = _tr.cw( get<2>(_cur) ); + get<1>(_cur) = Tr::EDGE; + get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); + get<3>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<3>(_prev) ) ); return; case 1: - _lt = Tr::VERTEX; - if( ocw == COLLINEAR ) _li = _pos->index( _prev->vertex( _tr.cw(_li) ) ); - else _li = _pos->index( _prev->vertex( _tr.ccw(_li) ) ); + get<1>(_prev) = Tr::VERTEX; + get<1>(_cur) = Tr::VERTEX; + if( ocw == COLLINEAR ) get<2>(_prev) = _tr.cw( get<2>(_cur) ); + else get<2>(_cur) = _tr.ccw( get<2>(_cur) ); + get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); return; default: + // The current vertex is the target. CGAL_triangulation_assertion(false); return; } } // The target lies in this cell. - _done = true; + switch( ocw+occw+op ) { + case 3: + _prev = Simplex( get<0>(_cur), Tr::FACET, 3, -1 ); + break; + case 2: + if( ocw == 0 ) + _prev = Simplex( get<0>(_cur), Tr::EDGE, _tr.ccw(get<2>(_cur)), -1 ); + else if( occw == 0 ) + _prev = Simplex( get<0>(_cur), Tr::EDGE, _tr.cw(get<2>(_cur)), -1 ); + else + _prev = Simplex( get<0>(_cur), Tr::EDGE, get<2>(_cur), -1 ); + break; + case 1: + if( ocw == 1 ) + _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr.ccw(get<2>(_cur)), -1 ); + else if( occw == 1 ) + _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr.cw(get<2>(_cur)), -1 ); + else + _prev = Simplex( get<0>(_cur), Tr::VERTEX, get<2>(_cur), -1 ); + break; + case 0: + CGAL_triangulation_assertion(false); + _prev = Simplex( get<0>(_cur), Tr::OUTSIDE_AFFINE_HULL, -1, -1 ); + break; + } + get<0>(_cur) = Cell_handle(); return; } case Tr::EDGE: { - int lk = 3-_li-_lj; + int lk = 3 - get<2>(_cur) - get<3>(_cur); - if( _pos->neighbor(lk) != _prev ) { + if( get<0>(_cur)->neighbor(lk) != get<0>(_prev) ) { // Check the edge itself - switch( _tr.coplanar_orientation( vert[_li], vert[_lj], vert[lk], _t_vert ) ) { + switch( _tr.coplanar_orientation( vert[get<2>(_cur)], vert[get<3>(_cur)], vert[lk], _t_vert ) ) { + _prev = _cur; case COLLINEAR: // The target lies in this cell. - _done = true; + get<0>(_cur) = Cell_handle(); return; case NEGATIVE: { // The target lies opposite of the edge. - Cell_handle tmp = _pos->neighbor(lk); - _prev = _pos; - _pos = tmp; - _li = _pos->index( _prev->vertex(_li) ); - _lj = _pos->index( _prev->vertex(_lj) ); + Cell_handle tmp = get<0>(_cur)->neighbor(lk); + get<0>(_cur) = tmp; + get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex(get<2>(_cur)) ); + get<3>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex(get<3>(_cur)) ); return; } default: @@ -512,23 +622,30 @@ increment_2() { } } - Orientation o = _tr.coplanar_orientation( _s_vert, vert[lk], vert[_li], _t_vert ); + Orientation o = _tr.coplanar_orientation( _s_vert, vert[lk], vert[get<2>(_cur)], _t_vert ); + Orientation op; switch( o ) { case POSITIVE: { // The ray passes through the edge ik. - if( _tr.coplanar_orientation( vert[lk], vert[_li], _s_vert, _t_vert ) == NEGATIVE ) { - Cell_handle tmp = _pos->neighbor(_lj); - _prev = _pos; - _pos = tmp; + op = _tr.coplanar_orientation( vert[lk], vert[get<2>(_cur)], _s_vert, _t_vert ); + if( op == NEGATIVE ) { + Cell_handle tmp = get<0>(_cur)->neighbor(get<3>(_cur)); + get<0>(_prev) = get<0>(_cur); + get<0>(_cur) = tmp; - if( _tr.collinear( _s_vert, vert[_li], _t_vert ) ) { - _lt = Tr::VERTEX; - _li = _pos->index( _prev->vertex(_li) ); + if( _tr.collinear( _s_vert, vert[get<2>(_cur)], _t_vert ) ) { + get<1>(_prev) = Tr::VERTEX; + get<2>(_prev) = get<2>(_cur); + get<1>(_cur) = Tr::VERTEX; + get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); } else { - _lt = Tr::EDGE; - _li = _pos->index( _prev->vertex(_li) ); - _lj = _pos->index( _prev->vertex(lk) ); + get<1>(_prev) = Tr::EDGE; + get<2>(_prev) = get<2>(_cur); + get<3>(_prev) = lk; + get<1>(_cur) = Tr::EDGE; + get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); + get<3>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<3>(_prev) ) ); } return; } @@ -536,23 +653,31 @@ increment_2() { } default: { // The ray passes through the edge jk. - if( _tr.coplanar_orientation( vert[lk], vert[_lj], _s_vert, _t_vert ) == NEGATIVE ) { - Cell_handle tmp = _pos->neighbor(_li); - _prev = _pos; - _pos = tmp; + op = _tr.coplanar_orientation( vert[lk], vert[get<3>(_cur)], _s_vert, _t_vert ); + if( op == NEGATIVE ) { + Cell_handle tmp = get<0>(_cur)->neighbor(get<2>(_cur)); + get<0>(_prev) = get<0>(_cur); + get<0>(_cur) = tmp; - if( _tr.collinear( _s_vert, vert[_lj], _t_vert ) ) { - _lt = Tr::VERTEX; - _li = _pos->index( _prev->vertex(_lj) ); + if( _tr.collinear( _s_vert, vert[get<3>(_cur)], _t_vert ) ) { + get<1>(_prev) = Tr::VERTEX; + get<2>(_prev) = get<3>(_cur); + get<1>(_cur) = Tr::VERTEX; + get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); } else if( o == COLLINEAR ) { - _lt = Tr::VERTEX; - _li = _pos->index( _prev->vertex(lk) ); + get<1>(_prev) = Tr::VERTEX; + get<2>(_prev) = lk; + get<1>(_cur) = Tr::VERTEX; + get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); } else { - _lt = Tr::EDGE; - _li = _pos->index( _prev->vertex(lk) ); - _lj = _pos->index( _prev->vertex(_lj) ); + get<1>(_prev) = Tr::EDGE; + get<2>(_prev) = lk; + get<3>(_prev) = get<3>(_cur); + get<1>(_cur) = Tr::EDGE; + get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); + get<3>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); } return; } @@ -561,7 +686,23 @@ increment_2() { } // The target lies in this cell. - _done = true; + if( op == POSITIVE ) + _prev = Simplex( get<0>(_cur), Tr::FACET, 3, -1 ); + else { + CGAL_triangulation_assertion( op == ZERO ); + switch( o ) { + case POSITIVE: + _prev = Simplex( get<0>(_cur), Tr::EDGE, get<2>(_cur), lk ); + break; + case NEGATIVE: + _prev = Simplex( get<0>(_cur), Tr::EDGE, get<3>(_cur), lk ); + break; + case ZERO: + _prev = Simplex( get<0>(_cur), Tr::VERTEX, lk, -1 ); + break; + } + } + get<0>(_cur) = Cell_handle(); return; } case Tr::FACET: { @@ -572,12 +713,13 @@ increment_2() { bool calc[3] = { false, false, false }; for( int j = 0; j != 3; ++j, li = _tr.ccw(li) ) { - Cell_handle next = _pos->neighbor(li); - if( next == _prev ) + Cell_handle next = get<0>(_cur)->neighbor(li); + if( next == get<0>(_prev) ) continue; // The target should lie on the other side of the edge. - if( _tr.coplanar_orientation( vert[_tr.ccw(li)], vert[_tr.cw(li)], vert[li], _t_vert ) != NEGATIVE ) + Orientation op = _tr.coplanar_orientation( vert[_tr.ccw(li)], vert[_tr.cw(li)], vert[li], _t_vert ); + if( op == POSITIVE ) continue; // The target should lie inside the wedge. @@ -585,27 +727,44 @@ increment_2() { o[_tr.ccw(li)] = _tr.coplanar_orientation( _s_vert, vert[_tr.ccw(li)], vert[_tr.cw(li)], _t_vert ); calc[_tr.ccw(li)] = true; } - if( o[_tr.ccw(li)] == NEGATIVE ) continue; + if( o[_tr.ccw(li)] == NEGATIVE ) + continue; + else if( op == COLLINEAR && o[_tr.ccw(li)] == COLLINEAR ) { + _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr.ccw(li), -1 ); + get<0>(_cur) = Cell_handle(); + return; + } if( !calc[_tr.cw(li)] ) { - o[_tr.cw(li)] = _tr.coplanar_orientation( _s_vert, vert[_tr.cw(li)], vert[_tr.ccw(li)], _t_vert ); + o[_tr.cw(li)] = _tr.coplanar_orientation( _s_vert, vert[_tr.cw(li)], vert[li], _t_vert ); calc[_tr.cw(li)] = true; } - if( o[_tr.cw(li)] == POSITIVE ) continue; + if( o[_tr.cw(li)] == POSITIVE ) + continue; + else if( op == COLLINEAR && o[_tr.cw(li)] == COLLINEAR ) { + _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr.cw(li), -1 ); + get<0>(_cur) = Cell_handle(); + return; + } - _prev = _pos; - _pos = next; + get<0>(_prev) = get<0>(_cur); + get<0>(_cur) = next; switch( o[_tr.ccw(li)] + o[_tr.cw(li)] ) { case 2: - _lt = Tr::EDGE; - _li = _pos->index( _prev->vertex( _tr.ccw(li) ) ); - _lj = _pos->index( _prev->vertex( _tr.cw(li) ) ); + get<1>(_prev) = Tr::EDGE; + get<2>(_prev) = _tr.ccw(li); + get<3>(_prev) = _tr.cw(li); + get<1>(_cur) = Tr::EDGE; + get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( _tr.ccw(li) ) ); + get<3>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( _tr.cw(li) ) ); return; case 1: - _lt = Tr::VERTEX; - if( o[_tr.ccw(li)] == COLLINEAR ) _li = _pos->index( _prev->vertex( _tr.ccw(li) ) ); - else _li = _pos->index( _prev->vertex( _tr.cw(li) ) ); + get<1>(_prev) = Tr::VERTEX; + get<1>(_cur) = Tr::VERTEX; + if( o[_tr.ccw(li)] == COLLINEAR ) get<2>(_prev) = _tr.ccw(li); + else get<2>(_prev) = _tr.cw(li); + get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); return; default: CGAL_triangulation_assertion( false ); @@ -614,7 +773,8 @@ increment_2() { } // The target lies in this cell. - _done = true; + _prev = Simplex( get<0>(_cur), Tr::FACET, 3, -1 ); + get<0>(_cur) = Cell_handle(); return; } default: @@ -622,42 +782,71 @@ increment_2() { } } -template -void Triangulation_segment_traverser_3:: -increment_2_inf( int inf ) { - CGAL_triangulation_precondition( _tr.is_infinite( _pos->vertex(3) ) ); - CGAL_triangulation_precondition( _tr.is_infinite( _pos->vertex(inf) ) ); +template < class Tr, class Inc > +void Triangulation_segment_cell_iterator_3:: +walk_to_next_2_inf( int inf ) { + CGAL_triangulation_precondition( _tr.is_infinite( get<0>(_cur)->vertex(3) ) ); + CGAL_triangulation_precondition( _tr.is_infinite( get<0>(_cur)->vertex(inf) ) ); // If this cell was reached by traversal from a finite one, it must be the final cell. - Cell_handle fin = _pos->neighbor(inf); - if (fin == _prev) { - _done = true; + Cell_handle fin = get<0>(_cur)->neighbor(inf); + if (fin == get<0>(_prev)) { + _prev = _cur; + get<0>(_cur) = Cell_handle(); return; } // Check the neighboring cells. - Gt::Coplanar_orientation_3 coplanar_orientation = Gt().coplanar_orientation_3_object(); - if( _tr.coplanar_orientation( _s_vert, _pos->vertex( _tr.ccw(inf)), _pos->vertex(_tr.cw(inf)), _t_vert ) == NEGATIVE ) { - Cell_handle tmp = _pos->neighbor(_tr.cw(inf)); - _prev = _pos; - _pos = tmp; + Orientation occw = _tr.coplanar_orientation( _s_vert, get<0>(_cur)->vertex( _tr.ccw(inf)), get<0>(_cur)->vertex(_tr.cw(inf)), _t_vert ); + if( occw == NEGATIVE ) { + Cell_handle tmp = get<0>(_cur)->neighbor(_tr.cw(inf)); + _prev = Simplex( get<0>(_cur), Tr::EDGE, _tr.ccw(inf), inf ); + _cur = Simplex( tmp, Tr::EDGE, tmp->index( get<0>(_prev)->vertex( get<2>(_prev) ) ), tmp->index( get<0>(_prev)->vertex( get<3>(_prev) ) ) ); return; } - if( _tr.coplanar_orientation( _s_vert, _pos->vertex( _tr.cw(inf)), _pos->vertex(_tr.ccw(inf)), _t_vert ) == NEGATIVE ) { - Cell_handle tmp = _pos->neighbor(_tr.ccw(inf)); - _prev = _pos; - _pos = tmp; + Orientation ocw = _tr.coplanar_orientation( _s_vert, get<0>(_cur)->vertex( _tr.cw(inf)), get<0>(_cur)->vertex(_tr.ccw(inf)), _t_vert ); + if( ocw == NEGATIVE ) { + Cell_handle tmp = get<0>(_cur)->neighbor(_tr.ccw(inf)); + _prev = Simplex( get<0>(_cur), Tr::EDGE, _tr.cw(inf), inf ); + _cur = Simplex( tmp, Tr::EDGE, tmp->index( get<0>(_prev)->vertex( get<2>(_prev) ) ), tmp->index( get<0>(_prev)->vertex( get<3>(_prev) ) ) ); return; } - if( _tr.coplanar_orientation( _pos->vertex( _tr.ccw(inf)), _pos->vertex(_tr.cw(inf)), _s_vert, _t_vert ) != POSITIVE ) { - _prev = _pos; - _pos = fin; + Orientation op = _tr.coplanar_orientation( get<0>(_cur)->vertex( _tr.ccw(inf) ), get<0>(_cur)->vertex( _tr.cw(inf) ), _s_vert, _t_vert ); + switch( op ) { + case NEGATIVE: + if( occw == COLLINEAR ) { + _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr.ccw(inf), -1 ); + _cur = Simplex( fin, Tr::VERTEX, fin->index( get<0>(_prev)->vertex( get<2>(_prev) ) ), -1 ); + return; + } + if( ocw == COLLINEAR ) { + _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr.cw(inf), -1 ); + _cur = Simplex( fin, Tr::VERTEX, fin->index( get<0>(_prev)->vertex( get<2>(_prev) ) ), -1 ); + return; + } + _prev = Simplex( get<0>(_cur), Tr::EDGE, _tr.ccw(inf), _tr.cw(inf) ); + _cur = Simplex( fin, Tr::EDGE, fin->index( get<0>(_prev)->vertex( get<2>(_prev) ) ), fin->index( get<0>(_prev)->vertex( get<3>(_prev) ) ) ); + return; + case COLLINEAR: + if( occw == COLLINEAR ) { + _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr.ccw(inf), -1 ); + get<0>(_cur) = Cell_handle(); + return; + } + if( ocw == COLLINEAR ) { + _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr.cw(inf), -1 ); + get<0>(_cur) = Cell_handle(); + return; + } + _prev = Simplex( get<0>(_cur), Tr::EDGE, _tr.ccw(inf), _tr.cw(inf) ); + get<0>(_cur) = Cell_handle(); + return; + case POSITIVE: + // The target lies in this infinite cell. + _prev = Simplex( get<0>(_cur), Tr::OUTSIDE_CONVEX_HULL, -1, -1 ); + get<0>(_cur) = Cell_handle(); return; } - - // The target lies in this infinite cell. - _done = true; - return; } } //end of CGAL namespace diff --git a/Triangulation_3/include/CGAL/how to make superclass for inserter pattern.txt b/Triangulation_3/include/CGAL/how to make superclass for inserter pattern.txt new file mode 100644 index 00000000000..fa5bf9761c7 --- /dev/null +++ b/Triangulation_3/include/CGAL/how to make superclass for inserter pattern.txt @@ -0,0 +1,39 @@ +add the following to Triangulation_segment_traverser_3.h to get a superclass of the Incrementer visitor. + + + + + +template < class Tr, class Inc > +class Test_super_SCI; + +namespace internal { + +template < class Tr > +struct Test_incrementer: public Incrementer { + typedef Incrementer Base; + typedef Test_incrementer Self; + typedef Test_super_SCI SCI; + Test_incrementer() {} + void increment( SCI& sci ) { + ++sci._superclass; + sci.increment(); + } +}; // struct Test_incrementer + +} // namespace internal + +template < class Tr_, class Inc = internal::Test_incrementer > +class Test_super_SCI: public Triangulation_segment_cell_iterator_3 { + typedef Tr_ Tr; + typedef Triangulation_segment_cell_iterator_3 SCI; + + int _superclass; + + friend internal::Test_incrementer; + +public: + Test_super_SCI( const Tr& tr, const Point& s, const Point& t, Cell_handle hint = Cell_handle() ) + : SCI(tr,s,t,hint), _superclass(0) {} + +}; \ No newline at end of file From c7a412155a48e3ebb2a4842756f2d0b3236bc455 Mon Sep 17 00:00:00 2001 From: Thijs van Lankveld Date: Wed, 10 Sep 2014 18:36:19 +0200 Subject: [PATCH 012/138] First adjustments based on comments Monique for round 2 --- .../Triangulation_3/CGAL/Triangulation_3.h | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h index b205bf55049..676ed434542 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h @@ -1148,11 +1148,11 @@ The triangulation defines an iterator that visits the cells intersected by a lin The cells visited comprise a connected region containing both source and target point of the line segment `s`. Each cell falls within one or more of the following categories: 1. a finite cell whose interior intersects `s`. -2. a finite cell with a facet `f` whose interior intersects `s`. If such a cell is visited, its neighbor incident to `f` is not visited. -3. a finite cell with an edge `e` whose interior (partially) ovelaps `s`. If such a cell is visited, none of the other cells incident to `e` are visited. -4. a finite cell with an edge `e` whose interior intersects `s` in a point. This cell must form a connected component together with a number of cells incident to `e`. Exactly two of these cells must also fall in category 1 or 2. +2. a finite cell with a facet `f` whose interior intersects `s` in a line segment. If such a cell is visited, its neighbor incident to `f` is not visited. +3. a finite cell with an edge `e` whose interior intersects `s` in a line segment. If such a cell is visited, none of the other cells incident to `e` are visited. +4. a finite cell with an edge `e` whose interior intersects `s` in a point. This cell must form a connected component together with the other cells incident to `e` that are visited. Exactly two of these visited cells must also fall in category 1 or 2. 5. a finite cell with a vertex `v` that is an endpoint of `s`. This cell must also fit in either category 1 or 2. -6. a finite cell with a vertex `v` that lies on the iterior of `s`. This cell must form a connected component together with a number of cells incident to `v`. Exactly two of these cells must also fall in category 1 or 2. +6. a finite cell with a vertex `v` that lies on the interior of `s`. This cell must form a connected component together with the other cells incident to `v` that are visited. Exactly two of these cells must also fall in category 1 or 2. 7. an infinite cell with a finite facet whose interior intersects the interior of `s`. 8. an infinite cell with a finite edge `e` whose interior intersects the interior of `s`. If such a cell is visited, its infinite neighbor incident to `e` is not visited. 9. an infinite cell with a finite vertex `v` that lies on the interior of `s`. If such a cell is visited, none of the other infinite cells incident to `v` are visited. @@ -1171,21 +1171,21 @@ The starting point of the iterator is an arbitrary cell incident to `s`. The iterator remains valid until the first cell incident to `t` is passed. -\pre `s` and `t` must be different points and neither can be the infinite vertex. +\pre `s` and `t` must be different vertices and neither can be the infinite vertex. \pre The triangulation must mave dimension at least 2. */ -Segment_walk_iterator segment_walk_begin(Vertex_handle s, Vertex_handle t) const; +Segment_cell_iterator segment_walk_begin(Vertex_handle s, Vertex_handle t) const; /*! returns the past-the-end iterator over the cells intersected by the line segment `st`. -This iterator cannot be dereferenced. It indicates when `segment_walk_begin` has +This iterator cannot be dereferenced. It indicates when the `Segment_cell_iterator` has passed the target. -\pre `s` and `t` must be different points and neither can be the infinite vertex. +\pre `s` and `t` must be different vertices and neither can be the infinite vertex. \pre The triangulation must mave dimension at least 2. */ -Segment_walk_iterator segment_walk_end(Vertex_handle s, Vertex_handle t) const; +Segment_cell_iterator segment_walk_end(Vertex_handle s, Vertex_handle t) const; /*! returns the iterator that allows to visit the cells intersected by the line segment `st`. @@ -1196,23 +1196,25 @@ The starting point of the iterator is a cell containing `s`. The iterator remains valid until the first cell containing `t` is passed. -The `hint` is used to locate `s`. +The optional argument `hint` can reduce the time to construct the iterator if it is close to `s`. \pre `s` and `t` must be different points. \pre The triangulation must mave dimension at least 2. If the dimension is 2, both `s` and `t` must lie in the affine hull. */ -Segment_walk_iterator segment_walk_begin(const Point& s, const Point& t, Cell_handle hint = Cell_handle()) const; +Segment_cell_iterator segment_walk_begin(const Point& s, const Point& t, Cell_handle hint = Cell_handle()) const; /*! returns the past-the-end iterator over the cells intersected by the line segment `st`. -This iterator cannot be dereferenced. It indicates when `segment_walk_begin` has +This iterator cannot be dereferenced. It indicates when the `Segment_cell_iterator` has passed the target. +The optional argument `hint` can reduce the time to construct the iterator if it is close to `s`. + \pre `s` and `t` must be different points and neither can be the infinite vertex. \pre The triangulation must mave dimension at least 2. */ -Segment_walk_iterator segment_walk_end(const Point& s, const Point& t, Cell_handle hint = Cell_handle()) const; +Segment_cell_iterator segment_walk_end(const Point& s, const Point& t, Cell_handle hint = Cell_handle()) const; /// @} /*!\name Cell and Facet Circulators From f32e08b230396112cb8a780339d33f379750efe6 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 16 Aug 2016 10:29:23 +0200 Subject: [PATCH 013/138] minor improvements --- .../Triangulation_3/CGAL/Triangulation_3.h | 14 +-- .../Triangulation_3/segment_traverser_3.cpp | 22 ++--- .../include/CGAL/Triangulation_3.h | 74 ++++++-------- .../include/CGAL/Triangulation_utils_3.h | 98 ++++++++++--------- 4 files changed, 101 insertions(+), 107 deletions(-) diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h index 676ed434542..e5cf192fb17 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h @@ -1144,9 +1144,9 @@ Point_iterator points_end() const; /*!\name Walk Iterator \cgalModifBegin -The triangulation defines an iterator that visits the cells intersected by a line segment. It is a non-mutable and forward iterator. It is invalidated by any modification of one of the cells traversed. +The triangulation defines an iterator that visits the cells intersected by a line segment. It is a non-mutable and forward iterator. It is invalidated by any modification of one of the cells traversed. -The cells visited comprise a connected region containing both source and target point of the line segment `s`. Each cell falls within one or more of the following categories: +The cells visited comprise a connected region containing both source and target points of the line segment `s`. Each cell falls within one or more of the following categories: 1. a finite cell whose interior intersects `s`. 2. a finite cell with a facet `f` whose interior intersects `s` in a line segment. If such a cell is visited, its neighbor incident to `f` is not visited. 3. a finite cell with an edge `e` whose interior intersects `s` in a line segment. If such a cell is visited, none of the other cells incident to `e` are visited. @@ -1172,7 +1172,7 @@ The starting point of the iterator is an arbitrary cell incident to `s`. The iterator remains valid until the first cell incident to `t` is passed. \pre `s` and `t` must be different vertices and neither can be the infinite vertex. -\pre The triangulation must mave dimension at least 2. +\pre `t.dimension() >= 2` */ Segment_cell_iterator segment_walk_begin(Vertex_handle s, Vertex_handle t) const; @@ -1183,7 +1183,7 @@ This iterator cannot be dereferenced. It indicates when the `Segment_cell_iterat passed the target. \pre `s` and `t` must be different vertices and neither can be the infinite vertex. -\pre The triangulation must mave dimension at least 2. +\pre `t.dimension() >= 2` */ Segment_cell_iterator segment_walk_end(Vertex_handle s, Vertex_handle t) const; @@ -1199,7 +1199,7 @@ The iterator remains valid until the first cell containing `t` is passed. The optional argument `hint` can reduce the time to construct the iterator if it is close to `s`. \pre `s` and `t` must be different points. -\pre The triangulation must mave dimension at least 2. If the dimension is 2, both `s` and `t` must lie in the affine hull. +\pre `t.dimension() >= 2`. If the dimension is 2, both `s` and `t` must lie in the affine hull. */ Segment_cell_iterator segment_walk_begin(const Point& s, const Point& t, Cell_handle hint = Cell_handle()) const; @@ -1211,8 +1211,8 @@ passed the target. The optional argument `hint` can reduce the time to construct the iterator if it is close to `s`. -\pre `s` and `t` must be different points and neither can be the infinite vertex. -\pre The triangulation must mave dimension at least 2. +\pre `s` and `t` must be different and finite points +\pre `t.dimension() >= 2` */ Segment_cell_iterator segment_walk_end(const Point& s, const Point& t, Cell_handle hint = Cell_handle()) const; /// @} diff --git a/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp b/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp index 33fa19d4a23..f1a1beed8c7 100644 --- a/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp +++ b/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp @@ -17,24 +17,24 @@ typedef DT::Cell_handle Cell_handle; typedef CGAL::Triangulation_segment_cell_iterator_3< DT > Traverser; void main() { - std::vector< Point_3 > points; - points.reserve( 6 ); - points.push_back( Point_3(-.9063, .4226, 1.0 ) ); - points.push_back( Point_3( .8192, .5736, 1.0 ) ); - points.push_back( Point_3( .0872,-.9992, 1.0 ) ); - points.push_back( Point_3(-.8192, .5736,-1.0 ) ); - points.push_back( Point_3( .9063, .4226,-1.0 ) ); - points.push_back( Point_3( .0872,-.9962,-1.0 ) ); + std::vector< Point_3 > points; + points.reserve( 6 ); + points.push_back( Point_3(-.9063, .4226, 1.0 ) ); + points.push_back( Point_3( .8192, .5736, 1.0 ) ); + points.push_back( Point_3( .0872,-.9992, 1.0 ) ); + points.push_back( Point_3(-.8192, .5736,-1.0 ) ); + points.push_back( Point_3( .9063, .4226,-1.0 ) ); + points.push_back( Point_3( .0872,-.9962,-1.0 ) ); - // Construct the Delaunay triangulation. - DT dt( points.begin(), points.end() ); + // Construct the Delaunay triangulation. + DT dt( points.begin(), points.end() ); assert( dt.is_valid() ); // Construct a traverser. Traverser st( dt, Point_3(-3,0,0), Point_3(3,0,0) ); // Count the number of finite cells traversed. - unsigned int inf = 0, fin = 0; + unsigned int inf = 0, fin = 0; for( ; st != st.end(); ++st ) { if( dt.is_infinite(st) ) ++inf; diff --git a/Triangulation_3/include/CGAL/Triangulation_3.h b/Triangulation_3/include/CGAL/Triangulation_3.h index c72690ab3c3..43424868a35 100644 --- a/Triangulation_3/include/CGAL/Triangulation_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_3.h @@ -19,12 +19,11 @@ // Sylvain Pion // Clement Jamin -#include - #ifndef CGAL_TRIANGULATION_3_H #define CGAL_TRIANGULATION_3_H #include +#include #ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING # define CGAL_PROFILE @@ -562,14 +561,14 @@ public: { return geom_traits().orientation_3_object()(p, q, r, s); } - - // Compute whether the orientation of the points of four vertices `a`, `b`, `c`, and `d`. - Orientation orientation( Vertex_handle a, Vertex_handle b, Vertex_handle c, Vertex_handle d ) const { - return orientation( a->point(), b->point(), c->point(), d->point() ); - } - - // Compute the orientation of a point compared to the oriented plane supporting a half-facet. - Orientation orientation( const Facet& f, const Point& p ) const; + + // Compute whether the orientation of the points of four vertices `a`, `b`, `c`, and `d`. + Orientation orientation( Vertex_handle a, Vertex_handle b, Vertex_handle c, Vertex_handle d ) const { + return orientation( a->point(), b->point(), c->point(), d->point() ); + } + + // Compute the orientation of a point compared to the oriented plane supporting a half-facet. + Orientation orientation( const Facet& f, const Point& p ) const; bool coplanar(const Point &p, const Point &q, @@ -578,31 +577,31 @@ public: return orientation(p, q, r, s) == COPLANAR; } - // Check whether the points of four vertices `a`, `b`, `c`, and `d` are coplanar. - bool coplanar( Vertex_handle a, Vertex_handle b, Vertex_handle c, Vertex_handle d ) const { - return coplanar( a->point(), b->point(), c->point(), d->point() ); - } - - // Check whether the points of facet `f` and point `p` are coplanar. - bool coplanar( const Facet& f, const Point& p ) const { - return orientation(f, p) == COPLANAR; - } + // Check whether the points of four vertices `a`, `b`, `c`, and `d` are coplanar. + bool coplanar( Vertex_handle a, Vertex_handle b, Vertex_handle c, Vertex_handle d ) const { + return coplanar( a->point(), b->point(), c->point(), d->point() ); + } - // Check whether the points of facet `f` and vertex `v` are coplanar. - bool coplanar( const Facet& f, Vertex_handle v ) const{ - return orientation(f, v->point()) == COPLANAR; - } + // Check whether the points of facet `f` and point `p` are coplanar. + bool coplanar( const Facet& f, const Point& p ) const { + return orientation(f, p) == COPLANAR; + } + + // Check whether the points of facet `f` and vertex `v` are coplanar. + bool coplanar( const Facet& f, Vertex_handle v ) const{ + return orientation(f, v->point()) == COPLANAR; + } Orientation coplanar_orientation(const Point &p, const Point &q, const Point &r) const { return geom_traits().coplanar_orientation_3_object()(p, q, r); } - - // \internal Compute the orientation of four coplanar vertices `a`, `b`, `c`, and `d`. - Orientation coplanar_orientation( Vertex_handle va, Vertex_handle vb, Vertex_handle vc, Vertex_handle vd ) const { - return geom_traits().coplanar_orientation_3_object()( va->point(), vb->point(), vc->point(), vd->point() ); - } + + // \internal Compute the orientation of four coplanar vertices `a`, `b`, `c`, and `d`. + Orientation coplanar_orientation( Vertex_handle va, Vertex_handle vb, Vertex_handle vc, Vertex_handle vd ) const { + return geom_traits().coplanar_orientation_3_object()( va->point(), vb->point(), vc->point(), vd->point() ); + } bool collinear(const Point &p, const Point &q, const Point &r) const @@ -610,7 +609,6 @@ public: return coplanar_orientation(p, q, r) == COLLINEAR; } - bool collinear( Vertex_handle va, Vertex_handle vb, Vertex_handle vc ) const { return collinear( va->point(), vb->point(), vc->point() ); } @@ -1074,20 +1072,12 @@ public: { return _tds.mirror_facet(f);} - // Gives the edge incident to the same cell that is not incident to any of the input vertices. - Edge opposite_edge( Cell_handle c, int li, int lj ) const; - - // Gives the edge incident to the same cell that is not incident to any of the vertices of the input edge. - Edge opposite_edge( const Edge& e ) const { return opposite_edge( e.first, e.second, e.third ); } - - // Gives the half-facet incident to the opposite cell. - Facet mirror_facet( Cell_handle c, int li ) const { return Facet( c->neighbor(li), c->neighbor(li)->index(c) ); } - - // Gives the opposite half-facet. - Facet mirror_facet( const Facet& f ) const { return mirror_facet( f.first, f.second ); } - - + // Gives the edge incident to the same cell that is not incident to any of the input vertices. + Edge opposite_edge( Cell_handle c, int li, int lj ) const; + // Gives the edge incident to the same cell that is not incident to any of the vertices of the input edge. + Edge opposite_edge( const Edge& e ) const + { return opposite_edge( e.first, e.second, e.third ); } // MODIFIERS bool flip(const Facet &f) diff --git a/Triangulation_3/include/CGAL/Triangulation_utils_3.h b/Triangulation_3/include/CGAL/Triangulation_utils_3.h index 0ac0c642ffe..c837d3d8a99 100644 --- a/Triangulation_3/include/CGAL/Triangulation_utils_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_utils_3.h @@ -29,29 +29,29 @@ namespace CGAL { // We use the following template class in order to avoid having a static data // member of a non-template class which would require src/Triangulation_3.C . template < class T = void > -struct Triangulation_utils_base_3 { - static const char tab_next_around_edge[4][4]; - static const int tab_vertex_triple_index[4][3]; +struct Triangulation_utils_base_3 +{ + static const char tab_next_around_edge[4][4]; + static const int tab_vertex_triple_index[4][3]; - static const int index_increment_map[4]; - static const int index_jump_map[4]; - static const int index_decrement_map[4]; + static const int index_increment_map[4]; + static const int index_jump_map[4]; + static const int index_decrement_map[4]; }; template < class T > const char Triangulation_utils_base_3::tab_next_around_edge[4][4] = { - { 5, 2, 3, 1 }, - { 3, 5, 0, 2 }, - { 1, 3, 5, 0 }, - { 2, 0, 1, 5 } -}; + {5, 2, 3, 1}, + {3, 5, 0, 2}, + {1, 3, 5, 0}, + {2, 0, 1, 5} }; template < class T > const int Triangulation_utils_base_3::tab_vertex_triple_index[4][3] = { - { 1, 3, 2 }, - { 0, 2, 3 }, - { 0, 3, 1 }, - { 0, 1, 2 } + {1, 3, 2}, + {0, 2, 3}, + {0, 3, 1}, + {0, 1, 2} }; template < class T > @@ -68,42 +68,46 @@ const int Triangulation_utils_base_3::index_decrement_map[4] = { 3, 0, 1, 2 } // T2D entirely. struct Triangulation_utils_3 -: public Triangulation_cw_ccw_2, - public Triangulation_utils_base_3<> { - static int next_around_edge( const int i, const int j ) { - // index of the next cell when turning around the - // oriented edge vertex(i) vertex(j) in 3d - CGAL_triangulation_precondition( ( i >= 0 && i < 4 ) && - ( j >= 0 && j < 4 ) && - ( i != j ) ); - return tab_next_around_edge[i][j]; - } + : public Triangulation_cw_ccw_2, + public Triangulation_utils_base_3<> +{ + static int next_around_edge(const int i, const int j) + { + // index of the next cell when turning around the + // oriented edge vertex(i) vertex(j) in 3d + CGAL_triangulation_precondition( ( i >= 0 && i < 4 ) && + ( j >= 0 && j < 4 ) && + ( i != j ) ); + return tab_next_around_edge[i][j]; + } - static int vertex_triple_index( const int i, const int j ) { - // indexes of the jth vertex of the facet of a cell - // opposite to vertx i - CGAL_triangulation_precondition( ( i >= 0 && i < 4 ) && - ( j >= 0 && j < 3 ) ); - return tab_vertex_triple_index[i][j]; - } - // Get the index of the next vertex or facet. - static int increment_index( int li ) { - CGAL_triangulation_precondition( li >= 0 && li < 4 ); - return index_increment_map[ li ]; - } + static int vertex_triple_index(const int i, const int j) + { + // indexes of the jth vertex of the facet of a cell + // opposite to vertx i + CGAL_triangulation_precondition( ( i >= 0 && i < 4 ) && + ( j >= 0 && j < 3 ) ); + return tab_vertex_triple_index[i][j]; + } - // Get the index of the vertex or facet two places further. - static int jump_index( int li ) { - CGAL_triangulation_precondition( li >= 0 && li < 4 ); - return index_jump_map[ li ]; - } + // Get the index of the next vertex or facet. + static int increment_index( int li ) { + CGAL_triangulation_precondition( li >= 0 && li < 4 ); + return index_increment_map[ li ]; + } - // Get the index of the previous vertex or facet. - static int decrement_index( int li ) { - CGAL_triangulation_precondition( li >= 0 && li < 4 ); - return index_decrement_map[ li ]; - } + // Get the index of the vertex or facet two places further. + static int jump_index( int li ) { + CGAL_triangulation_precondition( li >= 0 && li < 4 ); + return index_jump_map[ li ]; + } + + // Get the index of the previous vertex or facet. + static int decrement_index( int li ) { + CGAL_triangulation_precondition( li >= 0 && li < 4 ); + return index_decrement_map[ li ]; + } }; } //namespace CGAL From 2e6252fbf96520a539f6b7f1475db34cf1d9e2b2 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 16 Aug 2016 16:45:24 +0200 Subject: [PATCH 014/138] fix compilation --- .../include/CGAL/Triangulation_3.h | 36 +++++++++---------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_3.h b/Triangulation_3/include/CGAL/Triangulation_3.h index 43424868a35..9d805702125 100644 --- a/Triangulation_3/include/CGAL/Triangulation_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_3.h @@ -2309,23 +2309,20 @@ operator<< (std::ostream& os, const Triangulation_3 &tr) return os ; } - - - - -template -inline Orientation Triangulation_3:: -orientation( const Facet& f, const Point& p ) const { - return Gt().orientation_3_object()( f.first->vertex( vertex_triple_index(f.second, 0) )->point(), - f.first->vertex( vertex_triple_index(f.second, 1) )->point(), - f.first->vertex( vertex_triple_index(f.second, 2) )->point(), - p ); +template < class GT, class Tds, class Lds > +Orientation +Triangulation_3:: +orientation(const Facet& f, const Point& p) const +{ + return orientation( f.first->vertex( vertex_triple_index(f.second, 0) )->point(), + f.first->vertex( vertex_triple_index(f.second, 1) )->point(), + f.first->vertex( vertex_triple_index(f.second, 2) )->point(), + p ); } - -template < class GT, class Tds > -typename Triangulation_3::size_type -Triangulation_3:: +template < class GT, class Tds, class Lds > +typename Triangulation_3::size_type +Triangulation_3:: number_of_finite_cells() const { if ( dimension() < 3 ) return 0; @@ -3418,11 +3415,10 @@ side_of_edge(const Point & p, } } - -template +template < class Gt, class Tds, class Lds > inline -typename Triangulation_3::Edge -Triangulation_3:: +typename Triangulation_3::Edge +Triangulation_3:: opposite_edge( Cell_handle c, int li, int lj ) const { CGAL_triangulation_precondition( li >= 0 && li < 4 ); CGAL_triangulation_precondition( lj >= 0 && lj < 4 ); @@ -3441,7 +3437,7 @@ opposite_edge( Cell_handle c, int li, int lj ) const { } -template < class GT, class Tds > +template < class GT, class Tds, class Lds > bool Triangulation_3:: flip( Cell_handle c, int i ) From 43aaa9ae48fe863d4fac85a88cf6c989c75413a4 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 8 Sep 2016 15:36:28 +0200 Subject: [PATCH 015/138] fix example --- Triangulation_3/examples/Triangulation_3/CMakeLists.txt | 1 + .../examples/Triangulation_3/segment_traverser_3.cpp | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt index a0d3b10e9a1..db5b21b3e23 100644 --- a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt @@ -36,6 +36,7 @@ if ( CGAL_FOUND ) create_single_source_cgal_program( "parallel_insertion_and_removal_in_regular_3.cpp" ) create_single_source_cgal_program( "parallel_insertion_in_delaunay_3.cpp" ) create_single_source_cgal_program( "regular_3.cpp" ) + create_single_source_cgal_program( "segment_traverser_3.cpp" ) create_single_source_cgal_program( "sequential_parallel.cpp" ) create_single_source_cgal_program( "simple_triangulation_3.cpp" ) create_single_source_cgal_program( "simplex.cpp" ) diff --git a/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp b/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp index f1a1beed8c7..5e4b8afdd4f 100644 --- a/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp +++ b/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp @@ -16,7 +16,8 @@ typedef DT::Cell_handle Cell_handle; typedef CGAL::Triangulation_segment_cell_iterator_3< DT > Traverser; -void main() { +int main() +{ std::vector< Point_3 > points; points.reserve( 6 ); points.push_back( Point_3(-.9063, .4226, 1.0 ) ); @@ -44,4 +45,6 @@ void main() { std::cout << "While traversing from " << st.source() << " to " << st.target() << std::endl; std::cout << inf << " infinite and " << fin << " finite cells were visited." << std::endl; + + return 0; } \ No newline at end of file From eb59e2e0fa5448cb5ebf4cb44da78a87288b1db3 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 21 Oct 2016 17:15:23 +0200 Subject: [PATCH 016/138] when "prev" is skipped, its orientation info should be set anyway --- .../CGAL/Triangulation_segment_traverser_3_impl.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h index 35a04e51bf6..a4af5394408 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h @@ -240,7 +240,8 @@ walk_to_next_3() { // by comparing its position relative to the planes through the // source and the edges of the cell. Orientation o[6]; - Orientation op[4]; int pos = 0; + Orientation op[4]; + int pos = 0; // We keep track of which orientations are calculated. bool calc[6] = { false, false, false, false, false, false }; @@ -264,15 +265,19 @@ walk_to_next_3() { // For the remembering stochastic walk, we start trying with a random facet. int li = rng.template get_bits<2>(); CGAL_triangulation_assertion_code( bool incell = true; ) - for( int k = 0; k < 4; ++k, li = _tr.increment_index(li) ) { + for( int k = 0; k < 4; ++k, li = _tr.increment_index(li) ) + { // Skip the previous cell. Cell_handle next = get<0>(_cur)->neighbor(li); if( next == get<0>(_prev) ) - continue; - + { + op[li] = POSITIVE; + pos += li; + continue; + } Vertex_handle backup = vert[li]; vert[li] = _t_vert; - + // Check if the target is on the opposite side of the supporting plane. op[li] = _tr.orientation( vert[0], vert[1], vert[2], vert[3] ); if( op[li] == POSITIVE ) From b315f6e8a5585dff16935949f65e9fe5b3cf3c92 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 24 Oct 2016 11:54:27 +0200 Subject: [PATCH 017/138] add debug code to check whether the computed next cell really does intersect the query segment [source, target] we do not deal with infinite cell because intersection does not mean much. --- .../Triangulation_segment_traverser_3_impl.h | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h index a4af5394408..a476f666618 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h @@ -226,6 +226,27 @@ walk_to_next() { break; } } +#ifdef CGAL_TRIANGULATION_3_TRAVERSER_CHECK_INTERSECTION + if(_tr.dimension() == 3) + { + Cell_handle c = get<0>(_cur); + if (c != Cell_handle() && !_tr.is_infinite(c)) //hard to say anything in this case + { + typename Tr::Segment seg(_s_vert->point(), _t_vert->point()); + bool intersects = false; + for (int i = 0; i < 4; ++i) + { + if (!_tr.is_infinite(c, i) + && CGAL::do_intersect(_tr.triangle(c, i), seg)) + { + intersects = true; + break; + } + } + CGAL_assertion(intersects); + } + } +#endif } template < class Tr, class Inc > From d56a694a5c25cd9cc3e36f05c9d5ac1d72fde432 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 4 Nov 2016 17:13:29 +0100 Subject: [PATCH 018/138] add missing namespace --- .../include/CGAL/Triangulation_segment_traverser_3_impl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h index a476f666618..8dd6c9b8bb3 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h @@ -61,7 +61,7 @@ Triangulation_segment_cell_iterator_3( const Tr& tr, Vertex_handle s, const Poin _s_vertex = s; _t_vertex = Vertex_handle(); _s_vert = s; - _t_vert = _tds2.create_vertex( Vertex(_target) ); + _t_vert = _tds2.create_vertex( Tr::Vertex(_target) ); Cell_handle c = s->cell(); // If a vertex of an infinite cell, we start inside the convex hull. @@ -86,7 +86,7 @@ Triangulation_segment_cell_iterator_3( const Tr& tr, const Point& s, Vertex_hand _target = t->point(); _s_vertex = Vertex_handle(); _t_vertex = t; - _s_vert = _tds2.create_vertex( Vertex(_source) ); + _s_vert = _tds2.create_vertex( Tr::Vertex(_source) ); _t_vert = t; get<0>(_cur) = _tr.locate( s, get<1>(_cur), get<2>(_cur), get<3>(_cur), hint ); From 6afd0fc72a4bb4cee19b6430cdf2226bfc538ea5 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 7 Nov 2016 15:20:06 +0100 Subject: [PATCH 019/138] remove the extra tds constructed to store source and target as vertices this implies changing all `vert` containers into arrays of Point* (instead of arrays of Vertex_handle) --- .../CGAL/Triangulation_segment_traverser_3.h | 4 - .../Triangulation_segment_traverser_3_impl.h | 103 ++++++++++-------- 2 files changed, 55 insertions(+), 52 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 02970f1aded..c7a1afb910c 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -170,10 +170,6 @@ protected: // Where possible, facets are checked in a random order. mutable Random rng; -private: - Tds _tds2; // provides a place to store vertices of points. - Vertex_handle _s_vert, _t_vert; // vertices for source and target, irrespective of whether they are points. - public: // \name Constructors // \{ diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h index 8dd6c9b8bb3..171b024351f 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h @@ -19,6 +19,8 @@ #ifndef CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_IMPL_H #define CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_IMPL_H +#include + namespace CGAL { template < class Tr, class Inc > @@ -34,8 +36,6 @@ Triangulation_segment_cell_iterator_3( const Tr& tr, Vertex_handle s, Vertex_han _target = t->point(); _s_vertex = s; _t_vertex = t; - _s_vert = s; - _t_vert = t; Cell_handle c = s->cell(); // If a vertex of an infinite cell, we start inside the convex hull. @@ -60,8 +60,6 @@ Triangulation_segment_cell_iterator_3( const Tr& tr, Vertex_handle s, const Poin _target = t; _s_vertex = s; _t_vertex = Vertex_handle(); - _s_vert = s; - _t_vert = _tds2.create_vertex( Tr::Vertex(_target) ); Cell_handle c = s->cell(); // If a vertex of an infinite cell, we start inside the convex hull. @@ -86,8 +84,6 @@ Triangulation_segment_cell_iterator_3( const Tr& tr, const Point& s, Vertex_hand _target = t->point(); _s_vertex = Vertex_handle(); _t_vertex = t; - _s_vert = _tds2.create_vertex( Tr::Vertex(_source) ); - _t_vert = t; get<0>(_cur) = _tr.locate( s, get<1>(_cur), get<2>(_cur), get<3>(_cur), hint ); @@ -107,8 +103,6 @@ Triangulation_segment_cell_iterator_3( const Tr& tr, const Point& s, const Point _target = t; _s_vertex = Vertex_handle(); _t_vertex = Vertex_handle(); - _s_vert = _tds2.create_vertex( Tr::Vertex(_source) ); - _t_vert = _tds2.create_vertex( Tr::Vertex(_target) ); get<0>(_cur) = _tr.locate( s, get<1>(_cur), get<2>(_cur), get<3>(_cur), hint ); @@ -232,7 +226,7 @@ walk_to_next() { Cell_handle c = get<0>(_cur); if (c != Cell_handle() && !_tr.is_infinite(c)) //hard to say anything in this case { - typename Tr::Segment seg(_s_vert->point(), _t_vert->point()); + typename Tr::Segment seg(_source, _target); bool intersects = false; for (int i = 0; i < 4; ++i) { @@ -251,11 +245,13 @@ walk_to_next() { template < class Tr, class Inc > void Triangulation_segment_cell_iterator_3:: -walk_to_next_3() { - Vertex_handle vert[4] = { get<0>(_cur)->vertex(0), - get<0>(_cur)->vertex(1), - get<0>(_cur)->vertex(2), - get<0>(_cur)->vertex(3) }; +walk_to_next_3() +{ + boost::array vert + = {&(get<0>(_cur)->vertex(0)->point()), + &(get<0>(_cur)->vertex(1)->point()), + &(get<0>(_cur)->vertex(2)->point()), + &(get<0>(_cur)->vertex(3)->point()) }; // We check in which direction the target lies // by comparing its position relative to the planes through the @@ -296,11 +292,11 @@ walk_to_next_3() { pos += li; continue; } - Vertex_handle backup = vert[li]; - vert[li] = _t_vert; + Point* backup = vert[li]; + vert[li] = &_target; // Check if the target is on the opposite side of the supporting plane. - op[li] = _tr.orientation( vert[0], vert[1], vert[2], vert[3] ); + op[li] = _tr.orientation( *vert[0], *vert[1], *vert[2], *vert[3] ); if( op[li] == POSITIVE ) pos += li; if( op[li] != NEGATIVE ) { @@ -321,9 +317,9 @@ walk_to_next_3() { // Through the source and the edge opposite of ij. int oij = 5 - edgeIndex( li, lj ); if( !calc[oij] ) { - Vertex_handle backup2 = vert[lj]; - vert[lj] = _s_vert; - o[oij] = _tr.orientation( vert[0], vert[1], vert[2], vert[3] ); + Point* backup2 = vert[lj]; + vert[lj] = &_source; + o[oij] = _tr.orientation( *vert[0], *vert[1], *vert[2], *vert[3] ); vert[lj] = backup2; calc[oij] = true; } @@ -438,15 +434,15 @@ walk_to_next_3_inf( int inf ) { return; } - Vertex_handle vert[4]; + boost::array < Point*, 4> vert; for( int i = 0; i != 4; ++i ) if( i != inf ) - vert[i] = get<0>(_cur)->vertex(i); - vert[inf] = _t_vert; + vert[i] = &(get<0>(_cur)->vertex(i)->point()); + vert[inf] = &_target; Orientation o[4]; // Check if the target lies outside the convex hull. - if( _tr.orientation( vert[0], vert[1], vert[2], vert[3] ) == POSITIVE ) { + if( _tr.orientation( *vert[0], *vert[1], *vert[2], *vert[3] ) == POSITIVE ) { // The target lies in an infinite cell. // Note that we do not traverse to other infinite cells. _prev = Simplex( get<0>(_cur), Tr::OUTSIDE_CONVEX_HULL, -1, -1 ); @@ -454,8 +450,8 @@ walk_to_next_3_inf( int inf ) { return; } - vert[inf] = _s_vert; - CGAL_triangulation_assertion( _tr.orientation( vert[0], vert[1], vert[2], vert[3] ) == POSITIVE ); + vert[inf] = &(_source); + CGAL_triangulation_assertion( _tr.orientation( *vert[0], *vert[1], *vert[2], *vert[3] ) == POSITIVE ); // For the remembering stochastic walk, we start trying with a random index: int li = rng.template get_bits<2>(); @@ -476,9 +472,9 @@ walk_to_next_3_inf( int inf ) { continue; } - Vertex_handle backup = vert[li]; - vert[li] = _t_vert; - o[li] = _tr.orientation( vert[0], vert[1], vert[2], vert[3] ); + Point* backup = vert[li]; + vert[li] = &(_target); + o[li] = _tr.orientation( *vert[0], *vert[1], *vert[2], *vert[3] ); if( o[li] != NEGATIVE ) { vert[li] = backup; @@ -540,15 +536,17 @@ walk_to_next_3_inf( int inf ) { template < class Tr, class Inc > void Triangulation_segment_cell_iterator_3:: -walk_to_next_2() { - Vertex_handle vert[3] = { get<0>(_cur)->vertex(0), - get<0>(_cur)->vertex(1), - get<0>(_cur)->vertex(2) }; +walk_to_next_2() +{ + boost::array vert + = { &(get<0>(_cur)->vertex(0)->point()), + &(get<0>(_cur)->vertex(1)->point()), + &(get<0>(_cur)->vertex(2)->point()) }; switch( get<1>(_cur) ) { case Tr::VERTEX: { // First we try the incident edges. - Orientation ocw = _tr.coplanar_orientation( vert[get<2>(_cur)], vert[_tr.cw(get<2>(_cur))], vert[_tr.ccw(get<2>(_cur))], _t_vert ); + Orientation ocw = CGAL::coplanar_orientation( *vert[get<2>(_cur)], *vert[_tr.cw(get<2>(_cur))], *vert[_tr.ccw(get<2>(_cur))], _target ); if( get<0>(_cur)->neighbor( _tr.ccw(get<2>(_cur)) ) != get<0>(_prev) && ocw == NEGATIVE) { Cell_handle tmp = get<0>(_cur)->neighbor( _tr.ccw(get<2>(_cur)) ); _prev = _cur; @@ -556,7 +554,7 @@ walk_to_next_2() { get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex(get<2>(_cur)) ); return; } - Orientation occw = _tr.coplanar_orientation( vert[get<2>(_cur)], vert[_tr.ccw(get<2>(_cur))], vert[_tr.cw(get<2>(_cur))], _t_vert ); + Orientation occw = CGAL::coplanar_orientation( *vert[get<2>(_cur)], *vert[_tr.ccw(get<2>(_cur))], *vert[_tr.cw(get<2>(_cur))], _target ); if( get<0>(_cur)->neighbor( _tr.cw(get<2>(_cur)) ) != get<0>(_prev) && occw == NEGATIVE) { Cell_handle tmp = get<0>(_cur)->neighbor( _tr.cw(get<2>(_cur)) ); _prev = _cur; @@ -566,7 +564,7 @@ walk_to_next_2() { } // Then we try the opposite edge. - Orientation op = _tr.coplanar_orientation( vert[_tr.ccw(get<2>(_cur))], vert[_tr.cw(get<2>(_cur))], vert[get<2>(_cur)], _t_vert ); + Orientation op = CGAL::coplanar_orientation( *vert[_tr.ccw(get<2>(_cur))], *vert[_tr.cw(get<2>(_cur))], *vert[get<2>(_cur)], _target ); if( op == NEGATIVE) { Cell_handle tmp = get<0>(_cur)->neighbor(get<2>(_cur)); get<0>(_prev) = get<0>(_cur); @@ -629,7 +627,7 @@ walk_to_next_2() { if( get<0>(_cur)->neighbor(lk) != get<0>(_prev) ) { // Check the edge itself - switch( _tr.coplanar_orientation( vert[get<2>(_cur)], vert[get<3>(_cur)], vert[lk], _t_vert ) ) { + switch( CGAL::coplanar_orientation( *vert[get<2>(_cur)], *vert[get<3>(_cur)], *vert[lk], _target ) ) { _prev = _cur; case COLLINEAR: // The target lies in this cell. @@ -648,18 +646,18 @@ walk_to_next_2() { } } - Orientation o = _tr.coplanar_orientation( _s_vert, vert[lk], vert[get<2>(_cur)], _t_vert ); + Orientation o = CGAL::coplanar_orientation( _source, *vert[lk], *vert[get<2>(_cur)], _target ); Orientation op; switch( o ) { case POSITIVE: { // The ray passes through the edge ik. - op = _tr.coplanar_orientation( vert[lk], vert[get<2>(_cur)], _s_vert, _t_vert ); + op = CGAL::coplanar_orientation( *vert[lk], *vert[get<2>(_cur)], _source, _target ); if( op == NEGATIVE ) { Cell_handle tmp = get<0>(_cur)->neighbor(get<3>(_cur)); get<0>(_prev) = get<0>(_cur); get<0>(_cur) = tmp; - if( _tr.collinear( _s_vert, vert[get<2>(_cur)], _t_vert ) ) { + if( CGAL::collinear( _source, *vert[get<2>(_cur)], _target ) ) { get<1>(_prev) = Tr::VERTEX; get<2>(_prev) = get<2>(_cur); get<1>(_cur) = Tr::VERTEX; @@ -679,13 +677,13 @@ walk_to_next_2() { } default: { // The ray passes through the edge jk. - op = _tr.coplanar_orientation( vert[lk], vert[get<3>(_cur)], _s_vert, _t_vert ); + op = CGAL::coplanar_orientation( *vert[lk], *vert[get<3>(_cur)], _source, _target ); if( op == NEGATIVE ) { Cell_handle tmp = get<0>(_cur)->neighbor(get<2>(_cur)); get<0>(_prev) = get<0>(_cur); get<0>(_cur) = tmp; - if( _tr.collinear( _s_vert, vert[get<3>(_cur)], _t_vert ) ) { + if( CGAL::collinear( _source, *vert[get<3>(_cur)], _target ) ) { get<1>(_prev) = Tr::VERTEX; get<2>(_prev) = get<3>(_cur); get<1>(_cur) = Tr::VERTEX; @@ -744,13 +742,13 @@ walk_to_next_2() { continue; // The target should lie on the other side of the edge. - Orientation op = _tr.coplanar_orientation( vert[_tr.ccw(li)], vert[_tr.cw(li)], vert[li], _t_vert ); + Orientation op = CGAL::coplanar_orientation( *vert[_tr.ccw(li)], *vert[_tr.cw(li)], *vert[li], _target ); if( op == POSITIVE ) continue; // The target should lie inside the wedge. if( !calc[_tr.ccw(li)] ) { - o[_tr.ccw(li)] = _tr.coplanar_orientation( _s_vert, vert[_tr.ccw(li)], vert[_tr.cw(li)], _t_vert ); + o[_tr.ccw(li)] = CGAL::coplanar_orientation( _source, *vert[_tr.ccw(li)], *vert[_tr.cw(li)], _target ); calc[_tr.ccw(li)] = true; } if( o[_tr.ccw(li)] == NEGATIVE ) @@ -762,7 +760,7 @@ walk_to_next_2() { } if( !calc[_tr.cw(li)] ) { - o[_tr.cw(li)] = _tr.coplanar_orientation( _s_vert, vert[_tr.cw(li)], vert[li], _t_vert ); + o[_tr.cw(li)] = CGAL::coplanar_orientation( _source, *vert[_tr.cw(li)], *vert[li], _target ); calc[_tr.cw(li)] = true; } if( o[_tr.cw(li)] == POSITIVE ) @@ -823,21 +821,30 @@ walk_to_next_2_inf( int inf ) { } // Check the neighboring cells. - Orientation occw = _tr.coplanar_orientation( _s_vert, get<0>(_cur)->vertex( _tr.ccw(inf)), get<0>(_cur)->vertex(_tr.cw(inf)), _t_vert ); + Orientation occw = CGAL::coplanar_orientation( _source, + get<0>(_cur)->vertex( _tr.ccw(inf))->point(), + get<0>(_cur)->vertex(_tr.cw(inf))->point(), + _target ); if( occw == NEGATIVE ) { Cell_handle tmp = get<0>(_cur)->neighbor(_tr.cw(inf)); _prev = Simplex( get<0>(_cur), Tr::EDGE, _tr.ccw(inf), inf ); _cur = Simplex( tmp, Tr::EDGE, tmp->index( get<0>(_prev)->vertex( get<2>(_prev) ) ), tmp->index( get<0>(_prev)->vertex( get<3>(_prev) ) ) ); return; } - Orientation ocw = _tr.coplanar_orientation( _s_vert, get<0>(_cur)->vertex( _tr.cw(inf)), get<0>(_cur)->vertex(_tr.ccw(inf)), _t_vert ); + Orientation ocw = CGAL::coplanar_orientation( _source, + get<0>(_cur)->vertex( _tr.cw(inf))->point(), + get<0>(_cur)->vertex(_tr.ccw(inf))->point(), + _target ); if( ocw == NEGATIVE ) { Cell_handle tmp = get<0>(_cur)->neighbor(_tr.ccw(inf)); _prev = Simplex( get<0>(_cur), Tr::EDGE, _tr.cw(inf), inf ); _cur = Simplex( tmp, Tr::EDGE, tmp->index( get<0>(_prev)->vertex( get<2>(_prev) ) ), tmp->index( get<0>(_prev)->vertex( get<3>(_prev) ) ) ); return; } - Orientation op = _tr.coplanar_orientation( get<0>(_cur)->vertex( _tr.ccw(inf) ), get<0>(_cur)->vertex( _tr.cw(inf) ), _s_vert, _t_vert ); + Orientation op = CGAL::coplanar_orientation( + get<0>(_cur)->vertex( _tr.ccw(inf) )->point(), + get<0>(_cur)->vertex( _tr.cw(inf) )->point(), + _source, _target ); switch( op ) { case NEGATIVE: if( occw == COLLINEAR ) { From ac739b70d38d4ed30c54e478e15dcd72a6646533 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 7 Nov 2016 15:46:00 +0100 Subject: [PATCH 020/138] get closer to master remove code that is different from master, and has become useless with my last commit. --- .../include/CGAL/Triangulation_3.h | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_3.h b/Triangulation_3/include/CGAL/Triangulation_3.h index 9d805702125..2c79a84ffd2 100644 --- a/Triangulation_3/include/CGAL/Triangulation_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_3.h @@ -562,11 +562,6 @@ public: return geom_traits().orientation_3_object()(p, q, r, s); } - // Compute whether the orientation of the points of four vertices `a`, `b`, `c`, and `d`. - Orientation orientation( Vertex_handle a, Vertex_handle b, Vertex_handle c, Vertex_handle d ) const { - return orientation( a->point(), b->point(), c->point(), d->point() ); - } - // Compute the orientation of a point compared to the oriented plane supporting a half-facet. Orientation orientation( const Facet& f, const Point& p ) const; @@ -577,11 +572,6 @@ public: return orientation(p, q, r, s) == COPLANAR; } - // Check whether the points of four vertices `a`, `b`, `c`, and `d` are coplanar. - bool coplanar( Vertex_handle a, Vertex_handle b, Vertex_handle c, Vertex_handle d ) const { - return coplanar( a->point(), b->point(), c->point(), d->point() ); - } - // Check whether the points of facet `f` and point `p` are coplanar. bool coplanar( const Facet& f, const Point& p ) const { return orientation(f, p) == COPLANAR; @@ -598,22 +588,12 @@ public: return geom_traits().coplanar_orientation_3_object()(p, q, r); } - // \internal Compute the orientation of four coplanar vertices `a`, `b`, `c`, and `d`. - Orientation coplanar_orientation( Vertex_handle va, Vertex_handle vb, Vertex_handle vc, Vertex_handle vd ) const { - return geom_traits().coplanar_orientation_3_object()( va->point(), vb->point(), vc->point(), vd->point() ); - } - bool collinear(const Point &p, const Point &q, const Point &r) const { return coplanar_orientation(p, q, r) == COLLINEAR; } - bool collinear( Vertex_handle va, Vertex_handle vb, Vertex_handle vc ) const { - return collinear( va->point(), vb->point(), vc->point() ); - } - -protected: Segment construct_segment(const Point &p, const Point &q) const { @@ -1071,7 +1051,6 @@ public: Facet mirror_facet(Facet f) const { return _tds.mirror_facet(f);} - // Gives the edge incident to the same cell that is not incident to any of the input vertices. Edge opposite_edge( Cell_handle c, int li, int lj ) const; From 8b68ab345927fa36685ac97d2b6e7618eac51e2f Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 8 Nov 2016 15:06:57 +0100 Subject: [PATCH 021/138] remove random generator --- .../CGAL/Triangulation_segment_traverser_3.h | 4 ---- .../CGAL/Triangulation_segment_traverser_3_impl.h | 15 +++++++-------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index c7a1afb910c..7c586055100 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -40,7 +40,6 @@ #include #include -#include // If defined, type casting is done statically, // reducing type-safety overhead. @@ -167,9 +166,6 @@ protected: // the first cell containing the target. Simplex _cur, _prev; - // Where possible, facets are checked in a random order. - mutable Random rng; - public: // \name Constructors // \{ diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h index 171b024351f..d8ca0ac3aca 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h @@ -279,8 +279,8 @@ walk_to_next_3() calc[ij] = true; } - // For the remembering stochastic walk, we start trying with a random facet. - int li = rng.template get_bits<2>(); + // start trying + int li = 0; CGAL_triangulation_assertion_code( bool incell = true; ) for( int k = 0; k < 4; ++k, li = _tr.increment_index(li) ) { @@ -307,7 +307,7 @@ walk_to_next_3() // Check if the target is inside the 3-wedge with // the source as apex and the facet as an intersection. - int lj = rng.template get_bits<2>(); + int lj = 0; int Or = 0; for( int l = 0; l < 4; ++l, lj = _tr.increment_index(lj) ) { if( li == lj ) @@ -453,8 +453,8 @@ walk_to_next_3_inf( int inf ) { vert[inf] = &(_source); CGAL_triangulation_assertion( _tr.orientation( *vert[0], *vert[1], *vert[2], *vert[3] ) == POSITIVE ); - // For the remembering stochastic walk, we start trying with a random index: - int li = rng.template get_bits<2>(); + // start trying + int li = 0; // Check if the line enters an adjacent infinite cell. // This occurs if the target lies on the other side of @@ -730,9 +730,8 @@ walk_to_next_2() return; } case Tr::FACET: { - // We test its edges in a random order until we find a neighbor to go further - int li = rng.get_int(0, 3); - + // We test its until we find a neighbor to go further + int li = 0; Orientation o[3]; bool calc[3] = { false, false, false }; From 24e26634f5f8431dcb243e1267be2ca8393083ac Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 8 Nov 2016 15:12:57 +0100 Subject: [PATCH 022/138] remove useless Dummy_gt --- .../CGAL/Triangulation_segment_traverser_3.h | 2 - .../include/CGAL/internal/Dummy_gt.h | 37 ------------------- 2 files changed, 39 deletions(-) delete mode 100644 Triangulation_3/include/CGAL/internal/Dummy_gt.h diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 7c586055100..d1ed7a54924 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -39,8 +39,6 @@ #include -#include - // If defined, type casting is done statically, // reducing type-safety overhead. #define CGAL_TST_ASSUME_CORRECT_TYPES diff --git a/Triangulation_3/include/CGAL/internal/Dummy_gt.h b/Triangulation_3/include/CGAL/internal/Dummy_gt.h deleted file mode 100644 index 77c7596fac1..00000000000 --- a/Triangulation_3/include/CGAL/internal/Dummy_gt.h +++ /dev/null @@ -1,37 +0,0 @@ -// A dummy geometry traits class. -// Copyright (c) 2003 INRIA Sophia-Antipolis (France). -// All rights reserved. -// -//This program is free software: you can redistribute it and/or modify -//it under the terms of the GNU General Public License as published by -//the Free Software Foundation, either version 3 of the License, or -//(at your option) any later version. -// -//This program is distributed in the hope that it will be useful, -//but WITHOUT ANY WARRANTY; without even the implied warranty of -//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//GNU General Public License for more details. -// -//You should have received a copy of the GNU General Public License -//along with this program. If not, see . -// -// Author(s): Thijs van Lankveld - -#ifndef CGAL_INTERNAL_TRIANGULATION_DUMMY_GT_H -#define CGAL_INTERNAL_TRIANGULATION_DUMMY_GT_H - -namespace CGAL { namespace internal { - -// Dummy triangulation which provides all types that a triangulation can use. -struct Dummy_gt { - struct Point_3 {}; - struct Segment_3 {}; - struct Triangle_3 {}; - struct Tetrahedron_3 {}; -}; - -} // namespace internal - -} // namespace CGAL - -#endif // CGAL_INTERNAL_TRIANGULATION_DUMMY_GT_H From c1732121249e3d4f6a445eaf4761fea118a01f7a Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 8 Nov 2016 15:43:24 +0100 Subject: [PATCH 023/138] WIP simplex iterator --- .../CGAL/Triangulation_segment_traverser_3.h | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index d1ed7a54924..f02e7230cba 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -426,6 +426,72 @@ inline bool operator==( typename Tr::Cell_handle ch, Triangulation_segment_cell_ template < class Tr, class Inc > inline bool operator!=( typename Tr::Cell_handle ch, Triangulation_segment_cell_iterator_3 tci ) { return tci != ch; } + + +/********************************************************************/ +/********************************************************************/ +/********************************************************************/ +template < class Tr_, class Inc = internal::Incrementer > +class Triangulation_segment_simplex_iterator_3 +{ + typedef Tr_ Tr; + typedef typename Tr::Triangulation_data_structure Tds; + typedef typename Tr::Geom_traits Gt; + typedef Inc Incrementer; + +private: + typedef Triangulation_segment_simplex_iterator_3 Simplex_iterator; + typedef Triangulation_segment_cell_iterator_3 SCI; + SCI cell_iterator; + +private: + typedef SCI::Point Point; + typedef SCI::Segment Segment; + +public: + // \{ + typedef typename SCI::Vertex_handle Vertex_handle; //< defines the type of a handle for a vertex in the triangulation + typedef typename SCI::Cell_handle Cell_handle; //< defines the type of a handle for a cell in the triangulation. + typedef typename SCI::Locate_type Locate_type; //< defines the simplex type returned from location. + typedef typename SCI::Simplex Simplex; //< defines the simplex type. + + typedef Simplex value_type; //< defines the value type the iterator refers to. + typedef Simplex& reference; //< defines the reference type of the iterator. + typedef Simplex* pointer; //< defines the pointer type of the iterator. + typedef std::size_t size_type; //< defines the integral type that can hold the size of a sequence. + typedef std::ptrdiff_t difference_type; //< defines the signed integral type that can hold the distance between two iterators. + typedef std::forward_iterator_tag iterator_category; //< defines the iterator category. + // \} + + Triangulation_segment_simplex_iterator_3(const Tr& tr + , Vertex_handle s, Vertex_handle t) + : cell_iterator(tr, s, t) {} + Triangulation_segment_simplex_iterator_3(const Tr& tr + , Vertex_handle s, const Point& t) + : cell_iterator(tr, s, t) {} + Triangulation_segment_simplex_iterator_3(const Tr& tr + , const Point& s, Vertex_handle t, Cell_handle hint = Cell_handle()) + : cell_iterator(tr, s, t, hint) {} + Triangulation_segment_simplex_iterator_3(const Tr& tr + , const Point& s, const Point& t, Cell_handle hint = Cell_handle()) + : cell_iterator(tr, s, t, hint) {} + Triangulation_segment_simplex_iterator_3(const Tr& tr + , const Segment& seg, Cell_handle hint = Cell_handle()) + : cell_iterator(tr, seg, hint) {} + + Simplex_iterator end() const + { + return sci.end(); + } + + Simplex_iterator& operator++() + { + sci.walk_to_next(); + return *this; + } + +};//class Triangulation_segment_simplex_iterator_3 + } // namespace CGAL #include From 2e4a93f967dc1d0252a48a7da22c0753b464f8ae Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 22 Nov 2016 15:10:41 +0100 Subject: [PATCH 024/138] add Triangulation_segment_simplex_iterator_3 this new iterator is similar to Triangulation_segment_cell_iterator_3, but iterates over simplices of all dimensions instead of only cells. if [source, target] crosses cell1, and enters cell2 via their common vertex v, then the iterator returns cell1, v, and cell2 successively --- .../CGAL/Triangulation_segment_traverser_3.h | 165 ++++++++++++++++-- 1 file changed, 148 insertions(+), 17 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index f02e7230cba..2b15fc47fe8 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -442,53 +442,184 @@ class Triangulation_segment_simplex_iterator_3 private: typedef Triangulation_segment_simplex_iterator_3 Simplex_iterator; typedef Triangulation_segment_cell_iterator_3 SCI; - SCI cell_iterator; private: - typedef SCI::Point Point; - typedef SCI::Segment Segment; + typedef typename SCI::Point Point; + typedef typename SCI::Segment Segment; public: // \{ - typedef typename SCI::Vertex_handle Vertex_handle; //< defines the type of a handle for a vertex in the triangulation - typedef typename SCI::Cell_handle Cell_handle; //< defines the type of a handle for a cell in the triangulation. - typedef typename SCI::Locate_type Locate_type; //< defines the simplex type returned from location. - typedef typename SCI::Simplex Simplex; //< defines the simplex type. + typedef typename SCI::Vertex_handle Vertex_handle;//< defines the type of a handle for a vertex in the triangulation + typedef typename SCI::Cell_handle Cell_handle; //< defines the type of a handle for a cell in the triangulation. + typedef typename SCI::Triangulation::Edge Edge; //< defines the type of an edge in the triangulation. + typedef typename SCI::Triangulation::Facet Facet; //< defines the type of a facet in the triangulation. + typedef typename SCI::Locate_type Locate_type; //< defines the simplex type returned from location. - typedef Simplex value_type; //< defines the value type the iterator refers to. - typedef Simplex& reference; //< defines the reference type of the iterator. - typedef Simplex* pointer; //< defines the pointer type of the iterator. + typedef boost::variant Simplex_type; //types sorted by dimension + + typedef Simplex_type value_type; //< defines the value type the iterator refers to. + typedef Simplex_type& reference; //< defines the reference type of the iterator. + typedef Simplex_type* pointer; //< defines the pointer type of the iterator. typedef std::size_t size_type; //< defines the integral type that can hold the size of a sequence. typedef std::ptrdiff_t difference_type; //< defines the signed integral type that can hold the distance between two iterators. typedef std::forward_iterator_tag iterator_category; //< defines the iterator category. // \} +private: + SCI cell_iterator; + Simplex_type curr_simplex; + +public: Triangulation_segment_simplex_iterator_3(const Tr& tr , Vertex_handle s, Vertex_handle t) - : cell_iterator(tr, s, t) {} + : cell_iterator(tr, s, t) + { init_curr_simplex(); } Triangulation_segment_simplex_iterator_3(const Tr& tr , Vertex_handle s, const Point& t) - : cell_iterator(tr, s, t) {} + : cell_iterator(tr, s, t) + { init_curr_simplex(); } Triangulation_segment_simplex_iterator_3(const Tr& tr , const Point& s, Vertex_handle t, Cell_handle hint = Cell_handle()) - : cell_iterator(tr, s, t, hint) {} + : cell_iterator(tr, s, t, hint) + { init_curr_simplex(); } Triangulation_segment_simplex_iterator_3(const Tr& tr , const Point& s, const Point& t, Cell_handle hint = Cell_handle()) - : cell_iterator(tr, s, t, hint) {} + : cell_iterator(tr, s, t, hint) + { init_curr_simplex(); } Triangulation_segment_simplex_iterator_3(const Tr& tr , const Segment& seg, Cell_handle hint = Cell_handle()) - : cell_iterator(tr, seg, hint) {} + : cell_iterator(tr, seg, hint) + { init_curr_simplex(); } + bool operator==(const Simplex_iterator& sit) const + { + return sit.cell_iterator == cell_iterator + && sit.curr_simplex == curr_simplex; + } + bool operator!=(const Simplex_iterator& sit) const + { + return sit.cell_iterator != cell_iterator + || sit.curr_simplex != curr_simplex; + } + +private: + Triangulation_segment_simplex_iterator_3 + (const SCI& sci) + : cell_iterator(sci) + , curr_simplex(Cell_handle()) + {} + +private: + void init_curr_simplex() + { + //check what is the entry type of cell_iterator + Locate_type lt; + int li, lj; + cell_iterator.entry(lt, li, lj); + switch (lt) + { + case Locate_type::VERTEX: + curr_simplex = Cell_handle(cell_iterator)->vertex(li); + break; + case Locate_type::EDGE: + curr_simplex = Edge(Cell_handle(cell_iterator), li, lj); + break; + case Locate_type::FACET: //basic case where segment enters a cell + //by crossing a facet + //the 3 cases below correspond to the case when cell_iterator + //is in its initial position: _cur is locate(source) + case Locate_type::CELL: + case Locate_type::OUTSIDE_CONVEX_HULL: + case Locate_type::OUTSIDE_AFFINE_HULL: + curr_simplex = Cell_handle(cell_iterator); + break; + default: + CGAL_assertion(false); + }; + } + +public: Simplex_iterator end() const { - return sci.end(); + Simplex_iterator sit(cell_iterator.end()); + return sit; } + // provides the increment postfix operator. Simplex_iterator& operator++() { - sci.walk_to_next(); + CGAL_assertion(!curr_simplex.empty()); + + switch(curr_simplex.which()) + { + case 3 :/*Cell_handle*/ + { + ++cell_iterator; + init_curr_simplex(); + break; + } + case 2 :/*Facet*/ + { + std::cout << "which type is Facet...!?" << std::endl; + break; + } + case 1 :/*Edge*/ + case 0 :/*Vertex_handle*/ + { + //move to the cell actually traversed + curr_simplex = Cell_handle(cell_iterator); + break; + } + default: + CGAL_assertion(false); + }; return *this; } + // provides the increment prefix operator. + Simplex_iterator operator++(int) + { + Simplex_iterator tmp(*this); + ++(*this); + return tmp; + } + + // provides a dereference operator. + /* \return a pointer to the current cell. + */ + Simplex_type* operator->() { return &*curr_simplex; } + + // provides an indirection operator. + /* \return the current cell. + */ + Simplex_type& operator*() { return curr_simplex; } + + bool is_vertex() const { return curr_simplex.which() == 0; } + bool is_edge() const { return curr_simplex.which() == 1; } + bool is_facet() const { return curr_simplex.which() == 2; } + bool is_cell() const { return curr_simplex.which() == 3; } + + const Simplex_type& get_simplex() const { return curr_simplex; } + Vertex_handle get_vertex() const + { + CGAL_assertion(is_vertex()); + return boost::get(curr_simplex); + } + Vertex_handle get_edge() const + { + CGAL_assertion(is_edge()); + return boost::get(curr_simplex); + } + Vertex_handle get_facet() const + { + CGAL_assertion(is_facet()); + return boost::get(curr_simplex); + } + Vertex_handle get_cell() const + { + CGAL_assertion(is_cell()); + return boost::get(curr_simplex); + } + };//class Triangulation_segment_simplex_iterator_3 From bccd80512d54e6556a3ebfb8b971f18e4c97fb1d Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 22 Nov 2016 15:12:54 +0100 Subject: [PATCH 025/138] make the traversal example bigger --- .../Triangulation_3/segment_traverser_3.cpp | 113 ++++++++++++++---- 1 file changed, 91 insertions(+), 22 deletions(-) diff --git a/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp b/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp index 5e4b8afdd4f..88baf1c2234 100644 --- a/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp +++ b/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp @@ -1,9 +1,16 @@ +#define CGAL_TRIANGULATION_3_TRAVERSER_CHECK_INTERSECTION + #include #include #include #include #include +#include +#include + +#include +#include // Define the kernel. typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; @@ -14,37 +21,99 @@ typedef CGAL::Delaunay_triangulation_3< Kernel > DT; typedef DT::Cell_handle Cell_handle; -typedef CGAL::Triangulation_segment_cell_iterator_3< DT > Traverser; +typedef CGAL::Triangulation_segment_cell_iterator_3< DT > Cell_traverser; +typedef CGAL::Triangulation_segment_simplex_iterator_3
Simplex_traverser; -int main() +int main(int argc, char* argv[]) { - std::vector< Point_3 > points; - points.reserve( 6 ); - points.push_back( Point_3(-.9063, .4226, 1.0 ) ); - points.push_back( Point_3( .8192, .5736, 1.0 ) ); - points.push_back( Point_3( .0872,-.9992, 1.0 ) ); - points.push_back( Point_3(-.8192, .5736,-1.0 ) ); - points.push_back( Point_3( .9063, .4226,-1.0 ) ); - points.push_back( Point_3( .0872,-.9962,-1.0 ) ); - + const char* fname = (argc>1) ? argv[1] : "data/blobby.xyz"; + + // Reads a .xyz point set file in points. + // As the point is the second element of the tuple (that is with index 1) + // we use a property map that accesses the 1st element of the tuple. + + std::vector points; + std::ifstream stream(fname); + if (!stream || + !CGAL::read_xyz_points(stream, std::back_inserter(points))) + { + std::cerr << "Error: cannot read file " << fname << std::endl; + return EXIT_FAILURE; + } + + //bbox + //min (-0.481293,-0.220929,-0.194076), max (0.311532,0.225525,0.198025) + // Construct the Delaunay triangulation. DT dt( points.begin(), points.end() ); assert( dt.is_valid() ); - // Construct a traverser. - Traverser st( dt, Point_3(-3,0,0), Point_3(3,0,0) ); + CGAL::default_random = CGAL::Random(0); + CGAL::Random rng(0); - // Count the number of finite cells traversed. - unsigned int inf = 0, fin = 0; - for( ; st != st.end(); ++st ) { - if( dt.is_infinite(st) ) + unsigned int nb_facets = 0, nb_edges = 0, nb_vertex = 0; + + unsigned int nb_seg = 100; + for (unsigned int i = 0; i < nb_seg; ++i) + { + // Construct a traverser. + Point_3 p1(rng.get_double(-0.48, 0.31), + rng.get_double(-0.22, 0.22), + rng.get_double(-0.19, 0.19)); + Point_3 p2(rng.get_double(-0.48, 0.31), + rng.get_double(-0.22, 0.22), + rng.get_double(-0.19, 0.19)); + + std::cout << "Traverser " << (i + 1) + << "\n\t(" << p1 + << ")\n\t(" << p2 << ")" << std::endl; + Cell_traverser ct(dt, p1, p2); + + // Count the number of finite cells traversed. + unsigned int inf = 0, fin = 0; + for( ; ct != ct.end(); ++ct ) + { + if( dt.is_infinite(ct) ) ++inf; else - ++fin; + { + ++fin; + + DT::Locate_type lt; + int li, lj; + ct.entry(lt, li, lj); + + switch (lt) + { + case DT::Locate_type::FACET: + ++nb_facets; + break; + case DT::Locate_type::EDGE: + ++nb_edges; + break; + case DT::Locate_type::VERTEX: + ++nb_vertex; + break; + default: + /*when source is in a cell*/ + CGAL_assertion(lt == DT::Locate_type::CELL); + } + } + } + + Simplex_traverser st(dt, p1, p2); + for (; st != st.end(); ++st) + { + if (st.is_vertex()) + std::cout << "vertex " << st.get_vertex()->point() << std::endl; + } + + std::cout << "While traversing from " << ct.source() + << " to " << ct.target() << std::endl; + std::cout << inf << " infinite and " + << fin << " finite cells were visited." << std::endl; + std::cout << std::endl << std::endl; } - std::cout << "While traversing from " << st.source() << " to " << st.target() << std::endl; - std::cout << inf << " infinite and " << fin << " finite cells were visited." << std::endl; - - return 0; + return 0; } \ No newline at end of file From 99350fcefc8ef9efbd50f90569d5b439b4332d08 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 22 Nov 2016 16:39:02 +0100 Subject: [PATCH 026/138] fix end case --- .../include/CGAL/Triangulation_segment_traverser_3.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 2b15fc47fe8..1c4adc25ca9 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -513,6 +513,11 @@ private: void init_curr_simplex() { //check what is the entry type of cell_iterator + if (Cell_handle(cell_iterator) == Cell_handle()) + { + curr_simplex = Cell_handle(); + return;//end has been reached + } Locate_type lt; int li, lj; cell_iterator.entry(lt, li, lj); @@ -593,6 +598,11 @@ public: */ Simplex_type& operator*() { return curr_simplex; } + // provides a conversion operator. + /* \return a handle to the current cell. + */ + operator const Cell_handle() const { return Cell_handle(cell_iterator); } + bool is_vertex() const { return curr_simplex.which() == 0; } bool is_edge() const { return curr_simplex.which() == 1; } bool is_facet() const { return curr_simplex.which() == 2; } From 90c109f3ce4e2c0a258f61fa3aa0662852cd2f1a Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 22 Nov 2016 17:15:49 +0100 Subject: [PATCH 027/138] rename function --- .../CGAL/Triangulation_segment_traverser_3.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 1c4adc25ca9..0876216b405 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -473,23 +473,23 @@ public: Triangulation_segment_simplex_iterator_3(const Tr& tr , Vertex_handle s, Vertex_handle t) : cell_iterator(tr, s, t) - { init_curr_simplex(); } + { set_curr_simplex(); } Triangulation_segment_simplex_iterator_3(const Tr& tr , Vertex_handle s, const Point& t) : cell_iterator(tr, s, t) - { init_curr_simplex(); } + { set_curr_simplex(); } Triangulation_segment_simplex_iterator_3(const Tr& tr , const Point& s, Vertex_handle t, Cell_handle hint = Cell_handle()) : cell_iterator(tr, s, t, hint) - { init_curr_simplex(); } + { set_curr_simplex(); } Triangulation_segment_simplex_iterator_3(const Tr& tr , const Point& s, const Point& t, Cell_handle hint = Cell_handle()) : cell_iterator(tr, s, t, hint) - { init_curr_simplex(); } + { set_curr_simplex(); } Triangulation_segment_simplex_iterator_3(const Tr& tr , const Segment& seg, Cell_handle hint = Cell_handle()) : cell_iterator(tr, seg, hint) - { init_curr_simplex(); } + { set_curr_simplex(); } bool operator==(const Simplex_iterator& sit) const { @@ -510,7 +510,7 @@ private: {} private: - void init_curr_simplex() + void set_curr_simplex() { //check what is the entry type of cell_iterator if (Cell_handle(cell_iterator) == Cell_handle()) @@ -560,12 +560,12 @@ public: case 3 :/*Cell_handle*/ { ++cell_iterator; - init_curr_simplex(); + set_curr_simplex(); break; } case 2 :/*Facet*/ { - std::cout << "which type is Facet...!?" << std::endl; + std::cout << "todo : facet degenerate case" << std::endl; break; } case 1 :/*Edge*/ From f0adff5f66b64f27cda28988a77c78045423b43c Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 24 Nov 2016 10:27:00 +0100 Subject: [PATCH 028/138] handle the edge case when the query passes exactly only an edge --- .../CGAL/Triangulation_segment_traverser_3.h | 49 ++++++++++++++++--- 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 0876216b405..31e15e497f1 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -518,16 +518,26 @@ private: curr_simplex = Cell_handle(); return;//end has been reached } + + Cell_handle cell = Cell_handle(cell_iterator); Locate_type lt; int li, lj; cell_iterator.entry(lt, li, lj); + switch (lt) { case Locate_type::VERTEX: - curr_simplex = Cell_handle(cell_iterator)->vertex(li); + if (is_vertex()) //previous visited simplex was also a vertex + { + lj = cell->index(get_vertex()); + curr_simplex = Edge(cell, li, lj); + } + else + curr_simplex = cell->vertex(li); break; + case Locate_type::EDGE: - curr_simplex = Edge(Cell_handle(cell_iterator), li, lj); + curr_simplex = Edge(cell, li, lj); break; case Locate_type::FACET: //basic case where segment enters a cell //by crossing a facet @@ -536,7 +546,7 @@ private: case Locate_type::CELL: case Locate_type::OUTSIDE_CONVEX_HULL: case Locate_type::OUTSIDE_AFFINE_HULL: - curr_simplex = Cell_handle(cell_iterator); + curr_simplex = cell; break; default: CGAL_assertion(false); @@ -565,14 +575,39 @@ public: } case 2 :/*Facet*/ { - std::cout << "todo : facet degenerate case" << std::endl; + //todo + break; + } + case 1:/*Edge*/ + { + //todo break; } - case 1 :/*Edge*/ case 0 :/*Vertex_handle*/ { - //move to the cell actually traversed - curr_simplex = Cell_handle(cell_iterator); + Cell_handle ch = Cell_handle(cell_iterator); + ++cell_iterator; + Cell_handle chnext = Cell_handle(cell_iterator); + //cell_iterator is one step forward curr_simplex + + Locate_type lt; + int li, lj; + cell_iterator.entry(lt, li, lj); + + int index_v = ch->index(get_vertex()); + int index_vnext = ch->index(chnext->vertex(li)); + + if (lt == Locate_type::VERTEX) + { + curr_simplex = Edge(ch, index_v, index_vnext); + } + else if (lt == Locate_type::EDGE) + { + int index_f = 6 - (index_v + index_vnext + ch->index(chnext->vertex(lj))); + curr_simplex = Facet(ch, index_f); + } + else + curr_simplex = Cell_handle(cell_iterator); break; } default: From e340b38d86c2e35b3cd514b743b8c25f87c4e90a Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 25 Nov 2016 16:11:03 +0100 Subject: [PATCH 029/138] rename member variables --- .../CGAL/Triangulation_segment_traverser_3.h | 94 +++++++++---------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 31e15e497f1..49963603688 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -466,63 +466,63 @@ public: // \} private: - SCI cell_iterator; - Simplex_type curr_simplex; + SCI _cell_iterator; + Simplex_type _curr_simplex; public: Triangulation_segment_simplex_iterator_3(const Tr& tr , Vertex_handle s, Vertex_handle t) - : cell_iterator(tr, s, t) + : _cell_iterator(tr, s, t) { set_curr_simplex(); } Triangulation_segment_simplex_iterator_3(const Tr& tr , Vertex_handle s, const Point& t) - : cell_iterator(tr, s, t) + : _cell_iterator(tr, s, t) { set_curr_simplex(); } Triangulation_segment_simplex_iterator_3(const Tr& tr , const Point& s, Vertex_handle t, Cell_handle hint = Cell_handle()) - : cell_iterator(tr, s, t, hint) + : _cell_iterator(tr, s, t, hint) { set_curr_simplex(); } Triangulation_segment_simplex_iterator_3(const Tr& tr , const Point& s, const Point& t, Cell_handle hint = Cell_handle()) - : cell_iterator(tr, s, t, hint) + : _cell_iterator(tr, s, t, hint) { set_curr_simplex(); } Triangulation_segment_simplex_iterator_3(const Tr& tr , const Segment& seg, Cell_handle hint = Cell_handle()) - : cell_iterator(tr, seg, hint) + : _cell_iterator(tr, seg, hint) { set_curr_simplex(); } bool operator==(const Simplex_iterator& sit) const { - return sit.cell_iterator == cell_iterator - && sit.curr_simplex == curr_simplex; + return sit._cell_iterator == _cell_iterator + && sit._curr_simplex == _curr_simplex; } bool operator!=(const Simplex_iterator& sit) const { - return sit.cell_iterator != cell_iterator - || sit.curr_simplex != curr_simplex; + return sit._cell_iterator != _cell_iterator + || sit._curr_simplex != _curr_simplex; } private: Triangulation_segment_simplex_iterator_3 (const SCI& sci) - : cell_iterator(sci) - , curr_simplex(Cell_handle()) + : _cell_iterator(sci) + , _curr_simplex(Cell_handle()) {} private: void set_curr_simplex() { - //check what is the entry type of cell_iterator - if (Cell_handle(cell_iterator) == Cell_handle()) + //check what is the entry type of _cell_iterator + if (Cell_handle(_cell_iterator) == Cell_handle()) { - curr_simplex = Cell_handle(); + _curr_simplex = Cell_handle(); return;//end has been reached } - Cell_handle cell = Cell_handle(cell_iterator); + Cell_handle cell = Cell_handle(_cell_iterator); Locate_type lt; int li, lj; - cell_iterator.entry(lt, li, lj); + _cell_iterator.entry(lt, li, lj); switch (lt) { @@ -530,23 +530,23 @@ private: if (is_vertex()) //previous visited simplex was also a vertex { lj = cell->index(get_vertex()); - curr_simplex = Edge(cell, li, lj); + _curr_simplex = Edge(cell, li, lj); } else - curr_simplex = cell->vertex(li); + _curr_simplex = cell->vertex(li); break; case Locate_type::EDGE: - curr_simplex = Edge(cell, li, lj); + _curr_simplex = Edge(cell, li, lj); break; case Locate_type::FACET: //basic case where segment enters a cell //by crossing a facet - //the 3 cases below correspond to the case when cell_iterator + //the 3 cases below correspond to the case when _cell_iterator //is in its initial position: _cur is locate(source) case Locate_type::CELL: case Locate_type::OUTSIDE_CONVEX_HULL: case Locate_type::OUTSIDE_AFFINE_HULL: - curr_simplex = cell; + _curr_simplex = cell; break; default: CGAL_assertion(false); @@ -556,20 +556,20 @@ private: public: Simplex_iterator end() const { - Simplex_iterator sit(cell_iterator.end()); + Simplex_iterator sit(_cell_iterator.end()); return sit; } // provides the increment postfix operator. Simplex_iterator& operator++() { - CGAL_assertion(!curr_simplex.empty()); + CGAL_assertion(!_curr_simplex.empty()); - switch(curr_simplex.which()) + switch(_curr_simplex.which()) { case 3 :/*Cell_handle*/ { - ++cell_iterator; + ++_cell_iterator; set_curr_simplex(); break; } @@ -585,29 +585,29 @@ public: } case 0 :/*Vertex_handle*/ { - Cell_handle ch = Cell_handle(cell_iterator); - ++cell_iterator; - Cell_handle chnext = Cell_handle(cell_iterator); - //cell_iterator is one step forward curr_simplex + Cell_handle ch = Cell_handle(_cell_iterator); + ++_cell_iterator; + Cell_handle chnext = Cell_handle(_cell_iterator); + //_cell_iterator is one step forward _curr_simplex Locate_type lt; int li, lj; - cell_iterator.entry(lt, li, lj); + _cell_iterator.entry(lt, li, lj); int index_v = ch->index(get_vertex()); int index_vnext = ch->index(chnext->vertex(li)); if (lt == Locate_type::VERTEX) { - curr_simplex = Edge(ch, index_v, index_vnext); + _curr_simplex = Edge(ch, index_v, index_vnext); } else if (lt == Locate_type::EDGE) { int index_f = 6 - (index_v + index_vnext + ch->index(chnext->vertex(lj))); - curr_simplex = Facet(ch, index_f); + _curr_simplex = Facet(ch, index_f); } else - curr_simplex = Cell_handle(cell_iterator); + _curr_simplex = Cell_handle(_cell_iterator); break; } default: @@ -626,43 +626,43 @@ public: // provides a dereference operator. /* \return a pointer to the current cell. */ - Simplex_type* operator->() { return &*curr_simplex; } + Simplex_type* operator->() { return &*_curr_simplex; } // provides an indirection operator. /* \return the current cell. */ - Simplex_type& operator*() { return curr_simplex; } + Simplex_type& operator*() { return _curr_simplex; } // provides a conversion operator. /* \return a handle to the current cell. */ - operator const Cell_handle() const { return Cell_handle(cell_iterator); } + operator const Cell_handle() const { return Cell_handle(_cell_iterator); } - bool is_vertex() const { return curr_simplex.which() == 0; } - bool is_edge() const { return curr_simplex.which() == 1; } - bool is_facet() const { return curr_simplex.which() == 2; } - bool is_cell() const { return curr_simplex.which() == 3; } + bool is_vertex() const { return _curr_simplex.which() == 0; } + bool is_edge() const { return _curr_simplex.which() == 1; } + bool is_facet() const { return _curr_simplex.which() == 2; } + bool is_cell() const { return _curr_simplex.which() == 3; } - const Simplex_type& get_simplex() const { return curr_simplex; } + const Simplex_type& get_simplex() const { return _curr_simplex; } Vertex_handle get_vertex() const { CGAL_assertion(is_vertex()); - return boost::get(curr_simplex); + return boost::get(_curr_simplex); } Vertex_handle get_edge() const { CGAL_assertion(is_edge()); - return boost::get(curr_simplex); + return boost::get(_curr_simplex); } Vertex_handle get_facet() const { CGAL_assertion(is_facet()); - return boost::get(curr_simplex); + return boost::get(_curr_simplex); } Vertex_handle get_cell() const { CGAL_assertion(is_cell()); - return boost::get(curr_simplex); + return boost::get(_curr_simplex); } From f8c13bad6436740d034ac15a5453329762a94d04 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 25 Nov 2016 17:00:22 +0100 Subject: [PATCH 030/138] vertex - edge - vertex case is a degenerate case add degeneracy() fonction to detect this kind of case --- .../CGAL/Triangulation_segment_traverser_3.h | 97 +++++++++++++++++-- 1 file changed, 89 insertions(+), 8 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 49963603688..71d2137f7d4 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -527,13 +527,7 @@ private: switch (lt) { case Locate_type::VERTEX: - if (is_vertex()) //previous visited simplex was also a vertex - { - lj = cell->index(get_vertex()); - _curr_simplex = Edge(cell, li, lj); - } - else - _curr_simplex = cell->vertex(li); + _curr_simplex = cell->vertex(li); break; case Locate_type::EDGE: @@ -580,12 +574,64 @@ public: } case 1:/*Edge*/ { - //todo + if (cell_iterator_is_ahead()) + { + set_curr_simplex();//vertex or facet, entry of cell_iterator + break; + } + //cell_iterator's entry is edge + Cell_handle ch = Cell_handle(_cell_iterator); + Locate_type clt; + int cli, clj; + _cell_iterator.entry(clt, cli, clj); + + ++_cell_iterator; + Cell_handle chnext = Cell_handle(_cell_iterator); + //_cell_iterator is one step forward _curr_simplex + + Locate_type lt; + int li, lj; + _cell_iterator.entry(lt, li, lj); + + if (lt == Locate_type::VERTEX) + { + _curr_simplex = ch; + } + else if (lt == Locate_type::EDGE) + { + int index_v3 = -1; + int tmp = ch->index(chnext->vertex(li)); + if (tmp != cli && tmp != clj) + index_v3 = tmp; + else + { + tmp = ch->index(chnext->vertex(lj)); + index_v3 = tmp; + } + CGAL_assertion(index_v3 != -1); + _curr_simplex = Facet(ch, (6 - li - lj - index_v3)); + } + else if (lt == Locate_type::FACET) + { + _curr_simplex = ch; + } + break; } case 0 :/*Vertex_handle*/ { + if (degeneracy()) + { + set_curr_simplex(); + break; + } Cell_handle ch = Cell_handle(_cell_iterator); + if (cell_iterator_is_ahead()) + { + _curr_simplex = ch; + break; + } + ++_cell_iterator; Cell_handle chnext = Cell_handle(_cell_iterator); //_cell_iterator is one step forward _curr_simplex @@ -665,6 +711,41 @@ public: return boost::get(_curr_simplex); } +private: + /** returns true when _current_simplex does not have the same + * type as the "entry" of _cell_iterator + * it is for example the case after vertex - edge. + * the following value should be vertex, and the corresponding vertex + * is the entry of _cell_iterator + */ + bool degeneracy() const + { + Locate_type lt; + int li, lj; + _cell_iterator.entry(lt, li, lj); + return (is_vertex() && lt != Locate_type::VERTEX) + || (is_edge() && lt != Locate_type::EDGE) + || (is_facet() && lt != Locate_type::FACET); + } + + bool cell_iterator_is_ahead() const + { + Cell_handle ch = Cell_handle(_cell_iterator); + switch (_curr_simplex.which()) + { + case 0 ://vertex + return !ch->has_vertex(get_vertex()); + case 1 ://edge + return !ch->has_edge(get_edge()); + case 2 ://facet + return !ch->has_facet(get_facet()); + case 3 ://cell + return ch != get_cell(); + } + //should not be reached + CGAL_assertion(false); + return false; + } };//class Triangulation_segment_simplex_iterator_3 From 46f2f353fa0834d830b1f8887bcf468ef055d656 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 28 Nov 2016 12:18:03 +0100 Subject: [PATCH 031/138] facet and cell case --- .../CGAL/Triangulation_segment_traverser_3.h | 56 +++++++++++++++++-- 1 file changed, 52 insertions(+), 4 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 71d2137f7d4..480a45e2a23 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -569,7 +569,43 @@ public: } case 2 :/*Facet*/ { - //todo + if (cell_iterator_is_ahead()) + { + Cell_handle chnext = Cell_handle(_cell_iterator); + Locate_type ltnext; + int linext, ljnext; + _cell_iterator.entry(ltnext, linext, ljnext); + switch (ltnext)//entry simplex in next cell + { + case Locate_type::VERTEX: + //if the entry vertex is a vertex of current facet + if (facet_has_vertex(get_facet(), chnext->vertex(linext))) + set_curr_simplex(); + else + _curr_simplex = chnext; + break; + + case Locate_type::EDGE: + if (facet_has_edge(get_edge(), Edge(chnext, linext, ljnext))) + set_curr_simplex(); + else + _curr_simplex = chnext; + break; + + case Locate_type::FACET: + _curr_simplex = chnext; + break; + + default: + CGAL_assertion(false); + } + } + else //cell_iterator is not ahead. get_facet() is part of cell_iterator + { + //we cannot be in any of the degenerate cases, only detected by + //taking cell_iterator one step forward + _curr_simplex = Cell_handle(cell_iterator); + } break; } case 1:/*Edge*/ @@ -695,17 +731,17 @@ public: CGAL_assertion(is_vertex()); return boost::get(_curr_simplex); } - Vertex_handle get_edge() const + Edge get_edge() const { CGAL_assertion(is_edge()); return boost::get(_curr_simplex); } - Vertex_handle get_facet() const + Facet get_facet() const { CGAL_assertion(is_facet()); return boost::get(_curr_simplex); } - Vertex_handle get_cell() const + Cell_handle get_cell() const { CGAL_assertion(is_cell()); return boost::get(_curr_simplex); @@ -747,6 +783,18 @@ private: return false; } + bool facet_has_vertex(const Facet& f, const Vertex_handle v) const + { + Cell_handle c = f.first; + const int fi = f.second; + for (int i = 1; i < 4; ++i) + { + if (c->vertex((fi + i) % 4) == v) + return true; + } + return false; + } + };//class Triangulation_segment_simplex_iterator_3 } // namespace CGAL From a46bc3dc9bc71061912b9ab72dc3d6e5e682db65 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 28 Nov 2016 14:13:56 +0100 Subject: [PATCH 032/138] fix edge case --- .../CGAL/Triangulation_segment_traverser_3.h | 76 ++++++++++--------- 1 file changed, 39 insertions(+), 37 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 480a45e2a23..e65e311b6b9 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -610,48 +610,50 @@ public: } case 1:/*Edge*/ { - if (cell_iterator_is_ahead()) + if (!cell_iterator_is_ahead()) { - set_curr_simplex();//vertex or facet, entry of cell_iterator - break; + //we cannot be in any of the degenerate cases, only detected by + //taking cell_iterator one step forward + _curr_simplex = Cell_handle(cell_iterator); } - //cell_iterator's entry is edge - Cell_handle ch = Cell_handle(_cell_iterator); - Locate_type clt; - int cli, clj; - _cell_iterator.entry(clt, cli, clj); - - ++_cell_iterator; - Cell_handle chnext = Cell_handle(_cell_iterator); - //_cell_iterator is one step forward _curr_simplex - - Locate_type lt; - int li, lj; - _cell_iterator.entry(lt, li, lj); - - if (lt == Locate_type::VERTEX) + else { - _curr_simplex = ch; - } - else if (lt == Locate_type::EDGE) - { - int index_v3 = -1; - int tmp = ch->index(chnext->vertex(li)); - if (tmp != cli && tmp != clj) - index_v3 = tmp; - else + Cell_handle chnext = Cell_handle(_cell_iterator); + Locate_type ltnext; + int linext, ljnext; + _cell_iterator.entry(ltnext, linext, ljnext); + switch (ltnext)//entry simplex in next cell { - tmp = ch->index(chnext->vertex(lj)); - index_v3 = tmp; - } - CGAL_assertion(index_v3 != -1); - _curr_simplex = Facet(ch, (6 - li - lj - index_v3)); + case Locate_type::VERTEX: + if (edge_has_vertex(get_edge(), chnext->vertex(linext))) + _curr_simplex = chnext->vertex(linext); + else + _curr_simplex = get_edge(); + break; + + case Locate_type::EDGE: + //find the Facet between current and next edges + Cell_handle ch = Cell_handle(cell_iterator); + Locate_type lt; + int li, lj; + _cell_iterator.entry(lt, li, lj); + int index_v3 = -1; + int tmp = ch->index(chnext->vertex(li)); + if (tmp != cli && tmp != clj) + index_v3 = tmp; + else + { + tmp = ch->index(chnext->vertex(lj)); + index_v3 = tmp; + } + CGAL_assertion(index_v3 != -1); + _curr_simplex = Facet(ch, (6 - li - lj - index_v3)); + break; + + case Locate_type::FACET: + _curr_simplex = ch;//query goes through the cell + break; } - else if (lt == Locate_type::FACET) - { - _curr_simplex = ch; - } - break; } case 0 :/*Vertex_handle*/ From a11db75c573d4b9926e83343078848b4386cc81d Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 28 Nov 2016 14:17:56 +0100 Subject: [PATCH 033/138] reorder facet case for consistency with edge case fix compilation, and complete secondary functions --- .../CGAL/Triangulation_segment_traverser_3.h | 78 ++++++++++++++----- 1 file changed, 59 insertions(+), 19 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index e65e311b6b9..1d632e75d54 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -569,7 +569,14 @@ public: } case 2 :/*Facet*/ { - if (cell_iterator_is_ahead()) + if (!cell_iterator_is_ahead()) + { + //cell_iterator is not ahead. get_facet() is part of cell_iterator + //we cannot be in any of the degenerate cases, only detected by + //taking cell_iterator one step forward + _curr_simplex = Cell_handle(_cell_iterator); + } + else { Cell_handle chnext = Cell_handle(_cell_iterator); Locate_type ltnext; @@ -586,7 +593,7 @@ public: break; case Locate_type::EDGE: - if (facet_has_edge(get_edge(), Edge(chnext, linext, ljnext))) + if (facet_has_edge(get_facet(), Edge(chnext, linext, ljnext))) set_curr_simplex(); else _curr_simplex = chnext; @@ -598,14 +605,8 @@ public: default: CGAL_assertion(false); - } - } - else //cell_iterator is not ahead. get_facet() is part of cell_iterator - { - //we cannot be in any of the degenerate cases, only detected by - //taking cell_iterator one step forward - _curr_simplex = Cell_handle(cell_iterator); - } + }; + }//end else break; } case 1:/*Edge*/ @@ -614,7 +615,7 @@ public: { //we cannot be in any of the degenerate cases, only detected by //taking cell_iterator one step forward - _curr_simplex = Cell_handle(cell_iterator); + _curr_simplex = Cell_handle(_cell_iterator); } else { @@ -632,14 +633,15 @@ public: break; case Locate_type::EDGE: + { //find the Facet between current and next edges - Cell_handle ch = Cell_handle(cell_iterator); + Cell_handle ch = Cell_handle(_cell_iterator); Locate_type lt; int li, lj; _cell_iterator.entry(lt, li, lj); - int index_v3 = -1; + int index_v3 = -1;//todo : check this is correct int tmp = ch->index(chnext->vertex(li)); - if (tmp != cli && tmp != clj) + if (tmp != li && tmp != lj) index_v3 = tmp; else { @@ -649,11 +651,12 @@ public: CGAL_assertion(index_v3 != -1); _curr_simplex = Facet(ch, (6 - li - lj - index_v3)); break; - + } case Locate_type::FACET: - _curr_simplex = ch;//query goes through the cell + _curr_simplex = Cell_handle(_cell_iterator);//query goes through the cell break; - } + }; + }//end else break; } case 0 :/*Vertex_handle*/ @@ -774,9 +777,9 @@ private: case 0 ://vertex return !ch->has_vertex(get_vertex()); case 1 ://edge - return !ch->has_edge(get_edge()); + return !cell_has_edge(ch, get_edge()); case 2 ://facet - return !ch->has_facet(get_facet()); + return !cell_has_facet(ch, get_facet()); case 3 ://cell return ch != get_cell(); } @@ -785,6 +788,18 @@ private: return false; } + bool cell_has_edge(const Cell_handle ch, const Edge& e) const + { + Vertex_handle v1 = e.first->vertex(e.second); + Vertex_handle v2 = e.first->vertex(e.third); + return ch->has_vertex(v1) && ch->has_vertex(v2); + } + bool cell_has_facet(const Cell_handle c, const Facet& f) const + { + return f.first == c + || f.first->neighbor(f.second) == c; + } + bool facet_has_vertex(const Facet& f, const Vertex_handle v) const { Cell_handle c = f.first; @@ -797,6 +812,31 @@ private: return false; } + bool facet_has_edge(const Facet& f, const Edge& e) const + { + Vertex_handle v1 = e.first->vertex(e.second); + Vertex_handle v2 = e.first->vertex(e.third); + Cell_handle c = f.first; + const int fi = f.second; + + unsigned int count = 0; + for (int i = 1; i < 4; ++i) + { + Vertex_handle vi = c->vertex((fi + i) % 4); + if (vi == v1) ++count; + else if (vi == v2) ++count; + if (count == 2) + return true; + } + return false; + } + + bool edge_has_vertex(const Edge& e, const Vertex_handle v) const + { + return e.first->vertex(e.second) == v + || e.first->vertex(e.third) == v; + } + };//class Triangulation_segment_simplex_iterator_3 } // namespace CGAL From dfd1fd025d09d2cd04800b9c67d596946c809e55 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 28 Nov 2016 16:42:47 +0100 Subject: [PATCH 034/138] vertex case --- .../CGAL/Triangulation_segment_traverser_3.h | 73 ++++++++----------- 1 file changed, 29 insertions(+), 44 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 1d632e75d54..b054f12f80b 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -661,40 +661,41 @@ public: } case 0 :/*Vertex_handle*/ { - if (degeneracy()) - { - set_curr_simplex(); - break; - } Cell_handle ch = Cell_handle(_cell_iterator); if (cell_iterator_is_ahead()) { _curr_simplex = ch; - break; - } - - ++_cell_iterator; - Cell_handle chnext = Cell_handle(_cell_iterator); - //_cell_iterator is one step forward _curr_simplex - - Locate_type lt; - int li, lj; - _cell_iterator.entry(lt, li, lj); - - int index_v = ch->index(get_vertex()); - int index_vnext = ch->index(chnext->vertex(li)); - - if (lt == Locate_type::VERTEX) - { - _curr_simplex = Edge(ch, index_v, index_vnext); - } - else if (lt == Locate_type::EDGE) - { - int index_f = 6 - (index_v + index_vnext + ch->index(chnext->vertex(lj))); - _curr_simplex = Facet(ch, index_f); + std::cerr << "cell_iterator is ahead in vertex case (check to be done)" + << std::endl; } else - _curr_simplex = Cell_handle(_cell_iterator); + { + ++_cell_iterator; + Cell_handle chnext = Cell_handle(_cell_iterator); + //_cell_iterator is one step forward _curr_simplex + + Locate_type lt; + int li, lj; + _cell_iterator.entry(lt, li, lj); + + int index_v = ch->index(get_vertex()); + int index_vnext = ch->index(chnext->vertex(li)); + switch (lt) + { + case Locate_type::VERTEX: + _curr_simplex = Edge(ch, index_v, index_vnext); + break; + case Locate_type::EDGE: + { + int index_f = 6 - (index_v + index_vnext + ch->index(chnext->vertex(lj))); + _curr_simplex = Facet(ch, index_f); + break; + } + default ://FACET + CGAL_assertion(lt == Locate_type::FACET); + _curr_simplex = ch; + }; + } break; } default: @@ -753,22 +754,6 @@ public: } private: - /** returns true when _current_simplex does not have the same - * type as the "entry" of _cell_iterator - * it is for example the case after vertex - edge. - * the following value should be vertex, and the corresponding vertex - * is the entry of _cell_iterator - */ - bool degeneracy() const - { - Locate_type lt; - int li, lj; - _cell_iterator.entry(lt, li, lj); - return (is_vertex() && lt != Locate_type::VERTEX) - || (is_edge() && lt != Locate_type::EDGE) - || (is_facet() && lt != Locate_type::FACET); - } - bool cell_iterator_is_ahead() const { Cell_handle ch = Cell_handle(_cell_iterator); From 76f067aef31b32c4e77fbdd17d7c294a00ef51f9 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 28 Nov 2016 16:59:02 +0100 Subject: [PATCH 035/138] add collinearity tester --- .../CGAL/Triangulation_segment_traverser_3.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index b054f12f80b..67dbb19d9a7 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -753,6 +753,25 @@ public: return boost::get(_curr_simplex); } +public: + //returns true in any of the degenerate cases, + //i.e. when _curr_simplex has the following values successively + // edge / facet / edge + // edge / facet / vertex + // vertex / facet / edge + // vertex / edge / vertex + // TODO : rename this function + bool is_collinear() const + { + int curr_dim = _curr_simplex.which(); + //this concerns only edges and facets + if (curr_dim == 1 || curr_dim == 2) + return cell_iterator_is_ahead(); + //the degeneracy has been detected by moving cell_iterator forward + else + return false; + } + private: bool cell_iterator_is_ahead() const { From bb98fda6a5ef61c911e1b7b341b0418115aa73f3 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 28 Nov 2016 17:02:06 +0100 Subject: [PATCH 036/138] rename function and complete it for facet case --- .../CGAL/Triangulation_segment_traverser_3.h | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 67dbb19d9a7..1f4434c2a98 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -473,23 +473,23 @@ public: Triangulation_segment_simplex_iterator_3(const Tr& tr , Vertex_handle s, Vertex_handle t) : _cell_iterator(tr, s, t) - { set_curr_simplex(); } + { set_curr_simplex_to_entry(); } Triangulation_segment_simplex_iterator_3(const Tr& tr , Vertex_handle s, const Point& t) : _cell_iterator(tr, s, t) - { set_curr_simplex(); } + { set_curr_simplex_to_entry(); } Triangulation_segment_simplex_iterator_3(const Tr& tr , const Point& s, Vertex_handle t, Cell_handle hint = Cell_handle()) : _cell_iterator(tr, s, t, hint) - { set_curr_simplex(); } + { set_curr_simplex_to_entry(); } Triangulation_segment_simplex_iterator_3(const Tr& tr , const Point& s, const Point& t, Cell_handle hint = Cell_handle()) : _cell_iterator(tr, s, t, hint) - { set_curr_simplex(); } + { set_curr_simplex_to_entry(); } Triangulation_segment_simplex_iterator_3(const Tr& tr , const Segment& seg, Cell_handle hint = Cell_handle()) : _cell_iterator(tr, seg, hint) - { set_curr_simplex(); } + { set_curr_simplex_to_entry(); } bool operator==(const Simplex_iterator& sit) const { @@ -510,7 +510,7 @@ private: {} private: - void set_curr_simplex() + void set_curr_simplex_to_entry() { //check what is the entry type of _cell_iterator if (Cell_handle(_cell_iterator) == Cell_handle()) @@ -529,12 +529,12 @@ private: case Locate_type::VERTEX: _curr_simplex = cell->vertex(li); break; - case Locate_type::EDGE: _curr_simplex = Edge(cell, li, lj); break; - case Locate_type::FACET: //basic case where segment enters a cell - //by crossing a facet + case Locate_type::FACET: + _curr_simplex = Facet(cell, li); + break; //the 3 cases below correspond to the case when _cell_iterator //is in its initial position: _cur is locate(source) case Locate_type::CELL: @@ -564,7 +564,7 @@ public: case 3 :/*Cell_handle*/ { ++_cell_iterator; - set_curr_simplex(); + set_curr_simplex_to_entry(); break; } case 2 :/*Facet*/ @@ -587,14 +587,14 @@ public: case Locate_type::VERTEX: //if the entry vertex is a vertex of current facet if (facet_has_vertex(get_facet(), chnext->vertex(linext))) - set_curr_simplex(); + set_curr_simplex_to_entry(); else _curr_simplex = chnext; break; case Locate_type::EDGE: if (facet_has_edge(get_facet(), Edge(chnext, linext, ljnext))) - set_curr_simplex(); + set_curr_simplex_to_entry(); else _curr_simplex = chnext; break; From b192b27ec1ab4938aabceb0f52eb631bb51f4706 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 28 Nov 2016 17:24:13 +0100 Subject: [PATCH 037/138] add source() and target() functions --- .../include/CGAL/Triangulation_segment_traverser_3.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 1f4434c2a98..6fa59f8c1f8 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -441,7 +441,7 @@ class Triangulation_segment_simplex_iterator_3 private: typedef Triangulation_segment_simplex_iterator_3 Simplex_iterator; - typedef Triangulation_segment_cell_iterator_3 SCI; + typedef Triangulation_segment_cell_iterator_3 SCI; private: typedef typename SCI::Point Point; @@ -502,6 +502,9 @@ public: || sit._curr_simplex != _curr_simplex; } + const Point& source() const { return _cell_iterator.source(); } + const Point& target() const { return _cell_iterator.target(); } + private: Triangulation_segment_simplex_iterator_3 (const SCI& sci) From 581faa006ca9087cd7ac0b04cfddc55c294e616b Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 28 Nov 2016 17:26:25 +0100 Subject: [PATCH 038/138] add an example and remove simplex_traverser code from the example for cell_traverser --- .../examples/Triangulation_3/CMakeLists.txt | 1 + .../segment_simplex_traverser_3.cpp | 118 ++++++++++++++++++ .../Triangulation_3/segment_traverser_3.cpp | 8 -- 3 files changed, 119 insertions(+), 8 deletions(-) create mode 100644 Triangulation_3/examples/Triangulation_3/segment_simplex_traverser_3.cpp diff --git a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt index db5b21b3e23..dabce8b01e0 100644 --- a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt @@ -37,6 +37,7 @@ if ( CGAL_FOUND ) create_single_source_cgal_program( "parallel_insertion_in_delaunay_3.cpp" ) create_single_source_cgal_program( "regular_3.cpp" ) create_single_source_cgal_program( "segment_traverser_3.cpp" ) + create_single_source_cgal_program( "segment_simplex_traverser_3.cpp" ) create_single_source_cgal_program( "sequential_parallel.cpp" ) create_single_source_cgal_program( "simple_triangulation_3.cpp" ) create_single_source_cgal_program( "simplex.cpp" ) diff --git a/Triangulation_3/examples/Triangulation_3/segment_simplex_traverser_3.cpp b/Triangulation_3/examples/Triangulation_3/segment_simplex_traverser_3.cpp new file mode 100644 index 00000000000..9d7b53bb359 --- /dev/null +++ b/Triangulation_3/examples/Triangulation_3/segment_simplex_traverser_3.cpp @@ -0,0 +1,118 @@ +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +// Define the kernel. +typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; +typedef Kernel::Point_3 Point_3; + +// Define the structure. +typedef CGAL::Delaunay_triangulation_3< Kernel > DT; + +typedef DT::Cell_handle Cell_handle; + +typedef CGAL::Triangulation_segment_simplex_iterator_3
Simplex_traverser; + +int main(int argc, char* argv[]) +{ + const char* fname = (argc>1) ? argv[1] : "data/blobby.xyz"; + int nb_seg = (argc > 2) ? atoi(argv[2]) : 100; + + // Reads a .xyz point set file in points. + // As the point is the second element of the tuple (that is with index 1) + // we use a property map that accesses the 1st element of the tuple. + + std::vector points; + std::ifstream stream(fname); + if (!stream || + !CGAL::read_xyz_points(stream, std::back_inserter(points))) + { + std::cerr << "Error: cannot read file " << fname << std::endl; + return EXIT_FAILURE; + } + + //bbox + //min (-0.481293,-0.220929,-0.194076), max (0.311532,0.225525,0.198025) + + // Construct the Delaunay triangulation. + DT dt( points.begin(), points.end() ); + assert( dt.is_valid() ); + + CGAL::default_random = CGAL::Random(0); + CGAL::Random rng(0); + + for (int i = 0; i < nb_seg; ++i) + { + // Construct a traverser. + Point_3 p1(rng.get_double(-0.48, 0.31), + rng.get_double(-0.22, 0.22), + rng.get_double(-0.19, 0.19)); + Point_3 p2(rng.get_double(-0.48, 0.31), + rng.get_double(-0.22, 0.22), + rng.get_double(-0.19, 0.19)); + + std::cout << "Traverser " << (i + 1) + << "\n\t(" << p1 + << ")\n\t(" << p2 << ")" << std::endl; + Simplex_traverser st(dt, p1, p2); + + // Count the number of finite cells traversed. + unsigned int inf = 0, fin = 0; + unsigned int nb_facets = 0, nb_edges = 0, nb_vertex = 0; + unsigned int nb_collinear = 0; + for (; st != st.end(); ++st) + { + if( dt.is_infinite(st) ) + ++inf; + else + { + ++fin; + if (st.is_facet()) ++nb_facets; + else if (st.is_edge()) ++nb_edges; + else if (st.is_vertex()) ++nb_vertex; + + if (st.is_facet()) + std::cout << "facet " << std::endl; + else if (st.is_edge()) + std::cout << "edge " << std::endl; + else if (st.is_vertex()) + std::cout << "vertex " << std::endl; + else + { + CGAL_assertion(st.is_cell()); + std::cout << "cell " << std::endl; + } + + if (st.is_collinear()) ++nb_collinear; + } + } + + std::cout << "While traversing from " << st.source() + << " to " << st.target() << std::endl; + std::cout << "\tinfinite cells : " << inf << std::endl; + std::cout << "\tfinite cells : " << fin << std::endl; + std::cout << "\tfacets : " << nb_facets << std::endl; + std::cout << "\tedges : " << nb_edges << std::endl; + std::cout << "\tvertices : " << nb_vertex << std::endl; + std::cout << std::endl << std::endl; + } + + // TODO : add cases with degeneracies, with query : + // - along an edge + // - along a facet via edge/facet/edge + // - along a facet via edge/facet/vertex + // - along a facet via vertex/facet/edge + // - along 2 successive facets (vertex/facet/edge/facet/edge) + // - along 2 successive edges (vertex/edge/vertex/edge/vertex) + // - along a facet and an edge successively + + return 0; +} \ No newline at end of file diff --git a/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp b/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp index 88baf1c2234..753f3468bff 100644 --- a/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp +++ b/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp @@ -22,7 +22,6 @@ typedef CGAL::Delaunay_triangulation_3< Kernel > DT; typedef DT::Cell_handle Cell_handle; typedef CGAL::Triangulation_segment_cell_iterator_3< DT > Cell_traverser; -typedef CGAL::Triangulation_segment_simplex_iterator_3
Simplex_traverser; int main(int argc, char* argv[]) { @@ -101,13 +100,6 @@ int main(int argc, char* argv[]) } } - Simplex_traverser st(dt, p1, p2); - for (; st != st.end(); ++st) - { - if (st.is_vertex()) - std::cout << "vertex " << st.get_vertex()->point() << std::endl; - } - std::cout << "While traversing from " << ct.source() << " to " << ct.target() << std::endl; std::cout << inf << " infinite and " From f3777a397cad7545b9b70fe2fc84d17e58ad888d Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 29 Nov 2016 17:52:10 +0100 Subject: [PATCH 039/138] add test for simplex iterator --- .../test_simplex_iterator_3.cpp | 183 ++++++++++++++++++ 1 file changed, 183 insertions(+) create mode 100644 Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp diff --git a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp new file mode 100644 index 00000000000..4eacd0e7870 --- /dev/null +++ b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp @@ -0,0 +1,183 @@ +// Copyright (c) 1998 INRIA Sophia-Antipolis (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// You can redistribute it and/or modify it under the terms of the GNU +// General Public License as published by the Free Software Foundation, +// either version 3 of the License, or (at your option) any later version. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL$ +// $Id$ +// +// +// Author(s) : Jane Tournois + + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +// Define the kernel. +typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel; +typedef Kernel::Point_3 Point_3; +typedef Kernel::Vector_3 Vector_3; + +// Define the structure. +typedef CGAL::Delaunay_triangulation_3< Kernel > DT; + +typedef DT::Vertex_handle Vertex_handle; +typedef DT::Cell_handle Cell_handle; +typedef DT::Edge Edge; + +typedef CGAL::Triangulation_segment_simplex_iterator_3
Simplex_traverser; + + +void test_vertex_edge_vertex(const DT& dt, const std::size_t& nb_tests = 2) +{ + std::vector edges; + for (DT::Finite_edges_iterator eit = dt.finite_edges_begin(); + eit != dt.finite_edges_end() && edges.size() < nb_tests; + ++eit) + { + edges.push_back(*eit); + } + + for (std::size_t i = 0; i < nb_tests; ++i) + { + Vertex_handle v1 = edges[i].first->vertex(edges[i].second); + Vertex_handle v2 = edges[i].first->vertex(edges[i].third); + Vector_3 v(v1->point(), v2->point()); + + std::cout << "TEST " << i << " (" << v1->point() + << " ** " << v2->point() <<")" + << std::endl; + std::cout << "\t("; + Simplex_traverser st(dt, v1->point() - 2.*v, v2->point() + 3.*v); + for (; st != st.end(); ++st) + { + std::cout << st.simplex_dimension(); + if(dt.is_infinite(st)) + std::cout << "i"; + std::cout << " "; + + if (st.is_vertex()) + { + assert(st.get_vertex() == v1); + ++st; + assert(st.is_edge()); + Edge e = st.get_edge(); + Vertex_handle ve1 = e.first->vertex(e.second); + Vertex_handle ve2 = e.first->vertex(e.third); + assert((ve1 == v1 && ve2 == v2) + || (ve1 == v2 && ve2 == v1)); + ++st; + assert(st.is_vertex()); + assert(st.get_vertex() == v2); + break; //test OK + } + } + std::cout << ")" << std::endl; + } + +} + +int main(int argc, char* argv[]) +{ + const char* fname = (argc>1) ? argv[1] : "data/blobby.xyz"; + int nb_seg = (argc > 2) ? atoi(argv[2]) : 3; + + // Reads a .xyz point set file in points. + // As the point is the second element of the tuple (that is with index 1) + // we use a property map that accesses the 1st element of the tuple. + + std::vector points; + std::ifstream stream(fname); + if (!stream || + !CGAL::read_xyz_points(stream, std::back_inserter(points))) + { + std::cerr << "Error: cannot read file " << fname << std::endl; + return EXIT_FAILURE; + } + + //bbox + //min (-0.481293,-0.220929,-0.194076), max (0.311532,0.225525,0.198025) + + // Construct the Delaunay triangulation. + DT dt(points.begin(), points.end()); + assert(dt.is_valid()); + + //CGAL::default_random = CGAL::Random(0); + //CGAL::Random rng(0); + + //for (int i = 0; i < nb_seg; ++i) + //{ + // // Construct a traverser. + // Point_3 p1(rng.get_double(-0.48, 0.31), + // rng.get_double(-0.22, 0.22), + // rng.get_double(-0.19, 0.19)); + // Point_3 p2(rng.get_double(-0.48, 0.31), + // rng.get_double(-0.22, 0.22), + // rng.get_double(-0.19, 0.19)); + + // std::cout << "Traverser " << (i + 1) + // << "\n\t(" << p1 + // << ")\n\t(" << p2 << ")" << std::endl; + // Simplex_traverser st(dt, p1, p2); + + // // Count the number of finite cells traversed. + // unsigned int inf = 0, fin = 0; + // unsigned int nb_facets = 0, nb_edges = 0, nb_vertex = 0; + // unsigned int nb_collinear = 0; + // for (; st != st.end(); ++st) + // { + // if (dt.is_infinite(st)) + // ++inf; + // else + // { + // ++fin; + // if (st.is_facet()) ++nb_facets; + // else if (st.is_edge()) ++nb_edges; + // else if (st.is_vertex()) ++nb_vertex; + + // if (st.is_collinear()) ++nb_collinear; + // } + // } + + // std::cout << "While traversing from " << st.source() + // << " to " << st.target() << std::endl; + // std::cout << "\tinfinite cells : " << inf << std::endl; + // std::cout << "\tfinite cells : " << fin << std::endl; + // std::cout << "\tfacets : " << nb_facets << std::endl; + // std::cout << "\tedges : " << nb_edges << std::endl; + // std::cout << "\tvertices : " << nb_vertex << std::endl; + // std::cout << std::endl << std::endl; + //} + + //check degenerate cases + // - along an edge + test_vertex_edge_vertex(dt); + + // - along a facet via edge/facet/edge + // - along a facet via edge/facet/vertex + // - along a facet via vertex/facet/edge + // - along 2 successive facets (vertex/facet/edge/facet/edge) + // - along 2 successive edges (vertex/edge/vertex/edge/vertex) + // - along a facet and an edge successively + + return 0; +} \ No newline at end of file From 9e0f52546ea44b2c77d03ae079fbcab1e692cbcd Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 29 Nov 2016 17:54:35 +0100 Subject: [PATCH 040/138] cell_iterator may circulate around the edge we want before actually moving to the next cell crossed by the query segment --- .../CGAL/Triangulation_segment_traverser_3.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 6fa59f8c1f8..45e05fda551 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -676,6 +676,7 @@ public: ++_cell_iterator; Cell_handle chnext = Cell_handle(_cell_iterator); //_cell_iterator is one step forward _curr_simplex + CGAL_assertion(ch != chnext); Locate_type lt; int li, lj; @@ -686,6 +687,18 @@ public: switch (lt) { case Locate_type::VERTEX: + while (index_v == index_vnext)//another cell with same vertex has been found + { + ch = chnext; + index_v = ch->index(get_vertex()); + + ++_cell_iterator; + chnext = Cell_handle(_cell_iterator); + CGAL_assertion(ch != chnext); + _cell_iterator.entry(lt, li, lj); + CGAL_assertion(lt == Locate_type::VERTEX); + index_vnext = ch->index(chnext->vertex(li)); + } _curr_simplex = Edge(ch, index_v, index_vnext); break; case Locate_type::EDGE: @@ -775,6 +788,11 @@ public: return false; } + int simplex_dimension() const + { + return _curr_simplex.which(); + } + private: bool cell_iterator_is_ahead() const { From 76f729ad169b778abb7fd643818745a1b0beda4b Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 2 Dec 2016 10:49:07 +0100 Subject: [PATCH 041/138] fix the degenerate case where query is collinear with facet when the query segment goes exactly through a facet, the succession of simplices should be : edge - facet - edge however, cell_iterator iterate over both of the cells incident to the facet in question so, we skip the 2nd one --- .../CGAL/Triangulation_segment_traverser_3.h | 157 +++++++++++++----- 1 file changed, 114 insertions(+), 43 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 45e05fda551..388e7872334 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -222,6 +222,9 @@ private: public: // \name Accessors // \{ + + const Tr& triangulation() const { return _tr; } + // gives the source point of the segment followed. /* \return the source point. */ @@ -614,52 +617,50 @@ public: } case 1:/*Edge*/ { - if (!cell_iterator_is_ahead()) - { - //we cannot be in any of the degenerate cases, only detected by - //taking cell_iterator one step forward - _curr_simplex = Cell_handle(_cell_iterator); - } - else - { - Cell_handle chnext = Cell_handle(_cell_iterator); - Locate_type ltnext; - int linext, ljnext; - _cell_iterator.entry(ltnext, linext, ljnext); - switch (ltnext)//entry simplex in next cell - { - case Locate_type::VERTEX: - if (edge_has_vertex(get_edge(), chnext->vertex(linext))) - _curr_simplex = chnext->vertex(linext); - else - _curr_simplex = get_edge(); - break; + Cell_handle ch = Cell_handle(_cell_iterator); + Locate_type lt; + int li, lj; + _cell_iterator.entry(lt, li, lj); - case Locate_type::EDGE: + if (!cell_iterator_is_ahead()) + ++_cell_iterator;//cell_iterator needs to be ahead to detect degeneracies + + Cell_handle chnext = Cell_handle(_cell_iterator); + Locate_type ltnext; + int linext, ljnext; + _cell_iterator.entry(ltnext, linext, ljnext); + switch (ltnext)//entry simplex in next cell + { + case Locate_type::VERTEX: + if (edge_has_vertex(get_edge(), chnext->vertex(linext))) + _curr_simplex = chnext->vertex(linext); + else + _curr_simplex = ch; + break; + + case Locate_type::EDGE: + { + while (ltnext == Locate_type::EDGE + && is_same(get_edge(), Edge(chnext, linext, ljnext))) { - //find the Facet between current and next edges - Cell_handle ch = Cell_handle(_cell_iterator); - Locate_type lt; - int li, lj; - _cell_iterator.entry(lt, li, lj); - int index_v3 = -1;//todo : check this is correct - int tmp = ch->index(chnext->vertex(li)); - if (tmp != li && tmp != lj) - index_v3 = tmp; - else - { - tmp = ch->index(chnext->vertex(lj)); - index_v3 = tmp; - } - CGAL_assertion(index_v3 != -1); - _curr_simplex = Facet(ch, (6 - li - lj - index_v3)); - break; + ++_cell_iterator; + chnext = Cell_handle(_cell_iterator); + _cell_iterator.entry(ltnext, linext, ljnext); } - case Locate_type::FACET: - _curr_simplex = Cell_handle(_cell_iterator);//query goes through the cell - break; - }; - }//end else + if (ltnext == Locate_type::EDGE) + _curr_simplex = shared_facet(get_edge(), Edge(chnext, linext, ljnext)); + else if (ltnext == Locate_type::FACET) + _curr_simplex = chnext->neighbor(linext);//chnext will be met after the facet + else if (ltnext == Locate_type::VERTEX) + _curr_simplex = shared_cell(get_edge(), chnext->vertex(linext)); + else //CELL + CGAL_assertion(false); + break; + } + case Locate_type::FACET: + _curr_simplex = Cell_handle(_cell_iterator);//query goes through the cell + break; + }; break; } case 0 :/*Vertex_handle*/ @@ -862,6 +863,76 @@ private: || e.first->vertex(e.third) == v; } + bool is_same(const Edge& e1, const Edge& e2) const + { + Vertex_handle v1a = e1.first->vertex(e1.second); + Vertex_handle v1b = e1.first->vertex(e1.third); + Vertex_handle v2a = e2.first->vertex(e2.second); + Vertex_handle v2b = e2.first->vertex(e2.third); + return (v1a == v2a && v1b == v2b) + || (v1a == v2b && v1b == v2a); + } + + Vertex_handle shared_vertex(const Edge& e1, const Edge& e2) const + { + Vertex_handle v1a = e1.first->vertex(e1.second); + Vertex_handle v1b = e1.first->vertex(e1.third); + Vertex_handle v2a = e2.first->vertex(e2.second); + Vertex_handle v2b = e2.first->vertex(e2.third); + + if (v1a == v2a || v1a == v2b) + return v1a; + else if (v1b == v2a || v1b == v2b) + return v1b; + + std::cerr << "There is no vertex shared by e1 and e2" << std::endl; + CGAL_assertion(false); + return Vertex_handle(); + } + + Facet shared_facet(const Edge& e1, const Edge& e2) const + { + Vertex_handle v2a = e2.first->vertex(e2.second); + Vertex_handle v2b = e2.first->vertex(e2.third); + + Vertex_handle sv = shared_vertex(e1, e2); + Vertex_handle nsv2 = (sv == v2a) ? v2b : v2a; + + typename Tr::Facet_circulator circ + = _cell_iterator.triangulation().incident_facets(e1); + typename Tr::Facet_circulator end = circ; + do + { + Facet f = *circ; + for (int i = 0; i < 4; ++i) + { + if (nsv2 == f.first->vertex((f.second + i) % 4)) + return f; + } + } while (++circ != end); + + std::cerr << "There is no facet shared by e1 and e2" << std::endl; + CGAL_assertion(false); + return Facet(Cell_handle(), 0); + } + + Cell_handle shared_cell(const Edge& e, const Vertex_handle v) const + { + typename Tr::Cell_circulator circ + = _cell_iterator.triangulation().incident_cells(e); + typename Tr::Cell_circulator end = circ; + do + { + Cell_handle c = circ; + if (c->has_vertex(v)) + return c; + } while (++circ != end); + + std::cerr << "There is no cell shared by e and v" << std::endl; + CGAL_assertion(false); + return Cell_handle(); + } + };//class Triangulation_segment_simplex_iterator_3 } // namespace CGAL From f7e0c9121b1f06b20ca3f47e04c01ef688cf132f Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 2 Dec 2016 10:51:57 +0100 Subject: [PATCH 042/138] add the edge - facet - edge test case --- .../test_simplex_iterator_3.cpp | 60 ++++++++++++++++++- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp index 4eacd0e7870..73ec800bd88 100644 --- a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp @@ -43,11 +43,12 @@ typedef CGAL::Delaunay_triangulation_3< Kernel > DT; typedef DT::Vertex_handle Vertex_handle; typedef DT::Cell_handle Cell_handle; typedef DT::Edge Edge; +typedef DT::Facet Facet; typedef CGAL::Triangulation_segment_simplex_iterator_3
Simplex_traverser; -void test_vertex_edge_vertex(const DT& dt, const std::size_t& nb_tests = 2) +void test_vertex_edge_vertex(const DT& dt, const std::size_t& nb_tests) { std::vector edges; for (DT::Finite_edges_iterator eit = dt.finite_edges_begin(); @@ -93,7 +94,61 @@ void test_vertex_edge_vertex(const DT& dt, const std::size_t& nb_tests = 2) } std::cout << ")" << std::endl; } +} +void test_edge_facet_edge(const DT& dt, const std::size_t& nb_tests) +{ + std::vector facets; + for (DT::Finite_facets_iterator fit = dt.finite_facets_begin(); + fit != dt.finite_facets_end() && facets.size() < nb_tests; + ++fit) + { + facets.push_back(*fit); + } + for (std::size_t i = 0; i < nb_tests; ++i) + { + const int fi = facets[i].second; + Vertex_handle v1 = facets[i].first->vertex((fi + 1) % 4); + Vertex_handle v2 = facets[i].first->vertex((fi + 2) % 4); + Vertex_handle v3 = facets[i].first->vertex((fi + 3) % 4); + + Point_3 p1 = CGAL::midpoint(v1->point(), v2->point()); + Point_3 p2 = CGAL::midpoint(v2->point(), v3->point()); + Vector_3 v(p1, p2); + + std::cout << "TEST " << i << " (" << p1 << " ** " << p2 << ")" + << std::endl; + std::cout << "\t("; + Simplex_traverser st(dt, p1 - 2.*v, p2 + 3.*v); + for (; st != st.end(); ++st) + { + std::cout << st.simplex_dimension(); + if (dt.is_infinite(st)) + std::cout << "i"; + std::cout << " "; + + if (st.is_edge()) + { + Edge e = st.get_edge(); + Vertex_handle va = e.first->vertex(e.second); + Vertex_handle vb = e.first->vertex(e.third); + if ((va == v1 && vb == v2) + || (va == v2 && vb == v1)) + { + ++st; + int dim = st.simplex_dimension(); + assert(st.is_facet()); + ++st; + assert(st.is_edge()); + Edge e2 = st.get_edge(); + Vertex_handle va2 = e2.first->vertex(e2.second); + Vertex_handle vb2 = e2.first->vertex(e2.third); + assert(va == va2 || va == vb2 || vb == va2 || vb == vb2); + } + } + } + std::cout << ")" << std::endl; + } } int main(int argc, char* argv[]) @@ -170,9 +225,10 @@ int main(int argc, char* argv[]) //check degenerate cases // - along an edge - test_vertex_edge_vertex(dt); + test_vertex_edge_vertex(dt, 2); // - along a facet via edge/facet/edge + test_edge_facet_edge(dt, 3); // - along a facet via edge/facet/vertex // - along a facet via vertex/facet/edge // - along 2 successive facets (vertex/facet/edge/facet/edge) From c7fcdc1d0809b69ebdbfa354d4e8b70766f9bcc9 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 2 Dec 2016 11:43:13 +0100 Subject: [PATCH 043/138] fix the edge - facet - vertex case --- .../CGAL/Triangulation_segment_traverser_3.h | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 388e7872334..99048d96cb2 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -652,7 +652,12 @@ public: else if (ltnext == Locate_type::FACET) _curr_simplex = chnext->neighbor(linext);//chnext will be met after the facet else if (ltnext == Locate_type::VERTEX) - _curr_simplex = shared_cell(get_edge(), chnext->vertex(linext)); + { + if (edge_has_vertex(get_edge(), chnext->vertex(linext))) + _curr_simplex = chnext->vertex(linext); + else + _curr_simplex = shared_facet(get_edge(), chnext->vertex(linext)); + } else //CELL CGAL_assertion(false); break; @@ -916,6 +921,23 @@ private: return Facet(Cell_handle(), 0); } + Facet shared_facet(const Edge& e, const Vertex_handle v) const + { + typename Tr::Facet_circulator circ + = _cell_iterator.triangulation().incident_facets(e); + typename Tr::Facet_circulator end = circ; + do + { + Facet f = *circ; + if (facet_has_vertex(f, v)) + return f; + } while (++circ != end); + + std::cerr << "There is no facet shared by e and v" << std::endl; + CGAL_assertion(false); + return Facet(Cell_handle(), 0); + } + Cell_handle shared_cell(const Edge& e, const Vertex_handle v) const { typename Tr::Cell_circulator circ From 12e8cd91f3b60dca3222b470102f703b73b5e29b Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 2 Dec 2016 15:00:09 +0100 Subject: [PATCH 044/138] fix the edge - face - vertex degenerate case and deal with the case where end() is reached while looking for next simplex --- .../CGAL/Triangulation_segment_traverser_3.h | 49 +++++++++++++------ 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 99048d96cb2..8465d20514c 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -647,7 +647,9 @@ public: chnext = Cell_handle(_cell_iterator); _cell_iterator.entry(ltnext, linext, ljnext); } - if (ltnext == Locate_type::EDGE) + if (_cell_iterator == _cell_iterator.end()) + _curr_simplex = Cell_handle(_cell_iterator); + else if (ltnext == Locate_type::EDGE) _curr_simplex = shared_facet(get_edge(), Edge(chnext, linext, ljnext)); else if (ltnext == Locate_type::FACET) _curr_simplex = chnext->neighbor(linext);//chnext will be met after the facet @@ -684,37 +686,52 @@ public: //_cell_iterator is one step forward _curr_simplex CGAL_assertion(ch != chnext); - Locate_type lt; - int li, lj; - _cell_iterator.entry(lt, li, lj); + Locate_type ltnext; + int linext, ljnext; + _cell_iterator.entry(ltnext, linext, ljnext); - int index_v = ch->index(get_vertex()); - int index_vnext = ch->index(chnext->vertex(li)); - switch (lt) + switch (ltnext) { case Locate_type::VERTEX: - while (index_v == index_vnext)//another cell with same vertex has been found + { + while (ltnext == Locate_type::VERTEX + && _cell_iterator != _cell_iterator.end() + && get_vertex() == chnext->vertex(linext))//another cell with same vertex has been found { ch = chnext; - index_v = ch->index(get_vertex()); ++_cell_iterator; chnext = Cell_handle(_cell_iterator); - CGAL_assertion(ch != chnext); - _cell_iterator.entry(lt, li, lj); - CGAL_assertion(lt == Locate_type::VERTEX); - index_vnext = ch->index(chnext->vertex(li)); + _cell_iterator.entry(ltnext, linext, ljnext); + } + if (_cell_iterator == _cell_iterator.end()) + { + _curr_simplex = Cell_handle(_cell_iterator); + } + else + { + if (ltnext == Locate_type::VERTEX) + _curr_simplex = Edge(ch, ch->index(get_vertex()), ch->index(chnext->vertex(linext))); + else if (ltnext == Locate_type::EDGE) + _curr_simplex = shared_facet(Edge(chnext, linext, ljnext), get_vertex()); + else if (ltnext == Locate_type::FACET) + { + CGAL_assertion(!facet_has_vertex(Facet(chnext, linext), get_vertex())); + _curr_simplex = ch; + } } - _curr_simplex = Edge(ch, index_v, index_vnext); break; + } case Locate_type::EDGE: { - int index_f = 6 - (index_v + index_vnext + ch->index(chnext->vertex(lj))); + int index_v = ch->index(get_vertex()); + int index_vnext = ch->index(chnext->vertex(linext)); + int index_f = 6 - (index_v + index_vnext + ch->index(chnext->vertex(ljnext))); _curr_simplex = Facet(ch, index_f); break; } default ://FACET - CGAL_assertion(lt == Locate_type::FACET); + CGAL_assertion(ltnext == Locate_type::FACET); _curr_simplex = ch; }; } From 8ea167cd5e743f18f75b3ed7eb4063835dc23087 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 2 Dec 2016 15:00:57 +0100 Subject: [PATCH 045/138] add edge - face - vertex test case --- .../test_simplex_iterator_3.cpp | 77 ++++++++++++++++++- 1 file changed, 73 insertions(+), 4 deletions(-) diff --git a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp index 73ec800bd88..16e74d3b42b 100644 --- a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp @@ -50,6 +50,7 @@ typedef CGAL::Triangulation_segment_simplex_iterator_3
Simplex_traverse void test_vertex_edge_vertex(const DT& dt, const std::size_t& nb_tests) { + std::cout << "* test_vertex_edge_vertex *" << std::endl; std::vector edges; for (DT::Finite_edges_iterator eit = dt.finite_edges_begin(); eit != dt.finite_edges_end() && edges.size() < nb_tests; @@ -76,20 +77,21 @@ void test_vertex_edge_vertex(const DT& dt, const std::size_t& nb_tests) std::cout << "i"; std::cout << " "; - if (st.is_vertex()) + if (st.is_vertex() && st.get_vertex() == v1) { - assert(st.get_vertex() == v1); ++st; + std::cout << st.simplex_dimension() << " "; assert(st.is_edge()); Edge e = st.get_edge(); Vertex_handle ve1 = e.first->vertex(e.second); Vertex_handle ve2 = e.first->vertex(e.third); assert((ve1 == v1 && ve2 == v2) || (ve1 == v2 && ve2 == v1)); + ++st; + std::cout << st.simplex_dimension() << " "; assert(st.is_vertex()); assert(st.get_vertex() == v2); - break; //test OK } } std::cout << ")" << std::endl; @@ -98,6 +100,7 @@ void test_vertex_edge_vertex(const DT& dt, const std::size_t& nb_tests) void test_edge_facet_edge(const DT& dt, const std::size_t& nb_tests) { + std::cout << "* test_edge_facet_edge *" << std::endl; std::vector facets; for (DT::Finite_facets_iterator fit = dt.finite_facets_begin(); fit != dt.finite_facets_end() && facets.size() < nb_tests; @@ -136,9 +139,11 @@ void test_edge_facet_edge(const DT& dt, const std::size_t& nb_tests) || (va == v2 && vb == v1)) { ++st; - int dim = st.simplex_dimension(); + std::cout << st.simplex_dimension() << " "; assert(st.is_facet()); + ++st; + std::cout << st.simplex_dimension() << " "; assert(st.is_edge()); Edge e2 = st.get_edge(); Vertex_handle va2 = e2.first->vertex(e2.second); @@ -151,6 +156,67 @@ void test_edge_facet_edge(const DT& dt, const std::size_t& nb_tests) } } +void test_edge_facet_vertex(const DT& dt, const std::size_t& nb_tests) +{ + std::cout << "* test_edge_facet_vertex *" << std::endl; + std::vector facets; + for (DT::Finite_facets_iterator fit = dt.finite_facets_begin(); + fit != dt.finite_facets_end() && facets.size() < nb_tests; + ++fit) + { + facets.push_back(*fit); + } + for (std::size_t i = 0; i < nb_tests; ++i) + { + const int fi = facets[i].second; + Vertex_handle v1 = facets[i].first->vertex((fi + 1) % 4); + Vertex_handle v2 = facets[i].first->vertex((fi + 2) % 4); + Vertex_handle v3 = facets[i].first->vertex((fi + 3) % 4); + + Point_3 p1 = CGAL::midpoint(v1->point(), v2->point()); + Point_3 p2 = v3->point(); + Vector_3 v(p1, p2); + + std::cout << "TEST " << i << " (" << p1 << " ** " << p2 << ")" + << std::endl; + std::cout << "\t("; + Simplex_traverser st(dt, p1 - 2.*v, p2 + 3.*v); + Simplex_traverser end = st.end(); + for (; st != end; ++st) + { + std::cout << st.simplex_dimension(); + if (dt.is_infinite(st)) + std::cout << "i"; + std::cout << " "; + + if (st.is_edge()) + { + Edge e = st.get_edge(); + Vertex_handle va = e.first->vertex(e.second); + Vertex_handle vb = e.first->vertex(e.third); + if ((va == v1 && vb == v2) || (va == v2 && vb == v1)) + { + ++st; + std::cout << st.simplex_dimension() << " "; + assert(st.is_facet()); + + ++st; + std::cout << st.simplex_dimension() << " "; + assert(st.is_vertex()); + assert(st.get_vertex() == v3); + } + ++st; + std::cout << st.simplex_dimension() << " "; + if (st == st.end()) + break; + else if (dt.is_infinite(st)) std::cout << "i "; + assert(st.is_cell()); + } + } + std::cout << ")" << std::endl; + } +} + int main(int argc, char* argv[]) { const char* fname = (argc>1) ? argv[1] : "data/blobby.xyz"; @@ -229,7 +295,10 @@ int main(int argc, char* argv[]) // - along a facet via edge/facet/edge test_edge_facet_edge(dt, 3); + // - along a facet via edge/facet/vertex + test_edge_facet_vertex(dt, 3); + // - along a facet via vertex/facet/edge // - along 2 successive facets (vertex/facet/edge/facet/edge) // - along 2 successive edges (vertex/edge/vertex/edge/vertex) From 010cfbeda2f70e831e38234e329842fad7ac8af1 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 2 Dec 2016 15:14:18 +0100 Subject: [PATCH 046/138] add vertex - facet - edge test --- .../test_simplex_iterator_3.cpp | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp index 16e74d3b42b..8c62e49d3ef 100644 --- a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp @@ -217,6 +217,59 @@ void test_edge_facet_vertex(const DT& dt, const std::size_t& nb_tests) } } +void test_vertex_facet_edge(const DT& dt, const std::size_t& nb_tests) +{ + std::cout << "* test_vertex_facet_edge *" << std::endl; + std::vector facets; + DT::Finite_facets_iterator fit = dt.finite_facets_begin(); + ++fit; ++fit; ++fit; //just avoid using the same faces as for test_edge_facet_vertex + for (; fit != dt.finite_facets_end() && facets.size() < nb_tests; + ++fit) + { + facets.push_back(*fit); + } + for (std::size_t i = 0; i < nb_tests; ++i) + { + const int fi = facets[i].second; + Vertex_handle v1 = facets[i].first->vertex((fi + 1) % 4); + Vertex_handle v2 = facets[i].first->vertex((fi + 2) % 4); + Vertex_handle v3 = facets[i].first->vertex((fi + 3) % 4); + + Point_3 p1 = v1->point(); + Point_3 p2 = CGAL::midpoint(v2->point(), v3->point()); + Vector_3 v(p1, p2); + + std::cout << "TEST " << i << " (" << p1 << " ** " << p2 << ")" + << std::endl; + std::cout << "\t("; + Simplex_traverser st(dt, p1 - 2.*v, p2 + 3.*v); + Simplex_traverser end = st.end(); + for (; st != end; ++st) + { + std::cout << st.simplex_dimension(); + if (dt.is_infinite(st)) + std::cout << "i"; + std::cout << " "; + + if (st.is_vertex() && st.get_vertex() == v1) + { + ++st; + assert(st.is_facet()); + assert(st.get_facet() == facets[i] + || st.get_facet() == dt.mirror_facet(facets[i])); + ++st; + assert(st.is_edge()); + Edge e = st.get_edge(); + Vertex_handle va = e.first->vertex(e.second); + Vertex_handle vb = e.first->vertex(e.third); + assert((va == v2 && vb == v3) || (va == v3 && vb == v2)); + } + } + std::cout << ")" << std::endl; + } +} + + int main(int argc, char* argv[]) { const char* fname = (argc>1) ? argv[1] : "data/blobby.xyz"; @@ -300,6 +353,8 @@ int main(int argc, char* argv[]) test_edge_facet_vertex(dt, 3); // - along a facet via vertex/facet/edge + test_vertex_facet_edge(dt, 3); + // - along 2 successive facets (vertex/facet/edge/facet/edge) // - along 2 successive edges (vertex/edge/vertex/edge/vertex) // - along a facet and an edge successively From 868f188c955549604cbb03f7e085ebdb746caca5 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 2 Dec 2016 15:26:10 +0100 Subject: [PATCH 047/138] uncomment the non degenerate case --- .../test_simplex_iterator_3.cpp | 82 +++++++++---------- 1 file changed, 40 insertions(+), 42 deletions(-) diff --git a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp index 8c62e49d3ef..bbe1a89c319 100644 --- a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp @@ -295,52 +295,50 @@ int main(int argc, char* argv[]) DT dt(points.begin(), points.end()); assert(dt.is_valid()); - //CGAL::default_random = CGAL::Random(0); - //CGAL::Random rng(0); + CGAL::Random rng; + for (int i = 0; i < nb_seg; ++i) + { + // Construct a traverser. + Point_3 p1(rng.get_double(-0.48, 0.31), + rng.get_double(-0.22, 0.22), + rng.get_double(-0.19, 0.19)); + Point_3 p2(rng.get_double(-0.48, 0.31), + rng.get_double(-0.22, 0.22), + rng.get_double(-0.19, 0.19)); - //for (int i = 0; i < nb_seg; ++i) - //{ - // // Construct a traverser. - // Point_3 p1(rng.get_double(-0.48, 0.31), - // rng.get_double(-0.22, 0.22), - // rng.get_double(-0.19, 0.19)); - // Point_3 p2(rng.get_double(-0.48, 0.31), - // rng.get_double(-0.22, 0.22), - // rng.get_double(-0.19, 0.19)); + std::cout << "Traverser " << (i + 1) + << "\n\t(" << p1 + << ")\n\t(" << p2 << ")" << std::endl; + Simplex_traverser st(dt, p1, p2); - // std::cout << "Traverser " << (i + 1) - // << "\n\t(" << p1 - // << ")\n\t(" << p2 << ")" << std::endl; - // Simplex_traverser st(dt, p1, p2); + // Count the number of finite cells traversed. + unsigned int inf = 0, fin = 0; + unsigned int nb_facets = 0, nb_edges = 0, nb_vertex = 0; + unsigned int nb_collinear = 0; + for (; st != st.end(); ++st) + { + if (dt.is_infinite(st)) + ++inf; + else + { + ++fin; + if (st.is_facet()) ++nb_facets; + else if (st.is_edge()) ++nb_edges; + else if (st.is_vertex()) ++nb_vertex; - // // Count the number of finite cells traversed. - // unsigned int inf = 0, fin = 0; - // unsigned int nb_facets = 0, nb_edges = 0, nb_vertex = 0; - // unsigned int nb_collinear = 0; - // for (; st != st.end(); ++st) - // { - // if (dt.is_infinite(st)) - // ++inf; - // else - // { - // ++fin; - // if (st.is_facet()) ++nb_facets; - // else if (st.is_edge()) ++nb_edges; - // else if (st.is_vertex()) ++nb_vertex; + if (st.is_collinear()) ++nb_collinear; + } + } - // if (st.is_collinear()) ++nb_collinear; - // } - // } - - // std::cout << "While traversing from " << st.source() - // << " to " << st.target() << std::endl; - // std::cout << "\tinfinite cells : " << inf << std::endl; - // std::cout << "\tfinite cells : " << fin << std::endl; - // std::cout << "\tfacets : " << nb_facets << std::endl; - // std::cout << "\tedges : " << nb_edges << std::endl; - // std::cout << "\tvertices : " << nb_vertex << std::endl; - // std::cout << std::endl << std::endl; - //} + std::cout << "While traversing from " << st.source() + << " to " << st.target() << std::endl; + std::cout << "\tinfinite cells : " << inf << std::endl; + std::cout << "\tfinite cells : " << fin << std::endl; + std::cout << "\tfacets : " << nb_facets << std::endl; + std::cout << "\tedges : " << nb_edges << std::endl; + std::cout << "\tvertices : " << nb_vertex << std::endl; + std::cout << std::endl << std::endl; + } //check degenerate cases // - along an edge From b734446d2acb231e4d2fd218521e9bc1c090c75b Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 2 Dec 2016 15:47:19 +0100 Subject: [PATCH 048/138] use tr.has_vertex(f, v, i) instead of home-made implementation --- .../CGAL/Triangulation_segment_traverser_3.h | 40 ++++++++----------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 8465d20514c..9b89dcd5287 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -508,6 +508,8 @@ public: const Point& source() const { return _cell_iterator.source(); } const Point& target() const { return _cell_iterator.target(); } + const Tr& triangulation() const { return _cell_iterator.triangulation(); } + private: Triangulation_segment_simplex_iterator_3 (const SCI& sci) @@ -591,13 +593,15 @@ public: switch (ltnext)//entry simplex in next cell { case Locate_type::VERTEX: + { //if the entry vertex is a vertex of current facet - if (facet_has_vertex(get_facet(), chnext->vertex(linext))) + int i; + if (triangulation().has_vertex(get_facet(), chnext->vertex(linext), i)) set_curr_simplex_to_entry(); else _curr_simplex = chnext; break; - + } case Locate_type::EDGE: if (facet_has_edge(get_facet(), Edge(chnext, linext, ljnext))) set_curr_simplex_to_entry(); @@ -641,7 +645,7 @@ public: case Locate_type::EDGE: { while (ltnext == Locate_type::EDGE - && is_same(get_edge(), Edge(chnext, linext, ljnext))) + && are_equal(get_edge(), Edge(chnext, linext, ljnext))) { ++_cell_iterator; chnext = Cell_handle(_cell_iterator); @@ -716,7 +720,8 @@ public: _curr_simplex = shared_facet(Edge(chnext, linext, ljnext), get_vertex()); else if (ltnext == Locate_type::FACET) { - CGAL_assertion(!facet_has_vertex(Facet(chnext, linext), get_vertex())); + CGAL_assertion_code(int i); + CGAL_assertion(!triangulation().has_vertex(Facet(chnext, linext), get_vertex(), i)); _curr_simplex = ch; } } @@ -848,18 +853,6 @@ private: || f.first->neighbor(f.second) == c; } - bool facet_has_vertex(const Facet& f, const Vertex_handle v) const - { - Cell_handle c = f.first; - const int fi = f.second; - for (int i = 1; i < 4; ++i) - { - if (c->vertex((fi + i) % 4) == v) - return true; - } - return false; - } - bool facet_has_edge(const Facet& f, const Edge& e) const { Vertex_handle v1 = e.first->vertex(e.second); @@ -871,8 +864,8 @@ private: for (int i = 1; i < 4; ++i) { Vertex_handle vi = c->vertex((fi + i) % 4); - if (vi == v1) ++count; - else if (vi == v2) ++count; + if (vi == v1 || vi == v2) + ++count; if (count == 2) return true; } @@ -885,7 +878,7 @@ private: || e.first->vertex(e.third) == v; } - bool is_same(const Edge& e1, const Edge& e2) const + bool are_equal(const Edge& e1, const Edge& e2) const { Vertex_handle v1a = e1.first->vertex(e1.second); Vertex_handle v1b = e1.first->vertex(e1.third); @@ -921,7 +914,7 @@ private: Vertex_handle nsv2 = (sv == v2a) ? v2b : v2a; typename Tr::Facet_circulator circ - = _cell_iterator.triangulation().incident_facets(e1); + = triangulation().incident_facets(e1); typename Tr::Facet_circulator end = circ; do { @@ -941,12 +934,13 @@ private: Facet shared_facet(const Edge& e, const Vertex_handle v) const { typename Tr::Facet_circulator circ - = _cell_iterator.triangulation().incident_facets(e); + = triangulation().incident_facets(e); typename Tr::Facet_circulator end = circ; do { Facet f = *circ; - if (facet_has_vertex(f, v)) + int i; + if (triangulation().has_vertex(f, v, i)) return f; } while (++circ != end); @@ -958,7 +952,7 @@ private: Cell_handle shared_cell(const Edge& e, const Vertex_handle v) const { typename Tr::Cell_circulator circ - = _cell_iterator.triangulation().incident_cells(e); + = triangulation().incident_cells(e); typename Tr::Cell_circulator end = circ; do { From 322919f4a26d1c3fe3db6e07e5444cb0c5a08bee Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 2 Dec 2016 16:10:33 +0100 Subject: [PATCH 049/138] little cleaning --- .../include/CGAL/Triangulation_segment_traverser_3.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 9b89dcd5287..5a6a242edae 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -729,9 +729,10 @@ public: } case Locate_type::EDGE: { - int index_v = ch->index(get_vertex()); - int index_vnext = ch->index(chnext->vertex(linext)); - int index_f = 6 - (index_v + index_vnext + ch->index(chnext->vertex(ljnext))); + //facet shared by get_vertex() and the edge (ch is a common neighbor) + int index_f = 6 - (ch->index(get_vertex()) + + ch->index(chnext->vertex(linext)) + + ch->index(chnext->vertex(ljnext))); _curr_simplex = Facet(ch, index_f); break; } From f31155a0ce2f6433399ba1b36b61d896d6fdbce9 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 2 Dec 2016 16:17:38 +0100 Subject: [PATCH 050/138] Revert "remove random generator" This reverts commit 8b68ab345927fa36685ac97d2b6e7618eac51e2f. # Conflicts: # Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h NOTE in the degenerate case where the query passes exactly through an edge (i.e. through both of its vertices), it could happen that the iterator "circulates" around the edge, whithout finding a way to get out of this infinite loop randomness is re-introduced to avoid this --- .../CGAL/Triangulation_segment_traverser_3.h | 4 ++++ .../CGAL/Triangulation_segment_traverser_3_impl.h | 15 ++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 5a6a242edae..2c4f8b1eebd 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -39,6 +39,7 @@ #include +#include // If defined, type casting is done statically, // reducing type-safety overhead. #define CGAL_TST_ASSUME_CORRECT_TYPES @@ -164,6 +165,9 @@ protected: // the first cell containing the target. Simplex _cur, _prev; + // Where possible, facets are checked in a random order. + mutable Random rng; + public: // \name Constructors // \{ diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h index d8ca0ac3aca..171b024351f 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h @@ -279,8 +279,8 @@ walk_to_next_3() calc[ij] = true; } - // start trying - int li = 0; + // For the remembering stochastic walk, we start trying with a random facet. + int li = rng.template get_bits<2>(); CGAL_triangulation_assertion_code( bool incell = true; ) for( int k = 0; k < 4; ++k, li = _tr.increment_index(li) ) { @@ -307,7 +307,7 @@ walk_to_next_3() // Check if the target is inside the 3-wedge with // the source as apex and the facet as an intersection. - int lj = 0; + int lj = rng.template get_bits<2>(); int Or = 0; for( int l = 0; l < 4; ++l, lj = _tr.increment_index(lj) ) { if( li == lj ) @@ -453,8 +453,8 @@ walk_to_next_3_inf( int inf ) { vert[inf] = &(_source); CGAL_triangulation_assertion( _tr.orientation( *vert[0], *vert[1], *vert[2], *vert[3] ) == POSITIVE ); - // start trying - int li = 0; + // For the remembering stochastic walk, we start trying with a random index: + int li = rng.template get_bits<2>(); // Check if the line enters an adjacent infinite cell. // This occurs if the target lies on the other side of @@ -730,8 +730,9 @@ walk_to_next_2() return; } case Tr::FACET: { - // We test its until we find a neighbor to go further - int li = 0; + // We test its edges in a random order until we find a neighbor to go further + int li = rng.get_int(0, 3); + Orientation o[3]; bool calc[3] = { false, false, false }; From 001894dc7ed0c4c073369346694a24ec6a0c2b93 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 2 Dec 2016 17:34:32 +0100 Subject: [PATCH 051/138] deal with vertex-degenerate case when the query segment passes exactly through a vertex, avoid returning more than one cell containing this vertex operator++ iterates until it finds a cell which does not contain this vertex --- .../CGAL/Triangulation_segment_traverser_3.h | 24 +++++++++++++------ .../Triangulation_segment_traverser_3_impl.h | 9 +++++++ 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 2c4f8b1eebd..9d5889b391c 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -704,7 +704,8 @@ public: { while (ltnext == Locate_type::VERTEX && _cell_iterator != _cell_iterator.end() - && get_vertex() == chnext->vertex(linext))//another cell with same vertex has been found + && get_vertex() == chnext->vertex(linext)//another cell with same vertex has been found + && !triangulation().is_infinite(chnext)) { ch = chnext; @@ -719,7 +720,18 @@ public: else { if (ltnext == Locate_type::VERTEX) - _curr_simplex = Edge(ch, ch->index(get_vertex()), ch->index(chnext->vertex(linext))); + { + if (triangulation().is_infinite(chnext) && get_vertex() == chnext->vertex(linext)) + _curr_simplex = chnext; + else + { + Cell_handle ec; + int ei, ej; + if (!triangulation().is_edge(get_vertex(), chnext->vertex(linext), ec, ei, ej)) + CGAL_assertion(false); + _curr_simplex = Edge(ec, ei, ej); + } + } else if (ltnext == Locate_type::EDGE) _curr_simplex = shared_facet(Edge(chnext, linext, ljnext), get_vertex()); else if (ltnext == Locate_type::FACET) @@ -733,11 +745,9 @@ public: } case Locate_type::EDGE: { - //facet shared by get_vertex() and the edge (ch is a common neighbor) - int index_f = 6 - (ch->index(get_vertex()) - + ch->index(chnext->vertex(linext)) - + ch->index(chnext->vertex(ljnext))); - _curr_simplex = Facet(ch, index_f); + //facet shared by get_vertex() and the edge + //none of ch and chnext is certainly shared by both endpoints + _curr_simplex = shared_facet(Edge(chnext, linext, ljnext), get_vertex()); break; } default ://FACET diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h index 171b024351f..0c3afbb8f70 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h @@ -209,7 +209,16 @@ walk_to_next() { if( get<0>(_cur)->has_vertex( _tr.infinite_vertex(), inf ) ) walk_to_next_3_inf( inf ); else + { + Vertex_handle entry_vertex = (get<1>(_cur) == Locate_type::VERTEX) + ? get<0>(_cur)->vertex(get<2>(_cur)) + : Vertex_handle(); + do { walk_to_next_3(); + } while (get<1>(_cur) == Locate_type::VERTEX + && entry_vertex == get<0>(_cur)->vertex(get<2>(_cur)) + && !get<0>(_cur)->has_vertex(_tr.infinite_vertex(), inf));//end + } break; } case 2: { From addbfb383705c2c8b363240771f1eae0820c1881 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 5 Dec 2016 16:36:32 +0100 Subject: [PATCH 052/138] do not return more than one cell_iterator value with same entry previous commit was dealing with the case where entry is a vertex, here we deal with all entry types PLUS fix the edge - facet - vertex degenerate case --- .../CGAL/Triangulation_segment_traverser_3.h | 7 +++- .../Triangulation_segment_traverser_3_impl.h | 39 ++++++++++++++++--- 2 files changed, 38 insertions(+), 8 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 9d5889b391c..cea60246a36 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -411,6 +411,9 @@ private: CGAL_triangulation_precondition( i != j ); return ( i==0 || j==0 ) ? i+j-1 : i+j; } + + bool have_same_entry(const Simplex& s1, const Simplex& s2) const; + }; // class Triangulation_segment_cell_iterator_3 // compares a handle to a cell to a traverser. @@ -643,7 +646,7 @@ public: if (edge_has_vertex(get_edge(), chnext->vertex(linext))) _curr_simplex = chnext->vertex(linext); else - _curr_simplex = ch; + _curr_simplex = shared_facet(get_edge(), chnext->vertex(linext)); break; case Locate_type::EDGE: @@ -934,7 +937,7 @@ private: do { Facet f = *circ; - for (int i = 0; i < 4; ++i) + for (int i = 1; i < 4; ++i) { if (nsv2 == f.first->vertex((f.second + i) % 4)) return f; diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h index 0c3afbb8f70..52a355d53d9 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h @@ -210,14 +210,12 @@ walk_to_next() { walk_to_next_3_inf( inf ); else { - Vertex_handle entry_vertex = (get<1>(_cur) == Locate_type::VERTEX) - ? get<0>(_cur)->vertex(get<2>(_cur)) - : Vertex_handle(); + const Simplex backup = _cur; do { walk_to_next_3(); - } while (get<1>(_cur) == Locate_type::VERTEX - && entry_vertex == get<0>(_cur)->vertex(get<2>(_cur)) - && !get<0>(_cur)->has_vertex(_tr.infinite_vertex(), inf));//end + } while (get<0>(_cur) != Cell_handle()//end + && !get<0>(_cur)->has_vertex(_tr.infinite_vertex(), inf) + && have_same_entry(backup, _cur)); } break; } @@ -252,6 +250,35 @@ walk_to_next() { #endif } +template +bool Triangulation_segment_cell_iterator_3:: +have_same_entry(const Simplex& s1, const Simplex& s2) const +{ + //type + if (get<1>(s1) != get<1>(s2)) + return false; + switch (get<1>(s1)) + { + case Locate_type::VERTEX: + return get<0>(s1)->vertex(get<2>(s1)) == get<0>(s2)->vertex(get<2>(s2)); + case Locate_type::EDGE: + { + Vertex_handle v1a = get<0>(s1)->vertex(get<2>(s1)); + Vertex_handle v1b = get<0>(s1)->vertex(get<3>(s1)); + Vertex_handle v2a = get<0>(s2)->vertex(get<2>(s2)); + Vertex_handle v2b = get<0>(s2)->vertex(get<3>(s2)); + return (v1a == v2a && v1b == v2b) + || (v1a == v2b && v1b == v2a); + } + case Locate_type::FACET: + return triangulation().are_equal(Facet(get<0>(s1), get<2>(s1)), + Facet(get<0>(s2), get<2>(s2))); + default: + CGAL_assertion(false); + }; + return false; +} + template < class Tr, class Inc > void Triangulation_segment_cell_iterator_3:: walk_to_next_3() From 66b38744e3729485c1a490672941e54ac55d3c4b Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 5 Dec 2016 16:37:06 +0100 Subject: [PATCH 053/138] add cout to the test --- .../test/Triangulation_3/test_simplex_iterator_3.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp index bbe1a89c319..47eea842454 100644 --- a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp @@ -254,10 +254,12 @@ void test_vertex_facet_edge(const DT& dt, const std::size_t& nb_tests) if (st.is_vertex() && st.get_vertex() == v1) { ++st; + std::cout << st.simplex_dimension() << " "; assert(st.is_facet()); assert(st.get_facet() == facets[i] || st.get_facet() == dt.mirror_facet(facets[i])); ++st; + std::cout << st.simplex_dimension() << " "; assert(st.is_edge()); Edge e = st.get_edge(); Vertex_handle va = e.first->vertex(e.second); From 2f8def4ea056471288739c60cb409eb619bb6234 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 5 Dec 2016 16:59:57 +0100 Subject: [PATCH 054/138] add missing typedef --- Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index cea60246a36..80d4dd52bce 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -118,6 +118,7 @@ public: typedef typename Tr::Cell Cell; //< defines the type of a cell of the triangulation. typedef typename Tr::Edge Edge; //< defines the type of an edge of the triangulation. + typedef typename Tr::Facet Facet; //< defines the type of a facet of the triangulation. typedef typename Tr::Vertex_handle Vertex_handle; //< defines the type of a handle for a vertex in the triangulation. typedef typename Tr::Cell_handle Cell_handle; //< defines the type of a handle for a cell in the triangulation. From e1b715a56a4e5fab3c3635d2b733d0f0a121d487 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 6 Dec 2016 11:48:47 +0100 Subject: [PATCH 055/138] comment out (and fix) code that should not be used anymore because cell_iterator should not return more than one cell with the same entry point (useful in the case where the entry vertex, edge, or facet is traversed exactly) --- .../CGAL/Triangulation_segment_traverser_3.h | 35 ++++++++++--------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 80d4dd52bce..d13c3a7c89d 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -652,13 +652,14 @@ public: case Locate_type::EDGE: { - while (ltnext == Locate_type::EDGE - && are_equal(get_edge(), Edge(chnext, linext, ljnext))) - { - ++_cell_iterator; - chnext = Cell_handle(_cell_iterator); - _cell_iterator.entry(ltnext, linext, ljnext); - } + //while (ltnext == Locate_type::EDGE + // && _cell_iterator != _cell_iterator.end() + // && are_equal(get_edge(), Edge(chnext, linext, ljnext))) + //{ + // ++_cell_iterator; + // chnext = Cell_handle(_cell_iterator); + // _cell_iterator.entry(ltnext, linext, ljnext); + //} if (_cell_iterator == _cell_iterator.end()) _curr_simplex = Cell_handle(_cell_iterator); else if (ltnext == Locate_type::EDGE) @@ -706,17 +707,17 @@ public: { case Locate_type::VERTEX: { - while (ltnext == Locate_type::VERTEX - && _cell_iterator != _cell_iterator.end() - && get_vertex() == chnext->vertex(linext)//another cell with same vertex has been found - && !triangulation().is_infinite(chnext)) - { - ch = chnext; + //while (ltnext == Locate_type::VERTEX + // && _cell_iterator != _cell_iterator.end() + // && get_vertex() == chnext->vertex(linext)//another cell with same vertex has been found + // && !triangulation().is_infinite(chnext)) + //{ + // ch = chnext; - ++_cell_iterator; - chnext = Cell_handle(_cell_iterator); - _cell_iterator.entry(ltnext, linext, ljnext); - } + // ++_cell_iterator; + // chnext = Cell_handle(_cell_iterator); + // _cell_iterator.entry(ltnext, linext, ljnext); + //} if (_cell_iterator == _cell_iterator.end()) { _curr_simplex = Cell_handle(_cell_iterator); From 0eff9127634940bea23672880096dd8162ff3cc1 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 6 Dec 2016 11:56:17 +0100 Subject: [PATCH 056/138] turn comments into assertions --- .../CGAL/Triangulation_segment_traverser_3.h | 26 +++++-------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index d13c3a7c89d..533163978b9 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -652,14 +652,9 @@ public: case Locate_type::EDGE: { - //while (ltnext == Locate_type::EDGE - // && _cell_iterator != _cell_iterator.end() - // && are_equal(get_edge(), Edge(chnext, linext, ljnext))) - //{ - // ++_cell_iterator; - // chnext = Cell_handle(_cell_iterator); - // _cell_iterator.entry(ltnext, linext, ljnext); - //} + CGAL_assertion(_cell_iterator == _cell_iterator.end() + || !are_equal(get_edge(), Edge(chnext, linext, ljnext))); + if (_cell_iterator == _cell_iterator.end()) _curr_simplex = Cell_handle(_cell_iterator); else if (ltnext == Locate_type::EDGE) @@ -707,17 +702,10 @@ public: { case Locate_type::VERTEX: { - //while (ltnext == Locate_type::VERTEX - // && _cell_iterator != _cell_iterator.end() - // && get_vertex() == chnext->vertex(linext)//another cell with same vertex has been found - // && !triangulation().is_infinite(chnext)) - //{ - // ch = chnext; - - // ++_cell_iterator; - // chnext = Cell_handle(_cell_iterator); - // _cell_iterator.entry(ltnext, linext, ljnext); - //} + CGAL_assertion(_cell_iterator == _cell_iterator.end() + || get_vertex() != chnext->vertex(linext) + || triangulation().is_infinite(chnext)); + if (_cell_iterator == _cell_iterator.end()) { _curr_simplex = Cell_handle(_cell_iterator); From 3f80f95b6441e274d7776e57ff5a09ee5f05967e Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 6 Dec 2016 12:19:01 +0100 Subject: [PATCH 057/138] add infinite case for edges --- .../include/CGAL/Triangulation_segment_traverser_3.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 533163978b9..caa4c0f4475 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -653,10 +653,15 @@ public: case Locate_type::EDGE: { CGAL_assertion(_cell_iterator == _cell_iterator.end() - || !are_equal(get_edge(), Edge(chnext, linext, ljnext))); + || triangulation().is_infinite(chnext) + || !are_equal(get_edge(), Edge(chnext, linext, ljnext))); + if (_cell_iterator == _cell_iterator.end()) _curr_simplex = Cell_handle(_cell_iterator); + else if (triangulation().is_infinite(chnext) + && are_equal(get_edge(), Edge(chnext, linext, ljnext))) + _curr_simplex = chnext; else if (ltnext == Locate_type::EDGE) _curr_simplex = shared_facet(get_edge(), Edge(chnext, linext, ljnext)); else if (ltnext == Locate_type::FACET) From 64e17184193dde05bc59e1b9f512363f79566b62 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 6 Dec 2016 12:19:56 +0100 Subject: [PATCH 058/138] add testing when Delaunay triangulation is on a grid --- .../test_simplex_iterator_3.cpp | 80 ++++++++++++++++--- 1 file changed, 69 insertions(+), 11 deletions(-) diff --git a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp index 47eea842454..0f97818f5c5 100644 --- a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp @@ -34,8 +34,9 @@ // Define the kernel. typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel; -typedef Kernel::Point_3 Point_3; -typedef Kernel::Vector_3 Vector_3; +typedef Kernel::Point_3 Point_3; +typedef Kernel::Vector_3 Vector_3; +typedef Kernel::Segment_3 Segment_3; // Define the structure. typedef CGAL::Delaunay_triangulation_3< Kernel > DT; @@ -271,6 +272,62 @@ void test_vertex_facet_edge(const DT& dt, const std::size_t& nb_tests) } } +void test_triangulation_on_a_grid() +{ + std::cout << "* test_triangulation_on_a_grid *" << std::endl; + DT dt; + for (double x = 0.; x < 11.; x = x + 1.) + for (double y = 0.; y < 11.; y = y + 1.) + for (double z = 0.; z < 11.; z = z + 1.) + dt.insert(Point_3(x, y, z)); + + int nb_queries = 5; + std::vector queries(nb_queries); + //along an axis of the grid + queries[0] = Segment_3(Point_3(1., 1., 1.), Point_3(1., 8., 1.)); + //along an axis, but between two layers + queries[1] = Segment_3(Point_3(1., 1.5, 1.), Point_3(10., 1.5, 1.)); + //along a diagonal + queries[2] = Segment_3(Point_3(1., 1., 1.), Point_3(6., 6., 6.)); + //along a diagonal, in the plane (y = 1) + queries[3] = Segment_3(Point_3(1., 1., 1.), Point_3(7., 1., 7.)); + //along a border of the cube + queries[4] = Segment_3(Point_3(0., 0., 0.), Point_3(11., 0., 5.)); + + BOOST_FOREACH(Segment_3 s, queries) + { + std::cout << "Query segment : (" << s.source() + << ") to (" << s.target() << ") ["; + Simplex_traverser st(dt, s); + unsigned int inf = 0, fin = 0; + unsigned int nb_facets = 0, nb_edges = 0, nb_vertex = 0; + unsigned int nb_collinear = 0; + for (; st != st.end(); ++st) + { + std::cout << st.simplex_dimension() << " "; + std::cout.flush(); + if (st.is_cell()) + { + if (dt.is_infinite(st)) ++inf; + else ++fin; + } + if (st.is_facet()) ++nb_facets; + else if (st.is_edge()) ++nb_edges; + else if (st.is_vertex()) ++nb_vertex; + + if (st.is_collinear()) ++nb_collinear; + } + std::cout << "\b]" << std::endl; + + std::cout << "\tinfinite cells : " << inf << std::endl; + std::cout << "\tfinite cells : " << fin << std::endl; + std::cout << "\tfacets : " << nb_facets << std::endl; + std::cout << "\tedges : " << nb_edges << std::endl; + std::cout << "\tvertices : " << nb_vertex << std::endl; + std::cout << "\tcollinear : " << nb_collinear << std::endl; + std::cout << std::endl; + } +} int main(int argc, char* argv[]) { @@ -319,17 +376,16 @@ int main(int argc, char* argv[]) unsigned int nb_collinear = 0; for (; st != st.end(); ++st) { - if (dt.is_infinite(st)) - ++inf; - else + if (st.is_cell()) { - ++fin; - if (st.is_facet()) ++nb_facets; - else if (st.is_edge()) ++nb_edges; - else if (st.is_vertex()) ++nb_vertex; - - if (st.is_collinear()) ++nb_collinear; + if (dt.is_infinite(st)) ++inf; + else ++fin; } + if (st.is_facet()) ++nb_facets; + else if (st.is_edge()) ++nb_edges; + else if (st.is_vertex()) ++nb_vertex; + + if (st.is_collinear()) ++nb_collinear; } std::cout << "While traversing from " << st.source() @@ -358,6 +414,8 @@ int main(int argc, char* argv[]) // - along 2 successive facets (vertex/facet/edge/facet/edge) // - along 2 successive edges (vertex/edge/vertex/edge/vertex) // - along a facet and an edge successively + test_triangulation_on_a_grid(); + return 0; } \ No newline at end of file From c8dc6ec9d96c9941625b3a45dc6704cf06e5326b Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 6 Dec 2016 12:23:50 +0100 Subject: [PATCH 059/138] cleaning this cleaning can be done because cell iterator cannot return twice the same entry point anymore --- .../CGAL/Triangulation_segment_traverser_3.h | 41 ++++--------------- 1 file changed, 9 insertions(+), 32 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index caa4c0f4475..688e79d3671 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -656,25 +656,13 @@ public: || triangulation().is_infinite(chnext) || !are_equal(get_edge(), Edge(chnext, linext, ljnext))); - if (_cell_iterator == _cell_iterator.end()) _curr_simplex = Cell_handle(_cell_iterator); else if (triangulation().is_infinite(chnext) && are_equal(get_edge(), Edge(chnext, linext, ljnext))) _curr_simplex = chnext; - else if (ltnext == Locate_type::EDGE) + else _curr_simplex = shared_facet(get_edge(), Edge(chnext, linext, ljnext)); - else if (ltnext == Locate_type::FACET) - _curr_simplex = chnext->neighbor(linext);//chnext will be met after the facet - else if (ltnext == Locate_type::VERTEX) - { - if (edge_has_vertex(get_edge(), chnext->vertex(linext))) - _curr_simplex = chnext->vertex(linext); - else - _curr_simplex = shared_facet(get_edge(), chnext->vertex(linext)); - } - else //CELL - CGAL_assertion(false); break; } case Locate_type::FACET: @@ -717,26 +705,15 @@ public: } else { - if (ltnext == Locate_type::VERTEX) + if (triangulation().is_infinite(chnext) && get_vertex() == chnext->vertex(linext)) + _curr_simplex = chnext; + else { - if (triangulation().is_infinite(chnext) && get_vertex() == chnext->vertex(linext)) - _curr_simplex = chnext; - else - { - Cell_handle ec; - int ei, ej; - if (!triangulation().is_edge(get_vertex(), chnext->vertex(linext), ec, ei, ej)) - CGAL_assertion(false); - _curr_simplex = Edge(ec, ei, ej); - } - } - else if (ltnext == Locate_type::EDGE) - _curr_simplex = shared_facet(Edge(chnext, linext, ljnext), get_vertex()); - else if (ltnext == Locate_type::FACET) - { - CGAL_assertion_code(int i); - CGAL_assertion(!triangulation().has_vertex(Facet(chnext, linext), get_vertex(), i)); - _curr_simplex = ch; + Cell_handle ec; + int ei, ej; + if (!triangulation().is_edge(get_vertex(), chnext->vertex(linext), ec, ei, ej)) + CGAL_assertion(false); + _curr_simplex = Edge(ec, ei, ej); } } break; From 77f7ec43f5d0676afe917b7768e09c8137a8873b Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 6 Dec 2016 17:08:03 +0100 Subject: [PATCH 060/138] replace boost::variant by Triangulation_simplex_3 a minimal bench showed by this reduces iterator runtime of about 40% It takes only 10% longer than cell_iterator --- .../CGAL/Triangulation_segment_traverser_3.h | 53 ++++++++----------- 1 file changed, 23 insertions(+), 30 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 688e79d3671..1d68bcbc2ce 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -36,6 +36,7 @@ #include #include #include +#include #include @@ -466,7 +467,8 @@ public: typedef typename SCI::Triangulation::Facet Facet; //< defines the type of a facet in the triangulation. typedef typename SCI::Locate_type Locate_type; //< defines the simplex type returned from location. - typedef boost::variant Simplex_type; //types sorted by dimension + //typedef boost::variant Simplex_type; //types sorted by dimension + typedef CGAL::Triangulation_simplex_3 Simplex_type; typedef Simplex_type value_type; //< defines the value type the iterator refers to. typedef Simplex_type& reference; //< defines the reference type of the iterator. @@ -522,7 +524,7 @@ private: Triangulation_segment_simplex_iterator_3 (const SCI& sci) : _cell_iterator(sci) - , _curr_simplex(Cell_handle()) + , _curr_simplex() {} private: @@ -531,7 +533,7 @@ private: //check what is the entry type of _cell_iterator if (Cell_handle(_cell_iterator) == Cell_handle()) { - _curr_simplex = Cell_handle(); + _curr_simplex = Simplex_type(); return;//end has been reached } @@ -573,9 +575,9 @@ public: // provides the increment postfix operator. Simplex_iterator& operator++() { - CGAL_assertion(!_curr_simplex.empty()); + CGAL_assertion(_curr_simplex.incident_cell() != Cell_handle()); - switch(_curr_simplex.which()) + switch(_curr_simplex.dimension()) { case 3 :/*Cell_handle*/ { @@ -590,6 +592,7 @@ public: //cell_iterator is not ahead. get_facet() is part of cell_iterator //we cannot be in any of the degenerate cases, only detected by //taking cell_iterator one step forward + CGAL_assertion(cell_has_facet(Cell_handle(_cell_iterator), get_facet())); _curr_simplex = Cell_handle(_cell_iterator); } else @@ -654,12 +657,12 @@ public: { CGAL_assertion(_cell_iterator == _cell_iterator.end() || triangulation().is_infinite(chnext) - || !are_equal(get_edge(), Edge(chnext, linext, ljnext))); + || _curr_simplex != Simplex_type(Edge(chnext, linext, ljnext))); if (_cell_iterator == _cell_iterator.end()) - _curr_simplex = Cell_handle(_cell_iterator); + _curr_simplex = Simplex_type(); else if (triangulation().is_infinite(chnext) - && are_equal(get_edge(), Edge(chnext, linext, ljnext))) + && _curr_simplex == Simplex_type(Edge(chnext, linext, ljnext))) _curr_simplex = chnext; else _curr_simplex = shared_facet(get_edge(), Edge(chnext, linext, ljnext)); @@ -701,7 +704,7 @@ public: if (_cell_iterator == _cell_iterator.end()) { - _curr_simplex = Cell_handle(_cell_iterator); + _curr_simplex = Simplex_type(); } else { @@ -760,31 +763,31 @@ public: */ operator const Cell_handle() const { return Cell_handle(_cell_iterator); } - bool is_vertex() const { return _curr_simplex.which() == 0; } - bool is_edge() const { return _curr_simplex.which() == 1; } - bool is_facet() const { return _curr_simplex.which() == 2; } - bool is_cell() const { return _curr_simplex.which() == 3; } + bool is_vertex() const { return _curr_simplex.dimension() == 0; } + bool is_edge() const { return _curr_simplex.dimension() == 1; } + bool is_facet() const { return _curr_simplex.dimension() == 2; } + bool is_cell() const { return _curr_simplex.dimension() == 3; } const Simplex_type& get_simplex() const { return _curr_simplex; } Vertex_handle get_vertex() const { CGAL_assertion(is_vertex()); - return boost::get(_curr_simplex); + return Vertex_handle(_curr_simplex); } Edge get_edge() const { CGAL_assertion(is_edge()); - return boost::get(_curr_simplex); + return Edge(_curr_simplex); } Facet get_facet() const { CGAL_assertion(is_facet()); - return boost::get(_curr_simplex); + return Facet(_curr_simplex); } Cell_handle get_cell() const { CGAL_assertion(is_cell()); - return boost::get(_curr_simplex); + return Cell_handle(_curr_simplex); } public: @@ -797,7 +800,7 @@ public: // TODO : rename this function bool is_collinear() const { - int curr_dim = _curr_simplex.which(); + int curr_dim = _curr_simplex.dimension(); //this concerns only edges and facets if (curr_dim == 1 || curr_dim == 2) return cell_iterator_is_ahead(); @@ -808,14 +811,14 @@ public: int simplex_dimension() const { - return _curr_simplex.which(); + return _curr_simplex.dimension(); } private: bool cell_iterator_is_ahead() const { Cell_handle ch = Cell_handle(_cell_iterator); - switch (_curr_simplex.which()) + switch (_curr_simplex.dimension()) { case 0 ://vertex return !ch->has_vertex(get_vertex()); @@ -868,16 +871,6 @@ private: || e.first->vertex(e.third) == v; } - bool are_equal(const Edge& e1, const Edge& e2) const - { - Vertex_handle v1a = e1.first->vertex(e1.second); - Vertex_handle v1b = e1.first->vertex(e1.third); - Vertex_handle v2a = e2.first->vertex(e2.second); - Vertex_handle v2b = e2.first->vertex(e2.third); - return (v1a == v2a && v1b == v2b) - || (v1a == v2b && v1b == v2a); - } - Vertex_handle shared_vertex(const Edge& e1, const Edge& e2) const { Vertex_handle v1a = e1.first->vertex(e1.second); From bf1534d0c638cab3378e03bf3f49ad3f1f6f878a Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 6 Dec 2016 17:33:40 +0100 Subject: [PATCH 061/138] fix compilation when using c++11 and one warning of switch/case not handled --- .../CGAL/Triangulation_segment_traverser_3.h | 72 +++++++++++++++---- 1 file changed, 59 insertions(+), 13 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 1d68bcbc2ce..6a6ed7c02f3 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -247,7 +247,11 @@ public: * \return the current cell. * \sa `handle()`. */ - const Cell cell() const { return *get<0>(_cur); } + const Cell cell() const + { + using CGAL::cpp11::get; + return *get<0>(_cur); + } // gives a handle to the current cell. /* By invariance, this cell is intersected by the segment @@ -255,7 +259,11 @@ public: * \return a handle to the current cell. * \sa `cell()`. */ - Cell_handle handle() { return get<0>(_cur); } + Cell_handle handle() + { + using CGAL::cpp11::get; + return get<0>(_cur); + } // gives the previous cell. /* This cell is uninitialized until the iterator leaves the initial @@ -265,22 +273,38 @@ public: * \return the previous cell. * \sa `handle()`. */ - Cell_handle previous() const { return get<0>(_prev); } + Cell_handle previous() const + { + using CGAL::cpp11::get; + return get<0>(_prev); + } // provides a dereference operator. /* \return a pointer to the current cell. */ - Cell* operator->() { return &*get<0>(_cur); } + Cell* operator->() + { + using CGAL::cpp11::get; + return &*get<0>(_cur); + } // provides an indirection operator. /* \return the current cell. */ - Cell& operator*() { return *get<0>(_cur); } + Cell& operator*() + { + using CGAL::cpp11::get; + return *get<0>(_cur); + } // provides a conversion operator. /* \return a handle to the current cell. */ - operator const Cell_handle() const { return get<0>(_cur); } + operator const Cell_handle() const + { + using CGAL::cpp11::get; + return get<0>(_cur); + } // provides a conversion operator. /* \return the simplex through wich the current cell was entered. @@ -292,18 +316,29 @@ public: * the interior of the segment between `source()` and `target()`. * \return true iff the current cell contains the `target()`. */ - bool has_next() const { return get<0>(_cur) != Cell_handle(); } + bool has_next() const + { + using CGAL::cpp11::get; + return get<0>(_cur) != Cell_handle(); + } // gives the simplex through which the current cell was entered. /* For the first cell, containing the `source()` \f$ s \f$, * this indicates the location of \f$ s \f$ in this cell. */ - void entry( Locate_type& lt, int& li, int& lj ) const { lt = get<1>(_cur); li = get<2>(_cur); lj = get<3>(_cur); } - + void entry( Locate_type& lt, int& li, int& lj ) const + { + using CGAL::cpp11::get; + lt = get<1>(_cur); li = get<2>(_cur); lj = get<3>(_cur); + } // gives the simplex through which the previous cell was exited. /* \pre the current cell is not the initial cell. */ - void exit( Locate_type& lt, int& li, int& lj ) const { lt = get<1>(_prev); li = get<2>(_prev); lj = get<3>(_prev); } + void exit( Locate_type& lt, int& li, int& lj ) const + { + using CGAL::cpp11::get; + lt = get<1>(_prev); li = get<2>(_prev); lj = get<3>(_prev); + } // gives the past-the-end iterator associated with this iterator. SCI end() const; @@ -360,7 +395,11 @@ public: * \sa `operator!=( const Cell_handle& ch ) const`. * \sa `operator==( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_cell_iterator_3 t )`. */ - bool operator==( const Cell_handle& ch ) const { return ch == get<0>(_cur); } + bool operator==( const Cell_handle& ch ) const + { + using CGAL::cpp11::get; + return ch == get<0>(_cur); + } // compares the current cell with `ch`. /* \param ch a handle to the other cell. @@ -368,7 +407,11 @@ public: * \sa `operator==( const Cell_handle& ch )`. * \sa `operator!=( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_cell_iterator_3 t )`. */ - bool operator!=( const Cell_handle& ch ) const { return ch != get<0>(_cur); } + bool operator!=( const Cell_handle& ch ) const + { + using CGAL::cpp11::get; + return ch != get<0>(_cur); + } // \} bool operator==( Nullptr_t CGAL_triangulation_assertion_code(n) ) const; @@ -387,7 +430,7 @@ protected: * \sa `complete()`. */ void increment() { - typedef Incrementer::SCI Expected; + typedef typename Incrementer::SCI Expected; #ifdef CGAL_TST_ASSUME_CORRECT_TYPES Expected& sci = static_cast( *this ); #else // CGAL_TST_ASSUME_CORRECT_TYPES @@ -671,6 +714,9 @@ public: case Locate_type::FACET: _curr_simplex = Cell_handle(_cell_iterator);//query goes through the cell break; + + default: + CGAL_assertion(false);//should not happen }; break; } From 80c998dfc3b1d7aaf9bcdeda2c64c2990d5664b7 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 8 Dec 2016 11:24:58 +0100 Subject: [PATCH 062/138] fix errors and warnings for linux g++ --- .../CGAL/Triangulation_segment_traverser_3.h | 2 ++ .../CGAL/Triangulation_segment_traverser_3_impl.h | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 6a6ed7c02f3..17e47ffa677 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -874,6 +874,8 @@ private: return !cell_has_facet(ch, get_facet()); case 3 ://cell return ch != get_cell(); + default: + CGAL_assertion(false); } //should not be reached CGAL_assertion(false); diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h index 52a355d53d9..169618d6791 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h @@ -84,7 +84,8 @@ Triangulation_segment_cell_iterator_3( const Tr& tr, const Point& s, Vertex_hand _target = t->point(); _s_vertex = Vertex_handle(); _t_vertex = t; - + + using CGAL::cpp11::get; get<0>(_cur) = _tr.locate( s, get<1>(_cur), get<2>(_cur), get<3>(_cur), hint ); CGAL_triangulation_postcondition( get<0>(_cur) != Cell_handle() ); @@ -104,6 +105,7 @@ Triangulation_segment_cell_iterator_3( const Tr& tr, const Point& s, const Point _s_vertex = Vertex_handle(); _t_vertex = Vertex_handle(); + using CGAL::cpp11::get; get<0>(_cur) = _tr.locate( s, get<1>(_cur), get<2>(_cur), get<3>(_cur), hint ); CGAL_triangulation_postcondition( get<0>(_cur) != Cell_handle() ); @@ -127,6 +129,7 @@ Triangulation_segment_cell_iterator_3::end() const { sci._target = _target; sci._s_vertex = _s_vertex; sci._t_vertex = _t_vertex; + using CGAL::cpp11::get; get<0>(sci._cur) = Cell_handle(); return sci; } @@ -134,6 +137,7 @@ Triangulation_segment_cell_iterator_3::end() const { template < class Tr, class Inc > inline Triangulation_segment_cell_iterator_3& Triangulation_segment_cell_iterator_3::operator++() { + using CGAL::cpp11::get; CGAL_triangulation_precondition( get<0>(_cur) != Cell_handle() ); increment(); return *this; @@ -152,6 +156,7 @@ inline typename Triangulation_segment_cell_iterator_3::Cell_handle Triangulation_segment_cell_iterator_3::complete() { while( has_next() ) increment(); + using CGAL::cpp11::get; return get<0>(_prev); } @@ -161,6 +166,7 @@ operator==( const SCI& sci ) const { // To be equal, the iterators must traverse the same triangulations // along the same line segment and they must have the same current cell. // Note that to limit cost, we just compare the triangulation pointers. + using CGAL::cpp11::get; return ( &_tr == &sci._tr && ( _s_vertex == Vertex_handle() ? _source == sci._source : _s_vertex == sci._s_vertex ) && ( _t_vertex == Vertex_handle() ? _target == sci._target : _t_vertex == sci._t_vertex ) && @@ -177,6 +183,7 @@ template < class Tr, class Inc > inline bool Triangulation_segment_cell_iterator_3:: operator==( Nullptr_t CGAL_triangulation_assertion_code(n) ) const { CGAL_triangulation_assertion( n == NULL ); + using CGAL::cpp11::get; return get<0>(_cur) == Cell_handle(); } @@ -193,6 +200,7 @@ walk_to_next() { // Check if the target is in the current cell. int ti; + using CGAL::cpp11::get; if( get<0>(_cur)->has_vertex( _t_vertex, ti ) ) { // The target is inside the cell. _prev = Simplex( get<0>(_cur), Tr::VERTEX, ti, -1 ); @@ -255,6 +263,7 @@ bool Triangulation_segment_cell_iterator_3:: have_same_entry(const Simplex& s1, const Simplex& s2) const { //type + using CGAL::cpp11::get; if (get<1>(s1) != get<1>(s2)) return false; switch (get<1>(s1)) @@ -283,6 +292,7 @@ template < class Tr, class Inc > void Triangulation_segment_cell_iterator_3:: walk_to_next_3() { + using CGAL::cpp11::get; boost::array vert = {&(get<0>(_cur)->vertex(0)->point()), &(get<0>(_cur)->vertex(1)->point()), @@ -460,6 +470,7 @@ walk_to_next_3() template < class Tr, class Inc > void Triangulation_segment_cell_iterator_3:: walk_to_next_3_inf( int inf ) { + using CGAL::cpp11::get; CGAL_triangulation_precondition( _tr.is_infinite( get<0>(_cur)->vertex(inf) ) ); // If this cell was reached by traversal from a finite one, it must be the final cell. @@ -574,6 +585,7 @@ template < class Tr, class Inc > void Triangulation_segment_cell_iterator_3:: walk_to_next_2() { + using CGAL::cpp11::get; boost::array vert = { &(get<0>(_cur)->vertex(0)->point()), &(get<0>(_cur)->vertex(1)->point()), @@ -845,6 +857,7 @@ walk_to_next_2() template < class Tr, class Inc > void Triangulation_segment_cell_iterator_3:: walk_to_next_2_inf( int inf ) { + using CGAL::cpp11::get; CGAL_triangulation_precondition( _tr.is_infinite( get<0>(_cur)->vertex(3) ) ); CGAL_triangulation_precondition( _tr.is_infinite( get<0>(_cur)->vertex(inf) ) ); From e734d2fd823413993948f99de6168e8011709d07 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 23 Jan 2017 17:40:26 +0100 Subject: [PATCH 063/138] add timers and a macro for verbose examples --- .../segment_simplex_traverser_3.cpp | 33 ++++++++++++++++--- .../Triangulation_3/segment_traverser_3.cpp | 19 ++++++++++- 2 files changed, 46 insertions(+), 6 deletions(-) diff --git a/Triangulation_3/examples/Triangulation_3/segment_simplex_traverser_3.cpp b/Triangulation_3/examples/Triangulation_3/segment_simplex_traverser_3.cpp index 9d7b53bb359..fac9d9cf33c 100644 --- a/Triangulation_3/examples/Triangulation_3/segment_simplex_traverser_3.cpp +++ b/Triangulation_3/examples/Triangulation_3/segment_simplex_traverser_3.cpp @@ -9,6 +9,9 @@ #include #include +#include + +//#define CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE // Define the kernel. typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; @@ -48,6 +51,11 @@ int main(int argc, char* argv[]) CGAL::default_random = CGAL::Random(0); CGAL::Random rng(0); + CGAL::Timer time; + time.start(); + + unsigned int nb_cells = 0, nb_facets = 0, nb_edges = 0, nb_vertex = 0; + unsigned int nb_collinear = 0; for (int i = 0; i < nb_seg; ++i) { @@ -59,15 +67,15 @@ int main(int argc, char* argv[]) rng.get_double(-0.22, 0.22), rng.get_double(-0.19, 0.19)); +#ifdef CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE std::cout << "Traverser " << (i + 1) << "\n\t(" << p1 << ")\n\t(" << p2 << ")" << std::endl; +#endif Simplex_traverser st(dt, p1, p2); // Count the number of finite cells traversed. unsigned int inf = 0, fin = 0; - unsigned int nb_facets = 0, nb_edges = 0, nb_vertex = 0; - unsigned int nb_collinear = 0; for (; st != st.end(); ++st) { if( dt.is_infinite(st) ) @@ -78,7 +86,11 @@ int main(int argc, char* argv[]) if (st.is_facet()) ++nb_facets; else if (st.is_edge()) ++nb_edges; else if (st.is_vertex()) ++nb_vertex; + else if (st.is_cell()) ++nb_cells; + if (st.is_collinear()) ++nb_collinear; + +#ifdef CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE if (st.is_facet()) std::cout << "facet " << std::endl; else if (st.is_edge()) @@ -90,11 +102,11 @@ int main(int argc, char* argv[]) CGAL_assertion(st.is_cell()); std::cout << "cell " << std::endl; } - - if (st.is_collinear()) ++nb_collinear; +#endif } } +#ifdef CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE std::cout << "While traversing from " << st.source() << " to " << st.target() << std::endl; std::cout << "\tinfinite cells : " << inf << std::endl; @@ -103,6 +115,7 @@ int main(int argc, char* argv[]) std::cout << "\tedges : " << nb_edges << std::endl; std::cout << "\tvertices : " << nb_vertex << std::endl; std::cout << std::endl << std::endl; +#endif } // TODO : add cases with degeneracies, with query : @@ -113,6 +126,16 @@ int main(int argc, char* argv[]) // - along 2 successive facets (vertex/facet/edge/facet/edge) // - along 2 successive edges (vertex/edge/vertex/edge/vertex) // - along a facet and an edge successively - + + time.stop(); + std::cout << "Traversing simplices of triangulation with " + << nb_seg << " segments took " << time.time() << " seconds." + << std::endl; + std::cout << "\tnb cells : " << nb_cells << std::endl; + std::cout << "\tnb facets : " << nb_facets << std::endl; + std::cout << "\tnb edges : " << nb_edges << std::endl; + std::cout << "\tnb vertices : " << nb_vertex << std::endl; + std::cout << "\tnb collinear : " << nb_collinear << std::endl; + return 0; } \ No newline at end of file diff --git a/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp b/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp index 753f3468bff..54d1436adad 100644 --- a/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp +++ b/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp @@ -11,6 +11,9 @@ #include #include +#include + +//#define CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE // Define the kernel. typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; @@ -26,6 +29,7 @@ typedef CGAL::Triangulation_segment_cell_iterator_3< DT > Cell_traverser; int main(int argc, char* argv[]) { const char* fname = (argc>1) ? argv[1] : "data/blobby.xyz"; + int nb_seg = (argc > 2) ? atoi(argv[2]) : 100; // Reads a .xyz point set file in points. // As the point is the second element of the tuple (that is with index 1) @@ -49,10 +53,11 @@ int main(int argc, char* argv[]) CGAL::default_random = CGAL::Random(0); CGAL::Random rng(0); + CGAL::Timer time; + time.start(); unsigned int nb_facets = 0, nb_edges = 0, nb_vertex = 0; - unsigned int nb_seg = 100; for (unsigned int i = 0; i < nb_seg; ++i) { // Construct a traverser. @@ -63,9 +68,11 @@ int main(int argc, char* argv[]) rng.get_double(-0.22, 0.22), rng.get_double(-0.19, 0.19)); +#ifdef CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE std::cout << "Traverser " << (i + 1) << "\n\t(" << p1 << ")\n\t(" << p2 << ")" << std::endl; +#endif Cell_traverser ct(dt, p1, p2); // Count the number of finite cells traversed. @@ -100,12 +107,22 @@ int main(int argc, char* argv[]) } } +#ifdef CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE std::cout << "While traversing from " << ct.source() << " to " << ct.target() << std::endl; std::cout << inf << " infinite and " << fin << " finite cells were visited." << std::endl; std::cout << std::endl << std::endl; +#endif } + time.stop(); + std::cout << "Traversing cells of triangulation with " + << nb_seg << " segments took " << time.time() << " seconds." + << std::endl; + std::cout << "\tnb facets : " << nb_facets << std::endl; + std::cout << "\tnb edges : " << nb_edges << std::endl; + std::cout << "\tnb vertices : " << nb_vertex << std::endl; + return 0; } \ No newline at end of file From bd34d03c1553c23163514b39802fcd251373560d Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 21 Sep 2017 11:39:40 +0200 Subject: [PATCH 064/138] add cheaper orientation function to traverser it uses Simple_cartesian to make cheaper, though less precise, tests --- .../CGAL/Triangulation_segment_traverser_3.h | 3 ++ .../Triangulation_segment_traverser_3_impl.h | 32 +++++++++++++++---- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 17e47ffa677..38d8123a06d 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -459,6 +459,9 @@ private: bool have_same_entry(const Simplex& s1, const Simplex& s2) const; + CGAL::Orientation orientation(const Point& p, const Point& q, + const Point& r, const Point& s) const; + }; // class Triangulation_segment_cell_iterator_3 // compares a handle to a cell to a traverser. diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h index 169618d6791..7c42ef4ada0 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h @@ -20,6 +20,8 @@ #define CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_IMPL_H #include +#include +#include namespace CGAL { @@ -54,7 +56,7 @@ Triangulation_segment_cell_iterator_3( const Tr& tr, Vertex_handle s, const Poin CGAL_triangulation_precondition( s->point() != t ); CGAL_triangulation_precondition( _tr.dimension() >= 2 ); CGAL_triangulation_precondition( _tr.dimension() == 3 || - _tr.orientation( *_tr.finite_facets_begin(), t ) == COPLANAR ); + orientation( *_tr.finite_facets_begin(), t ) == COPLANAR ); _source = s->point(); _target = t; @@ -78,7 +80,7 @@ Triangulation_segment_cell_iterator_3( const Tr& tr, const Point& s, Vertex_hand CGAL_triangulation_precondition( s != t->point() ); CGAL_triangulation_precondition( _tr.dimension() >= 2 ); CGAL_triangulation_precondition( _tr.dimension() == 3 || - _tr.orientation( *_tr.finite_facets_begin(), s ) == COPLANAR ); + orientation( *_tr.finite_facets_begin(), s ) == COPLANAR ); _source = s; _target = t->point(); @@ -342,7 +344,7 @@ walk_to_next_3() vert[li] = &_target; // Check if the target is on the opposite side of the supporting plane. - op[li] = _tr.orientation( *vert[0], *vert[1], *vert[2], *vert[3] ); + op[li] = orientation( *vert[0], *vert[1], *vert[2], *vert[3] ); if( op[li] == POSITIVE ) pos += li; if( op[li] != NEGATIVE ) { @@ -365,7 +367,7 @@ walk_to_next_3() if( !calc[oij] ) { Point* backup2 = vert[lj]; vert[lj] = &_source; - o[oij] = _tr.orientation( *vert[0], *vert[1], *vert[2], *vert[3] ); + o[oij] = orientation( *vert[0], *vert[1], *vert[2], *vert[3] ); vert[lj] = backup2; calc[oij] = true; } @@ -489,7 +491,7 @@ walk_to_next_3_inf( int inf ) { Orientation o[4]; // Check if the target lies outside the convex hull. - if( _tr.orientation( *vert[0], *vert[1], *vert[2], *vert[3] ) == POSITIVE ) { + if( orientation( *vert[0], *vert[1], *vert[2], *vert[3] ) == POSITIVE ) { // The target lies in an infinite cell. // Note that we do not traverse to other infinite cells. _prev = Simplex( get<0>(_cur), Tr::OUTSIDE_CONVEX_HULL, -1, -1 ); @@ -498,7 +500,7 @@ walk_to_next_3_inf( int inf ) { } vert[inf] = &(_source); - CGAL_triangulation_assertion( _tr.orientation( *vert[0], *vert[1], *vert[2], *vert[3] ) == POSITIVE ); + CGAL_triangulation_assertion( orientation( *vert[0], *vert[1], *vert[2], *vert[3] ) == POSITIVE ); // For the remembering stochastic walk, we start trying with a random index: int li = rng.template get_bits<2>(); @@ -521,7 +523,7 @@ walk_to_next_3_inf( int inf ) { Point* backup = vert[li]; vert[li] = &(_target); - o[li] = _tr.orientation( *vert[0], *vert[1], *vert[2], *vert[3] ); + o[li] = orientation( *vert[0], *vert[1], *vert[2], *vert[3] ); if( o[li] != NEGATIVE ) { vert[li] = backup; @@ -930,6 +932,22 @@ walk_to_next_2_inf( int inf ) { return; } } + +template < class Tr, class Inc > +CGAL::Orientation +Triangulation_segment_cell_iterator_3::orientation( + const Point& p, const Point& q, const Point& r, const Point& s) const +{ +#ifdef CGAL_EXPERIMENT_WITH_SIMPLE_CARTESIAN + typedef CGAL::Simple_cartesian K2; + CGAL::Cartesian_converter c; + + return CGAL::orientation(c(p), c(q), c(r), c(s)); +#else + return _tr.orientation(p, q, r, s); +#endif +} + } //end of CGAL namespace From 8b6674398077fe7fa5e2df32f236368b97f4e261 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 21 Sep 2017 11:40:38 +0200 Subject: [PATCH 065/138] change the example to use it for benchmarking --- .../Triangulation_3/segment_traverser_3.cpp | 44 ++++++++++--------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp b/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp index 54d1436adad..df68f42d56a 100644 --- a/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp +++ b/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp @@ -1,4 +1,5 @@ -#define CGAL_TRIANGULATION_3_TRAVERSER_CHECK_INTERSECTION +//#define CGAL_TRIANGULATION_3_TRAVERSER_CHECK_INTERSECTION +//#define CGAL_EXPERIMENT_WITH_SIMPLE_CARTESIAN #include #include @@ -29,7 +30,8 @@ typedef CGAL::Triangulation_segment_cell_iterator_3< DT > Cell_traverser; int main(int argc, char* argv[]) { const char* fname = (argc>1) ? argv[1] : "data/blobby.xyz"; - int nb_seg = (argc > 2) ? atoi(argv[2]) : 100; + unsigned int nb_seg = (argc > 2) ? static_cast(atoi(argv[2])) + : 100; // Reads a .xyz point set file in points. // As the point is the second element of the tuple (that is with index 1) @@ -85,25 +87,25 @@ int main(int argc, char* argv[]) { ++fin; - DT::Locate_type lt; - int li, lj; - ct.entry(lt, li, lj); + //DT::Locate_type lt; + //int li, lj; + //ct.entry(lt, li, lj); - switch (lt) - { - case DT::Locate_type::FACET: - ++nb_facets; - break; - case DT::Locate_type::EDGE: - ++nb_edges; - break; - case DT::Locate_type::VERTEX: - ++nb_vertex; - break; - default: - /*when source is in a cell*/ - CGAL_assertion(lt == DT::Locate_type::CELL); - } + //switch (lt) + //{ + //case DT::Locate_type::FACET: + // ++nb_facets; + // break; + //case DT::Locate_type::EDGE: + // ++nb_edges; + // break; + //case DT::Locate_type::VERTEX: + // ++nb_vertex; + // break; + //default: + // /*when source is in a cell*/ + // CGAL_assertion(lt == DT::Locate_type::CELL); + //} } } @@ -117,6 +119,8 @@ int main(int argc, char* argv[]) } time.stop(); + std::cout << "Triangulation has " << dt.number_of_vertices() << " vertices." + << std::endl; std::cout << "Traversing cells of triangulation with " << nb_seg << " segments took " << time.time() << " seconds." << std::endl; From 6a2567aa014af3824f62e9154ce1e32df4462ae4 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 21 Sep 2017 11:54:30 +0200 Subject: [PATCH 066/138] add actual bbox of the input --- .../Triangulation_3/segment_traverser_3.cpp | 33 ++++++++++++++----- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp b/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp index df68f42d56a..8577fcaaffc 100644 --- a/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp +++ b/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp @@ -1,5 +1,5 @@ //#define CGAL_TRIANGULATION_3_TRAVERSER_CHECK_INTERSECTION -//#define CGAL_EXPERIMENT_WITH_SIMPLE_CARTESIAN +#define CGAL_EXPERIMENT_WITH_SIMPLE_CARTESIAN #include #include @@ -9,11 +9,13 @@ #include #include #include +#include #include #include #include + //#define CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE // Define the kernel. @@ -47,7 +49,22 @@ int main(int argc, char* argv[]) } //bbox - //min (-0.481293,-0.220929,-0.194076), max (0.311532,0.225525,0.198025) + double xmin = points[0].x(); + double xmax = points[0].x(); + double ymin = points[0].y(); + double ymax = points[0].y(); + double zmin = points[0].z(); + double zmax = points[0].z(); + + BOOST_FOREACH(Point_3 p, points) + { + xmin = (std::min)(xmin, p.x()); + ymin = (std::min)(ymin, p.y()); + zmin = (std::min)(zmin, p.z()); + xmax = (std::max)(xmax, p.x()); + ymax = (std::max)(ymax, p.y()); + zmax = (std::max)(zmax, p.z()); + } // Construct the Delaunay triangulation. DT dt( points.begin(), points.end() ); @@ -63,12 +80,12 @@ int main(int argc, char* argv[]) for (unsigned int i = 0; i < nb_seg; ++i) { // Construct a traverser. - Point_3 p1(rng.get_double(-0.48, 0.31), - rng.get_double(-0.22, 0.22), - rng.get_double(-0.19, 0.19)); - Point_3 p2(rng.get_double(-0.48, 0.31), - rng.get_double(-0.22, 0.22), - rng.get_double(-0.19, 0.19)); + Point_3 p1(rng.get_double(xmin, xmax), + rng.get_double(ymin, ymax), + rng.get_double(zmin, zmax)); + Point_3 p2(rng.get_double(xmin, xmax), + rng.get_double(ymin, ymax), + rng.get_double(zmin, zmax)); #ifdef CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE std::cout << "Traverser " << (i + 1) From ec7c86fa7a934ed7705b8efcdbf854878ad5e8a5 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 15 Mar 2018 15:22:22 +0100 Subject: [PATCH 067/138] Reduce testcase --- .../Algebraic_kernel_d/Curve_analysis_2.h | 4 +- .../Curve_pair_analysis_2.h | 21 +- .../Curve_pair_analysis_2.cpp | 1069 +---------------- 3 files changed, 34 insertions(+), 1060 deletions(-) diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h index 4758d20b215..c92ef9fbb98 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h @@ -856,7 +856,7 @@ private: size_type mult_of_resultant = event.mult_of_prim_res_root; -/* + // AF was commented #if CGAL_ACK_DEBUG_FLAG CGAL_ACK_DEBUG_PRINT << "Event line for " << index << " " << root_of_resultant << " " @@ -865,7 +865,7 @@ private: << left_arcs << " " << right_arcs << std::endl; #endif -*/ + Status_line_1 ev_line = event_line_builder().create_event_line(index, diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h index 9a3b7d45403..ea1c4c926d9 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h @@ -633,6 +633,10 @@ public: CGAL_assertion(i>=0 && i < static_cast (event_indices().size())); + + for(int j = 0; j < event_indices().size(); j++){ + std::cout << "event_indices["<< j << "] = " << event_indices()[j].fg << " " << event_indices()[j].ffy << " "<< event_indices()[j].ggy << std::endl; + } return event_indices()[i]; } @@ -1429,18 +1433,19 @@ compute_event_x_coordinates_with_event_indices() const { std::vector& event_indices = this->ptr()->event_indices.get(); for(size_type i=0;i(events.size());i++) { -/* + #if CGAL_ACK_DEBUG_FLAG + std::cout << " events["<< i << "] = "; CGAL_ACK_DEBUG_PRINT << CGAL::to_double(events[i]) << std::flush; #endif -*/ + switch(events_type[i]) { case(CGAL::internal::ROOT_OF_FIRST_SET): { -/* + #if CGAL_ACK_DEBUG_FLAG CGAL_ACK_DEBUG_PRINT << " one curve event" << std::endl; #endif -*/ + this->ptr()->event_slices.push_back(Lazy_status_line_CPA_1()); switch(*(one_curve_it++)) { case(CGAL::internal::ROOT_OF_FIRST_SET): { @@ -1463,11 +1468,11 @@ compute_event_x_coordinates_with_event_indices() const { break; } case(CGAL::internal::ROOT_OF_SECOND_SET): { -/* + #if CGAL_ACK_DEBUG_FLAG CGAL_ACK_DEBUG_PRINT << " two curve event" << std::endl; #endif -*/ + this->ptr()-> event_slices.push_back(Lazy_status_line_CPA_1()); @@ -1477,12 +1482,12 @@ compute_event_x_coordinates_with_event_indices() const { break; } case(CGAL::internal::ROOT_OF_BOTH_SETS): { -/* + #if CGAL_ACK_DEBUG_FLAG CGAL_ACK_DEBUG_PRINT << " one and two curve event" << std::endl; #endif -*/ + this->ptr()->event_slices.push_back(Lazy_status_line_CPA_1()); diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/Curve_pair_analysis_2.cpp b/Algebraic_kernel_d/test/Algebraic_kernel_d/Curve_pair_analysis_2.cpp index 3901f71ee5b..d98feaa3b6c 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/Curve_pair_analysis_2.cpp +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/Curve_pair_analysis_2.cpp @@ -1,3 +1,5 @@ +#define CGAL_ACK_DEBUG_FLAG 1 + // TODO: Add licence // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE @@ -14,21 +16,13 @@ #include #include -// Switches on/off tests for Sqrt-extension types -#if CGAL_ACK_WITH_ROTATIONS -#ifndef DO_SQRT_EXTENSION_TESTS -#define DO_SQRT_EXTENSION_TESTS 1 -#endif -#endif + #include #include -#if CGAL_ACK_USE_EXACUS -#include -#include -#endif + #include @@ -55,9 +49,7 @@ void test_routine() { typedef typename Arithmetic_kernel::Integer Integer; typedef Integer Coefficient; - typedef typename - CGAL::Polynomial_type_generator::Type Poly_1; - CGAL_USE_TYPE(Poly_1); + typedef typename CGAL::Polynomial_type_generator::Type Poly_2; @@ -73,20 +65,9 @@ void test_routine() { typedef CGAL::Algebraic_kernel_d_1 Algebraic_kernel_d_1; - typedef typename Algebraic_kernel_d_1::Algebraic_real_1 Algebraic_real; - CGAL_USE_TYPE(Algebraic_real); -#if CGAL_ACK_USE_EXACUS - typedef AcX::Algebraic_curve_2 Algebraic_curve_2; - typedef AcX::Algebraic_curve_pair_2 - Algebraic_curve_pair_2; - typedef CGAL::Algebraic_curve_kernel_2 - Algebraic_kernel_d_2; -#else typedef CGAL::Algebraic_curve_kernel_2 Algebraic_kernel_d_2; -#endif Algebraic_kernel_d_2 kernel; @@ -103,371 +84,7 @@ void test_routine() { construct_curve_pair_2 = kernel.construct_curve_pair_2_object(); - - { - Poly_2 f=from_string("P[4(0,P[4(3,-1)(4,2)])(2,P[1(1,1)])(4,P[0(0,1)])]"); - Poly_2 g=from_string("P[4(0,P[4(4,1)])(1,P[2(2,1)])(3,P[0(0,-1)])(4,P[0(0,2)])]"); - Curve_analysis_2 c1=construct_curve_2(f); - Curve_analysis_2 c2=construct_curve_2(g); - Curve_pair_analysis_2 curve_pair=construct_curve_pair_2(c1,c2); - assert(curve_pair.number_of_status_lines_with_event()==10); - typedef typename Curve_pair_analysis_2::Status_line_1 Status_line_1; -#if CGAL_ACK_USE_EXACUS - typedef SoX::Index_triple Triple; -#else - typedef CGAL::internal::Event_indices Triple; -#endif - int i; - { - i=0; - const Status_line_1& slice=curve_pair.status_line_of_interval(i); - assert(! slice.is_event()); - assert(! slice.is_intersection()); - assert(slice.number_of_events()==0); - } - { - i=0; - const Status_line_1& slice=curve_pair.status_line_at_event(i); - Triple triple = curve_pair.event_indices(i); - assert(triple.fg==-1); - assert(triple.ffy==-1); - assert(triple.ggy==0); - //assert(slice.event_of_curve(i,0)==-1); - //assert(slice.event_of_curve(i,1)==0); - assert(slice.index()==i); - assert(slice.is_event()); - assert(! slice.is_intersection()); - assert(slice.number_of_events()==1); - assert(slice.curves_at_event(0).first==-1); - assert(slice.curves_at_event(0).second==0); - } - { - i=1; - const Status_line_1& slice=curve_pair.status_line_of_interval(i); - assert(! slice.is_event()); - assert(slice.number_of_events()==2); - assert(slice.curves_at_event(0).first==-1); - assert(slice.curves_at_event(0).second==0); - assert(slice.curves_at_event(1).first==-1); - assert(slice.curves_at_event(1).second==1); - } - { - i=1; - const Status_line_1& slice=curve_pair.status_line_at_event(i); - Triple triple = curve_pair.event_indices(i); - assert(triple.fg==-1); - assert(triple.ffy==-1); - assert(triple.ggy==1); - //assert(slice.event_of_curve(i,0)==-1); - //assert(slice.event_of_curve(i,1)==0); - assert(slice.index()==i); - assert(slice.is_event()); - assert(! slice.is_intersection()); - assert(slice.number_of_events()==3); - assert(slice.curves_at_event(0).first==-1); - assert(slice.curves_at_event(0).second==0); - assert(slice.curves_at_event(1).first==-1); - assert(slice.curves_at_event(1).second==1); - assert(slice.curves_at_event(2).first==-1); - assert(slice.curves_at_event(2).second==2); - } - { - i=2; - const Status_line_1& slice=curve_pair.status_line_of_interval(i); - assert(! slice.is_event()); - assert(slice.number_of_events()==4); - assert(slice.curves_at_event(0).first==-1); - assert(slice.curves_at_event(0).second==0); - assert(slice.curves_at_event(1).first==-1); - assert(slice.curves_at_event(1).second==1); - assert(slice.curves_at_event(2).first==-1); - assert(slice.curves_at_event(2).second==2); - assert(slice.curves_at_event(3).first==-1); - assert(slice.curves_at_event(3).second==3); - } - { - i=2; - const Status_line_1& slice=curve_pair.status_line_at_event(i); - Triple triple = curve_pair.event_indices(i); - assert(triple.fg==-1); - assert(triple.ffy==0); - assert(triple.ggy==-1); - //assert(slice.event_of_curve(i,0)==0); - //assert(slice.event_of_curve(i,1)==-1); - assert(slice.index()==i); - assert(slice.is_event()); - assert(! slice.is_intersection()); - assert(slice.number_of_events()==6); - assert(slice.curves_at_event(0).first==0); - assert(slice.curves_at_event(0).second==-1); - assert(slice.curves_at_event(1).first==-1); - assert(slice.curves_at_event(1).second==0); - assert(slice.curves_at_event(2).first==-1); - assert(slice.curves_at_event(2).second==1); - assert(slice.curves_at_event(3).first==1); - assert(slice.curves_at_event(3).second==-1); - assert(slice.curves_at_event(4).first==-1); - assert(slice.curves_at_event(4).second==2); - assert(slice.curves_at_event(5).first==-1); - assert(slice.curves_at_event(5).second==3); - } - { - i=3; - const Status_line_1& slice=curve_pair.status_line_of_interval(i); - assert(! slice.is_event()); - assert(slice.number_of_events()==8); - assert(slice.curves_at_event(0).first==0); - assert(slice.curves_at_event(0).second==-1); - assert(slice.curves_at_event(1).first==1); - assert(slice.curves_at_event(1).second==-1); - assert(slice.curves_at_event(2).first==-1); - assert(slice.curves_at_event(2).second==0); - assert(slice.curves_at_event(3).first==-1); - assert(slice.curves_at_event(3).second==1); - assert(slice.curves_at_event(4).first==2); - assert(slice.curves_at_event(4).second==-1); - assert(slice.curves_at_event(5).first==3); - assert(slice.curves_at_event(5).second==-1); - assert(slice.curves_at_event(6).first==-1); - assert(slice.curves_at_event(6).second==2); - assert(slice.curves_at_event(7).first==-1); - assert(slice.curves_at_event(7).second==3); - } - { - i=3; - const Status_line_1& slice=curve_pair.status_line_at_event(i); - Triple triple = curve_pair.event_indices(i); - assert(triple.fg==0); - assert(triple.ffy==-1); - assert(triple.ggy==-1); - //assert(slice.event_of_curve(i,0)==-1); - //assert(slice.event_of_curve(i,1)==-1); - assert(slice.index()==i); - assert(slice.is_event()); - assert(slice.is_intersection()); - assert(slice.number_of_events()==7); - assert(slice.curves_at_event(0).first==0); - assert(slice.curves_at_event(0).second==-1); - assert(slice.curves_at_event(1).first==1); - assert(slice.curves_at_event(1).second==-1); - assert(slice.curves_at_event(2).first==-1); - assert(slice.curves_at_event(2).second==0); - assert(slice.curves_at_event(3).first==-1); - assert(slice.curves_at_event(3).second==1); - assert(slice.curves_at_event(4).first==2); - assert(slice.curves_at_event(4).second==-1); - assert(slice.curves_at_event(5).first==3); - assert(slice.curves_at_event(5).second==2); - assert(slice.curves_at_event(6).first==-1); - assert(slice.curves_at_event(6).second==3); - - assert(slice.multiplicity_of_intersection(5)==1); - } - { - i=4; - const Status_line_1& slice=curve_pair.status_line_of_interval(i); - assert(! slice.is_event()); - assert(slice.number_of_events()==8); - assert(slice.curves_at_event(0).first==0); - assert(slice.curves_at_event(0).second==-1); - assert(slice.curves_at_event(1).first==1); - assert(slice.curves_at_event(1).second==-1); - assert(slice.curves_at_event(2).first==-1); - assert(slice.curves_at_event(2).second==0); - assert(slice.curves_at_event(3).first==-1); - assert(slice.curves_at_event(3).second==1); - assert(slice.curves_at_event(4).first==2); - assert(slice.curves_at_event(4).second==-1); - assert(slice.curves_at_event(5).first==-1); - assert(slice.curves_at_event(5).second==2); - assert(slice.curves_at_event(6).first==3); - assert(slice.curves_at_event(6).second==-1); - assert(slice.curves_at_event(7).first==-1); - assert(slice.curves_at_event(7).second==3); - } - { - i=4; - const Status_line_1& slice=curve_pair.status_line_at_event(i); - Triple triple = curve_pair.event_indices(i); - assert(triple.fg==1); - assert(triple.ffy==1); - assert(triple.ggy==2); - //assert(slice.event_of_curve(i,0)==1); - //assert(slice.event_of_curve(i,1)==2); - assert(slice.index()==i); - assert(slice.is_event()); - assert(slice.is_intersection()); - assert(slice.number_of_events()==2); - assert(slice.curves_at_event(0).first==0); - assert(slice.curves_at_event(0).second==0); - assert(slice.curves_at_event(1).first==-1); - assert(slice.curves_at_event(1).second==1); - } - { - i=5; - const Status_line_1& slice=curve_pair.status_line_of_interval(i); - assert(! slice.is_event()); - assert(slice.number_of_events()==6); - assert(slice.curves_at_event(0).first==-1); - assert(slice.curves_at_event(0).second==0); - assert(slice.curves_at_event(1).first==0); - assert(slice.curves_at_event(1).second==-1); - assert(slice.curves_at_event(2).first==-1); - assert(slice.curves_at_event(2).second==1); - assert(slice.curves_at_event(3).first==1); - assert(slice.curves_at_event(3).second==-1); - assert(slice.curves_at_event(4).first==-1); - assert(slice.curves_at_event(4).second==2); - assert(slice.curves_at_event(5).first==-1); - assert(slice.curves_at_event(5).second==3); - } - { - i=5; - const Status_line_1& slice=curve_pair.status_line_at_event(i); - Triple triple = curve_pair.event_indices(i); - assert(triple.fg==-1); - assert(triple.ffy==-1); - assert(triple.ggy==3); - //assert(slice.event_of_curve(i,0)==-1); - //assert(slice.event_of_curve(i,1)==-1); - assert(slice.index()==i); - assert(slice.is_event()); - assert(! slice.is_intersection()); - assert(slice.number_of_events()==5); - assert(slice.curves_at_event(0).first==-1); - assert(slice.curves_at_event(0).second==0); - assert(slice.curves_at_event(1).first==0); - assert(slice.curves_at_event(1).second==-1); - assert(slice.curves_at_event(2).first==-1); - assert(slice.curves_at_event(2).second==1); - assert(slice.curves_at_event(3).first==1); - assert(slice.curves_at_event(3).second==-1); - assert(slice.curves_at_event(4).first==-1); - assert(slice.curves_at_event(4).second==2); - } - { - i=6; - const Status_line_1& slice=curve_pair.status_line_of_interval(i); - assert(! slice.is_event()); - assert(slice.number_of_events()==4); - assert(slice.curves_at_event(0).first==-1); - assert(slice.curves_at_event(0).second==0); - assert(slice.curves_at_event(1).first==0); - assert(slice.curves_at_event(1).second==-1); - assert(slice.curves_at_event(2).first==-1); - assert(slice.curves_at_event(2).second==1); - assert(slice.curves_at_event(3).first==1); - assert(slice.curves_at_event(3).second==-1); - } - { - i=6; - const Status_line_1& slice=curve_pair.status_line_at_event(i); - Triple triple = curve_pair.event_indices(i); - assert(triple.fg==2); - assert(triple.ffy==-1); - assert(triple.ggy==-1); - //assert(slice.event_of_curve(i,0)==-1); - //assert(slice.event_of_curve(i,1)==-1); - assert(slice.index()==i); - assert(slice.is_event()); - assert(slice.is_intersection()); - assert(slice.number_of_events()==3); - assert(slice.curves_at_event(0).first==0); - assert(slice.curves_at_event(0).second==0); - assert(slice.curves_at_event(1).first==-1); - assert(slice.curves_at_event(1).second==1); - assert(slice.curves_at_event(2).first==1); - assert(slice.curves_at_event(2).second==-1); - assert(slice.multiplicity_of_intersection(0)==1); - } - { - i=7; - const Status_line_1& slice=curve_pair.status_line_of_interval(i); - assert(! slice.is_event()); - assert(slice.number_of_events()==4); - assert(slice.curves_at_event(0).first==0); - assert(slice.curves_at_event(0).second==-1); - assert(slice.curves_at_event(1).first==-1); - assert(slice.curves_at_event(1).second==0); - assert(slice.curves_at_event(2).first==-1); - assert(slice.curves_at_event(2).second==1); - assert(slice.curves_at_event(3).first==1); - assert(slice.curves_at_event(3).second==-1); - } - { - i=7; - const Status_line_1& slice=curve_pair.status_line_at_event(i); - Triple triple = curve_pair.event_indices(i); - assert(triple.fg==-1); - assert(triple.ffy==-1); - assert(triple.ggy==4); - //assert(slice.event_of_curve(i,0)==-1); - //assert(slice.event_of_curve(i,1)==4); - assert(slice.index()==i); - assert(slice.is_event()); - assert(! slice.is_intersection()); - assert(slice.number_of_events()==3); - assert(slice.curves_at_event(0).first==0); - assert(slice.curves_at_event(0).second==-1); - assert(slice.curves_at_event(1).first==-1); - assert(slice.curves_at_event(1).second==0); - assert(slice.curves_at_event(2).first==1); - assert(slice.curves_at_event(2).second==-1); - } - { - i=8; - const Status_line_1& slice=curve_pair.status_line_of_interval(i); - assert(! slice.is_event()); - assert(slice.number_of_events()==2); - assert(slice.curves_at_event(0).first==0); - assert(slice.curves_at_event(0).second==-1); - assert(slice.curves_at_event(1).first==1); - assert(slice.curves_at_event(1).second==-1); - } - { - i=8; - const Status_line_1& slice=curve_pair.status_line_at_event(i); - Triple triple = curve_pair.event_indices(i); - assert(triple.fg==-1); - assert(triple.ffy==2); - assert(triple.ggy==-1); - //assert(slice.event_of_curve(i,0)==2); - //assert(slice.event_of_curve(i,1)==-1); - assert(slice.index()==i); - assert(slice.is_event()); - assert(! slice.is_intersection()); - assert(slice.number_of_events()==1); - assert(slice.curves_at_event(0).first==0); - assert(slice.curves_at_event(0).second==-1); - } - { - i=9; - const Status_line_1& slice=curve_pair.status_line_of_interval(i); - assert(! slice.is_event()); - assert(slice.number_of_events()==0); - } - { - i=9; - const Status_line_1& slice=curve_pair.status_line_at_event(i); - Triple triple = curve_pair.event_indices(i); - assert(triple.fg==-1); - assert(triple.ffy==3); - assert(triple.ggy==-1); - //assert(slice.event_of_curve(i,0)==3); - //assert(slice.event_of_curve(i,1)==-1); - assert(slice.index()==i); - assert(slice.is_event()); - assert(! slice.is_intersection()); - assert(slice.number_of_events()==0); - } - { - i=10; - const Status_line_1& slice=curve_pair.status_line_of_interval(i); - assert(! slice.is_event()); - assert(slice.number_of_events()==0); - } - - } + { Poly_2 f=from_string("P[4(0,P[1(0,1)(1,1)])(4,P[0(0,-1)])]"); Poly_2 g=from_string("P[2(0,P[2(0,-5)(2,6)])(2,P[0(0,4)])]"); @@ -477,675 +94,27 @@ void test_routine() { Curve_pair_analysis_2 curve_pair=construct_curve_pair_2(ca1,ca2); assert(curve_pair.number_of_status_lines_with_event()==7); typedef typename Curve_pair_analysis_2::Status_line_1 Status_line_1; -#if CGAL_ACK_USE_EXACUS - typedef SoX::Index_triple Triple; -#else + typedef CGAL::internal::Event_indices Triple; -#endif - int i; - { - i=0; - const Status_line_1& slice=curve_pair.status_line_of_interval(i); - assert(! slice.is_event()); - assert(slice.number_of_events()==0); - } - { - i=0; - const Status_line_1& slice=curve_pair.status_line_at_event(i); - Triple triple = curve_pair.event_indices(i); - assert(triple.fg==-1); - assert(triple.ffy==0); - assert(triple.ggy==-1); - //assert(slice.event_of_curve(i,0)==0); - //assert(slice.event_of_curve(i,1)==-1); - assert(slice.index()==i); - assert(slice.is_event()); - assert(! slice.is_intersection()); - assert(slice.number_of_events()==1); - assert(slice.curves_at_event(0).first==0); - assert(slice.curves_at_event(0).second==-1); - } - { - i=1; - const Status_line_1& slice=curve_pair.status_line_of_interval(i); - assert(! slice.is_event()); - assert(slice.number_of_events()==2); - assert(slice.curves_at_event(0).first==0); - assert(slice.curves_at_event(0).second==-1); - assert(slice.curves_at_event(1).first==1); - assert(slice.curves_at_event(1).second==-1); - } - { - i=1; - const Status_line_1& slice=curve_pair.status_line_at_event(i); - Triple triple = curve_pair.event_indices(i); - assert(triple.fg==0); - assert(triple.ffy==-1); - assert(triple.ggy==-1); - //assert(slice.event_of_curve(i,0)==-1); - //assert(slice.event_of_curve(i,1)==-1); - assert(slice.index()==i); - assert(slice.is_event()); - assert(! slice.is_intersection()); - assert(slice.number_of_events()==2); - assert(slice.curves_at_event(0).first==0); - assert(slice.curves_at_event(0).second==-1); - assert(slice.curves_at_event(1).first==1); - assert(slice.curves_at_event(1).second==-1); - } - { - i=2; - const Status_line_1& slice=curve_pair.status_line_of_interval(i); - assert(! slice.is_event()); - assert(slice.number_of_events()==2); - assert(slice.curves_at_event(0).first==0); - assert(slice.curves_at_event(0).second==-1); - assert(slice.curves_at_event(1).first==1); - assert(slice.curves_at_event(1).second==-1); - } - { - i=2; - const Status_line_1& slice=curve_pair.status_line_at_event(i); - Triple triple = curve_pair.event_indices(i); - assert(triple.fg==-1); - assert(triple.ffy==-1); - assert(triple.ggy==0); - //assert(slice.event_of_curve(i,0)==-1); - //assert(slice.event_of_curve(i,1)==0); - assert(slice.index()==i); - assert(slice.is_event()); - assert(! slice.is_intersection()); - assert(slice.number_of_events()==3); - assert(slice.curves_at_event(0).first==0); - assert(slice.curves_at_event(0).second==-1); - assert(slice.curves_at_event(1).first==-1); - assert(slice.curves_at_event(1).second==0); - assert(slice.curves_at_event(2).first==1); - assert(slice.curves_at_event(2).second==-1); - - } - { - i=3; - const Status_line_1& slice=curve_pair.status_line_of_interval(i); - assert(! slice.is_event()); - assert(slice.number_of_events()==4); - assert(slice.curves_at_event(0).first==0); - assert(slice.curves_at_event(0).second==-1); - assert(slice.curves_at_event(1).first==-1); - assert(slice.curves_at_event(1).second==0); - assert(slice.curves_at_event(2).first==-1); - assert(slice.curves_at_event(2).second==1); - assert(slice.curves_at_event(3).first==1); - assert(slice.curves_at_event(3).second==-1); - } - { - i=3; - const Status_line_1& slice=curve_pair.status_line_at_event(i); - Triple triple = curve_pair.event_indices(i); - assert(triple.fg==1); - assert(triple.ffy==-1); - assert(triple.ggy==-1); - //assert(slice.event_of_curve(i,0)==-1); - //assert(slice.event_of_curve(i,1)==-1); - assert(slice.index()==i); - assert(slice.is_event()); - assert(slice.is_intersection()); - assert(slice.number_of_events()==2); - assert(slice.curves_at_event(0).first==0); - assert(slice.curves_at_event(0).second==0); - assert(slice.curves_at_event(1).first==1); - assert(slice.curves_at_event(1).second==1); - assert(slice.multiplicity_of_intersection(0)==1); - assert(slice.multiplicity_of_intersection(1)==1); - } - { - i=4; - const Status_line_1& slice=curve_pair.status_line_of_interval(i); - assert(! slice.is_event()); - assert(slice.number_of_events()==4); - assert(slice.curves_at_event(0).first==-1); - assert(slice.curves_at_event(0).second==0); - assert(slice.curves_at_event(1).first==0); - assert(slice.curves_at_event(1).second==-1); - assert(slice.curves_at_event(2).first==1); - assert(slice.curves_at_event(2).second==-1); - assert(slice.curves_at_event(3).first==-1); - assert(slice.curves_at_event(3).second==1); - } - { - i=4; - const Status_line_1& slice=curve_pair.status_line_at_event(i); - Triple triple = curve_pair.event_indices(i); - assert(triple.fg==2); - assert(triple.ffy==-1); - assert(triple.ggy==-1); - //assert(slice.event_of_curve(i,0)==-1); - //assert(slice.event_of_curve(i,1)==-1); - assert(slice.index()==i); - assert(slice.is_event()); - assert(slice.is_intersection()); - assert(slice.number_of_events()==2); - assert(slice.curves_at_event(0).first==0); - assert(slice.curves_at_event(0).second==0); - assert(slice.curves_at_event(1).first==1); - assert(slice.curves_at_event(1).second==1); - assert(slice.multiplicity_of_intersection(0)==1); - assert(slice.multiplicity_of_intersection(1)==1); - } - { - i=5; - const Status_line_1& slice=curve_pair.status_line_of_interval(i); - assert(! slice.is_event()); - assert(slice.number_of_events()==4); - assert(slice.curves_at_event(0).first==0); - assert(slice.curves_at_event(0).second==-1); - assert(slice.curves_at_event(1).first==-1); - assert(slice.curves_at_event(1).second==0); - assert(slice.curves_at_event(2).first==-1); - assert(slice.curves_at_event(2).second==1); - assert(slice.curves_at_event(3).first==1); - assert(slice.curves_at_event(3).second==-1); - } - { - i=5; - const Status_line_1& slice=curve_pair.status_line_at_event(i); - Triple triple = curve_pair.event_indices(i); - assert(triple.fg==-1); - assert(triple.ffy==-1); - assert(triple.ggy==1); - //assert(slice.event_of_curve(i,0)==-1); - //assert(slice.event_of_curve(i,1)==1); - assert(slice.index()==i); - assert(slice.is_event()); - assert(! slice.is_intersection()); - assert(slice.number_of_events()==3); - assert(slice.curves_at_event(0).first==0); - assert(slice.curves_at_event(0).second==-1); - assert(slice.curves_at_event(1).first==-1); - assert(slice.curves_at_event(1).second==0); - assert(slice.curves_at_event(2).first==1); - assert(slice.curves_at_event(2).second==-1); - } - { - i=6; - const Status_line_1& slice=curve_pair.status_line_of_interval(i); - assert(! slice.is_event()); - assert(slice.number_of_events()==2); - assert(slice.curves_at_event(0).first==0); - assert(slice.curves_at_event(0).second==-1); - assert(slice.curves_at_event(1).first==1); - assert(slice.curves_at_event(1).second==-1); - } - { - i=6; - const Status_line_1& slice=curve_pair.status_line_at_event(i); - Triple triple = curve_pair.event_indices(i); - assert(triple.fg==3); - assert(triple.ffy==-1); - assert(triple.ggy==-1); - //assert(slice.event_of_curve(i,0)==-1); - //assert(slice.event_of_curve(i,1)==-1); - assert(slice.index()==i); - assert(slice.is_event()); - assert(! slice.is_intersection()); - assert(slice.number_of_events()==2); - assert(slice.curves_at_event(0).first==0); - assert(slice.curves_at_event(0).second==-1); - assert(slice.curves_at_event(1).first==1); - assert(slice.curves_at_event(1).second==-1); - } - { - i=7; - const Status_line_1& slice=curve_pair.status_line_of_interval(i); - assert(! slice.is_event()); - assert(slice.number_of_events()==2); - assert(slice.curves_at_event(0).first==0); - assert(slice.curves_at_event(0).second==-1); - assert(slice.curves_at_event(1).first==1); - assert(slice.curves_at_event(1).second==-1); - } + + int i=0; + + Triple triple = curve_pair.event_indices(i); + assert(triple.fg==-1); + assert(triple.ffy==0); + assert(triple.ggy==-1); + } - { - Poly_2 f=from_string("P[4(0,P[4(3,-1)(4,2)])(2,P[1(1,1)])(4,P[0(0,1)])]"); - Poly_2 g=from_string("P[4(0,P[4(0,12)(1,-380)(2,4200)(3,-18000)(4,20000)])(2,P[1(0,-4000)(1,40000)])(4,P[0(0,160000)])]"); - Curve_analysis_2 ca1=construct_curve_2(f), - ca2=construct_curve_2(g); - Curve_pair_analysis_2 curve_pair=construct_curve_pair_2(ca1,ca2); - //assert(curve_pair.number_of_status_lines_with_event()==11); - - - } -#if CGAL_ACK_WITH_ROTATIONS -#if DO_SQRT_EXTENSION_TESTS - // Sqrt extension: - { - typedef CGAL::Sqrt_extension Sqrt_extension; - typedef Sqrt_extension Coefficient; - typedef typename - CGAL::Polynomial_type_generator::Type Poly_sqrt1; - typedef typename - CGAL::Polynomial_type_generator::Type Poly_sqrt2; - - typedef CGAL::internal::Algebraic_real_quadratic_refinement_rep_bfi - < Coefficient, Rational > Rep_class; - typedef CGAL::internal::Bitstream_descartes - < CGAL::internal::Bitstream_descartes_rndl_tree_traits - < CGAL::internal::Bitstream_coefficient_kernel - > - > - Isolator; - typedef CGAL::Algebraic_kernel_d_1< Coefficient,Rational, - Rep_class, Isolator > - Algebraic_kernel_d_1_with_sqrt; - - Poly_sqrt2 f,g; - f=from_string("P[4(0,P[4(3,EXT[0,-2,7])(4,EXT[0,4,7])])(2,P[1(1,EXT[0,2,7])])(4,P[0(0,EXT[0,2,7])])]"); - g=from_string("P[4(0,P[4(4,EXT[0,2,7])])(1,P[2(2,EXT[0,2,7])])(3,P[0(0,EXT[0,-2,7])])(4,P[0(0,EXT[0,4,7])])]"); - - typedef CGAL::Algebraic_curve_kernel_2 - Algebraic_kernel_d_2; - - typedef typename Algebraic_kernel_d_2::Curve_analysis_2 Curve_analysis_2; - typedef typename Algebraic_kernel_d_2::Curve_pair_analysis_2 - Curve_pair_analysis_2; - - Algebraic_kernel_d_2 kernel; - - typename Algebraic_kernel_d_2::Construct_curve_2 - construct_curve_2 - = kernel.construct_curve_2_object(); - - typename Algebraic_kernel_d_2::Construct_curve_pair_2 - construct_curve_pair_2 - = kernel.construct_curve_pair_2_object(); - - - Curve_analysis_2 c1=construct_curve_2(f), - c2=construct_curve_2(g); - - Curve_pair_analysis_2 curve_pair=construct_curve_pair_2(c1,c2); - assert(curve_pair.number_of_status_lines_with_event()==10); - typedef typename Curve_pair_analysis_2::Status_line_1 Status_line_1; - typedef CGAL::internal::Event_indices Triple; - int i; - - { - i=0; - const Status_line_1& slice=curve_pair.status_line_of_interval(i); - assert(! slice.is_event()); - assert(! slice.is_intersection()); - assert(slice.number_of_events()==0); - } - { - i=0; - const Status_line_1& slice=curve_pair.status_line_at_event(i); - Triple triple = curve_pair.event_indices(i); - assert(triple.fg==-1); - assert(triple.ffy==-1); - assert(triple.ggy==0); - //assert(slice.event_of_curve(i,0)==-1); - //assert(slice.event_of_curve(i,1)==0); - assert(slice.index()==i); - assert(slice.is_event()); - assert(! slice.is_intersection()); - assert(slice.number_of_events()==1); - assert(slice.curves_at_event(0).first==-1); - assert(slice.curves_at_event(0).second==0); - } - { - i=1; - const Status_line_1& slice=curve_pair.status_line_of_interval(i); - assert(! slice.is_event()); - assert(slice.number_of_events()==2); - assert(slice.curves_at_event(0).first==-1); - assert(slice.curves_at_event(0).second==0); - assert(slice.curves_at_event(1).first==-1); - assert(slice.curves_at_event(1).second==1); - } - { - i=1; - const Status_line_1& slice=curve_pair.status_line_at_event(i); - Triple triple = curve_pair.event_indices(i); - assert(triple.fg==-1); - assert(triple.ffy==-1); - assert(triple.ggy==1); - //assert(slice.event_of_curve(i,0)==-1); - //assert(slice.event_of_curve(i,1)==0); - assert(slice.index()==i); - assert(slice.is_event()); - assert(! slice.is_intersection()); - assert(slice.number_of_events()==3); - assert(slice.curves_at_event(0).first==-1); - assert(slice.curves_at_event(0).second==0); - assert(slice.curves_at_event(1).first==-1); - assert(slice.curves_at_event(1).second==1); - assert(slice.curves_at_event(2).first==-1); - assert(slice.curves_at_event(2).second==2); - } - { - i=2; - const Status_line_1& slice=curve_pair.status_line_of_interval(i); - assert(! slice.is_event()); - assert(slice.number_of_events()==4); - assert(slice.curves_at_event(0).first==-1); - assert(slice.curves_at_event(0).second==0); - assert(slice.curves_at_event(1).first==-1); - assert(slice.curves_at_event(1).second==1); - assert(slice.curves_at_event(2).first==-1); - assert(slice.curves_at_event(2).second==2); - assert(slice.curves_at_event(3).first==-1); - assert(slice.curves_at_event(3).second==3); - } - { - i=2; - const Status_line_1& slice=curve_pair.status_line_at_event(i); - Triple triple = curve_pair.event_indices(i); - assert(triple.fg==-1); - assert(triple.ffy==0); - assert(triple.ggy==-1); - //assert(slice.event_of_curve(i,0)==0); - //assert(slice.event_of_curve(i,1)==-1); - assert(slice.index()==i); - assert(slice.is_event()); - assert(! slice.is_intersection()); - assert(slice.number_of_events()==6); - assert(slice.curves_at_event(0).first==0); - assert(slice.curves_at_event(0).second==-1); - assert(slice.curves_at_event(1).first==-1); - assert(slice.curves_at_event(1).second==0); - assert(slice.curves_at_event(2).first==-1); - assert(slice.curves_at_event(2).second==1); - assert(slice.curves_at_event(3).first==1); - assert(slice.curves_at_event(3).second==-1); - assert(slice.curves_at_event(4).first==-1); - assert(slice.curves_at_event(4).second==2); - assert(slice.curves_at_event(5).first==-1); - assert(slice.curves_at_event(5).second==3); - } - { - i=3; - const Status_line_1& slice=curve_pair.status_line_of_interval(i); - assert(! slice.is_event()); - assert(slice.number_of_events()==8); - assert(slice.curves_at_event(0).first==0); - assert(slice.curves_at_event(0).second==-1); - assert(slice.curves_at_event(1).first==1); - assert(slice.curves_at_event(1).second==-1); - assert(slice.curves_at_event(2).first==-1); - assert(slice.curves_at_event(2).second==0); - assert(slice.curves_at_event(3).first==-1); - assert(slice.curves_at_event(3).second==1); - assert(slice.curves_at_event(4).first==2); - assert(slice.curves_at_event(4).second==-1); - assert(slice.curves_at_event(5).first==3); - assert(slice.curves_at_event(5).second==-1); - assert(slice.curves_at_event(6).first==-1); - assert(slice.curves_at_event(6).second==2); - assert(slice.curves_at_event(7).first==-1); - assert(slice.curves_at_event(7).second==3); - } - { - i=3; - const Status_line_1& slice=curve_pair.status_line_at_event(i); - Triple triple = curve_pair.event_indices(i); - assert(triple.fg==0); - assert(triple.ffy==-1); - assert(triple.ggy==-1); - //assert(slice.event_of_curve(i,0)==-1); - //assert(slice.event_of_curve(i,1)==-1); - assert(slice.index()==i); - assert(slice.is_event()); - assert(slice.is_intersection()); - assert(slice.number_of_events()==7); - assert(slice.curves_at_event(0).first==0); - assert(slice.curves_at_event(0).second==-1); - assert(slice.curves_at_event(1).first==1); - assert(slice.curves_at_event(1).second==-1); - assert(slice.curves_at_event(2).first==-1); - assert(slice.curves_at_event(2).second==0); - assert(slice.curves_at_event(3).first==-1); - assert(slice.curves_at_event(3).second==1); - assert(slice.curves_at_event(4).first==2); - assert(slice.curves_at_event(4).second==-1); - assert(slice.curves_at_event(5).first==3); - assert(slice.curves_at_event(5).second==2); - assert(slice.curves_at_event(6).first==-1); - assert(slice.curves_at_event(6).second==3); - - assert(slice.multiplicity_of_intersection(5)==1); - } - { - i=4; - const Status_line_1& slice=curve_pair.status_line_of_interval(i); - assert(! slice.is_event()); - assert(slice.number_of_events()==8); - assert(slice.curves_at_event(0).first==0); - assert(slice.curves_at_event(0).second==-1); - assert(slice.curves_at_event(1).first==1); - assert(slice.curves_at_event(1).second==-1); - assert(slice.curves_at_event(2).first==-1); - assert(slice.curves_at_event(2).second==0); - assert(slice.curves_at_event(3).first==-1); - assert(slice.curves_at_event(3).second==1); - assert(slice.curves_at_event(4).first==2); - assert(slice.curves_at_event(4).second==-1); - assert(slice.curves_at_event(5).first==-1); - assert(slice.curves_at_event(5).second==2); - assert(slice.curves_at_event(6).first==3); - assert(slice.curves_at_event(6).second==-1); - assert(slice.curves_at_event(7).first==-1); - assert(slice.curves_at_event(7).second==3); - } - { - i=4; - const Status_line_1& slice=curve_pair.status_line_at_event(i); - Triple triple = curve_pair.event_indices(i); - assert(triple.fg==1); - assert(triple.ffy==1); - assert(triple.ggy==2); - //assert(slice.event_of_curve(i,0)==1); - //assert(slice.event_of_curve(i,1)==2); - assert(slice.index()==i); - assert(slice.is_event()); - assert(slice.is_intersection()); - assert(slice.number_of_events()==2); - assert(slice.curves_at_event(0).first==0); - assert(slice.curves_at_event(0).second==0); - assert(slice.curves_at_event(1).first==-1); - assert(slice.curves_at_event(1).second==1); - } - { - i=5; - const Status_line_1& slice=curve_pair.status_line_of_interval(i); - assert(! slice.is_event()); - assert(slice.number_of_events()==6); - assert(slice.curves_at_event(0).first==-1); - assert(slice.curves_at_event(0).second==0); - assert(slice.curves_at_event(1).first==0); - assert(slice.curves_at_event(1).second==-1); - assert(slice.curves_at_event(2).first==-1); - assert(slice.curves_at_event(2).second==1); - assert(slice.curves_at_event(3).first==1); - assert(slice.curves_at_event(3).second==-1); - assert(slice.curves_at_event(4).first==-1); - assert(slice.curves_at_event(4).second==2); - assert(slice.curves_at_event(5).first==-1); - assert(slice.curves_at_event(5).second==3); - } - { - i=5; - const Status_line_1& slice=curve_pair.status_line_at_event(i); - Triple triple = curve_pair.event_indices(i); - assert(triple.fg==-1); - assert(triple.ffy==-1); - assert(triple.ggy==3); - //assert(slice.event_of_curve(i,0)==-1); - //assert(slice.event_of_curve(i,1)==-1); - assert(slice.index()==i); - assert(slice.is_event()); - assert(! slice.is_intersection()); - assert(slice.number_of_events()==5); - assert(slice.curves_at_event(0).first==-1); - assert(slice.curves_at_event(0).second==0); - assert(slice.curves_at_event(1).first==0); - assert(slice.curves_at_event(1).second==-1); - assert(slice.curves_at_event(2).first==-1); - assert(slice.curves_at_event(2).second==1); - assert(slice.curves_at_event(3).first==1); - assert(slice.curves_at_event(3).second==-1); - assert(slice.curves_at_event(4).first==-1); - assert(slice.curves_at_event(4).second==2); - } - { - i=6; - const Status_line_1& slice=curve_pair.status_line_of_interval(i); - assert(! slice.is_event()); - assert(slice.number_of_events()==4); - assert(slice.curves_at_event(0).first==-1); - assert(slice.curves_at_event(0).second==0); - assert(slice.curves_at_event(1).first==0); - assert(slice.curves_at_event(1).second==-1); - assert(slice.curves_at_event(2).first==-1); - assert(slice.curves_at_event(2).second==1); - assert(slice.curves_at_event(3).first==1); - assert(slice.curves_at_event(3).second==-1); - } - { - i=6; - const Status_line_1& slice=curve_pair.status_line_at_event(i); - Triple triple = curve_pair.event_indices(i); - assert(triple.fg==2); - assert(triple.ffy==-1); - assert(triple.ggy==-1); - //assert(slice.event_of_curve(i,0)==-1); - //assert(slice.event_of_curve(i,1)==-1); - assert(slice.index()==i); - assert(slice.is_event()); - assert(slice.is_intersection()); - assert(slice.number_of_events()==3); - assert(slice.curves_at_event(0).first==0); - assert(slice.curves_at_event(0).second==0); - assert(slice.curves_at_event(1).first==-1); - assert(slice.curves_at_event(1).second==1); - assert(slice.curves_at_event(2).first==1); - assert(slice.curves_at_event(2).second==-1); - assert(slice.multiplicity_of_intersection(0)==1); - } - { - i=7; - const Status_line_1& slice=curve_pair.status_line_of_interval(i); - assert(! slice.is_event()); - assert(slice.number_of_events()==4); - assert(slice.curves_at_event(0).first==0); - assert(slice.curves_at_event(0).second==-1); - assert(slice.curves_at_event(1).first==-1); - assert(slice.curves_at_event(1).second==0); - assert(slice.curves_at_event(2).first==-1); - assert(slice.curves_at_event(2).second==1); - assert(slice.curves_at_event(3).first==1); - assert(slice.curves_at_event(3).second==-1); - } - { - i=7; - const Status_line_1& slice=curve_pair.status_line_at_event(i); - Triple triple = curve_pair.event_indices(i); - assert(triple.fg==-1); - assert(triple.ffy==-1); - assert(triple.ggy==4); - //assert(slice.event_of_curve(i,0)==-1); - //assert(slice.event_of_curve(i,1)==4); - assert(slice.index()==i); - assert(slice.is_event()); - assert(! slice.is_intersection()); - assert(slice.number_of_events()==3); - assert(slice.curves_at_event(0).first==0); - assert(slice.curves_at_event(0).second==-1); - assert(slice.curves_at_event(1).first==-1); - assert(slice.curves_at_event(1).second==0); - assert(slice.curves_at_event(2).first==1); - assert(slice.curves_at_event(2).second==-1); - } - { - i=8; - const Status_line_1& slice=curve_pair.status_line_of_interval(i); - assert(! slice.is_event()); - assert(slice.number_of_events()==2); - assert(slice.curves_at_event(0).first==0); - assert(slice.curves_at_event(0).second==-1); - assert(slice.curves_at_event(1).first==1); - assert(slice.curves_at_event(1).second==-1); - } - { - i=8; - const Status_line_1& slice=curve_pair.status_line_at_event(i); - Triple triple = curve_pair.event_indices(i); - assert(triple.fg==-1); - assert(triple.ffy==2); - assert(triple.ggy==-1); - //assert(slice.event_of_curve(i,0)==2); - //assert(slice.event_of_curve(i,1)==-1); - assert(slice.index()==i); - assert(slice.is_event()); - assert(! slice.is_intersection()); - assert(slice.number_of_events()==1); - assert(slice.curves_at_event(0).first==0); - assert(slice.curves_at_event(0).second==-1); - } - { - i=9; - const Status_line_1& slice=curve_pair.status_line_of_interval(i); - assert(! slice.is_event()); - assert(slice.number_of_events()==0); - } - { - i=9; - const Status_line_1& slice=curve_pair.status_line_at_event(i); - Triple triple = curve_pair.event_indices(i); - assert(triple.fg==-1); - assert(triple.ffy==3); - assert(triple.ggy==-1); - //assert(slice.event_of_curve(i,0)==3); - //assert(slice.event_of_curve(i,1)==-1); - assert(slice.index()==i); - assert(slice.is_event()); - assert(! slice.is_intersection()); - assert(slice.number_of_events()==0); - } - { - i=10; - const Status_line_1& slice=curve_pair.status_line_of_interval(i); - assert(! slice.is_event()); - assert(slice.number_of_events()==0); - } - - } -#endif -#endif } int main() { -#ifdef NDEBUG - std::cout << "Assertions switched off!" << std::endl; - return 0; -#endif -#ifdef CGAL_HAS_LEDA_ARITHMETIC_KERNEL - test_routine(); -#else - std::cout << "LEDA tests skipped!" << std::endl; -#endif -#ifdef CGAL_HAS_CORE_ARITHMETIC_KERNEL - test_routine(); -#else - std::cout << "CORE tests skipped!" << std::endl; -#endif -#ifdef CGAL_HAS_GMP_ARITHMETIC_KERNEL - test_routine(); -#else - std::cout << "GMP tests skipped!" << std::endl; -#endif + + + test_routine(); + return 0; } From bbfeedcf5a43425b5d4ec4c68b47e462b7f71f3f Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 16 Mar 2018 19:24:36 +0100 Subject: [PATCH 068/138] Oliver's faster walk_to_next_3() --- .gitignore | 2 + .../Triangulation_3/segment_traverser_3.cpp | 43 +++--- .../CGAL/Triangulation_segment_traverser_3.h | 4 - .../Triangulation_segment_traverser_3_impl.h | 138 ++++++++++++++++-- .../test/Triangulation_3/CMakeLists.txt | 1 + .../test_simplex_iterator_3.cpp | 5 +- 6 files changed, 157 insertions(+), 36 deletions(-) diff --git a/.gitignore b/.gitignore index cf6ea13ac18..7c2492c4855 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ /*build* /*/*/*/build +/*/*/*/VC* +/*/*/*/GCC AABB_tree/demo/AABB_tree/AABB_demo AABB_tree/demo/AABB_tree/Makefile AABB_tree/examples/AABB_tree/*.kdev* diff --git a/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp b/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp index 8577fcaaffc..abadcab2f13 100644 --- a/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp +++ b/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp @@ -1,5 +1,7 @@ +#define CGAL_PROFILE 1 +#define CGAL_FAST_TRAVERSER //#define CGAL_TRIANGULATION_3_TRAVERSER_CHECK_INTERSECTION -#define CGAL_EXPERIMENT_WITH_SIMPLE_CARTESIAN +//#define CGAL_EXPERIMENT_WITH_SIMPLE_CARTESIAN #include #include @@ -15,7 +17,6 @@ #include #include - //#define CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE // Define the kernel. @@ -104,25 +105,25 @@ int main(int argc, char* argv[]) { ++fin; - //DT::Locate_type lt; - //int li, lj; - //ct.entry(lt, li, lj); + DT::Locate_type lt; + int li, lj; + ct.entry(lt, li, lj); - //switch (lt) - //{ - //case DT::Locate_type::FACET: - // ++nb_facets; - // break; - //case DT::Locate_type::EDGE: - // ++nb_edges; - // break; - //case DT::Locate_type::VERTEX: - // ++nb_vertex; - // break; - //default: - // /*when source is in a cell*/ - // CGAL_assertion(lt == DT::Locate_type::CELL); - //} + switch (lt) + { + case DT::Locate_type::FACET: + ++nb_facets; + break; + case DT::Locate_type::EDGE: + ++nb_edges; + break; + case DT::Locate_type::VERTEX: + ++nb_vertex; + break; + default: + /*when source is in a cell*/ + CGAL_assertion(lt == DT::Locate_type::CELL); + } } } @@ -146,4 +147,4 @@ int main(int argc, char* argv[]) std::cout << "\tnb vertices : " << nb_vertex << std::endl; return 0; -} \ No newline at end of file +} diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 38d8123a06d..0ec766475de 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -40,7 +40,6 @@ #include -#include // If defined, type casting is done statically, // reducing type-safety overhead. #define CGAL_TST_ASSUME_CORRECT_TYPES @@ -167,9 +166,6 @@ protected: // the first cell containing the target. Simplex _cur, _prev; - // Where possible, facets are checked in a random order. - mutable Random rng; - public: // \name Constructors // \{ diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h index 7c42ef4ada0..8413df212ec 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h @@ -301,6 +301,100 @@ walk_to_next_3() &(get<0>(_cur)->vertex(2)->point()), &(get<0>(_cur)->vertex(3)->point()) }; +#ifdef CGAL_FAST_TRAVERSER + Orientation o0, o1, o2; + int inside=0,outside=0,regular_case=0,degenerate=0; + Cell_handle nnext; + + if( get<1>(_cur) == Tr::FACET ) { + regular_case=1; + int i = get<2>(_cur); + int j0 = Tr::vertex_triple_index(i,0); + int j1 = Tr::vertex_triple_index(i,1); + int j2 = Tr::vertex_triple_index(i,2); + o0 = orientation(_source, *vert[i], *vert[j0], _target); + if (o0==POSITIVE){ + o1 = orientation(_source, *vert[i], *vert[j1], _target); + if(o1!=POSITIVE){ + if (orientation(*vert[i], *vert[j0], *vert[j1], _target)==POSITIVE){ + nnext= get<0>(_cur)->neighbor(j2); + outside=j2; + if(o1==ZERO) degenerate=1; //EDGE i j1 + } + else + inside=1; + }else{ + if (orientation(*vert[i], *vert[j1], *vert[j2], _target)==POSITIVE){ + nnext= get<0>(_cur)->neighbor(j0); + outside=j0; + } + else + inside=2; + } + }else if (o0==ZERO){ + o1 = orientation(_source, *vert[i], *vert[j1], _target); + if(o1==NEGATIVE){ + if (orientation(*vert[i], *vert[j0], *vert[j1], _target)==POSITIVE){ + nnext= get<0>(_cur)->neighbor(j2); //EDGE i j0 + degenerate=2; + outside=44; + } + else + inside=3; + }else if (o1==ZERO){ + nnext= get<0>(_cur)->neighbor(j2); //VERTEX i + degenerate =3; + outside=5; + }else { + if (orientation(*vert[i], *vert[j1], *vert[j2], _target)==POSITIVE){ + nnext= get<0>(_cur)->neighbor(j0); + outside=j0; + } + else + inside=4; + } + }else{ + o2 = orientation(_source, *vert[i], *vert[j2], _target); + if(o2!=NEGATIVE){ + if (orientation(*vert[i], *vert[j2], *vert[j0], _target)==POSITIVE){ + nnext= get<0>(_cur)->neighbor(j1); + outside=j1; + if(o2==ZERO) degenerate =4; // EDGE i j2 + } + else + inside=5; + }else{ + if (orientation(*vert[i], *vert[j1], *vert[j2], _target)==POSITIVE){ + nnext= get<0>(_cur)->neighbor(j0); + outside=j0; + } + else + inside=6; + } + } + + + if( (! degenerate) && (! inside) ){ + get<0>(_prev) = get<0>(_cur); + get<0>(_cur) = nnext; + get<1>(_prev) = Tr::FACET; + get<2>(_prev) = outside; + get<1>(_cur) = Tr::FACET; + get<2>(_cur) = nnext->index(get<0>(_prev)); + return; + } + + if((! degenerate) && inside){ + _prev = Simplex( get<0>(_cur), Tr::CELL, -1, -1 ); + get<0>(_cur) = Cell_handle(); + return; + } + } + +#endif + + + // We check in which direction the target lies // by comparing its position relative to the planes through the // source and the edges of the cell. @@ -328,7 +422,7 @@ walk_to_next_3() } // For the remembering stochastic walk, we start trying with a random facet. - int li = rng.template get_bits<2>(); + int li = 0; CGAL_triangulation_assertion_code( bool incell = true; ) for( int k = 0; k < 4; ++k, li = _tr.increment_index(li) ) { @@ -355,7 +449,7 @@ walk_to_next_3() // Check if the target is inside the 3-wedge with // the source as apex and the facet as an intersection. - int lj = rng.template get_bits<2>(); + int lj = 0; int Or = 0; for( int l = 0; l < 4; ++l, lj = _tr.increment_index(lj) ) { if( li == lj ) @@ -406,8 +500,30 @@ walk_to_next_3() get<2>(_prev) = li; get<1>(_cur) = Tr::FACET; get<2>(_cur) = get<0>(_cur)->index(get<0>(_prev)); +#ifdef CGAL_FAST_TRAVERSER + if(regular_case){ + if ((get<0>(_cur) != Cell_handle()) && (nnext != Cell_handle()) ){ + if (get<0>(_cur)!=nnext ){ + std::cout<<"nnext "<vertex(0)->point(); + std::cout<<" "<vertex(1)->point(); + std::cout<<" "<vertex(2)->point(); + std::cout<<" "<vertex(3)->point()<(_cur)->vertex(0)->point(); + std::cout<<" "<< get<0>(_cur)->vertex(1)->point(); + std::cout<<" "<< get<0>(_cur)->vertex(2)->point(); + std::cout<<" "<< get<0>(_cur)->vertex(3)->point()<(_cur)==nnext ); + CGAL_triangulation_assertion( li==outside ); + CGAL_triangulation_assertion( ! inside ); + } +#endif return; case 2: +#ifdef CGAL_FAST_TRAVERSER + if(regular_case) + CGAL_triangulation_assertion(degenerate ); +#endif get<1>(_prev) = Tr::EDGE; get<1>(_cur) = Tr::EDGE; for( int j = 0; j < 4; ++j ) { @@ -423,6 +539,10 @@ walk_to_next_3() CGAL_triangulation_assertion( false ); return; case 1: +#ifdef CGAL_FAST_TRAVERSER + if(regular_case) + CGAL_triangulation_assertion(degenerate ); +#endif get<1>(_prev) = Tr::VERTEX; get<1>(_cur) = Tr::VERTEX; for( int j = 0; j < 4; ++j ) { @@ -439,13 +559,16 @@ walk_to_next_3() return; } } - + // The target lies inside this cell. CGAL_triangulation_assertion( incell ); switch( op[0] + op[1] + op[2] + op[3] ) { case 4: CGAL_triangulation_assertion( pos == 6 ); _prev = Simplex( get<0>(_cur), Tr::CELL, -1, -1 ); +#ifdef CGAL_FAST_TRAVERSER + CGAL_triangulation_assertion( (! regular_case) || inside ); +#endif break; case 3: _prev = Simplex( get<0>(_cur), Tr::FACET, 6-pos, -1 ); @@ -502,9 +625,7 @@ walk_to_next_3_inf( int inf ) { vert[inf] = &(_source); CGAL_triangulation_assertion( orientation( *vert[0], *vert[1], *vert[2], *vert[3] ) == POSITIVE ); - // For the remembering stochastic walk, we start trying with a random index: - int li = rng.template get_bits<2>(); - + int li = 0; // Check if the line enters an adjacent infinite cell. // This occurs if the target lies on the other side of // a plane through one of the finite edges and the source point. @@ -780,9 +901,8 @@ walk_to_next_2() return; } case Tr::FACET: { - // We test its edges in a random order until we find a neighbor to go further - int li = rng.get_int(0, 3); - + int li = 0; + Orientation o[3]; bool calc[3] = { false, false, false }; diff --git a/Triangulation_3/test/Triangulation_3/CMakeLists.txt b/Triangulation_3/test/Triangulation_3/CMakeLists.txt index d1139a43c68..eefbd5efb87 100644 --- a/Triangulation_3/test/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/test/Triangulation_3/CMakeLists.txt @@ -35,6 +35,7 @@ if ( CGAL_FOUND ) create_single_source_cgal_program( "test_regular_remove_3.cpp" ) create_single_source_cgal_program( "test_regular_traits_3.cpp" ) create_single_source_cgal_program( "test_simplex_3.cpp" ) + create_single_source_cgal_program( "test_simplex_iterator_3.cpp" ) create_single_source_cgal_program( "test_static_filters.cpp" ) create_single_source_cgal_program( "test_triangulation_3.cpp" ) diff --git a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp index 0f97818f5c5..1cf919293d7 100644 --- a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp @@ -19,6 +19,8 @@ // Author(s) : Jane Tournois +#define CGAL_FAST_TRAVERSER + #include #include #include @@ -416,6 +418,5 @@ int main(int argc, char* argv[]) // - along a facet and an edge successively test_triangulation_on_a_grid(); - return 0; -} \ No newline at end of file +} From 495923158b4799977e5856e8ef23458d68ad0c5e Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 10 Sep 2019 19:00:47 +0200 Subject: [PATCH 069/138] make test compile after merge --- Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp index 1cf919293d7..333955bfe9e 100644 --- a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp @@ -338,6 +338,7 @@ int main(int argc, char* argv[]) // Reads a .xyz point set file in points. // As the point is the second element of the tuple (that is with index 1) +#define CGAL_FAST_TRAVERSER // we use a property map that accesses the 1st element of the tuple. std::vector points; From 45a0b2a8413dba5cd8ca2b7fc0b15901856d5243 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 10 Sep 2019 19:03:07 +0200 Subject: [PATCH 070/138] Revert "Reduce testcase" This reverts commit ec7c86fa7a934ed7705b8efcdbf854878ad5e8a5. --- .../Algebraic_kernel_d/Curve_analysis_2.h | 4 +- .../Curve_pair_analysis_2.h | 21 +- .../Curve_pair_analysis_2.cpp | 1069 ++++++++++++++++- 3 files changed, 1060 insertions(+), 34 deletions(-) diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h index 77ac8d89b84..98255ec6077 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h @@ -852,7 +852,7 @@ private: size_type mult_of_resultant = event.mult_of_prim_res_root; - // AF was commented +/* #if CGAL_ACK_DEBUG_FLAG CGAL_ACK_DEBUG_PRINT << "Event line for " << index << " " << root_of_resultant << " " @@ -861,7 +861,7 @@ private: << left_arcs << " " << right_arcs << std::endl; #endif - +*/ Status_line_1 ev_line = event_line_builder().create_event_line(index, diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h index 8c5071c6df4..cc8ba6b58cb 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h @@ -631,10 +631,6 @@ public: CGAL_assertion(i>=0 && i < static_cast (event_indices().size())); - - for(int j = 0; j < event_indices().size(); j++){ - std::cout << "event_indices["<< j << "] = " << event_indices()[j].fg << " " << event_indices()[j].ffy << " "<< event_indices()[j].ggy << std::endl; - } return event_indices()[i]; } @@ -1426,19 +1422,18 @@ compute_event_x_coordinates_with_event_indices() const { std::vector& event_indices = this->ptr()->event_indices.get(); for(size_type i=0;i(events.size());i++) { - +/* #if CGAL_ACK_DEBUG_FLAG - std::cout << " events["<< i << "] = "; CGAL_ACK_DEBUG_PRINT << CGAL::to_double(events[i]) << std::flush; #endif - +*/ switch(events_type[i]) { case(CGAL::internal::ROOT_OF_FIRST_SET): { - +/* #if CGAL_ACK_DEBUG_FLAG CGAL_ACK_DEBUG_PRINT << " one curve event" << std::endl; #endif - +*/ this->ptr()->event_slices.push_back(Lazy_status_line_CPA_1()); switch(*(one_curve_it++)) { case(CGAL::internal::ROOT_OF_FIRST_SET): { @@ -1461,11 +1456,11 @@ compute_event_x_coordinates_with_event_indices() const { break; } case(CGAL::internal::ROOT_OF_SECOND_SET): { - +/* #if CGAL_ACK_DEBUG_FLAG CGAL_ACK_DEBUG_PRINT << " two curve event" << std::endl; #endif - +*/ this->ptr()-> event_slices.push_back(Lazy_status_line_CPA_1()); @@ -1475,12 +1470,12 @@ compute_event_x_coordinates_with_event_indices() const { break; } case(CGAL::internal::ROOT_OF_BOTH_SETS): { - +/* #if CGAL_ACK_DEBUG_FLAG CGAL_ACK_DEBUG_PRINT << " one and two curve event" << std::endl; #endif - +*/ this->ptr()->event_slices.push_back(Lazy_status_line_CPA_1()); diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/Curve_pair_analysis_2.cpp b/Algebraic_kernel_d/test/Algebraic_kernel_d/Curve_pair_analysis_2.cpp index d98feaa3b6c..3901f71ee5b 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/Curve_pair_analysis_2.cpp +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/Curve_pair_analysis_2.cpp @@ -1,5 +1,3 @@ -#define CGAL_ACK_DEBUG_FLAG 1 - // TODO: Add licence // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE @@ -16,13 +14,21 @@ #include #include - +// Switches on/off tests for Sqrt-extension types +#if CGAL_ACK_WITH_ROTATIONS +#ifndef DO_SQRT_EXTENSION_TESTS +#define DO_SQRT_EXTENSION_TESTS 1 +#endif +#endif #include #include - +#if CGAL_ACK_USE_EXACUS +#include +#include +#endif #include @@ -49,7 +55,9 @@ void test_routine() { typedef typename Arithmetic_kernel::Integer Integer; typedef Integer Coefficient; - + typedef typename + CGAL::Polynomial_type_generator::Type Poly_1; + CGAL_USE_TYPE(Poly_1); typedef typename CGAL::Polynomial_type_generator::Type Poly_2; @@ -65,9 +73,20 @@ void test_routine() { typedef CGAL::Algebraic_kernel_d_1 Algebraic_kernel_d_1; + typedef typename Algebraic_kernel_d_1::Algebraic_real_1 Algebraic_real; + CGAL_USE_TYPE(Algebraic_real); +#if CGAL_ACK_USE_EXACUS + typedef AcX::Algebraic_curve_2 Algebraic_curve_2; + typedef AcX::Algebraic_curve_pair_2 + Algebraic_curve_pair_2; + typedef CGAL::Algebraic_curve_kernel_2 + Algebraic_kernel_d_2; +#else typedef CGAL::Algebraic_curve_kernel_2 Algebraic_kernel_d_2; +#endif Algebraic_kernel_d_2 kernel; @@ -84,7 +103,371 @@ void test_routine() { construct_curve_pair_2 = kernel.construct_curve_pair_2_object(); - + + { + Poly_2 f=from_string("P[4(0,P[4(3,-1)(4,2)])(2,P[1(1,1)])(4,P[0(0,1)])]"); + Poly_2 g=from_string("P[4(0,P[4(4,1)])(1,P[2(2,1)])(3,P[0(0,-1)])(4,P[0(0,2)])]"); + Curve_analysis_2 c1=construct_curve_2(f); + Curve_analysis_2 c2=construct_curve_2(g); + Curve_pair_analysis_2 curve_pair=construct_curve_pair_2(c1,c2); + assert(curve_pair.number_of_status_lines_with_event()==10); + typedef typename Curve_pair_analysis_2::Status_line_1 Status_line_1; +#if CGAL_ACK_USE_EXACUS + typedef SoX::Index_triple Triple; +#else + typedef CGAL::internal::Event_indices Triple; +#endif + int i; + { + i=0; + const Status_line_1& slice=curve_pair.status_line_of_interval(i); + assert(! slice.is_event()); + assert(! slice.is_intersection()); + assert(slice.number_of_events()==0); + } + { + i=0; + const Status_line_1& slice=curve_pair.status_line_at_event(i); + Triple triple = curve_pair.event_indices(i); + assert(triple.fg==-1); + assert(triple.ffy==-1); + assert(triple.ggy==0); + //assert(slice.event_of_curve(i,0)==-1); + //assert(slice.event_of_curve(i,1)==0); + assert(slice.index()==i); + assert(slice.is_event()); + assert(! slice.is_intersection()); + assert(slice.number_of_events()==1); + assert(slice.curves_at_event(0).first==-1); + assert(slice.curves_at_event(0).second==0); + } + { + i=1; + const Status_line_1& slice=curve_pair.status_line_of_interval(i); + assert(! slice.is_event()); + assert(slice.number_of_events()==2); + assert(slice.curves_at_event(0).first==-1); + assert(slice.curves_at_event(0).second==0); + assert(slice.curves_at_event(1).first==-1); + assert(slice.curves_at_event(1).second==1); + } + { + i=1; + const Status_line_1& slice=curve_pair.status_line_at_event(i); + Triple triple = curve_pair.event_indices(i); + assert(triple.fg==-1); + assert(triple.ffy==-1); + assert(triple.ggy==1); + //assert(slice.event_of_curve(i,0)==-1); + //assert(slice.event_of_curve(i,1)==0); + assert(slice.index()==i); + assert(slice.is_event()); + assert(! slice.is_intersection()); + assert(slice.number_of_events()==3); + assert(slice.curves_at_event(0).first==-1); + assert(slice.curves_at_event(0).second==0); + assert(slice.curves_at_event(1).first==-1); + assert(slice.curves_at_event(1).second==1); + assert(slice.curves_at_event(2).first==-1); + assert(slice.curves_at_event(2).second==2); + } + { + i=2; + const Status_line_1& slice=curve_pair.status_line_of_interval(i); + assert(! slice.is_event()); + assert(slice.number_of_events()==4); + assert(slice.curves_at_event(0).first==-1); + assert(slice.curves_at_event(0).second==0); + assert(slice.curves_at_event(1).first==-1); + assert(slice.curves_at_event(1).second==1); + assert(slice.curves_at_event(2).first==-1); + assert(slice.curves_at_event(2).second==2); + assert(slice.curves_at_event(3).first==-1); + assert(slice.curves_at_event(3).second==3); + } + { + i=2; + const Status_line_1& slice=curve_pair.status_line_at_event(i); + Triple triple = curve_pair.event_indices(i); + assert(triple.fg==-1); + assert(triple.ffy==0); + assert(triple.ggy==-1); + //assert(slice.event_of_curve(i,0)==0); + //assert(slice.event_of_curve(i,1)==-1); + assert(slice.index()==i); + assert(slice.is_event()); + assert(! slice.is_intersection()); + assert(slice.number_of_events()==6); + assert(slice.curves_at_event(0).first==0); + assert(slice.curves_at_event(0).second==-1); + assert(slice.curves_at_event(1).first==-1); + assert(slice.curves_at_event(1).second==0); + assert(slice.curves_at_event(2).first==-1); + assert(slice.curves_at_event(2).second==1); + assert(slice.curves_at_event(3).first==1); + assert(slice.curves_at_event(3).second==-1); + assert(slice.curves_at_event(4).first==-1); + assert(slice.curves_at_event(4).second==2); + assert(slice.curves_at_event(5).first==-1); + assert(slice.curves_at_event(5).second==3); + } + { + i=3; + const Status_line_1& slice=curve_pair.status_line_of_interval(i); + assert(! slice.is_event()); + assert(slice.number_of_events()==8); + assert(slice.curves_at_event(0).first==0); + assert(slice.curves_at_event(0).second==-1); + assert(slice.curves_at_event(1).first==1); + assert(slice.curves_at_event(1).second==-1); + assert(slice.curves_at_event(2).first==-1); + assert(slice.curves_at_event(2).second==0); + assert(slice.curves_at_event(3).first==-1); + assert(slice.curves_at_event(3).second==1); + assert(slice.curves_at_event(4).first==2); + assert(slice.curves_at_event(4).second==-1); + assert(slice.curves_at_event(5).first==3); + assert(slice.curves_at_event(5).second==-1); + assert(slice.curves_at_event(6).first==-1); + assert(slice.curves_at_event(6).second==2); + assert(slice.curves_at_event(7).first==-1); + assert(slice.curves_at_event(7).second==3); + } + { + i=3; + const Status_line_1& slice=curve_pair.status_line_at_event(i); + Triple triple = curve_pair.event_indices(i); + assert(triple.fg==0); + assert(triple.ffy==-1); + assert(triple.ggy==-1); + //assert(slice.event_of_curve(i,0)==-1); + //assert(slice.event_of_curve(i,1)==-1); + assert(slice.index()==i); + assert(slice.is_event()); + assert(slice.is_intersection()); + assert(slice.number_of_events()==7); + assert(slice.curves_at_event(0).first==0); + assert(slice.curves_at_event(0).second==-1); + assert(slice.curves_at_event(1).first==1); + assert(slice.curves_at_event(1).second==-1); + assert(slice.curves_at_event(2).first==-1); + assert(slice.curves_at_event(2).second==0); + assert(slice.curves_at_event(3).first==-1); + assert(slice.curves_at_event(3).second==1); + assert(slice.curves_at_event(4).first==2); + assert(slice.curves_at_event(4).second==-1); + assert(slice.curves_at_event(5).first==3); + assert(slice.curves_at_event(5).second==2); + assert(slice.curves_at_event(6).first==-1); + assert(slice.curves_at_event(6).second==3); + + assert(slice.multiplicity_of_intersection(5)==1); + } + { + i=4; + const Status_line_1& slice=curve_pair.status_line_of_interval(i); + assert(! slice.is_event()); + assert(slice.number_of_events()==8); + assert(slice.curves_at_event(0).first==0); + assert(slice.curves_at_event(0).second==-1); + assert(slice.curves_at_event(1).first==1); + assert(slice.curves_at_event(1).second==-1); + assert(slice.curves_at_event(2).first==-1); + assert(slice.curves_at_event(2).second==0); + assert(slice.curves_at_event(3).first==-1); + assert(slice.curves_at_event(3).second==1); + assert(slice.curves_at_event(4).first==2); + assert(slice.curves_at_event(4).second==-1); + assert(slice.curves_at_event(5).first==-1); + assert(slice.curves_at_event(5).second==2); + assert(slice.curves_at_event(6).first==3); + assert(slice.curves_at_event(6).second==-1); + assert(slice.curves_at_event(7).first==-1); + assert(slice.curves_at_event(7).second==3); + } + { + i=4; + const Status_line_1& slice=curve_pair.status_line_at_event(i); + Triple triple = curve_pair.event_indices(i); + assert(triple.fg==1); + assert(triple.ffy==1); + assert(triple.ggy==2); + //assert(slice.event_of_curve(i,0)==1); + //assert(slice.event_of_curve(i,1)==2); + assert(slice.index()==i); + assert(slice.is_event()); + assert(slice.is_intersection()); + assert(slice.number_of_events()==2); + assert(slice.curves_at_event(0).first==0); + assert(slice.curves_at_event(0).second==0); + assert(slice.curves_at_event(1).first==-1); + assert(slice.curves_at_event(1).second==1); + } + { + i=5; + const Status_line_1& slice=curve_pair.status_line_of_interval(i); + assert(! slice.is_event()); + assert(slice.number_of_events()==6); + assert(slice.curves_at_event(0).first==-1); + assert(slice.curves_at_event(0).second==0); + assert(slice.curves_at_event(1).first==0); + assert(slice.curves_at_event(1).second==-1); + assert(slice.curves_at_event(2).first==-1); + assert(slice.curves_at_event(2).second==1); + assert(slice.curves_at_event(3).first==1); + assert(slice.curves_at_event(3).second==-1); + assert(slice.curves_at_event(4).first==-1); + assert(slice.curves_at_event(4).second==2); + assert(slice.curves_at_event(5).first==-1); + assert(slice.curves_at_event(5).second==3); + } + { + i=5; + const Status_line_1& slice=curve_pair.status_line_at_event(i); + Triple triple = curve_pair.event_indices(i); + assert(triple.fg==-1); + assert(triple.ffy==-1); + assert(triple.ggy==3); + //assert(slice.event_of_curve(i,0)==-1); + //assert(slice.event_of_curve(i,1)==-1); + assert(slice.index()==i); + assert(slice.is_event()); + assert(! slice.is_intersection()); + assert(slice.number_of_events()==5); + assert(slice.curves_at_event(0).first==-1); + assert(slice.curves_at_event(0).second==0); + assert(slice.curves_at_event(1).first==0); + assert(slice.curves_at_event(1).second==-1); + assert(slice.curves_at_event(2).first==-1); + assert(slice.curves_at_event(2).second==1); + assert(slice.curves_at_event(3).first==1); + assert(slice.curves_at_event(3).second==-1); + assert(slice.curves_at_event(4).first==-1); + assert(slice.curves_at_event(4).second==2); + } + { + i=6; + const Status_line_1& slice=curve_pair.status_line_of_interval(i); + assert(! slice.is_event()); + assert(slice.number_of_events()==4); + assert(slice.curves_at_event(0).first==-1); + assert(slice.curves_at_event(0).second==0); + assert(slice.curves_at_event(1).first==0); + assert(slice.curves_at_event(1).second==-1); + assert(slice.curves_at_event(2).first==-1); + assert(slice.curves_at_event(2).second==1); + assert(slice.curves_at_event(3).first==1); + assert(slice.curves_at_event(3).second==-1); + } + { + i=6; + const Status_line_1& slice=curve_pair.status_line_at_event(i); + Triple triple = curve_pair.event_indices(i); + assert(triple.fg==2); + assert(triple.ffy==-1); + assert(triple.ggy==-1); + //assert(slice.event_of_curve(i,0)==-1); + //assert(slice.event_of_curve(i,1)==-1); + assert(slice.index()==i); + assert(slice.is_event()); + assert(slice.is_intersection()); + assert(slice.number_of_events()==3); + assert(slice.curves_at_event(0).first==0); + assert(slice.curves_at_event(0).second==0); + assert(slice.curves_at_event(1).first==-1); + assert(slice.curves_at_event(1).second==1); + assert(slice.curves_at_event(2).first==1); + assert(slice.curves_at_event(2).second==-1); + assert(slice.multiplicity_of_intersection(0)==1); + } + { + i=7; + const Status_line_1& slice=curve_pair.status_line_of_interval(i); + assert(! slice.is_event()); + assert(slice.number_of_events()==4); + assert(slice.curves_at_event(0).first==0); + assert(slice.curves_at_event(0).second==-1); + assert(slice.curves_at_event(1).first==-1); + assert(slice.curves_at_event(1).second==0); + assert(slice.curves_at_event(2).first==-1); + assert(slice.curves_at_event(2).second==1); + assert(slice.curves_at_event(3).first==1); + assert(slice.curves_at_event(3).second==-1); + } + { + i=7; + const Status_line_1& slice=curve_pair.status_line_at_event(i); + Triple triple = curve_pair.event_indices(i); + assert(triple.fg==-1); + assert(triple.ffy==-1); + assert(triple.ggy==4); + //assert(slice.event_of_curve(i,0)==-1); + //assert(slice.event_of_curve(i,1)==4); + assert(slice.index()==i); + assert(slice.is_event()); + assert(! slice.is_intersection()); + assert(slice.number_of_events()==3); + assert(slice.curves_at_event(0).first==0); + assert(slice.curves_at_event(0).second==-1); + assert(slice.curves_at_event(1).first==-1); + assert(slice.curves_at_event(1).second==0); + assert(slice.curves_at_event(2).first==1); + assert(slice.curves_at_event(2).second==-1); + } + { + i=8; + const Status_line_1& slice=curve_pair.status_line_of_interval(i); + assert(! slice.is_event()); + assert(slice.number_of_events()==2); + assert(slice.curves_at_event(0).first==0); + assert(slice.curves_at_event(0).second==-1); + assert(slice.curves_at_event(1).first==1); + assert(slice.curves_at_event(1).second==-1); + } + { + i=8; + const Status_line_1& slice=curve_pair.status_line_at_event(i); + Triple triple = curve_pair.event_indices(i); + assert(triple.fg==-1); + assert(triple.ffy==2); + assert(triple.ggy==-1); + //assert(slice.event_of_curve(i,0)==2); + //assert(slice.event_of_curve(i,1)==-1); + assert(slice.index()==i); + assert(slice.is_event()); + assert(! slice.is_intersection()); + assert(slice.number_of_events()==1); + assert(slice.curves_at_event(0).first==0); + assert(slice.curves_at_event(0).second==-1); + } + { + i=9; + const Status_line_1& slice=curve_pair.status_line_of_interval(i); + assert(! slice.is_event()); + assert(slice.number_of_events()==0); + } + { + i=9; + const Status_line_1& slice=curve_pair.status_line_at_event(i); + Triple triple = curve_pair.event_indices(i); + assert(triple.fg==-1); + assert(triple.ffy==3); + assert(triple.ggy==-1); + //assert(slice.event_of_curve(i,0)==3); + //assert(slice.event_of_curve(i,1)==-1); + assert(slice.index()==i); + assert(slice.is_event()); + assert(! slice.is_intersection()); + assert(slice.number_of_events()==0); + } + { + i=10; + const Status_line_1& slice=curve_pair.status_line_of_interval(i); + assert(! slice.is_event()); + assert(slice.number_of_events()==0); + } + + } { Poly_2 f=from_string("P[4(0,P[1(0,1)(1,1)])(4,P[0(0,-1)])]"); Poly_2 g=from_string("P[2(0,P[2(0,-5)(2,6)])(2,P[0(0,4)])]"); @@ -94,27 +477,675 @@ void test_routine() { Curve_pair_analysis_2 curve_pair=construct_curve_pair_2(ca1,ca2); assert(curve_pair.number_of_status_lines_with_event()==7); typedef typename Curve_pair_analysis_2::Status_line_1 Status_line_1; - +#if CGAL_ACK_USE_EXACUS + typedef SoX::Index_triple Triple; +#else typedef CGAL::internal::Event_indices Triple; - - int i=0; - - Triple triple = curve_pair.event_indices(i); - assert(triple.fg==-1); - assert(triple.ffy==0); - assert(triple.ggy==-1); - +#endif + int i; + { + i=0; + const Status_line_1& slice=curve_pair.status_line_of_interval(i); + assert(! slice.is_event()); + assert(slice.number_of_events()==0); + } + { + i=0; + const Status_line_1& slice=curve_pair.status_line_at_event(i); + Triple triple = curve_pair.event_indices(i); + assert(triple.fg==-1); + assert(triple.ffy==0); + assert(triple.ggy==-1); + //assert(slice.event_of_curve(i,0)==0); + //assert(slice.event_of_curve(i,1)==-1); + assert(slice.index()==i); + assert(slice.is_event()); + assert(! slice.is_intersection()); + assert(slice.number_of_events()==1); + assert(slice.curves_at_event(0).first==0); + assert(slice.curves_at_event(0).second==-1); + } + { + i=1; + const Status_line_1& slice=curve_pair.status_line_of_interval(i); + assert(! slice.is_event()); + assert(slice.number_of_events()==2); + assert(slice.curves_at_event(0).first==0); + assert(slice.curves_at_event(0).second==-1); + assert(slice.curves_at_event(1).first==1); + assert(slice.curves_at_event(1).second==-1); + } + { + i=1; + const Status_line_1& slice=curve_pair.status_line_at_event(i); + Triple triple = curve_pair.event_indices(i); + assert(triple.fg==0); + assert(triple.ffy==-1); + assert(triple.ggy==-1); + //assert(slice.event_of_curve(i,0)==-1); + //assert(slice.event_of_curve(i,1)==-1); + assert(slice.index()==i); + assert(slice.is_event()); + assert(! slice.is_intersection()); + assert(slice.number_of_events()==2); + assert(slice.curves_at_event(0).first==0); + assert(slice.curves_at_event(0).second==-1); + assert(slice.curves_at_event(1).first==1); + assert(slice.curves_at_event(1).second==-1); + } + { + i=2; + const Status_line_1& slice=curve_pair.status_line_of_interval(i); + assert(! slice.is_event()); + assert(slice.number_of_events()==2); + assert(slice.curves_at_event(0).first==0); + assert(slice.curves_at_event(0).second==-1); + assert(slice.curves_at_event(1).first==1); + assert(slice.curves_at_event(1).second==-1); + } + { + i=2; + const Status_line_1& slice=curve_pair.status_line_at_event(i); + Triple triple = curve_pair.event_indices(i); + assert(triple.fg==-1); + assert(triple.ffy==-1); + assert(triple.ggy==0); + //assert(slice.event_of_curve(i,0)==-1); + //assert(slice.event_of_curve(i,1)==0); + assert(slice.index()==i); + assert(slice.is_event()); + assert(! slice.is_intersection()); + assert(slice.number_of_events()==3); + assert(slice.curves_at_event(0).first==0); + assert(slice.curves_at_event(0).second==-1); + assert(slice.curves_at_event(1).first==-1); + assert(slice.curves_at_event(1).second==0); + assert(slice.curves_at_event(2).first==1); + assert(slice.curves_at_event(2).second==-1); + + } + { + i=3; + const Status_line_1& slice=curve_pair.status_line_of_interval(i); + assert(! slice.is_event()); + assert(slice.number_of_events()==4); + assert(slice.curves_at_event(0).first==0); + assert(slice.curves_at_event(0).second==-1); + assert(slice.curves_at_event(1).first==-1); + assert(slice.curves_at_event(1).second==0); + assert(slice.curves_at_event(2).first==-1); + assert(slice.curves_at_event(2).second==1); + assert(slice.curves_at_event(3).first==1); + assert(slice.curves_at_event(3).second==-1); + } + { + i=3; + const Status_line_1& slice=curve_pair.status_line_at_event(i); + Triple triple = curve_pair.event_indices(i); + assert(triple.fg==1); + assert(triple.ffy==-1); + assert(triple.ggy==-1); + //assert(slice.event_of_curve(i,0)==-1); + //assert(slice.event_of_curve(i,1)==-1); + assert(slice.index()==i); + assert(slice.is_event()); + assert(slice.is_intersection()); + assert(slice.number_of_events()==2); + assert(slice.curves_at_event(0).first==0); + assert(slice.curves_at_event(0).second==0); + assert(slice.curves_at_event(1).first==1); + assert(slice.curves_at_event(1).second==1); + assert(slice.multiplicity_of_intersection(0)==1); + assert(slice.multiplicity_of_intersection(1)==1); + } + { + i=4; + const Status_line_1& slice=curve_pair.status_line_of_interval(i); + assert(! slice.is_event()); + assert(slice.number_of_events()==4); + assert(slice.curves_at_event(0).first==-1); + assert(slice.curves_at_event(0).second==0); + assert(slice.curves_at_event(1).first==0); + assert(slice.curves_at_event(1).second==-1); + assert(slice.curves_at_event(2).first==1); + assert(slice.curves_at_event(2).second==-1); + assert(slice.curves_at_event(3).first==-1); + assert(slice.curves_at_event(3).second==1); + } + { + i=4; + const Status_line_1& slice=curve_pair.status_line_at_event(i); + Triple triple = curve_pair.event_indices(i); + assert(triple.fg==2); + assert(triple.ffy==-1); + assert(triple.ggy==-1); + //assert(slice.event_of_curve(i,0)==-1); + //assert(slice.event_of_curve(i,1)==-1); + assert(slice.index()==i); + assert(slice.is_event()); + assert(slice.is_intersection()); + assert(slice.number_of_events()==2); + assert(slice.curves_at_event(0).first==0); + assert(slice.curves_at_event(0).second==0); + assert(slice.curves_at_event(1).first==1); + assert(slice.curves_at_event(1).second==1); + assert(slice.multiplicity_of_intersection(0)==1); + assert(slice.multiplicity_of_intersection(1)==1); + } + { + i=5; + const Status_line_1& slice=curve_pair.status_line_of_interval(i); + assert(! slice.is_event()); + assert(slice.number_of_events()==4); + assert(slice.curves_at_event(0).first==0); + assert(slice.curves_at_event(0).second==-1); + assert(slice.curves_at_event(1).first==-1); + assert(slice.curves_at_event(1).second==0); + assert(slice.curves_at_event(2).first==-1); + assert(slice.curves_at_event(2).second==1); + assert(slice.curves_at_event(3).first==1); + assert(slice.curves_at_event(3).second==-1); + } + { + i=5; + const Status_line_1& slice=curve_pair.status_line_at_event(i); + Triple triple = curve_pair.event_indices(i); + assert(triple.fg==-1); + assert(triple.ffy==-1); + assert(triple.ggy==1); + //assert(slice.event_of_curve(i,0)==-1); + //assert(slice.event_of_curve(i,1)==1); + assert(slice.index()==i); + assert(slice.is_event()); + assert(! slice.is_intersection()); + assert(slice.number_of_events()==3); + assert(slice.curves_at_event(0).first==0); + assert(slice.curves_at_event(0).second==-1); + assert(slice.curves_at_event(1).first==-1); + assert(slice.curves_at_event(1).second==0); + assert(slice.curves_at_event(2).first==1); + assert(slice.curves_at_event(2).second==-1); + } + { + i=6; + const Status_line_1& slice=curve_pair.status_line_of_interval(i); + assert(! slice.is_event()); + assert(slice.number_of_events()==2); + assert(slice.curves_at_event(0).first==0); + assert(slice.curves_at_event(0).second==-1); + assert(slice.curves_at_event(1).first==1); + assert(slice.curves_at_event(1).second==-1); + } + { + i=6; + const Status_line_1& slice=curve_pair.status_line_at_event(i); + Triple triple = curve_pair.event_indices(i); + assert(triple.fg==3); + assert(triple.ffy==-1); + assert(triple.ggy==-1); + //assert(slice.event_of_curve(i,0)==-1); + //assert(slice.event_of_curve(i,1)==-1); + assert(slice.index()==i); + assert(slice.is_event()); + assert(! slice.is_intersection()); + assert(slice.number_of_events()==2); + assert(slice.curves_at_event(0).first==0); + assert(slice.curves_at_event(0).second==-1); + assert(slice.curves_at_event(1).first==1); + assert(slice.curves_at_event(1).second==-1); + } + { + i=7; + const Status_line_1& slice=curve_pair.status_line_of_interval(i); + assert(! slice.is_event()); + assert(slice.number_of_events()==2); + assert(slice.curves_at_event(0).first==0); + assert(slice.curves_at_event(0).second==-1); + assert(slice.curves_at_event(1).first==1); + assert(slice.curves_at_event(1).second==-1); + } } + { + Poly_2 f=from_string("P[4(0,P[4(3,-1)(4,2)])(2,P[1(1,1)])(4,P[0(0,1)])]"); + Poly_2 g=from_string("P[4(0,P[4(0,12)(1,-380)(2,4200)(3,-18000)(4,20000)])(2,P[1(0,-4000)(1,40000)])(4,P[0(0,160000)])]"); + Curve_analysis_2 ca1=construct_curve_2(f), + ca2=construct_curve_2(g); + Curve_pair_analysis_2 curve_pair=construct_curve_pair_2(ca1,ca2); + //assert(curve_pair.number_of_status_lines_with_event()==11); + + + } +#if CGAL_ACK_WITH_ROTATIONS +#if DO_SQRT_EXTENSION_TESTS + // Sqrt extension: + { + typedef CGAL::Sqrt_extension Sqrt_extension; + typedef Sqrt_extension Coefficient; + typedef typename + CGAL::Polynomial_type_generator::Type Poly_sqrt1; + typedef typename + CGAL::Polynomial_type_generator::Type Poly_sqrt2; + + typedef CGAL::internal::Algebraic_real_quadratic_refinement_rep_bfi + < Coefficient, Rational > Rep_class; + typedef CGAL::internal::Bitstream_descartes + < CGAL::internal::Bitstream_descartes_rndl_tree_traits + < CGAL::internal::Bitstream_coefficient_kernel + > + > + Isolator; + typedef CGAL::Algebraic_kernel_d_1< Coefficient,Rational, + Rep_class, Isolator > + Algebraic_kernel_d_1_with_sqrt; + + Poly_sqrt2 f,g; + f=from_string("P[4(0,P[4(3,EXT[0,-2,7])(4,EXT[0,4,7])])(2,P[1(1,EXT[0,2,7])])(4,P[0(0,EXT[0,2,7])])]"); + g=from_string("P[4(0,P[4(4,EXT[0,2,7])])(1,P[2(2,EXT[0,2,7])])(3,P[0(0,EXT[0,-2,7])])(4,P[0(0,EXT[0,4,7])])]"); + + typedef CGAL::Algebraic_curve_kernel_2 + Algebraic_kernel_d_2; + + typedef typename Algebraic_kernel_d_2::Curve_analysis_2 Curve_analysis_2; + typedef typename Algebraic_kernel_d_2::Curve_pair_analysis_2 + Curve_pair_analysis_2; + + Algebraic_kernel_d_2 kernel; + + typename Algebraic_kernel_d_2::Construct_curve_2 + construct_curve_2 + = kernel.construct_curve_2_object(); + + typename Algebraic_kernel_d_2::Construct_curve_pair_2 + construct_curve_pair_2 + = kernel.construct_curve_pair_2_object(); + + + Curve_analysis_2 c1=construct_curve_2(f), + c2=construct_curve_2(g); + + Curve_pair_analysis_2 curve_pair=construct_curve_pair_2(c1,c2); + assert(curve_pair.number_of_status_lines_with_event()==10); + typedef typename Curve_pair_analysis_2::Status_line_1 Status_line_1; + typedef CGAL::internal::Event_indices Triple; + int i; + + { + i=0; + const Status_line_1& slice=curve_pair.status_line_of_interval(i); + assert(! slice.is_event()); + assert(! slice.is_intersection()); + assert(slice.number_of_events()==0); + } + { + i=0; + const Status_line_1& slice=curve_pair.status_line_at_event(i); + Triple triple = curve_pair.event_indices(i); + assert(triple.fg==-1); + assert(triple.ffy==-1); + assert(triple.ggy==0); + //assert(slice.event_of_curve(i,0)==-1); + //assert(slice.event_of_curve(i,1)==0); + assert(slice.index()==i); + assert(slice.is_event()); + assert(! slice.is_intersection()); + assert(slice.number_of_events()==1); + assert(slice.curves_at_event(0).first==-1); + assert(slice.curves_at_event(0).second==0); + } + { + i=1; + const Status_line_1& slice=curve_pair.status_line_of_interval(i); + assert(! slice.is_event()); + assert(slice.number_of_events()==2); + assert(slice.curves_at_event(0).first==-1); + assert(slice.curves_at_event(0).second==0); + assert(slice.curves_at_event(1).first==-1); + assert(slice.curves_at_event(1).second==1); + } + { + i=1; + const Status_line_1& slice=curve_pair.status_line_at_event(i); + Triple triple = curve_pair.event_indices(i); + assert(triple.fg==-1); + assert(triple.ffy==-1); + assert(triple.ggy==1); + //assert(slice.event_of_curve(i,0)==-1); + //assert(slice.event_of_curve(i,1)==0); + assert(slice.index()==i); + assert(slice.is_event()); + assert(! slice.is_intersection()); + assert(slice.number_of_events()==3); + assert(slice.curves_at_event(0).first==-1); + assert(slice.curves_at_event(0).second==0); + assert(slice.curves_at_event(1).first==-1); + assert(slice.curves_at_event(1).second==1); + assert(slice.curves_at_event(2).first==-1); + assert(slice.curves_at_event(2).second==2); + } + { + i=2; + const Status_line_1& slice=curve_pair.status_line_of_interval(i); + assert(! slice.is_event()); + assert(slice.number_of_events()==4); + assert(slice.curves_at_event(0).first==-1); + assert(slice.curves_at_event(0).second==0); + assert(slice.curves_at_event(1).first==-1); + assert(slice.curves_at_event(1).second==1); + assert(slice.curves_at_event(2).first==-1); + assert(slice.curves_at_event(2).second==2); + assert(slice.curves_at_event(3).first==-1); + assert(slice.curves_at_event(3).second==3); + } + { + i=2; + const Status_line_1& slice=curve_pair.status_line_at_event(i); + Triple triple = curve_pair.event_indices(i); + assert(triple.fg==-1); + assert(triple.ffy==0); + assert(triple.ggy==-1); + //assert(slice.event_of_curve(i,0)==0); + //assert(slice.event_of_curve(i,1)==-1); + assert(slice.index()==i); + assert(slice.is_event()); + assert(! slice.is_intersection()); + assert(slice.number_of_events()==6); + assert(slice.curves_at_event(0).first==0); + assert(slice.curves_at_event(0).second==-1); + assert(slice.curves_at_event(1).first==-1); + assert(slice.curves_at_event(1).second==0); + assert(slice.curves_at_event(2).first==-1); + assert(slice.curves_at_event(2).second==1); + assert(slice.curves_at_event(3).first==1); + assert(slice.curves_at_event(3).second==-1); + assert(slice.curves_at_event(4).first==-1); + assert(slice.curves_at_event(4).second==2); + assert(slice.curves_at_event(5).first==-1); + assert(slice.curves_at_event(5).second==3); + } + { + i=3; + const Status_line_1& slice=curve_pair.status_line_of_interval(i); + assert(! slice.is_event()); + assert(slice.number_of_events()==8); + assert(slice.curves_at_event(0).first==0); + assert(slice.curves_at_event(0).second==-1); + assert(slice.curves_at_event(1).first==1); + assert(slice.curves_at_event(1).second==-1); + assert(slice.curves_at_event(2).first==-1); + assert(slice.curves_at_event(2).second==0); + assert(slice.curves_at_event(3).first==-1); + assert(slice.curves_at_event(3).second==1); + assert(slice.curves_at_event(4).first==2); + assert(slice.curves_at_event(4).second==-1); + assert(slice.curves_at_event(5).first==3); + assert(slice.curves_at_event(5).second==-1); + assert(slice.curves_at_event(6).first==-1); + assert(slice.curves_at_event(6).second==2); + assert(slice.curves_at_event(7).first==-1); + assert(slice.curves_at_event(7).second==3); + } + { + i=3; + const Status_line_1& slice=curve_pair.status_line_at_event(i); + Triple triple = curve_pair.event_indices(i); + assert(triple.fg==0); + assert(triple.ffy==-1); + assert(triple.ggy==-1); + //assert(slice.event_of_curve(i,0)==-1); + //assert(slice.event_of_curve(i,1)==-1); + assert(slice.index()==i); + assert(slice.is_event()); + assert(slice.is_intersection()); + assert(slice.number_of_events()==7); + assert(slice.curves_at_event(0).first==0); + assert(slice.curves_at_event(0).second==-1); + assert(slice.curves_at_event(1).first==1); + assert(slice.curves_at_event(1).second==-1); + assert(slice.curves_at_event(2).first==-1); + assert(slice.curves_at_event(2).second==0); + assert(slice.curves_at_event(3).first==-1); + assert(slice.curves_at_event(3).second==1); + assert(slice.curves_at_event(4).first==2); + assert(slice.curves_at_event(4).second==-1); + assert(slice.curves_at_event(5).first==3); + assert(slice.curves_at_event(5).second==2); + assert(slice.curves_at_event(6).first==-1); + assert(slice.curves_at_event(6).second==3); + + assert(slice.multiplicity_of_intersection(5)==1); + } + { + i=4; + const Status_line_1& slice=curve_pair.status_line_of_interval(i); + assert(! slice.is_event()); + assert(slice.number_of_events()==8); + assert(slice.curves_at_event(0).first==0); + assert(slice.curves_at_event(0).second==-1); + assert(slice.curves_at_event(1).first==1); + assert(slice.curves_at_event(1).second==-1); + assert(slice.curves_at_event(2).first==-1); + assert(slice.curves_at_event(2).second==0); + assert(slice.curves_at_event(3).first==-1); + assert(slice.curves_at_event(3).second==1); + assert(slice.curves_at_event(4).first==2); + assert(slice.curves_at_event(4).second==-1); + assert(slice.curves_at_event(5).first==-1); + assert(slice.curves_at_event(5).second==2); + assert(slice.curves_at_event(6).first==3); + assert(slice.curves_at_event(6).second==-1); + assert(slice.curves_at_event(7).first==-1); + assert(slice.curves_at_event(7).second==3); + } + { + i=4; + const Status_line_1& slice=curve_pair.status_line_at_event(i); + Triple triple = curve_pair.event_indices(i); + assert(triple.fg==1); + assert(triple.ffy==1); + assert(triple.ggy==2); + //assert(slice.event_of_curve(i,0)==1); + //assert(slice.event_of_curve(i,1)==2); + assert(slice.index()==i); + assert(slice.is_event()); + assert(slice.is_intersection()); + assert(slice.number_of_events()==2); + assert(slice.curves_at_event(0).first==0); + assert(slice.curves_at_event(0).second==0); + assert(slice.curves_at_event(1).first==-1); + assert(slice.curves_at_event(1).second==1); + } + { + i=5; + const Status_line_1& slice=curve_pair.status_line_of_interval(i); + assert(! slice.is_event()); + assert(slice.number_of_events()==6); + assert(slice.curves_at_event(0).first==-1); + assert(slice.curves_at_event(0).second==0); + assert(slice.curves_at_event(1).first==0); + assert(slice.curves_at_event(1).second==-1); + assert(slice.curves_at_event(2).first==-1); + assert(slice.curves_at_event(2).second==1); + assert(slice.curves_at_event(3).first==1); + assert(slice.curves_at_event(3).second==-1); + assert(slice.curves_at_event(4).first==-1); + assert(slice.curves_at_event(4).second==2); + assert(slice.curves_at_event(5).first==-1); + assert(slice.curves_at_event(5).second==3); + } + { + i=5; + const Status_line_1& slice=curve_pair.status_line_at_event(i); + Triple triple = curve_pair.event_indices(i); + assert(triple.fg==-1); + assert(triple.ffy==-1); + assert(triple.ggy==3); + //assert(slice.event_of_curve(i,0)==-1); + //assert(slice.event_of_curve(i,1)==-1); + assert(slice.index()==i); + assert(slice.is_event()); + assert(! slice.is_intersection()); + assert(slice.number_of_events()==5); + assert(slice.curves_at_event(0).first==-1); + assert(slice.curves_at_event(0).second==0); + assert(slice.curves_at_event(1).first==0); + assert(slice.curves_at_event(1).second==-1); + assert(slice.curves_at_event(2).first==-1); + assert(slice.curves_at_event(2).second==1); + assert(slice.curves_at_event(3).first==1); + assert(slice.curves_at_event(3).second==-1); + assert(slice.curves_at_event(4).first==-1); + assert(slice.curves_at_event(4).second==2); + } + { + i=6; + const Status_line_1& slice=curve_pair.status_line_of_interval(i); + assert(! slice.is_event()); + assert(slice.number_of_events()==4); + assert(slice.curves_at_event(0).first==-1); + assert(slice.curves_at_event(0).second==0); + assert(slice.curves_at_event(1).first==0); + assert(slice.curves_at_event(1).second==-1); + assert(slice.curves_at_event(2).first==-1); + assert(slice.curves_at_event(2).second==1); + assert(slice.curves_at_event(3).first==1); + assert(slice.curves_at_event(3).second==-1); + } + { + i=6; + const Status_line_1& slice=curve_pair.status_line_at_event(i); + Triple triple = curve_pair.event_indices(i); + assert(triple.fg==2); + assert(triple.ffy==-1); + assert(triple.ggy==-1); + //assert(slice.event_of_curve(i,0)==-1); + //assert(slice.event_of_curve(i,1)==-1); + assert(slice.index()==i); + assert(slice.is_event()); + assert(slice.is_intersection()); + assert(slice.number_of_events()==3); + assert(slice.curves_at_event(0).first==0); + assert(slice.curves_at_event(0).second==0); + assert(slice.curves_at_event(1).first==-1); + assert(slice.curves_at_event(1).second==1); + assert(slice.curves_at_event(2).first==1); + assert(slice.curves_at_event(2).second==-1); + assert(slice.multiplicity_of_intersection(0)==1); + } + { + i=7; + const Status_line_1& slice=curve_pair.status_line_of_interval(i); + assert(! slice.is_event()); + assert(slice.number_of_events()==4); + assert(slice.curves_at_event(0).first==0); + assert(slice.curves_at_event(0).second==-1); + assert(slice.curves_at_event(1).first==-1); + assert(slice.curves_at_event(1).second==0); + assert(slice.curves_at_event(2).first==-1); + assert(slice.curves_at_event(2).second==1); + assert(slice.curves_at_event(3).first==1); + assert(slice.curves_at_event(3).second==-1); + } + { + i=7; + const Status_line_1& slice=curve_pair.status_line_at_event(i); + Triple triple = curve_pair.event_indices(i); + assert(triple.fg==-1); + assert(triple.ffy==-1); + assert(triple.ggy==4); + //assert(slice.event_of_curve(i,0)==-1); + //assert(slice.event_of_curve(i,1)==4); + assert(slice.index()==i); + assert(slice.is_event()); + assert(! slice.is_intersection()); + assert(slice.number_of_events()==3); + assert(slice.curves_at_event(0).first==0); + assert(slice.curves_at_event(0).second==-1); + assert(slice.curves_at_event(1).first==-1); + assert(slice.curves_at_event(1).second==0); + assert(slice.curves_at_event(2).first==1); + assert(slice.curves_at_event(2).second==-1); + } + { + i=8; + const Status_line_1& slice=curve_pair.status_line_of_interval(i); + assert(! slice.is_event()); + assert(slice.number_of_events()==2); + assert(slice.curves_at_event(0).first==0); + assert(slice.curves_at_event(0).second==-1); + assert(slice.curves_at_event(1).first==1); + assert(slice.curves_at_event(1).second==-1); + } + { + i=8; + const Status_line_1& slice=curve_pair.status_line_at_event(i); + Triple triple = curve_pair.event_indices(i); + assert(triple.fg==-1); + assert(triple.ffy==2); + assert(triple.ggy==-1); + //assert(slice.event_of_curve(i,0)==2); + //assert(slice.event_of_curve(i,1)==-1); + assert(slice.index()==i); + assert(slice.is_event()); + assert(! slice.is_intersection()); + assert(slice.number_of_events()==1); + assert(slice.curves_at_event(0).first==0); + assert(slice.curves_at_event(0).second==-1); + } + { + i=9; + const Status_line_1& slice=curve_pair.status_line_of_interval(i); + assert(! slice.is_event()); + assert(slice.number_of_events()==0); + } + { + i=9; + const Status_line_1& slice=curve_pair.status_line_at_event(i); + Triple triple = curve_pair.event_indices(i); + assert(triple.fg==-1); + assert(triple.ffy==3); + assert(triple.ggy==-1); + //assert(slice.event_of_curve(i,0)==3); + //assert(slice.event_of_curve(i,1)==-1); + assert(slice.index()==i); + assert(slice.is_event()); + assert(! slice.is_intersection()); + assert(slice.number_of_events()==0); + } + { + i=10; + const Status_line_1& slice=curve_pair.status_line_of_interval(i); + assert(! slice.is_event()); + assert(slice.number_of_events()==0); + } + + } +#endif +#endif } int main() { - - - test_routine(); - +#ifdef NDEBUG + std::cout << "Assertions switched off!" << std::endl; + return 0; +#endif +#ifdef CGAL_HAS_LEDA_ARITHMETIC_KERNEL + test_routine(); +#else + std::cout << "LEDA tests skipped!" << std::endl; +#endif +#ifdef CGAL_HAS_CORE_ARITHMETIC_KERNEL + test_routine(); +#else + std::cout << "CORE tests skipped!" << std::endl; +#endif +#ifdef CGAL_HAS_GMP_ARITHMETIC_KERNEL + test_routine(); +#else + std::cout << "GMP tests skipped!" << std::endl; +#endif return 0; } From 0483a885610303a9c8ac8886f39fc889cbd05d1a Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 14 May 2019 17:25:09 +0200 Subject: [PATCH 071/138] include this package include directory to be able to use another CGAL_DIR --- Triangulation_3/examples/Triangulation_3/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt index 0e3977bee33..df163540434 100644 --- a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt @@ -13,6 +13,8 @@ if(CGAL_Qt5_FOUND) add_definitions(-DCGAL_USE_BASIC_VIEWER -DQT_NO_KEYWORDS) endif() +include_directories(BEFORE "../../include") + if ( CGAL_FOUND ) create_single_source_cgal_program( "adding_handles_3.cpp" ) create_single_source_cgal_program( "color.cpp" ) From 0d6a9e8367fc04f243da5d6006f7efea0cbdeac9 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 16 May 2019 16:46:43 +0200 Subject: [PATCH 072/138] add a benchmark for simplex traverser and cell traverser --- .../benchmark/Triangulation_3/CMakeLists.txt | 29 ++++ .../segment_traverser_benchmark.cpp | 131 ++++++++++++++++++ .../CGAL/Triangulation_segment_traverser_3.h | 6 + 3 files changed, 166 insertions(+) create mode 100644 Triangulation_3/benchmark/Triangulation_3/CMakeLists.txt create mode 100644 Triangulation_3/benchmark/Triangulation_3/segment_traverser_benchmark.cpp diff --git a/Triangulation_3/benchmark/Triangulation_3/CMakeLists.txt b/Triangulation_3/benchmark/Triangulation_3/CMakeLists.txt new file mode 100644 index 00000000000..c7c212da684 --- /dev/null +++ b/Triangulation_3/benchmark/Triangulation_3/CMakeLists.txt @@ -0,0 +1,29 @@ + +project( Triangulation_3_Benchmark ) + +cmake_minimum_required(VERSION 2.8.11) + +find_package(CGAL QUIET) + +if ( CGAL_FOUND ) + + include( ${CGAL_USE_FILE} ) + +# find_package( TBB QUIET ) + + include( CGAL_CreateSingleSourceCGALProgram ) + + include_directories (BEFORE "../../include") + + create_single_source_cgal_program( "incident_edges.cpp" ) + create_single_source_cgal_program( "simple.cpp" ) + create_single_source_cgal_program( "simple_2.cpp" ) + create_single_source_cgal_program( "Triangulation_benchmark_3.cpp" ) + create_single_source_cgal_program( "segment_traverser_benchmark.cpp" ) + +else() + + message(STATUS "This program requires the CGAL library, and will not be compiled.") + +endif() + diff --git a/Triangulation_3/benchmark/Triangulation_3/segment_traverser_benchmark.cpp b/Triangulation_3/benchmark/Triangulation_3/segment_traverser_benchmark.cpp new file mode 100644 index 00000000000..580d9d7e649 --- /dev/null +++ b/Triangulation_3/benchmark/Triangulation_3/segment_traverser_benchmark.cpp @@ -0,0 +1,131 @@ +// Copyright (c) 2019 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// You can redistribute it and/or modify it under the terms of the GNU +// General Public License as published by the Free Software Foundation, +// either version 3 of the License, or (at your option) any later version. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL$ +// $Id$ +// +// + +#include +#include + +#include +#include + +#include +#include + +#include +#include + +// Define the kernel. +typedef CGAL::Exact_predicates_exact_constructions_kernel Epeck; +typedef CGAL::Exact_predicates_inexact_constructions_kernel Epick; + + +template +void bench_segment_traverser(const int nb_queries, + const int nbv, + const double rad, + CGAL::Random& rng) +{ + typedef CGAL::Delaunay_triangulation_3 DT; + typedef CGAL::Triangulation_segment_simplex_iterator_3
Simplex_traverser; + typedef CGAL::Triangulation_segment_cell_iterator_3
Cell_traverser; + typedef typename DT::Point_3 Point_3; + typedef typename DT::Cell Cell; + + std::cout << "\nBench :\t " << nb_queries << " queries," << std::endl + << "\t in triangulation of size " << nbv << std::endl + << "\t lying in the sphere (-" << rad << "; " << rad << ")" << std::endl + << "\t and Kernel : " << typeid(Kernel()).name() << std::endl; + + // Collect random points to build a triangulation + std::vector points(nbv); + int i = 0; + while (i < nbv) + { + points[i++] = Point_3(rng.get_double(-rad, rad), + rng.get_double(-rad, rad), + rng.get_double(-rad, rad)); + } + + // Construct the Delaunay triangulation. + DT dt(points.begin(), points.end()); + assert(dt.is_valid()); + + // Collect random segments for queries in [-2*rad, 2*rad] + std::vector segments(2 * nb_queries); + i = 0; + while (i < 2 * nb_queries) + { + segments[i++] = Point_3(rng.get_double(-2 * rad, 2 * rad), + rng.get_double(-2 * rad, 2 * rad), + rng.get_double(-2 * rad, 2 * rad)); + } + + CGAL::Timer timer_st, timer_ct; + timer_st.reset(); + timer_ct.reset(); + + for (i = 0; i < nb_queries; ++i) + { + //Simplex traverser + timer_st.start(); + Simplex_traverser st(dt, segments[2*i], segments[2*i + 1]); + + // Count the number of finite cells traversed. + unsigned int inf = 0, fin = 0; + for (; st != st.end(); ++st) + { + Cell c = st.cell(); +// if (dt.is_infinite(c)) ++inf; +// else ++fin; + } + timer_st.stop(); + + //Cell traverser + timer_ct.start(); + Cell_traverser ct(dt, segments[2*i], segments[2*i + 1]); + + // Count the number of finite cells traversed. + inf = 0, fin = 0; + for (; ct != ct.end(); ++ct) + { + Cell c = ct.cell(); +// if (dt.is_infinite(c)) ++inf; +// else ++fin; + } + timer_ct.stop(); + } + + std::cout << "Simplex traverser took " << timer_st.time() << " seconds." << std::endl; + std::cout << "Cell traverser took " << timer_ct.time() << " seconds." << std::endl; +} + +int main(int argc, char* argv[]) +{ + CGAL::Random rng; + std::cout << "CGAL::Random seed is " << rng.get_seed() << std::endl; + + //nb of segments tested + const int nb_queries = (argc > 1) ? atoi(argv[1]) : 100; + //nb of vertices in triangulation + const int nbv = (argc > 2) ? atoi(argv[2]) : 1000; + //radius of sphere including the triangulation + const double rad = (argc > 3) ? atof(argv[3]) : 10.; + +// bench_segment_traverser(nb_queries, nbv, rad, rng); + bench_segment_traverser(nb_queries, nbv, rad, rng); +} diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 0ec766475de..396df844073 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -505,6 +505,7 @@ public: // \{ typedef typename SCI::Vertex_handle Vertex_handle;//< defines the type of a handle for a vertex in the triangulation typedef typename SCI::Cell_handle Cell_handle; //< defines the type of a handle for a cell in the triangulation. + typedef typename SCI::Cell Cell; //< defines the type of a handle for a cell in the triangulation. typedef typename SCI::Triangulation::Edge Edge; //< defines the type of an edge in the triangulation. typedef typename SCI::Triangulation::Facet Facet; //< defines the type of a facet in the triangulation. typedef typename SCI::Locate_type Locate_type; //< defines the simplex type returned from location. @@ -813,6 +814,11 @@ public: bool is_facet() const { return _curr_simplex.dimension() == 2; } bool is_cell() const { return _curr_simplex.dimension() == 3; } + const Cell cell() const + { + return _cell_iterator.cell(); + } + const Simplex_type& get_simplex() const { return _curr_simplex; } Vertex_handle get_vertex() const { From 4e419e9c75a08560cc964a61c350794c327e66cb Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 16 May 2019 17:06:44 +0200 Subject: [PATCH 073/138] little cleaning around CGAL_FAST_TRAVERSER using this code speedups the traversal by 20% with Epick, 35% with Epeck and our tests remain valid, so we can remove the macro and activate the code --- .../Triangulation_segment_traverser_3_impl.h | 51 +++++++------------ 1 file changed, 17 insertions(+), 34 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h index 8413df212ec..900071abd30 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h @@ -301,12 +301,11 @@ walk_to_next_3() &(get<0>(_cur)->vertex(2)->point()), &(get<0>(_cur)->vertex(3)->point()) }; -#ifdef CGAL_FAST_TRAVERSER Orientation o0, o1, o2; int inside=0,outside=0,regular_case=0,degenerate=0; Cell_handle nnext; - - if( get<1>(_cur) == Tr::FACET ) { + + if( get<1>(_cur) == Tr::FACET ) { regular_case=1; int i = get<2>(_cur); int j0 = Tr::vertex_triple_index(i,0); @@ -391,9 +390,6 @@ walk_to_next_3() } } -#endif - - // We check in which direction the target lies // by comparing its position relative to the planes through the @@ -500,30 +496,19 @@ walk_to_next_3() get<2>(_prev) = li; get<1>(_cur) = Tr::FACET; get<2>(_cur) = get<0>(_cur)->index(get<0>(_prev)); -#ifdef CGAL_FAST_TRAVERSER - if(regular_case){ - if ((get<0>(_cur) != Cell_handle()) && (nnext != Cell_handle()) ){ - if (get<0>(_cur)!=nnext ){ - std::cout<<"nnext "<vertex(0)->point(); - std::cout<<" "<vertex(1)->point(); - std::cout<<" "<vertex(2)->point(); - std::cout<<" "<vertex(3)->point()<(_cur)->vertex(0)->point(); - std::cout<<" "<< get<0>(_cur)->vertex(1)->point(); - std::cout<<" "<< get<0>(_cur)->vertex(2)->point(); - std::cout<<" "<< get<0>(_cur)->vertex(3)->point()<(_cur)==nnext ); - CGAL_triangulation_assertion( li==outside ); - CGAL_triangulation_assertion( ! inside ); - } -#endif - return; - case 2: -#ifdef CGAL_FAST_TRAVERSER + if(regular_case) - CGAL_triangulation_assertion(degenerate ); -#endif + { + CGAL_triangulation_assertion( get<0>(_cur)==nnext ); + CGAL_triangulation_assertion( li==outside ); + CGAL_triangulation_assertion( ! inside ); + } + return; + + case 2: + if(regular_case) + CGAL_triangulation_assertion(degenerate ); + get<1>(_prev) = Tr::EDGE; get<1>(_cur) = Tr::EDGE; for( int j = 0; j < 4; ++j ) { @@ -539,10 +524,9 @@ walk_to_next_3() CGAL_triangulation_assertion( false ); return; case 1: -#ifdef CGAL_FAST_TRAVERSER if(regular_case) - CGAL_triangulation_assertion(degenerate ); -#endif + CGAL_triangulation_assertion(degenerate ); + get<1>(_prev) = Tr::VERTEX; get<1>(_cur) = Tr::VERTEX; for( int j = 0; j < 4; ++j ) { @@ -566,10 +550,9 @@ walk_to_next_3() case 4: CGAL_triangulation_assertion( pos == 6 ); _prev = Simplex( get<0>(_cur), Tr::CELL, -1, -1 ); -#ifdef CGAL_FAST_TRAVERSER CGAL_triangulation_assertion( (! regular_case) || inside ); -#endif break; + case 3: _prev = Simplex( get<0>(_cur), Tr::FACET, 6-pos, -1 ); break; From 7a28923da9ca59eeff53739accee5bc516f741f2 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 17 May 2019 10:26:41 +0200 Subject: [PATCH 074/138] remove useless macro --- .../test/Triangulation_3/test_simplex_iterator_3.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp index 333955bfe9e..8e4a739decf 100644 --- a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp @@ -19,8 +19,6 @@ // Author(s) : Jane Tournois -#define CGAL_FAST_TRAVERSER - #include #include #include @@ -338,7 +336,6 @@ int main(int argc, char* argv[]) // Reads a .xyz point set file in points. // As the point is the second element of the tuple (that is with index 1) -#define CGAL_FAST_TRAVERSER // we use a property map that accesses the 1st element of the tuple. std::vector points; From 4d47fd59782484d13ae314f5da7b0b4d91fe231d Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 17 May 2019 12:05:00 +0200 Subject: [PATCH 075/138] little cleaning --- .../Triangulation_3/segment_simplex_traverser_3.cpp | 12 ------------ .../examples/Triangulation_3/segment_traverser_3.cpp | 4 ---- 2 files changed, 16 deletions(-) diff --git a/Triangulation_3/examples/Triangulation_3/segment_simplex_traverser_3.cpp b/Triangulation_3/examples/Triangulation_3/segment_simplex_traverser_3.cpp index fac9d9cf33c..00900ff107b 100644 --- a/Triangulation_3/examples/Triangulation_3/segment_simplex_traverser_3.cpp +++ b/Triangulation_3/examples/Triangulation_3/segment_simplex_traverser_3.cpp @@ -42,9 +42,6 @@ int main(int argc, char* argv[]) return EXIT_FAILURE; } - //bbox - //min (-0.481293,-0.220929,-0.194076), max (0.311532,0.225525,0.198025) - // Construct the Delaunay triangulation. DT dt( points.begin(), points.end() ); assert( dt.is_valid() ); @@ -118,15 +115,6 @@ int main(int argc, char* argv[]) #endif } - // TODO : add cases with degeneracies, with query : - // - along an edge - // - along a facet via edge/facet/edge - // - along a facet via edge/facet/vertex - // - along a facet via vertex/facet/edge - // - along 2 successive facets (vertex/facet/edge/facet/edge) - // - along 2 successive edges (vertex/edge/vertex/edge/vertex) - // - along a facet and an edge successively - time.stop(); std::cout << "Traversing simplices of triangulation with " << nb_seg << " segments took " << time.time() << " seconds." diff --git a/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp b/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp index abadcab2f13..ab75a14ac39 100644 --- a/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp +++ b/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp @@ -1,7 +1,3 @@ -#define CGAL_PROFILE 1 -#define CGAL_FAST_TRAVERSER -//#define CGAL_TRIANGULATION_3_TRAVERSER_CHECK_INTERSECTION -//#define CGAL_EXPERIMENT_WITH_SIMPLE_CARTESIAN #include #include From 3f96a41f9372c69b55e88df2b0c932d80936b949 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 17 May 2019 13:32:34 +0200 Subject: [PATCH 076/138] fix warning : code not reached --- .../include/CGAL/Triangulation_segment_traverser_3_impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h index 900071abd30..64e43c82a77 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h @@ -782,7 +782,7 @@ walk_to_next_2() if( get<0>(_cur)->neighbor(lk) != get<0>(_prev) ) { // Check the edge itself switch( CGAL::coplanar_orientation( *vert[get<2>(_cur)], *vert[get<3>(_cur)], *vert[lk], _target ) ) { - _prev = _cur; + //_prev = _cur; //code not reached case COLLINEAR: // The target lies in this cell. get<0>(_cur) = Cell_handle(); From 9d23b2f20ceaaad0d16a95e87725b0937736d7f0 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 17 May 2019 15:30:11 +0200 Subject: [PATCH 077/138] move functions from Triangulation_3 to the traverser header now Triangulation_3.h is the same as in cgal/master branch, and everything specific to the traverser has been moved to the traverser header --- .../include/CGAL/Triangulation_3.h | 82 +---------------- .../CGAL/Triangulation_segment_traverser_3.h | 10 +- .../Triangulation_segment_traverser_3_impl.h | 92 +++++++++++++------ 3 files changed, 72 insertions(+), 112 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_3.h b/Triangulation_3/include/CGAL/Triangulation_3.h index 6010793508a..94160f16f17 100644 --- a/Triangulation_3/include/CGAL/Triangulation_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_3.h @@ -27,7 +27,6 @@ #include #include -#include #ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING # define CGAL_PROFILE @@ -432,8 +431,6 @@ public: typedef Edge_iterator All_edges_iterator; typedef Vertex_iterator All_vertices_iterator; - typedef Triangulation_segment_cell_iterator_3 Segment_cell_iterator; - typedef typename Tds::Simplex Simplex; private: @@ -583,26 +580,11 @@ public: construct_point(s)); } - // Compute the orientation of a point compared to the oriented plane supporting a half-facet. - Orientation orientation( const Facet& f, const Point& p ) const; - - bool - coplanar(const Point &p, const Point &q, - const Point &r, const Point &s) const + bool coplanar(const Point& p, const Point& q, const Point& r, const Point& s) const { return orientation(p, q, r, s) == COPLANAR; } - // Check whether the points of facet `f` and point `p` are coplanar. - bool coplanar( const Facet& f, const Point& p ) const { - return orientation(f, p) == COPLANAR; - } - - // Check whether the points of facet `f` and vertex `v` are coplanar. - bool coplanar( const Facet& f, Vertex_handle v ) const{ - return orientation(f, v->point()) == COPLANAR; - } - template // Point or Point_3 Orientation coplanar_orientation(const P& p, const P& q, const P& r) const { @@ -1076,13 +1058,6 @@ public: Vertex_handle mirror_vertex(Cell_handle c, int i) const { return _tds.mirror_vertex(c, i); } Facet mirror_facet(Facet f) const { return _tds.mirror_facet(f);} - // Gives the edge incident to the same cell that is not incident to any of the input vertices. - Edge opposite_edge( Cell_handle c, int li, int lj ) const; - - // Gives the edge incident to the same cell that is not incident to any of the vertices of the input edge. - Edge opposite_edge( const Edge& e ) const - { return opposite_edge( e.first, e.second, e.third ); } - // MODIFIERS bool flip(const Facet& f) @@ -2057,26 +2032,6 @@ public: return _tds.incident_edges(v, edges, Finite_filter(this)); } - Segment_cell_iterator - segment_walk_begin(Vertex_handle s, Vertex_handle t) const { - return Segment_cell_iterator( *this, s, t ); - } - - Segment_cell_iterator - segment_walk_end(Vertex_handle s, Vertex_handle t) const { - return Segment_cell_iterator( *this, s, t ).end(); - } - - Segment_cell_iterator - segment_walk_begin(const Point& s, const Point& t, Cell_handle hint = Cell_handle()) const { - return Segment_cell_iterator( *this, s, t, hint ); - } - - Segment_cell_iterator - segment_walk_end(const Point& s, const Point& t, Cell_handle hint = Cell_handle()) const { - return Segment_cell_iterator( *this, s, t, hint ).end(); - } - template OutputIterator incident_edges_threadsafe(Vertex_handle v, OutputIterator edges) const { @@ -2259,19 +2214,8 @@ std::ostream& operator<< (std::ostream& os, const Triangulation_3& } template < class GT, class Tds, class Lds > -Orientation +typename Triangulation_3::size_type Triangulation_3:: -orientation(const Facet& f, const Point& p) const -{ - return orientation( f.first->vertex( vertex_triple_index(f.second, 0) )->point(), - f.first->vertex( vertex_triple_index(f.second, 1) )->point(), - f.first->vertex( vertex_triple_index(f.second, 2) )->point(), - p ); -} - -template < class GT, class Tds, class Lds > -typename Triangulation_3::size_type -Triangulation_3:: number_of_finite_cells() const { if(dimension() < 3) @@ -3417,28 +3361,6 @@ side_of_edge(const Point& p, } } -template < class Gt, class Tds, class Lds > -inline -typename Triangulation_3::Edge -Triangulation_3:: -opposite_edge( Cell_handle c, int li, int lj ) const { - CGAL_triangulation_precondition( li >= 0 && li < 4 ); - CGAL_triangulation_precondition( lj >= 0 && lj < 4 ); - CGAL_triangulation_precondition( li != lj ); - - switch( 6-li-lj ) { // i + j + missing indices = 6. - case 1: return Edge( c, 0, 1 ); - case 2: return Edge( c, 0, 2 ); - case 3: return ( li == 0 || lj == 0 ) ? Edge( c, 1, 2 ) : Edge( c, 0, 3 ); - case 4: return Edge( c, 1, 3 ); - case 5: return Edge( c, 2, 3 ); - } - - CGAL_triangulation_assertion( false ); - return Edge(); -} - - template < class GT, class Tds, class Lds > bool Triangulation_3:: diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 396df844073..b00bd4c9528 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -455,8 +455,14 @@ private: bool have_same_entry(const Simplex& s1, const Simplex& s2) const; - CGAL::Orientation orientation(const Point& p, const Point& q, - const Point& r, const Point& s) const; + // Compute the orientation of a point compared to the oriented plane supporting a half-facet. + CGAL::Orientation orientation(const Facet& f, const Point& p) const; + + bool coplanar(const Facet &f, const Point &p) const; + + // Gives the edge incident to the same cell that is not incident to any of the input vertices. + Edge opposite_edge(Cell_handle c, int li, int lj) const; + Edge opposite_edge(const Edge& e) const; }; // class Triangulation_segment_cell_iterator_3 diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h index 64e43c82a77..7fc0672c703 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h @@ -20,8 +20,6 @@ #define CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_IMPL_H #include -#include -#include namespace CGAL { @@ -100,7 +98,7 @@ Triangulation_segment_cell_iterator_3( const Tr& tr, const Point& s, const Point CGAL_triangulation_precondition( s != t ); CGAL_triangulation_precondition( _tr.dimension() >= 2 ); CGAL_triangulation_precondition( _tr.dimension() == 3 || - _tr.coplanar( *_tr.finite_facets_begin(), _target ) ); + coplanar( *_tr.finite_facets_begin(), _target ) ); _source = s; _target = t; @@ -311,11 +309,11 @@ walk_to_next_3() int j0 = Tr::vertex_triple_index(i,0); int j1 = Tr::vertex_triple_index(i,1); int j2 = Tr::vertex_triple_index(i,2); - o0 = orientation(_source, *vert[i], *vert[j0], _target); + o0 = _tr.orientation(_source, *vert[i], *vert[j0], _target); if (o0==POSITIVE){ - o1 = orientation(_source, *vert[i], *vert[j1], _target); + o1 = _tr.orientation(_source, *vert[i], *vert[j1], _target); if(o1!=POSITIVE){ - if (orientation(*vert[i], *vert[j0], *vert[j1], _target)==POSITIVE){ + if (_tr.orientation(*vert[i], *vert[j0], *vert[j1], _target)==POSITIVE){ nnext= get<0>(_cur)->neighbor(j2); outside=j2; if(o1==ZERO) degenerate=1; //EDGE i j1 @@ -323,7 +321,7 @@ walk_to_next_3() else inside=1; }else{ - if (orientation(*vert[i], *vert[j1], *vert[j2], _target)==POSITIVE){ + if (_tr.orientation(*vert[i], *vert[j1], *vert[j2], _target)==POSITIVE){ nnext= get<0>(_cur)->neighbor(j0); outside=j0; } @@ -331,9 +329,9 @@ walk_to_next_3() inside=2; } }else if (o0==ZERO){ - o1 = orientation(_source, *vert[i], *vert[j1], _target); + o1 = _tr.orientation(_source, *vert[i], *vert[j1], _target); if(o1==NEGATIVE){ - if (orientation(*vert[i], *vert[j0], *vert[j1], _target)==POSITIVE){ + if (_tr.orientation(*vert[i], *vert[j0], *vert[j1], _target)==POSITIVE){ nnext= get<0>(_cur)->neighbor(j2); //EDGE i j0 degenerate=2; outside=44; @@ -345,7 +343,7 @@ walk_to_next_3() degenerate =3; outside=5; }else { - if (orientation(*vert[i], *vert[j1], *vert[j2], _target)==POSITIVE){ + if (_tr.orientation(*vert[i], *vert[j1], *vert[j2], _target)==POSITIVE){ nnext= get<0>(_cur)->neighbor(j0); outside=j0; } @@ -353,9 +351,9 @@ walk_to_next_3() inside=4; } }else{ - o2 = orientation(_source, *vert[i], *vert[j2], _target); + o2 = _tr.orientation(_source, *vert[i], *vert[j2], _target); if(o2!=NEGATIVE){ - if (orientation(*vert[i], *vert[j2], *vert[j0], _target)==POSITIVE){ + if (_tr.orientation(*vert[i], *vert[j2], *vert[j0], _target)==POSITIVE){ nnext= get<0>(_cur)->neighbor(j1); outside=j1; if(o2==ZERO) degenerate =4; // EDGE i j2 @@ -363,7 +361,7 @@ walk_to_next_3() else inside=5; }else{ - if (orientation(*vert[i], *vert[j1], *vert[j2], _target)==POSITIVE){ + if (_tr.orientation(*vert[i], *vert[j1], *vert[j2], _target)==POSITIVE){ nnext= get<0>(_cur)->neighbor(j0); outside=j0; } @@ -434,7 +432,7 @@ walk_to_next_3() vert[li] = &_target; // Check if the target is on the opposite side of the supporting plane. - op[li] = orientation( *vert[0], *vert[1], *vert[2], *vert[3] ); + op[li] = _tr.orientation( *vert[0], *vert[1], *vert[2], *vert[3] ); if( op[li] == POSITIVE ) pos += li; if( op[li] != NEGATIVE ) { @@ -457,7 +455,7 @@ walk_to_next_3() if( !calc[oij] ) { Point* backup2 = vert[lj]; vert[lj] = &_source; - o[oij] = orientation( *vert[0], *vert[1], *vert[2], *vert[3] ); + o[oij] = _tr.orientation( *vert[0], *vert[1], *vert[2], *vert[3] ); vert[lj] = backup2; calc[oij] = true; } @@ -513,7 +511,7 @@ walk_to_next_3() get<1>(_cur) = Tr::EDGE; for( int j = 0; j < 4; ++j ) { if( li != j && o[ 5 - edgeIndex(li, j) ] == COPLANAR) { - Edge opp = _tr.opposite_edge( get<0>(_prev), li, j ); + Edge opp = opposite_edge( get<0>(_prev), li, j ); get<2>(_prev) = opp.second; get<3>(_prev) = opp.third; get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); @@ -597,7 +595,7 @@ walk_to_next_3_inf( int inf ) { Orientation o[4]; // Check if the target lies outside the convex hull. - if( orientation( *vert[0], *vert[1], *vert[2], *vert[3] ) == POSITIVE ) { + if( _tr.orientation( *vert[0], *vert[1], *vert[2], *vert[3] ) == POSITIVE ) { // The target lies in an infinite cell. // Note that we do not traverse to other infinite cells. _prev = Simplex( get<0>(_cur), Tr::OUTSIDE_CONVEX_HULL, -1, -1 ); @@ -606,7 +604,7 @@ walk_to_next_3_inf( int inf ) { } vert[inf] = &(_source); - CGAL_triangulation_assertion( orientation( *vert[0], *vert[1], *vert[2], *vert[3] ) == POSITIVE ); + CGAL_triangulation_assertion( _tr.orientation( *vert[0], *vert[1], *vert[2], *vert[3] ) == POSITIVE ); int li = 0; // Check if the line enters an adjacent infinite cell. @@ -627,7 +625,7 @@ walk_to_next_3_inf( int inf ) { Point* backup = vert[li]; vert[li] = &(_target); - o[li] = orientation( *vert[0], *vert[1], *vert[2], *vert[3] ); + o[li] = _tr.orientation( *vert[0], *vert[1], *vert[2], *vert[3] ); if( o[li] != NEGATIVE ) { vert[li] = backup; @@ -659,7 +657,7 @@ walk_to_next_3_inf( int inf ) { get<1>(_cur) = Tr::EDGE; for( int i = 0; i < 4; ++i ) { if( o[i] == COPLANAR && i != inf ) { - Edge opp = _tr.opposite_edge( get<0>(_prev), inf, i ); + Edge opp = opposite_edge( get<0>(_prev), inf, i ); get<2>(_prev) = opp.second; get<3>(_prev) = opp.third; get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); @@ -1039,19 +1037,53 @@ walk_to_next_2_inf( int inf ) { template < class Tr, class Inc > CGAL::Orientation Triangulation_segment_cell_iterator_3::orientation( - const Point& p, const Point& q, const Point& r, const Point& s) const + const Facet& f, const Point& p) const { -#ifdef CGAL_EXPERIMENT_WITH_SIMPLE_CARTESIAN - typedef CGAL::Simple_cartesian K2; - CGAL::Cartesian_converter c; - - return CGAL::orientation(c(p), c(q), c(r), c(s)); -#else - return _tr.orientation(p, q, r, s); -#endif + return _tr.orientation( + f.first->vertex(Tr::vertex_triple_index(f.second, 0))->point(), + f.first->vertex(Tr::vertex_triple_index(f.second, 1))->point(), + f.first->vertex(Tr::vertex_triple_index(f.second, 2))->point(), + p); } - +template < class Tr, class Inc > +bool +Triangulation_segment_cell_iterator_3::coplanar( + const Facet& f, const Point& p) const +{ + return orientation(f, p) == COPLANAR; +} + +template < class Tr, class Inc > +typename Triangulation_segment_cell_iterator_3::Edge +Triangulation_segment_cell_iterator_3::opposite_edge( + Cell_handle c, int li, int lj) const +{ + CGAL_triangulation_precondition(li >= 0 && li < 4); + CGAL_triangulation_precondition(lj >= 0 && lj < 4); + CGAL_triangulation_precondition(li != lj); + + switch (6 - li - lj) { // i + j + missing indices = 6. + case 1: return Edge(c, 0, 1); + case 2: return Edge(c, 0, 2); + case 3: return (li == 0 || lj == 0) ? Edge(c, 1, 2) : Edge(c, 0, 3); + case 4: return Edge(c, 1, 3); + case 5: return Edge(c, 2, 3); + } + + CGAL_triangulation_assertion(false); + return Edge(); +} + +template < class Tr, class Inc > +typename Triangulation_segment_cell_iterator_3::Edge +Triangulation_segment_cell_iterator_3::opposite_edge( + const Edge& e) const +{ + return opposite_edge(e.first, e.second, e.third); +} + + } //end of CGAL namespace #endif // CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_IMPL_H From b438e73b4b24ab7fa8710d21f667b60421832407 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 11 Sep 2019 11:04:21 +0200 Subject: [PATCH 078/138] cleanup: synchronize with the older branch --- TDS_3/include/CGAL/Triangulation_utils_3.h | 30 ------------------- .../include/CGAL/Triangulation_3.h | 1 - .../Triangulation_segment_traverser_3_impl.h | 6 ++-- 3 files changed, 3 insertions(+), 34 deletions(-) diff --git a/TDS_3/include/CGAL/Triangulation_utils_3.h b/TDS_3/include/CGAL/Triangulation_utils_3.h index d8d7a68e154..f613ff759c8 100644 --- a/TDS_3/include/CGAL/Triangulation_utils_3.h +++ b/TDS_3/include/CGAL/Triangulation_utils_3.h @@ -36,10 +36,6 @@ struct Triangulation_utils_base_3 { static const char tab_next_around_edge[4][4]; static const int tab_vertex_triple_index[4][3]; - - static const int index_increment_map[4]; - static const int index_jump_map[4]; - static const int index_decrement_map[4]; // copied from Triangulation_utils_2.h to avoid package dependency static const int ccw_map[3]; @@ -61,15 +57,6 @@ const int Triangulation_utils_base_3::tab_vertex_triple_index[4][3] = { {0, 1, 2} }; -template < class T > -const int Triangulation_utils_base_3::index_increment_map[4] = { 1, 2, 3, 0 }; - -template < class T > -const int Triangulation_utils_base_3::index_jump_map[4] = { 2, 3, 0, 1 }; - -template < class T > -const int Triangulation_utils_base_3::index_decrement_map[4] = { 3, 0, 1, 2 }; - template < class T > const int Triangulation_utils_base_3::ccw_map[3] = {1, 2, 0}; @@ -115,23 +102,6 @@ struct Triangulation_utils_3 return tab_vertex_triple_index[i][j]; } - // Get the index of the next vertex or facet. - static int increment_index( int li ) { - CGAL_triangulation_precondition( li >= 0 && li < 4 ); - return index_increment_map[ li ]; - } - - // Get the index of the vertex or facet two places further. - static int jump_index( int li ) { - CGAL_triangulation_precondition( li >= 0 && li < 4 ); - return index_jump_map[ li ]; - } - - // Get the index of the previous vertex or facet. - static int decrement_index( int li ) { - CGAL_triangulation_precondition( li >= 0 && li < 4 ); - return index_decrement_map[ li ]; - } }; } //namespace CGAL diff --git a/Triangulation_3/include/CGAL/Triangulation_3.h b/Triangulation_3/include/CGAL/Triangulation_3.h index 94160f16f17..2e3771adad4 100644 --- a/Triangulation_3/include/CGAL/Triangulation_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_3.h @@ -558,7 +558,6 @@ public: return geom_traits().construct_point_3_object()(p); } -public: template // Point or Point_3 Comparison_result compare_xyz(const P& p, const P& q) const { diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h index 7fc0672c703..6dcc4efdbb4 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h @@ -418,7 +418,7 @@ walk_to_next_3() // For the remembering stochastic walk, we start trying with a random facet. int li = 0; CGAL_triangulation_assertion_code( bool incell = true; ) - for( int k = 0; k < 4; ++k, li = _tr.increment_index(li) ) + for( int k = 0; k < 4; ++k, ++li ) { // Skip the previous cell. Cell_handle next = get<0>(_cur)->neighbor(li); @@ -445,7 +445,7 @@ walk_to_next_3() // the source as apex and the facet as an intersection. int lj = 0; int Or = 0; - for( int l = 0; l < 4; ++l, lj = _tr.increment_index(lj) ) { + for( int l = 0; l < 4; ++l, ++lj ) { if( li == lj ) continue; @@ -610,7 +610,7 @@ walk_to_next_3_inf( int inf ) { // Check if the line enters an adjacent infinite cell. // This occurs if the target lies on the other side of // a plane through one of the finite edges and the source point. - for( int j = 0; j != 4; ++j, li = _tr.increment_index(li) ) { + for( int j = 0; j != 4; ++j, ++li ) { if( li == inf ) { o[li] = COPLANAR; continue; From e4e065fad5735e95ba909f846c462f73920c9d88 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 11 Sep 2019 11:22:36 +0200 Subject: [PATCH 079/138] 'how to make superclass for inserter pattern.txt' turned to comment --- .../CGAL/Triangulation_segment_traverser_3.h | 43 ++++++++++++++++++- ...o make superclass for inserter pattern.txt | 39 ----------------- 2 files changed, 42 insertions(+), 40 deletions(-) delete mode 100644 Triangulation_3/include/CGAL/how to make superclass for inserter pattern.txt diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index b00bd4c9528..c1bef5391a2 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -46,11 +46,52 @@ namespace CGAL { +/* +add the following to Triangulation_segment_traverser_3.h to get a superclass of the Incrementer visitor. + + + + + +template < class Tr, class Inc > +class Test_super_SCI; + +namespace internal { + +template < class Tr > +struct Test_incrementer: public Incrementer { + typedef Incrementer Base; + typedef Test_incrementer Self; + typedef Test_super_SCI SCI; + Test_incrementer() {} + void increment( SCI& sci ) { + ++sci._superclass; + sci.increment(); + } +}; // struct Test_incrementer + +} // namespace internal + +template < class Tr_, class Inc = internal::Test_incrementer > +class Test_super_SCI: public Triangulation_segment_cell_iterator_3 { + typedef Tr_ Tr; + typedef Triangulation_segment_cell_iterator_3 SCI; + + int _superclass; + + friend internal::Test_incrementer; + +public: + Test_super_SCI( const Tr& tr, const Point& s, const Point& t, Cell_handle hint = Cell_handle() ) + : SCI(tr,s,t,hint), _superclass(0) {} + +}; +*/ + template < class Tr, class Inc > class Triangulation_segment_cell_iterator_3; namespace internal { - template < class Tr > struct Incrementer { typedef Incrementer Self; diff --git a/Triangulation_3/include/CGAL/how to make superclass for inserter pattern.txt b/Triangulation_3/include/CGAL/how to make superclass for inserter pattern.txt deleted file mode 100644 index fa5bf9761c7..00000000000 --- a/Triangulation_3/include/CGAL/how to make superclass for inserter pattern.txt +++ /dev/null @@ -1,39 +0,0 @@ -add the following to Triangulation_segment_traverser_3.h to get a superclass of the Incrementer visitor. - - - - - -template < class Tr, class Inc > -class Test_super_SCI; - -namespace internal { - -template < class Tr > -struct Test_incrementer: public Incrementer { - typedef Incrementer Base; - typedef Test_incrementer Self; - typedef Test_super_SCI SCI; - Test_incrementer() {} - void increment( SCI& sci ) { - ++sci._superclass; - sci.increment(); - } -}; // struct Test_incrementer - -} // namespace internal - -template < class Tr_, class Inc = internal::Test_incrementer > -class Test_super_SCI: public Triangulation_segment_cell_iterator_3 { - typedef Tr_ Tr; - typedef Triangulation_segment_cell_iterator_3 SCI; - - int _superclass; - - friend internal::Test_incrementer; - -public: - Test_super_SCI( const Tr& tr, const Point& s, const Point& t, Cell_handle hint = Cell_handle() ) - : SCI(tr,s,t,hint), _superclass(0) {} - -}; \ No newline at end of file From c78d4b66a9a1291b5a6e319cc1a334a48532d0ed Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 12 Sep 2019 10:01:20 +0200 Subject: [PATCH 080/138] Add SPDX license headers --- .../CGAL/Triangulation_segment_traverser_3.h | 22 ++++++++++--------- .../Triangulation_segment_traverser_3_impl.h | 22 ++++++++++--------- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index c1bef5391a2..c0f207bb9b3 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -1,18 +1,20 @@ //A class that follows a straight line through a Delaunay triangulation structure. //Copyright (C) 2012 Utrecht University // -//This program is free software: you can redistribute it and/or modify -//it under the terms of the GNU General Public License as published by -//the Free Software Foundation, either version 3 of the License, or -//(at your option) any later version. +// This file is part of CGAL (www.cgal.org). +// You can redistribute it and/or modify it under the terms of the GNU +// General Public License as published by the Free Software Foundation, +// either version 3 of the License, or (at your option) any later version. // -//This program is distributed in the hope that it will be useful, -//but WITHOUT ANY WARRANTY; without even the implied warranty of -//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//GNU General Public License for more details. +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. // -//You should have received a copy of the GNU General Public License -//along with this program. If not, see . +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: GPL-3.0+ // // Author(s): Thijs van Lankveld diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h index 6dcc4efdbb4..9648733c18d 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h @@ -1,18 +1,20 @@ //A class that follows a straight line through a Delaunay triangulation structure. //Copyright (C) 2012 Utrecht University // -//This program is free software: you can redistribute it and/or modify -//it under the terms of the GNU General Public License as published by -//the Free Software Foundation, either version 3 of the License, or -//(at your option) any later version. +// This file is part of CGAL (www.cgal.org). +// You can redistribute it and/or modify it under the terms of the GNU +// General Public License as published by the Free Software Foundation, +// either version 3 of the License, or (at your option) any later version. // -//This program is distributed in the hope that it will be useful, -//but WITHOUT ANY WARRANTY; without even the implied warranty of -//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//GNU General Public License for more details. +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. // -//You should have received a copy of the GNU General Public License -//along with this program. If not, see . +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: GPL-3.0+ // // Author(s): Thijs van Lankveld From 3694d7a005ee6ce71cfacde1454e1c0591ac60f4 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 12 Sep 2019 13:10:14 +0200 Subject: [PATCH 081/138] Only use polymorphism if CGAL_TST_ASSUME_CORRECT_TYPES is undefined --- .../include/CGAL/Triangulation_segment_traverser_3.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index c0f207bb9b3..e65d4a77bfa 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -256,9 +256,12 @@ public: Triangulation_segment_cell_iterator_3( const Tr& tr, const Segment& S, Cell_handle hint = Cell_handle() ); // \} +#ifndef CGAL_TST_ASSUME_CORRECT_TYPES // The virtual destructor is mainly defined to indicate to the casting // operators that this is a dynamic type. - virtual ~Triangulation_segment_cell_iterator_3() {} + virtual +#endif + ~Triangulation_segment_cell_iterator_3() {} private: // private constructor that does not initialize the source and target. From 5813b65267296f98df4423f515d96ae5c1df9b9a Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 24 Sep 2019 11:37:20 +0200 Subject: [PATCH 082/138] fix the end conditions of simplex iterator now we get the last simplex traversed before getting end() --- .../CGAL/Triangulation_segment_traverser_3.h | 33 ++++++++++++++----- .../test_simplex_iterator_3.cpp | 12 +++---- 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index e65d4a77bfa..49b27ad79a7 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -625,17 +625,22 @@ private: private: void set_curr_simplex_to_entry() { + Locate_type lt; + int li, lj; + Cell_handle cell; + //check what is the entry type of _cell_iterator if (Cell_handle(_cell_iterator) == Cell_handle()) { - _curr_simplex = Simplex_type(); - return;//end has been reached + //where did the segment get out from previous cell + cell = _cell_iterator.previous(); + _cell_iterator.exit(lt, li, lj); + } + else + { + cell = Cell_handle(_cell_iterator); + _cell_iterator.entry(lt, li, lj); } - - Cell_handle cell = Cell_handle(_cell_iterator); - Locate_type lt; - int li, lj; - _cell_iterator.entry(lt, li, lj); switch (lt) { @@ -672,11 +677,19 @@ public: { CGAL_assertion(_curr_simplex.incident_cell() != Cell_handle()); + Cell_handle ch = Cell_handle(_cell_iterator); + if (ch == Cell_handle()) + { + _curr_simplex = Simplex_type(); + return *this; + } + switch(_curr_simplex.dimension()) { case 3 :/*Cell_handle*/ { - ++_cell_iterator; + if (!cell_iterator_is_ahead()) + ++_cell_iterator; set_curr_simplex_to_entry(); break; } @@ -727,7 +740,6 @@ public: } case 1:/*Edge*/ { - Cell_handle ch = Cell_handle(_cell_iterator); Locate_type lt; int li, lj; _cell_iterator.entry(lt, li, lj); @@ -921,6 +933,9 @@ private: bool cell_iterator_is_ahead() const { Cell_handle ch = Cell_handle(_cell_iterator); + if(ch == Cell_handle()) + return true; + switch (_curr_simplex.dimension()) { case 0 ://vertex diff --git a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp index 8e4a739decf..cabc98ffaa9 100644 --- a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp @@ -74,7 +74,7 @@ void test_vertex_edge_vertex(const DT& dt, const std::size_t& nb_tests) for (; st != st.end(); ++st) { std::cout << st.simplex_dimension(); - if(dt.is_infinite(st)) + if(Cell_handle(st) != Cell_handle() && dt.is_infinite(st)) std::cout << "i"; std::cout << " "; @@ -127,7 +127,7 @@ void test_edge_facet_edge(const DT& dt, const std::size_t& nb_tests) for (; st != st.end(); ++st) { std::cout << st.simplex_dimension(); - if (dt.is_infinite(st)) + if (Cell_handle(st) != Cell_handle() && dt.is_infinite(st)) std::cout << "i"; std::cout << " "; @@ -186,7 +186,7 @@ void test_edge_facet_vertex(const DT& dt, const std::size_t& nb_tests) for (; st != end; ++st) { std::cout << st.simplex_dimension(); - if (dt.is_infinite(st)) + if (Cell_handle(st) != Cell_handle() && dt.is_infinite(st)) std::cout << "i"; std::cout << " "; @@ -248,7 +248,7 @@ void test_vertex_facet_edge(const DT& dt, const std::size_t& nb_tests) for (; st != end; ++st) { std::cout << st.simplex_dimension(); - if (dt.is_infinite(st)) + if (Cell_handle(st) != Cell_handle() && dt.is_infinite(st)) std::cout << "i"; std::cout << " "; @@ -378,8 +378,8 @@ int main(int argc, char* argv[]) { if (st.is_cell()) { - if (dt.is_infinite(st)) ++inf; - else ++fin; + if (Cell_handle(st) != Cell_handle() && dt.is_infinite(st)) ++inf; + else ++fin; } if (st.is_facet()) ++nb_facets; else if (st.is_edge()) ++nb_edges; From ba02a4c7ad21cd375f5c8c3896826be13db5571e Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 24 Sep 2019 11:38:08 +0200 Subject: [PATCH 083/138] add 2 new simple tests for simplex and cell traversers --- .../test/Triangulation_3/CMakeLists.txt | 6 +- .../test_segment_cell_traverser_3.cpp | 113 +++++++++++++++ .../test_segment_simplex_traverser_3.cpp | 136 ++++++++++++++++++ 3 files changed, 253 insertions(+), 2 deletions(-) create mode 100644 Triangulation_3/test/Triangulation_3/test_segment_cell_traverser_3.cpp create mode 100644 Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp diff --git a/Triangulation_3/test/Triangulation_3/CMakeLists.txt b/Triangulation_3/test/Triangulation_3/CMakeLists.txt index 68698a162da..46e2f3d2d1e 100644 --- a/Triangulation_3/test/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/test/Triangulation_3/CMakeLists.txt @@ -27,6 +27,8 @@ if ( CGAL_FOUND ) create_single_source_cgal_program( "test_robust_weighted_circumcenter.cpp" ) create_single_source_cgal_program( "test_simplex_3.cpp" ) create_single_source_cgal_program( "test_simplex_iterator_3.cpp" ) + create_single_source_cgal_program( "test_segment_cell_traverser_3.cpp" ) + create_single_source_cgal_program( "test_segment_simplex_traverser_3.cpp" ) create_single_source_cgal_program( "test_static_filters.cpp" ) create_single_source_cgal_program( "test_triangulation_3.cpp" ) @@ -50,8 +52,8 @@ if ( CGAL_FOUND ) endif() else() - + message(STATUS "This program requires the CGAL library, and will not be compiled.") - + endif() diff --git a/Triangulation_3/test/Triangulation_3/test_segment_cell_traverser_3.cpp b/Triangulation_3/test/Triangulation_3/test_segment_cell_traverser_3.cpp new file mode 100644 index 00000000000..bf6ef9afd93 --- /dev/null +++ b/Triangulation_3/test/Triangulation_3/test_segment_cell_traverser_3.cpp @@ -0,0 +1,113 @@ + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +//#define CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE + +// Define the kernel. +typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; +typedef Kernel::Point_3 Point_3; + +// Define the structure. +typedef CGAL::Delaunay_triangulation_3< Kernel > DT; + +typedef DT::Cell_handle Cell_handle; + +typedef CGAL::Triangulation_segment_cell_iterator_3< DT > Cell_traverser; + +int main(int argc, char* argv[]) +{ + const std::vector points = { { -2, 0, 0 }, + { 2, 0, 0 }, + { 0, 1, -1 }, + { 0, -1, -1 }, + { 0, 0, 1 }, + { -10, -10, -10 }, + { -10, 10, -10 }, + { 10, 10, -10 }, + { 10, -10, -10 }, + { -10, -10, 10 }, + { -10, 10, 10 }, + { 10, 10, 10 }, + { 10, -10, 10 }, + }; + std::vector vertices; + vertices.reserve(points.size()); + DT dt; + for(auto p: points) vertices.push_back(dt.insert(p)); + DT::Cell_handle c; + assert( dt.is_valid() ); + assert(dt.is_cell(vertices[0], vertices[2], vertices[3], vertices[4], c)); + assert(dt.is_cell(vertices[1], vertices[2], vertices[3], vertices[4], c)); + + std::cerr << dt.number_of_finite_cells() << '\n'; + Cell_traverser ct(dt, points[0], points[1]); + unsigned int nb_cells = 0, nb_facets = 0, nb_edges = 0, nb_vertex = 0; + +// Count the number of finite cells traversed. + unsigned int inf = 0, fin = 0; + for( ; ct != ct.end(); ++ct ) + { + std::cerr << "Cell ( "; + for(int i = 0; i < 4; ++i) + std::cerr << ct->vertex(i)->point() << " "; + std::cerr << " )\n"; + + + if( dt.is_infinite(ct) ) + ++inf; + else + { + ++fin; + + DT::Locate_type lt; + int li, lj; + ct.entry(lt, li, lj); + + switch (lt) + { + case DT::Locate_type::FACET: + ++nb_facets; + break; + case DT::Locate_type::EDGE: + ++nb_edges; + break; + case DT::Locate_type::VERTEX: + ++nb_vertex; + break; + default: + /*when source is in a cell*/ + ++nb_cells; + CGAL_assertion(lt == DT::Locate_type::CELL); + } + } + } + +#ifdef CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE + std::cout << "While traversing from " << ct.source() + << " to " << ct.target() << std::endl; + std::cout << inf << " infinite and " + << fin << " finite cells were visited." << std::endl; + std::cout << std::endl << std::endl; +#endif + + std::cout << "Triangulation has " << dt.number_of_vertices() << " vertices." + << std::endl; + std::cout << "\tnb cells : " << nb_cells << std::endl; + std::cout << "\tnb facets : " << nb_facets << std::endl; + std::cout << "\tnb edges : " << nb_edges << std::endl; + std::cout << "\tnb vertices : " << nb_vertex << std::endl; + + return 0; +} diff --git a/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp b/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp new file mode 100644 index 00000000000..f40fadadb3a --- /dev/null +++ b/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp @@ -0,0 +1,136 @@ +#include +#include +#include + +#include +#include +#include +#include + +#include + +//#define CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE + +// Define the kernel. +typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; +typedef Kernel::Point_3 Point_3; + +// Define the structure. +typedef CGAL::Delaunay_triangulation_3< Kernel > DT; + +typedef DT::Cell_handle Cell_handle; + +typedef CGAL::Triangulation_segment_simplex_iterator_3
Simplex_traverser; + +int main(int argc, char* argv[]) +{ + const std::vector points = { { -2, 0, 0 }, + { 2, 0, 0 }, + { 0, 1, -1 }, + { 0, -1, -1 }, + { 0, 0, 1 }, + { -10, -10, -10 }, + { -10, 10, -10 }, + { 10, 10, -10 }, + { 10, -10, -10 }, + { -10, -10, 10 }, + { -10, 10, 10 }, + { 10, 10, 10 }, + { 10, -10, 10 }, + }; + std::vector vertices; + vertices.reserve(points.size()); + DT dt; + for(auto p: points) vertices.push_back(dt.insert(p)); + DT::Cell_handle c; + assert( dt.is_valid() ); + assert(dt.is_cell(vertices[0], vertices[2], vertices[3], vertices[4], c)); + assert(dt.is_cell(vertices[1], vertices[2], vertices[3], vertices[4], c)); + + std::cerr << dt.number_of_finite_cells() << '\n'; + Simplex_traverser st(dt, vertices[0]->point(), vertices[1]->point()); + + unsigned int nb_cells = 0, nb_facets = 0, nb_edges = 0, nb_vertex = 0; + unsigned int nb_collinear = 0; + + + // Count the number of finite cells traversed. + unsigned int inf = 0, fin = 0; + for (; st != st.end(); ++st) + { + if(Cell_handle(st) != Cell_handle() && dt.is_infinite(st) ) + ++inf; + else + { + ++fin; + if (st.is_facet()) ++nb_facets; + else if (st.is_edge()) ++nb_edges; + else if (st.is_vertex()) ++nb_vertex; + else if (st.is_cell()) ++nb_cells; + + if (st.is_collinear()) { + ++nb_collinear; + std::cout << "collinear\n"; + } + + if (st.is_facet()) { + std::cout << "facet " << std::endl; + DT::Facet f = *st; + std::cout << " ( " + << f.first->vertex((f.second+1)&3)->point() + << " " + << f.first->vertex((f.second+2)&3)->point() + << " " + << f.first->vertex((f.second+3)&3)->point() + << " )\n"; + } + else if (st.is_edge()) { + std::cout << "edge " << std::endl; + DT::Edge e = *st; + std::cout << " ( " + << e.first->vertex(e.second)->point() + << " " + << e.first->vertex(e.third)->point() + << " )\n"; + } + else if (st.is_vertex()) { + std::cout << "vertex " << std::endl; + DT::Vertex_handle v = *st; + std::cout << " ( " << v->point() << " )\n"; + } + else + { + CGAL_assertion(st.is_cell()); + std::cout << "cell \n ( "; + DT::Cell_handle ch = *st; + for(int i = 0; i < 4; ++i) + std::cout << ch->vertex(i)->point() << " "; + std::cout << " )\n"; + } + } + } + +#ifdef CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE + std::cout << "While traversing from " << st.source() + << " to " << st.target() << std::endl; + std::cout << "\tinfinite cells : " << inf << std::endl; + std::cout << "\tfinite cells : " << fin << std::endl; + std::cout << "\tfacets : " << nb_facets << std::endl; + std::cout << "\tedges : " << nb_edges << std::endl; + std::cout << "\tvertices : " << nb_vertex << std::endl; + std::cout << std::endl << std::endl; +#endif + + std::cout << "\tnb cells : " << nb_cells << std::endl; + std::cout << "\tnb facets : " << nb_facets << std::endl; + std::cout << "\tnb edges : " << nb_edges << std::endl; + std::cout << "\tnb vertices : " << nb_vertex << std::endl; + std::cout << "\tnb collinear : " << nb_collinear << std::endl; + + assert(nb_cells == 2); + assert(nb_facets == 1); + assert(nb_edges == 0); + assert(nb_vertex == 2); + + return 0; +} From d4289524a94b82494d81198724beff16d63708e2 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 24 Sep 2019 16:51:28 +0200 Subject: [PATCH 084/138] fix the constructor of Triangulation_segment_cell_traverser until now, when the query segment started exactly on a vertex/edge/facet, the constructor was setting _cur to one cell incident to this vertex/edge/facet, not necessarily the one that was intersected by the segment query this commit fixes it by introducing the function `jump_to_intersecting_cell()`, that changes _cur to point to the right cell --- .../CGAL/Triangulation_segment_traverser_3.h | 5 ++ .../Triangulation_segment_traverser_3_impl.h | 57 +++++++++++++++++++ 2 files changed, 62 insertions(+) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 49b27ad79a7..c34939e975d 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -483,6 +483,11 @@ protected: // \} private: + // at the end of the constructors, entry() is a vertex, edge or facet, + // we need to circulate/iterate over its incident cells to + // make sure that the current cell intersects the input query + void jump_to_intersecting_cell(); + // walk_to_next(), if the triangulation is 3D. void walk_to_next_3(); void walk_to_next_3_inf( int inf ); diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h index 9648733c18d..5d3917bfc2d 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h @@ -46,6 +46,8 @@ Triangulation_segment_cell_iterator_3( const Tr& tr, Vertex_handle s, Vertex_han c = c->neighbor(inf); _cur = Simplex( c, Tr::VERTEX, c->index(s), -1 ); + + jump_to_intersecting_cell(); } template < class Tr, class Inc > @@ -70,6 +72,8 @@ Triangulation_segment_cell_iterator_3( const Tr& tr, Vertex_handle s, const Poin c = c->neighbor(inf); _cur = Simplex( c, Tr::VERTEX, c->index(s), -1 ); + + jump_to_intersecting_cell(); } template < class Tr, class Inc > @@ -91,6 +95,8 @@ Triangulation_segment_cell_iterator_3( const Tr& tr, const Point& s, Vertex_hand get<0>(_cur) = _tr.locate( s, get<1>(_cur), get<2>(_cur), get<3>(_cur), hint ); CGAL_triangulation_postcondition( get<0>(_cur) != Cell_handle() ); + + jump_to_intersecting_cell(); } template < class Tr, class Inc > @@ -111,6 +117,8 @@ Triangulation_segment_cell_iterator_3( const Tr& tr, const Point& s, const Point get<0>(_cur) = _tr.locate( s, get<1>(_cur), get<2>(_cur), get<3>(_cur), hint ); CGAL_triangulation_postcondition( get<0>(_cur) != Cell_handle() ); + + jump_to_intersecting_cell(); } template < class Tr, class Inc > @@ -195,6 +203,55 @@ operator!=( Nullptr_t n ) const { return !( *this == n ); } +template < class Tr, class Inc > +void Triangulation_segment_cell_iterator_3:: +jump_to_intersecting_cell() +{ + //copy _cur + Cell_handle ch = get<0>(_cur); + Locate_type lt; + int li, lj; + entry(lt, li, lj); + + if (lt == Tr::FACET || lt == Tr::EDGE || lt == Tr::VERTEX) + { + //go forward once in the iterator + Triangulation_segment_cell_iterator_3 cit(*this); + ++cit; + + // collect the properties of "previous" to be in the right cell + Cell_handle new_ch = cit.previous(); + if (new_ch == ch) //initialization already went to the good cell + return; + + if (lt == Tr::VERTEX) + { + get<0>(_cur) = new_ch; + //get<1>(_cur) is Locate_type and unchanged + get<2>(_cur) = new_ch->index(ch->vertex(li)); + //get<3>(_cur) is lj and unchanged + } + else if (lt == Tr::EDGE) + { + get<0>(_cur) = new_ch; + //get<1>(_cur) is Locate_type and unchanged + get<2>(_cur) = new_ch->index(ch->vertex(li)); + get<3>(_cur) = new_ch->index(ch->vertex(lj)); + } + else + { + get<0>(_cur) = new_ch; + //get<1>(_cur) is Locate_type and unchanged + get<2>(_cur) = new_ch->index(ch); + //get<3>(_cur) is lj and unchanged + } + } + + //for other cases (CELL, OUTSIDE_CONVEX_HULL, OUTSIDE_AFFINE_HULL) + //the entry cell is already the good one, given by `locate()` + //in the traverser constructor +} + template < class Tr, class Inc > void Triangulation_segment_cell_iterator_3:: walk_to_next() { From 3c06351ec5da180871ac5277022c231f0b258d78 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 3 Oct 2019 15:02:34 +0200 Subject: [PATCH 085/138] Fix operator-> and add const to the reference and pointer types --- .../include/CGAL/Triangulation_segment_traverser_3.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index c34939e975d..a95f3f2cd1c 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -571,8 +571,8 @@ public: typedef CGAL::Triangulation_simplex_3 Simplex_type; typedef Simplex_type value_type; //< defines the value type the iterator refers to. - typedef Simplex_type& reference; //< defines the reference type of the iterator. - typedef Simplex_type* pointer; //< defines the pointer type of the iterator. + typedef const Simplex_type& reference; //< defines the reference type of the iterator. + typedef const Simplex_type* pointer; //< defines the pointer type of the iterator. typedef std::size_t size_type; //< defines the integral type that can hold the size of a sequence. typedef std::ptrdiff_t difference_type; //< defines the signed integral type that can hold the distance between two iterators. typedef std::forward_iterator_tag iterator_category; //< defines the iterator category. @@ -866,12 +866,12 @@ public: // provides a dereference operator. /* \return a pointer to the current cell. */ - Simplex_type* operator->() { return &*_curr_simplex; } + const Simplex_type* operator->() { return &_curr_simplex; } // provides an indirection operator. /* \return the current cell. */ - Simplex_type& operator*() { return _curr_simplex; } + const Simplex_type& operator*() { return _curr_simplex; } // provides a conversion operator. /* \return a handle to the current cell. From 7f02506b49f974271c07fa186de977b24048513f Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 3 Oct 2019 15:03:46 +0200 Subject: [PATCH 086/138] A more complete test --- .../test_segment_simplex_traverser_3.cpp | 167 +++++++++++------- 1 file changed, 103 insertions(+), 64 deletions(-) diff --git a/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp b/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp index f40fadadb3a..e7df08f97e7 100644 --- a/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp @@ -6,6 +6,8 @@ #include #include #include +#include +#include #include @@ -22,7 +24,10 @@ typedef DT::Cell_handle Cell_handle; typedef CGAL::Triangulation_segment_simplex_iterator_3
Simplex_traverser; -int main(int argc, char* argv[]) +template +bool test(const DT dt, const Big_tuple& tuple); + +int main(int, char* []) { const std::vector points = { { -2, 0, 0 }, { 2, 0, 0 }, @@ -48,66 +53,95 @@ int main(int argc, char* argv[]) assert(dt.is_cell(vertices[1], vertices[2], vertices[3], vertices[4], c)); std::cerr << dt.number_of_finite_cells() << '\n'; - Simplex_traverser st(dt, vertices[0]->point(), vertices[1]->point()); + + const std::vector < std::tuple>> queries = { + {{-1, 0, 0}, { 2, 0, 0}, {1, 0, 1, 2}}, // CFCV + // {{ 2, 0, 0}, {-1, 0, 0}, {1, 0, 1, 2}}, // reverse: assertion + {{-2, 0, 0}, { 2, 0, 0}, {2, 0, 1, 2}}, // VCFCV + {{ 2, 0, 0}, {-2, 0, 0}, {2, 0, 1, 2}}, // reverse case: VCFCV + {{-3, 0, 0}, { 3, 0, 0}, {2, 0, 1, 4}}, // bug + {{-2, 0, 0}, { 2, 2, -2}, {2, 1, 0, 1}}, // bug + {{ 2, 2, -2}, {-2, 0, 0}, {2, 1, 0, 1}}, // bug + }; + bool ok = true; + for(const auto& tuple: queries) { + if(!test(dt, tuple)) ok = false; + } + std::cout << "Done (" << queries.size() << " queries)\n"; + return ok ? EXIT_SUCCESS : EXIT_FAILURE; +} + +template +bool test(const DT dt, const Big_tuple& tuple) { + bool result = true; + using std::get; + const auto& p1 = get<0>(tuple); + const auto& p2 = get<1>(tuple); + const auto& expected_results = get<2>(tuple); + + std::cout << "\n#\n# Query segment: ( " << p1 << " , " + << p2 << " )\n#\n"; + Simplex_traverser st(dt, p1, p2); - unsigned int nb_cells = 0, nb_facets = 0, nb_edges = 0, nb_vertex = 0; - unsigned int nb_collinear = 0; + unsigned int nb_cells = 0, nb_facets = 0, nb_edges = 0, nb_vertex = 0; + unsigned int nb_collinear = 0; + // Count the number of finite cells traversed. + unsigned int inf = 0, fin = 0; + for (; st != st.end(); ++st) { + if (Cell_handle(st) != Cell_handle() && dt.is_infinite(st)) + ++inf; + else { + ++fin; + if (st.is_facet()) + ++nb_facets; + else if (st.is_edge()) + ++nb_edges; + else if (st.is_vertex()) + ++nb_vertex; + else if (st.is_cell()) + ++nb_cells; - // Count the number of finite cells traversed. - unsigned int inf = 0, fin = 0; - for (; st != st.end(); ++st) - { - if(Cell_handle(st) != Cell_handle() && dt.is_infinite(st) ) - ++inf; - else - { - ++fin; - if (st.is_facet()) ++nb_facets; - else if (st.is_edge()) ++nb_edges; - else if (st.is_vertex()) ++nb_vertex; - else if (st.is_cell()) ++nb_cells; + if (st.is_collinear()) { + ++nb_collinear; + std::cout << "collinear\n"; + } - if (st.is_collinear()) { - ++nb_collinear; - std::cout << "collinear\n"; - } - - if (st.is_facet()) { - std::cout << "facet " << std::endl; - DT::Facet f = *st; - std::cout << " ( " - << f.first->vertex((f.second+1)&3)->point() - << " " - << f.first->vertex((f.second+2)&3)->point() - << " " - << f.first->vertex((f.second+3)&3)->point() - << " )\n"; - } - else if (st.is_edge()) { - std::cout << "edge " << std::endl; - DT::Edge e = *st; - std::cout << " ( " - << e.first->vertex(e.second)->point() - << " " - << e.first->vertex(e.third)->point() - << " )\n"; - } - else if (st.is_vertex()) { - std::cout << "vertex " << std::endl; - DT::Vertex_handle v = *st; - std::cout << " ( " << v->point() << " )\n"; - } - else - { - CGAL_assertion(st.is_cell()); - std::cout << "cell \n ( "; - DT::Cell_handle ch = *st; - for(int i = 0; i < 4; ++i) - std::cout << ch->vertex(i)->point() << " "; - std::cout << " )\n"; - } - } + switch (st->dimension()) { + case 2: { + std::cout << "facet " << std::endl; + DT::Facet f = *st; + std::cout << " ( " << f.first->vertex((f.second + 1) & 3)->point() + << " " << f.first->vertex((f.second + 2) & 3)->point() + << " " << f.first->vertex((f.second + 3) & 3)->point() + << " )\n"; + break; + } + case 1: { + std::cout << "edge " << std::endl; + DT::Edge e = *st; + std::cout << " ( " << e.first->vertex(e.second)->point() << " " + << e.first->vertex(e.third)->point() << " )\n"; + break; + } + case 0: { + std::cout << "vertex " << std::endl; + DT::Vertex_handle v = *st; + std::cout << " ( " << v->point() << " )\n"; + break; + } + case 3: { + std::cout << "cell \n ( "; + DT::Cell_handle ch = *st; + for (int i = 0; i < 4; ++i) + std::cout << ch->vertex(i)->point() << " "; + std::cout << " )\n"; + break; + } + default: + CGAL_assume(false); + } // end switch + } } #ifdef CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE @@ -121,16 +155,21 @@ int main(int argc, char* argv[]) std::cout << std::endl << std::endl; #endif + auto check_expected = [](unsigned value, unsigned expected) { + if(value != expected) { + std::cout << "\t ERROR: expected " << expected << '\n'; + return false; + } + return true; + }; std::cout << "\tnb cells : " << nb_cells << std::endl; + result = result && check_expected(nb_cells, expected_results[3]); std::cout << "\tnb facets : " << nb_facets << std::endl; + result = result && check_expected(nb_facets, expected_results[2]); std::cout << "\tnb edges : " << nb_edges << std::endl; + result = result && check_expected(nb_edges, expected_results[1]); std::cout << "\tnb vertices : " << nb_vertex << std::endl; + result = result && check_expected(nb_vertex, expected_results[0]); std::cout << "\tnb collinear : " << nb_collinear << std::endl; - - assert(nb_cells == 2); - assert(nb_facets == 1); - assert(nb_edges == 0); - assert(nb_vertex == 2); - - return 0; + return result; } From 7e0f93f4c9e675723aac26e5a66e0d88419910a8 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 3 Oct 2019 15:26:57 +0200 Subject: [PATCH 087/138] Add a case (assertion) --- .../test/Triangulation_3/test_segment_simplex_traverser_3.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp b/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp index e7df08f97e7..6be034311ad 100644 --- a/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp @@ -55,6 +55,7 @@ int main(int, char* []) std::cerr << dt.number_of_finite_cells() << '\n'; const std::vector < std::tuple>> queries = { + // {{-1, 0, 0}, { 1, 0, 0}, {0, 0, 1, 2}}, // CFC: assertion {{-1, 0, 0}, { 2, 0, 0}, {1, 0, 1, 2}}, // CFCV // {{ 2, 0, 0}, {-1, 0, 0}, {1, 0, 1, 2}}, // reverse: assertion {{-2, 0, 0}, { 2, 0, 0}, {2, 0, 1, 2}}, // VCFCV From f269280dd60b8fa7ad30aa5ea4515a6ba5a6276b Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 4 Oct 2019 14:30:43 +0200 Subject: [PATCH 088/138] deal with another degenerate case when reaching end(), and when source, target, and the vertex vi are aligned, o0 is ZERO and o1 is ZERO too but target target can be `inside` anyhow --- .../CGAL/Triangulation_segment_traverser_3_impl.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h index 5d3917bfc2d..22b9bba628e 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h @@ -398,9 +398,13 @@ walk_to_next_3() else inside=3; }else if (o1==ZERO){ - nnext= get<0>(_cur)->neighbor(j2); //VERTEX i - degenerate =3; - outside=5; + if (_tr.orientation(*vert[i], *vert[j0], *vert[j1], _target) == POSITIVE) { + nnext = get<0>(_cur)->neighbor(j2); //VERTEX i + degenerate = 3; + outside = 5; + } + else + inside = 55; }else { if (_tr.orientation(*vert[i], *vert[j1], *vert[j2], _target)==POSITIVE){ nnext= get<0>(_cur)->neighbor(j0); From aaf8aa404ec1bd5694b4e7771f4c48f46b20cd94 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 4 Oct 2019 16:21:17 +0200 Subject: [PATCH 089/138] fix moving to end() --- .../include/CGAL/Triangulation_segment_traverser_3.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index a95f3f2cd1c..7465ab3dffb 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -663,7 +663,10 @@ private: case Locate_type::CELL: case Locate_type::OUTSIDE_CONVEX_HULL: case Locate_type::OUTSIDE_AFFINE_HULL: - _curr_simplex = cell; + if (Cell_handle(_cell_iterator) == Cell_handle()) + _curr_simplex = Simplex_type(); + else + _curr_simplex = cell; break; default: CGAL_assertion(false); From 27eedb168a79d5eb556727d1495af5bc5c2e2364 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 7 Oct 2019 17:38:27 +0200 Subject: [PATCH 090/138] fix the case where source, target, and vert[i] are aligned Revert "deal with another degenerate case" This reverts commit f269280dd60b8fa7ad30aa5ea4515a6ba5a6276b. --- .../include/CGAL/Triangulation_segment_traverser_3_impl.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h index 22b9bba628e..121906b3226 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h @@ -398,13 +398,14 @@ walk_to_next_3() else inside=3; }else if (o1==ZERO){ - if (_tr.orientation(*vert[i], *vert[j0], *vert[j1], _target) == POSITIVE) { + if (_tr.orientation(*vert[i], *vert[j0], *vert[j2], _target) == POSITIVE) + inside = 55; + else + { nnext = get<0>(_cur)->neighbor(j2); //VERTEX i degenerate = 3; outside = 5; } - else - inside = 55; }else { if (_tr.orientation(*vert[i], *vert[j1], *vert[j2], _target)==POSITIVE){ nnext= get<0>(_cur)->neighbor(j0); From 80553fbfb12a9026fea89bf140641f26e5e9f2ec Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 8 Oct 2019 16:48:41 +0200 Subject: [PATCH 091/138] improve deal of degenerate cases for simplex traverser --- .../CGAL/Triangulation_segment_traverser_3.h | 183 ++++++++++-------- 1 file changed, 107 insertions(+), 76 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 7465ab3dffb..5fbcc86f6a7 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -686,11 +686,6 @@ public: CGAL_assertion(_curr_simplex.incident_cell() != Cell_handle()); Cell_handle ch = Cell_handle(_cell_iterator); - if (ch == Cell_handle()) - { - _curr_simplex = Simplex_type(); - return *this; - } switch(_curr_simplex.dimension()) { @@ -703,47 +698,53 @@ public: } case 2 :/*Facet*/ { + Cell_handle ch = Cell_handle(_cell_iterator); if (!cell_iterator_is_ahead()) { //cell_iterator is not ahead. get_facet() is part of cell_iterator //we cannot be in any of the degenerate cases, only detected by //taking cell_iterator one step forward CGAL_assertion(cell_has_facet(Cell_handle(_cell_iterator), get_facet())); - _curr_simplex = Cell_handle(_cell_iterator); + ++_cell_iterator; } else + ch = _cell_iterator.previous(); + + Cell_handle chnext = Cell_handle(_cell_iterator); + Locate_type ltnext; + int linext, ljnext; + _cell_iterator.entry(ltnext, linext, ljnext); + switch (ltnext)//entry simplex in next cell { - Cell_handle chnext = Cell_handle(_cell_iterator); - Locate_type ltnext; - int linext, ljnext; - _cell_iterator.entry(ltnext, linext, ljnext); - switch (ltnext)//entry simplex in next cell + case Locate_type::VERTEX: + { + if (_cell_iterator == _cell_iterator.end()) { - case Locate_type::VERTEX: - { - //if the entry vertex is a vertex of current facet - int i; - if (triangulation().has_vertex(get_facet(), chnext->vertex(linext), i)) - set_curr_simplex_to_entry(); - else - _curr_simplex = chnext; + _curr_simplex = Simplex_type(); break; } - case Locate_type::EDGE: - if (facet_has_edge(get_facet(), Edge(chnext, linext, ljnext))) - set_curr_simplex_to_entry(); - else - _curr_simplex = chnext; - break; + //if the entry vertex is a vertex of current facet + int i; + if (triangulation().has_vertex(get_facet(), chnext->vertex(linext), i)) + set_curr_simplex_to_entry(); + else + _curr_simplex = ch; + break; + } + case Locate_type::EDGE: + if (facet_has_edge(get_facet(), Edge(chnext, linext, ljnext))) + set_curr_simplex_to_entry(); + else + _curr_simplex = ch; + break; - case Locate_type::FACET: - _curr_simplex = chnext; - break; + case Locate_type::FACET: + _curr_simplex = ch; + break; - default: - CGAL_assertion(false); - }; - }//end else + default: + CGAL_assertion(false); + }; break; } case 1:/*Edge*/ @@ -795,64 +796,81 @@ public: case 0 :/*Vertex_handle*/ { Cell_handle ch = Cell_handle(_cell_iterator); - if (cell_iterator_is_ahead()) - { - _curr_simplex = ch; - std::cerr << "cell_iterator is ahead in vertex case (check to be done)" - << std::endl; - } + + if (!cell_iterator_is_ahead()) //_curr_simplex does contain v + ++_cell_iterator;//cell_iterator needs to be ahead to detect degeneracies else + ch = _cell_iterator.previous(); + + Cell_handle chnext = Cell_handle(_cell_iterator); + //_cell_iterator is one step forward _curr_simplex + CGAL_assertion(ch != chnext); + + Locate_type ltnext; + int linext, ljnext; + _cell_iterator.entry(ltnext, linext, ljnext); + + switch (ltnext) { - ++_cell_iterator; - Cell_handle chnext = Cell_handle(_cell_iterator); - //_cell_iterator is one step forward _curr_simplex - CGAL_assertion(ch != chnext); - - Locate_type ltnext; - int linext, ljnext; - _cell_iterator.entry(ltnext, linext, ljnext); - - switch (ltnext) + case Locate_type::VERTEX: + { + CGAL_assertion(_cell_iterator == _cell_iterator.end() + || get_vertex() != chnext->vertex(linext) + || triangulation().is_infinite(chnext)); + if (_cell_iterator == _cell_iterator.end()) { - case Locate_type::VERTEX: - { - CGAL_assertion(_cell_iterator == _cell_iterator.end() - || get_vertex() != chnext->vertex(linext) - || triangulation().is_infinite(chnext)); - - if (_cell_iterator == _cell_iterator.end()) + Cell_handle prev; + Locate_type ltprev; + int liprev, ljprev; + prev = _cell_iterator.previous(); + _cell_iterator.exit(ltprev, liprev, ljprev); + if (prev == ch && ltprev == Locate_type::VERTEX) { - _curr_simplex = Simplex_type(); + CGAL_assertion(prev->vertex(liprev) == get_vertex()); + _curr_simplex = ch; } else { - if (triangulation().is_infinite(chnext) && get_vertex() == chnext->vertex(linext)) - _curr_simplex = chnext; + if(ltprev == Locate_type::FACET) + _curr_simplex = Facet(prev, liprev); + else if(ltprev == Locate_type::EDGE) + _curr_simplex = Edge(prev, liprev, ljprev); else - { - Cell_handle ec; - int ei, ej; - if (!triangulation().is_edge(get_vertex(), chnext->vertex(linext), ec, ei, ej)) - CGAL_assertion(false); - _curr_simplex = Edge(ec, ei, ej); - } + CGAL_assertion(false); } - break; } - case Locate_type::EDGE: + else { - //facet shared by get_vertex() and the edge - //none of ch and chnext is certainly shared by both endpoints - _curr_simplex = shared_facet(Edge(chnext, linext, ljnext), get_vertex()); - break; + if (triangulation().is_infinite(chnext) && get_vertex() == chnext->vertex(linext)) + _curr_simplex = chnext; + else + { + Cell_handle ec; + int ei, ej; + if (!triangulation().is_edge(get_vertex(), chnext->vertex(linext), ec, ei, ej)) + CGAL_assertion(false); + _curr_simplex = Edge(ec, ei, ej); + } } - default ://FACET - CGAL_assertion(ltnext == Locate_type::FACET); - _curr_simplex = ch; - }; + break; } - break; + case Locate_type::EDGE: + { + //facet shared by get_vertex() and the edge + //none of ch and chnext is certainly shared by both endpoints + _curr_simplex = shared_facet(Edge(chnext, linext, ljnext), get_vertex()); + break; + } + default ://FACET + CGAL_assertion(ltnext == Locate_type::FACET); + if(chnext == Cell_handle()) + _curr_simplex = Simplex_type(); + else + _curr_simplex = shared_cell(Facet(chnext, linext), get_vertex()); + }; } + break; + default: CGAL_assertion(false); }; @@ -1077,6 +1095,19 @@ private: return Cell_handle(); } + Cell_handle shared_cell(const Facet& f, const Vertex_handle v) const + { + Cell_handle c = f.first; + if (c->has_vertex(v)) + return c; + else + { + c = f.first->neighbor(f.second); + CGAL_assertion(c->has_vertex(v)); + return c; + } + } + };//class Triangulation_segment_simplex_iterator_3 } // namespace CGAL From d145abaf9a49bf5c5546b26a3d34be402a061552 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 8 Oct 2019 17:39:35 +0200 Subject: [PATCH 092/138] temporarily change the example for debugging : the commented queries do pass --- .../Triangulation_segment_traverser_3_impl.h | 1 + .../test_segment_simplex_traverser_3.cpp | 48 +++++++++---------- 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h index 121906b3226..b2eaffe7e50 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h @@ -230,6 +230,7 @@ jump_to_intersecting_cell() //get<1>(_cur) is Locate_type and unchanged get<2>(_cur) = new_ch->index(ch->vertex(li)); //get<3>(_cur) is lj and unchanged + CGAL_assertion(get<0>(_cur)->vertex(get<2>(_cur)) == ch->vertex(li)); } else if (lt == Tr::EDGE) { diff --git a/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp b/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp index 6be034311ad..8f4673359eb 100644 --- a/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp @@ -11,7 +11,8 @@ #include -//#define CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE +#define CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE +#define CGAL_T3_TEST_SIMPLEX_TRAVERSER // Define the kernel. typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; @@ -22,7 +23,11 @@ typedef CGAL::Delaunay_triangulation_3< Kernel > DT; typedef DT::Cell_handle Cell_handle; -typedef CGAL::Triangulation_segment_simplex_iterator_3
Simplex_traverser; +#ifdef CGAL_T3_TEST_SIMPLEX_TRAVERSER +typedef CGAL::Triangulation_segment_simplex_iterator_3
Traverser; +#else +typedef CGAL::Triangulation_segment_cell_iterator_3
Traverser; +#endif template bool test(const DT dt, const Big_tuple& tuple); @@ -55,12 +60,12 @@ int main(int, char* []) std::cerr << dt.number_of_finite_cells() << '\n'; const std::vector < std::tuple>> queries = { - // {{-1, 0, 0}, { 1, 0, 0}, {0, 0, 1, 2}}, // CFC: assertion - {{-1, 0, 0}, { 2, 0, 0}, {1, 0, 1, 2}}, // CFCV - // {{ 2, 0, 0}, {-1, 0, 0}, {1, 0, 1, 2}}, // reverse: assertion - {{-2, 0, 0}, { 2, 0, 0}, {2, 0, 1, 2}}, // VCFCV - {{ 2, 0, 0}, {-2, 0, 0}, {2, 0, 1, 2}}, // reverse case: VCFCV - {{-3, 0, 0}, { 3, 0, 0}, {2, 0, 1, 4}}, // bug + // {{-1, 0, 0}, { 1, 0, 0}, {0, 0, 1, 2}}, // CFC + // {{-1, 0, 0}, { 2, 0, 0}, {1, 0, 1, 2}}, // CFCV + // {{ 2, 0, 0}, {-1, 0, 0}, {1, 0, 1, 2}}, // reverse + // {{-2, 0, 0}, { 2, 0, 0}, {2, 0, 1, 2}}, // VCFCV + // {{ 2, 0, 0}, {-2, 0, 0}, {2, 0, 1, 2}}, // reverse case: VCFCV + // {{-3, 0, 0}, { 3, 0, 0}, {2, 0, 3, 2}}, // FVCFCVF {{-2, 0, 0}, { 2, 2, -2}, {2, 1, 0, 1}}, // bug {{ 2, 2, -2}, {-2, 0, 0}, {2, 1, 0, 1}}, // bug }; @@ -82,7 +87,7 @@ bool test(const DT dt, const Big_tuple& tuple) { std::cout << "\n#\n# Query segment: ( " << p1 << " , " << p2 << " )\n#\n"; - Simplex_traverser st(dt, p1, p2); + Traverser st(dt, p1, p2); unsigned int nb_cells = 0, nb_facets = 0, nb_edges = 0, nb_vertex = 0; unsigned int nb_collinear = 0; @@ -94,22 +99,11 @@ bool test(const DT dt, const Big_tuple& tuple) { ++inf; else { ++fin; - if (st.is_facet()) - ++nb_facets; - else if (st.is_edge()) - ++nb_edges; - else if (st.is_vertex()) - ++nb_vertex; - else if (st.is_cell()) - ++nb_cells; - - if (st.is_collinear()) { - ++nb_collinear; - std::cout << "collinear\n"; - } +#ifdef CGAL_T3_TEST_SIMPLEX_TRAVERSER switch (st->dimension()) { case 2: { + ++nb_facets; std::cout << "facet " << std::endl; DT::Facet f = *st; std::cout << " ( " << f.first->vertex((f.second + 1) & 3)->point() @@ -119,6 +113,7 @@ bool test(const DT dt, const Big_tuple& tuple) { break; } case 1: { + ++nb_edges; std::cout << "edge " << std::endl; DT::Edge e = *st; std::cout << " ( " << e.first->vertex(e.second)->point() << " " @@ -126,12 +121,14 @@ bool test(const DT dt, const Big_tuple& tuple) { break; } case 0: { + ++nb_vertex; std::cout << "vertex " << std::endl; DT::Vertex_handle v = *st; std::cout << " ( " << v->point() << " )\n"; break; } case 3: { + ++nb_cells; std::cout << "cell \n ( "; DT::Cell_handle ch = *st; for (int i = 0; i < 4; ++i) @@ -142,8 +139,9 @@ bool test(const DT dt, const Big_tuple& tuple) { default: CGAL_assume(false); } // end switch - } - } +#endif + } +} #ifdef CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE std::cout << "While traversing from " << st.source() @@ -156,6 +154,7 @@ bool test(const DT dt, const Big_tuple& tuple) { std::cout << std::endl << std::endl; #endif +#ifdef CGAL_T3_TEST_SIMPLEX_TRAVERSER auto check_expected = [](unsigned value, unsigned expected) { if(value != expected) { std::cout << "\t ERROR: expected " << expected << '\n'; @@ -172,5 +171,6 @@ bool test(const DT dt, const Big_tuple& tuple) { std::cout << "\tnb vertices : " << nb_vertex << std::endl; result = result && check_expected(nb_vertex, expected_results[0]); std::cout << "\tnb collinear : " << nb_collinear << std::endl; +#endif return result; } From a5bf1e166228b4c3b71447e43a7013a04cfb4829 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 14 Oct 2019 16:04:56 +0200 Subject: [PATCH 093/138] make walk_to_next_3() const and declare variables later when possible --- .../CGAL/Triangulation_segment_traverser_3.h | 8 +- .../Triangulation_segment_traverser_3_impl.h | 313 ++++++++++-------- 2 files changed, 172 insertions(+), 149 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 5fbcc86f6a7..7e0d0b81694 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -489,7 +489,8 @@ private: void jump_to_intersecting_cell(); // walk_to_next(), if the triangulation is 3D. - void walk_to_next_3(); + std::pair walk_to_next_3(const Simplex& prev, + const Simplex& cur) const; void walk_to_next_3_inf( int inf ); // walk_to_next(), if the triangulation is 2D. @@ -685,8 +686,6 @@ public: { CGAL_assertion(_curr_simplex.incident_cell() != Cell_handle()); - Cell_handle ch = Cell_handle(_cell_iterator); - switch(_curr_simplex.dimension()) { case 3 :/*Cell_handle*/ @@ -749,6 +748,8 @@ public: } case 1:/*Edge*/ { + Cell_handle ch = Cell_handle(_cell_iterator); + Locate_type lt; int li, lj; _cell_iterator.entry(lt, li, lj); @@ -824,6 +825,7 @@ public: int liprev, ljprev; prev = _cell_iterator.previous(); _cell_iterator.exit(ltprev, liprev, ljprev); + if (prev == ch && ltprev == Locate_type::VERTEX) { CGAL_assertion(prev->vertex(liprev) == get_vertex()); diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h index b2eaffe7e50..d1410483443 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h @@ -207,7 +207,7 @@ template < class Tr, class Inc > void Triangulation_segment_cell_iterator_3:: jump_to_intersecting_cell() { - //copy _cur + //copy current simplex Cell_handle ch = get<0>(_cur); Locate_type lt; int li, lj; @@ -280,7 +280,10 @@ walk_to_next() { { const Simplex backup = _cur; do { - walk_to_next_3(); + std::pair p = walk_to_next_3(_prev, _cur); + _prev = p.first; + _cur = p.second; + } while (get<0>(_cur) != Cell_handle()//end && !get<0>(_cur)->has_vertex(_tr.infinite_vertex(), inf) && have_same_entry(backup, _cur)); @@ -349,111 +352,115 @@ have_same_entry(const Simplex& s1, const Simplex& s2) const } template < class Tr, class Inc > -void Triangulation_segment_cell_iterator_3:: -walk_to_next_3() +std::pair::Simplex, + typename Triangulation_segment_cell_iterator_3::Simplex > +Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& prev, + const Simplex& cur) const { using CGAL::cpp11::get; - boost::array vert - = {&(get<0>(_cur)->vertex(0)->point()), - &(get<0>(_cur)->vertex(1)->point()), - &(get<0>(_cur)->vertex(2)->point()), - &(get<0>(_cur)->vertex(3)->point()) }; + boost::array vert + = {&(get<0>(cur)->vertex(0)->point()), + &(get<0>(cur)->vertex(1)->point()), + &(get<0>(cur)->vertex(2)->point()), + &(get<0>(cur)->vertex(3)->point()) }; - Orientation o0, o1, o2; int inside=0,outside=0,regular_case=0,degenerate=0; Cell_handle nnext; - if( get<1>(_cur) == Tr::FACET ) { - regular_case=1; - int i = get<2>(_cur); - int j0 = Tr::vertex_triple_index(i,0); - int j1 = Tr::vertex_triple_index(i,1); - int j2 = Tr::vertex_triple_index(i,2); - o0 = _tr.orientation(_source, *vert[i], *vert[j0], _target); - if (o0==POSITIVE){ - o1 = _tr.orientation(_source, *vert[i], *vert[j1], _target); - if(o1!=POSITIVE){ - if (_tr.orientation(*vert[i], *vert[j0], *vert[j1], _target)==POSITIVE){ - nnext= get<0>(_cur)->neighbor(j2); - outside=j2; - if(o1==ZERO) degenerate=1; //EDGE i j1 - } - else - inside=1; - }else{ - if (_tr.orientation(*vert[i], *vert[j1], *vert[j2], _target)==POSITIVE){ - nnext= get<0>(_cur)->neighbor(j0); - outside=j0; - } - else - inside=2; + if (get<1>(cur) == Tr::FACET) { + regular_case = 1; + int i = get<2>(cur); + int j0 = Tr::vertex_triple_index(i, 0); + int j1 = Tr::vertex_triple_index(i, 1); + int j2 = Tr::vertex_triple_index(i, 2); + Orientation o0 = _tr.orientation(_source, *vert[i], *vert[j0], _target); + if (o0 == POSITIVE) { + Orientation o1 = _tr.orientation(_source, *vert[i], *vert[j1], _target); + if (o1 != POSITIVE) { + if (_tr.orientation(*vert[i], *vert[j0], *vert[j1], _target) == POSITIVE) { + nnext = get<0>(cur)->neighbor(j2); + outside = j2; + if (o1 == ZERO) degenerate = 1; //EDGE i j1 } - }else if (o0==ZERO){ - o1 = _tr.orientation(_source, *vert[i], *vert[j1], _target); - if(o1==NEGATIVE){ - if (_tr.orientation(*vert[i], *vert[j0], *vert[j1], _target)==POSITIVE){ - nnext= get<0>(_cur)->neighbor(j2); //EDGE i j0 - degenerate=2; - outside=44; - } - else - inside=3; - }else if (o1==ZERO){ - if (_tr.orientation(*vert[i], *vert[j0], *vert[j2], _target) == POSITIVE) - inside = 55; - else - { - nnext = get<0>(_cur)->neighbor(j2); //VERTEX i - degenerate = 3; - outside = 5; - } - }else { - if (_tr.orientation(*vert[i], *vert[j1], *vert[j2], _target)==POSITIVE){ - nnext= get<0>(_cur)->neighbor(j0); - outside=j0; - } - else - inside=4; + else + inside = 1; + } + else { + if (_tr.orientation(*vert[i], *vert[j1], *vert[j2], _target) == POSITIVE) { + nnext = get<0>(cur)->neighbor(j0); + outside = j0; } - }else{ - o2 = _tr.orientation(_source, *vert[i], *vert[j2], _target); - if(o2!=NEGATIVE){ - if (_tr.orientation(*vert[i], *vert[j2], *vert[j0], _target)==POSITIVE){ - nnext= get<0>(_cur)->neighbor(j1); - outside=j1; - if(o2==ZERO) degenerate =4; // EDGE i j2 - } - else - inside=5; - }else{ - if (_tr.orientation(*vert[i], *vert[j1], *vert[j2], _target)==POSITIVE){ - nnext= get<0>(_cur)->neighbor(j0); - outside=j0; - } - else - inside=6; + else + inside = 2; + } + } + else if (o0 == ZERO) { + Orientation o1 = _tr.orientation(_source, *vert[i], *vert[j1], _target); + if (o1 == NEGATIVE) { + if (_tr.orientation(*vert[i], *vert[j0], *vert[j1], _target) == POSITIVE) { + nnext = get<0>(cur)->neighbor(j2); //EDGE i j0 + degenerate = 2; + outside = 44; + } + else + inside = 3; + } + else if (o1 == ZERO) { + if (_tr.orientation(*vert[i], *vert[j0], *vert[j2], _target) == POSITIVE) + inside = 55; + else + { + nnext = get<0>(cur)->neighbor(j2); //VERTEX i + degenerate = 3; + outside = 5; } } - - - if( (! degenerate) && (! inside) ){ - get<0>(_prev) = get<0>(_cur); - get<0>(_cur) = nnext; - get<1>(_prev) = Tr::FACET; - get<2>(_prev) = outside; - get<1>(_cur) = Tr::FACET; - get<2>(_cur) = nnext->index(get<0>(_prev)); - return; + else { + if (_tr.orientation(*vert[i], *vert[j1], *vert[j2], _target) == POSITIVE) { + nnext = get<0>(cur)->neighbor(j0); + outside = j0; + } + else + inside = 4; } - - if((! degenerate) && inside){ - _prev = Simplex( get<0>(_cur), Tr::CELL, -1, -1 ); - get<0>(_cur) = Cell_handle(); - return; + } + else { + Orientation o2 = _tr.orientation(_source, *vert[i], *vert[j2], _target); + if (o2 != NEGATIVE) { + if (_tr.orientation(*vert[i], *vert[j2], *vert[j0], _target) == POSITIVE) { + nnext = get<0>(cur)->neighbor(j1); + outside = j1; + if (o2 == ZERO) degenerate = 4; // EDGE i j2 + } + else + inside = 5; + } + else { + if (_tr.orientation(*vert[i], *vert[j1], *vert[j2], _target) == POSITIVE) { + nnext = get<0>(cur)->neighbor(j0); + outside = j0; + } + else + inside = 6; } } - + if ((!degenerate) && (!inside)) + { + Simplex prev_after_walk(get<0>(cur), Tr::FACET, outside, -1); + Simplex cur_after_walk( nnext, Tr::FACET, nnext->index(get<0>(cur)), -1); + return std::make_pair(prev_after_walk, cur_after_walk); + } + + if ((!degenerate) && inside) + { + Simplex prev_after_walk(get<0>(cur), Tr::CELL, -1, -1); + Simplex cur_after_walk(Cell_handle(), Tr::OUTSIDE_AFFINE_HULL, -1, -1); + return std::make_pair(prev_after_walk, cur_after_walk); + } + } + + // We check in which direction the target lies // by comparing its position relative to the planes through the // source and the edges of the cell. @@ -463,19 +470,19 @@ walk_to_next_3() // We keep track of which orientations are calculated. bool calc[6] = { false, false, false, false, false, false }; - if( get<1>(_cur) == Tr::VERTEX ) { + if( get<1>(cur) == Tr::VERTEX ) { // The three planes through the vertex are set to coplanar. for( int j = 0; j < 4; ++j ) { - if( get<2>(_cur) != j ) { - int ij = edgeIndex( get<2>(_cur), j ); + if( get<2>(cur) != j ) { + int ij = edgeIndex( get<2>(cur), j ); o[ij] = COPLANAR; calc[ij] = true; } } } - else if( get<1>(_cur) == Tr::EDGE ) { + else if( get<1>(cur) == Tr::EDGE ) { // The plane through the edge is set to coplanar. - int ij = edgeIndex( get<2>(_cur), get<3>(_cur) ); + int ij = edgeIndex( get<2>(cur), get<3>(cur) ); o[ij] = COPLANAR; calc[ij] = true; } @@ -486,14 +493,14 @@ walk_to_next_3() for( int k = 0; k < 4; ++k, ++li ) { // Skip the previous cell. - Cell_handle next = get<0>(_cur)->neighbor(li); - if( next == get<0>(_prev) ) + Cell_handle next = get<0>(cur)->neighbor(li); + if( next == get<0>(prev) ) { op[li] = POSITIVE; pos += li; continue; } - Point* backup = vert[li]; + const Point* backup = vert[li]; vert[li] = &_target; // Check if the target is on the opposite side of the supporting plane. @@ -518,7 +525,7 @@ walk_to_next_3() // Through the source and the edge opposite of ij. int oij = 5 - edgeIndex( li, lj ); if( !calc[oij] ) { - Point* backup2 = vert[lj]; + const Point* backup2 = vert[lj]; vert[lj] = &_source; o[oij] = _tr.orientation( *vert[0], *vert[1], *vert[2], *vert[3] ); vert[lj] = backup2; @@ -551,91 +558,105 @@ walk_to_next_3() } // The target is inside the pyramid. - get<0>(_prev) = get<0>(_cur); - get<0>(_cur) = next; + + Simplex prev_after_walk; + Simplex cur_after_walk; + + get<0>(prev_after_walk) = get<0>(cur); + get<0>(cur_after_walk) = next; switch( Or ) { case 3: - get<1>(_prev) = Tr::FACET; - get<2>(_prev) = li; - get<1>(_cur) = Tr::FACET; - get<2>(_cur) = get<0>(_cur)->index(get<0>(_prev)); + get<1>(prev_after_walk) = Tr::FACET; + get<2>(prev_after_walk) = li; + get<1>(cur_after_walk) = Tr::FACET; + get<2>(cur_after_walk) = get<0>(cur_after_walk)->index(get<0>(prev_after_walk)); if(regular_case) { - CGAL_triangulation_assertion( get<0>(_cur)==nnext ); + CGAL_triangulation_assertion( get<0>(cur_after_walk)==nnext ); CGAL_triangulation_assertion( li==outside ); CGAL_triangulation_assertion( ! inside ); } - return; + return std::make_pair(prev_after_walk, cur_after_walk); case 2: if(regular_case) CGAL_triangulation_assertion(degenerate ); - get<1>(_prev) = Tr::EDGE; - get<1>(_cur) = Tr::EDGE; + get<1>(prev_after_walk) = Tr::EDGE; + get<1>(cur_after_walk) = Tr::EDGE; for( int j = 0; j < 4; ++j ) { if( li != j && o[ 5 - edgeIndex(li, j) ] == COPLANAR) { - Edge opp = opposite_edge( get<0>(_prev), li, j ); - get<2>(_prev) = opp.second; - get<3>(_prev) = opp.third; - get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); - get<3>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<3>(_prev) ) ); - return; + Edge opp = opposite_edge( get<0>(prev), li, j ); + get<2>(prev_after_walk) = opp.second; + get<3>(prev_after_walk) = opp.third; + get<2>(cur_after_walk) + = get<0>(cur_after_walk)->index( + get<0>(prev_after_walk)->vertex( get<2>(prev_after_walk) ) ); + get<3>(cur_after_walk) + = get<0>(cur_after_walk)->index( + get<0>(prev_after_walk)->vertex( get<3>(prev_after_walk) ) ); + + return std::make_pair(prev_after_walk, cur_after_walk); } } CGAL_triangulation_assertion( false ); - return; + return std::make_pair(prev, cur); case 1: if(regular_case) CGAL_triangulation_assertion(degenerate ); - get<1>(_prev) = Tr::VERTEX; - get<1>(_cur) = Tr::VERTEX; + get<1>(prev_after_walk) = Tr::VERTEX; + get<1>(cur_after_walk) = Tr::VERTEX; for( int j = 0; j < 4; ++j ) { if( li != j && o[ 5 - edgeIndex(li, j) ] == NEGATIVE ) { - get<2>(_prev) = j; - get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex(j) ); - return; + get<2>(prev_after_walk) = j; + get<2>(cur_after_walk) + = get<0>(cur_after_walk)->index( + get<0>(prev_after_walk)->vertex(j) ); + + return std::make_pair(prev_after_walk, cur_after_walk); } } CGAL_triangulation_assertion( false ); - return; + return std::make_pair(prev, cur); default: CGAL_triangulation_assertion( false ); - return; + return std::make_pair(prev, cur); } } - + // The target lies inside this cell. + Simplex prev_after_walk; CGAL_triangulation_assertion( incell ); switch( op[0] + op[1] + op[2] + op[3] ) { case 4: - CGAL_triangulation_assertion( pos == 6 ); - _prev = Simplex( get<0>(_cur), Tr::CELL, -1, -1 ); - CGAL_triangulation_assertion( (! regular_case) || inside ); - break; + CGAL_triangulation_assertion( pos == 6 ); + prev_after_walk = Simplex( get<0>(cur), Tr::CELL, -1, -1 ); + CGAL_triangulation_assertion( (! regular_case) || inside ); + break; case 3: - _prev = Simplex( get<0>(_cur), Tr::FACET, 6-pos, -1 ); - break; + prev_after_walk = Simplex( get<0>(cur), Tr::FACET, 6-pos, -1 ); + break; case 2: - if( pos < 3 ) - _prev = Simplex( get<0>(_cur), Tr::EDGE, 0, pos+1 ); - else if( pos < 5 ) - _prev = Simplex( get<0>(_cur), Tr::EDGE, 1, pos-1 ); - else - _prev = Simplex( get<0>(_cur), Tr::EDGE, 2, 3 ); - break; + if( pos < 3 ) + prev_after_walk = Simplex( get<0>(cur), Tr::EDGE, 0, pos+1 ); + else if( pos < 5 ) + prev_after_walk = Simplex( get<0>(cur), Tr::EDGE, 1, pos-1 ); + else + prev_after_walk = Simplex( get<0>(cur), Tr::EDGE, 2, 3 ); + break; case 1: - _prev = Simplex( get<0>(_cur), Tr::VERTEX, pos, -1 ); - break; + prev_after_walk = Simplex( get<0>(cur), Tr::VERTEX, pos, -1 ); + break; default: - _prev = Simplex( get<0>(_cur), Tr::OUTSIDE_AFFINE_HULL, -1, -1 ); - CGAL_triangulation_assertion( false ); + prev_after_walk = Simplex( get<0>(cur), Tr::OUTSIDE_AFFINE_HULL, -1, -1 ); + CGAL_triangulation_assertion( false ); } - get<0>(_cur) = Cell_handle(); - return; + + Simplex cur_after_walk(Cell_handle(), Tr::OUTSIDE_AFFINE_HULL, -1, -1); + return std::make_pair(prev_after_walk, cur_after_walk); } template < class Tr, class Inc > From 9897f07508b2dda86394caa91000f0ff40d60b31 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 17 Oct 2019 10:35:47 +0200 Subject: [PATCH 094/138] fix test case --- .../test/Triangulation_3/test_segment_simplex_traverser_3.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp b/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp index 8f4673359eb..15635868dbf 100644 --- a/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp @@ -66,8 +66,8 @@ int main(int, char* []) // {{-2, 0, 0}, { 2, 0, 0}, {2, 0, 1, 2}}, // VCFCV // {{ 2, 0, 0}, {-2, 0, 0}, {2, 0, 1, 2}}, // reverse case: VCFCV // {{-3, 0, 0}, { 3, 0, 0}, {2, 0, 3, 2}}, // FVCFCVF - {{-2, 0, 0}, { 2, 2, -2}, {2, 1, 0, 1}}, // bug - {{ 2, 2, -2}, {-2, 0, 0}, {2, 1, 0, 1}}, // bug + {{-2, 0, 0}, { 2, 2, -2}, {2, 1, 1, 0}}, // VEVF + {{ 2, 2, -2}, {-2, 0, 0}, {2, 1, 1, 0}}, // reverse case: FVEV }; bool ok = true; for(const auto& tuple: queries) { From bb1f5254084ef5e3acb59b480e3afead0eb58853 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 17 Oct 2019 15:43:24 +0200 Subject: [PATCH 095/138] update doc of the cell traverser --- .../Triangulation_3/CGAL/Triangulation_3.h | 66 +++++++++++++------ 1 file changed, 47 insertions(+), 19 deletions(-) diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h index 3f5c92dd72c..07b6ad197a9 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h @@ -220,6 +220,13 @@ circulator over all facets incident to a given edge */ typedef Triangulation_data_structure::Facet_circulator Facet_circulator; +/*! +\cgalModifBegin +iterator over cells intersected by a line segment +\cgalModifEnd +*/ +typedef unspecified_type Segment_cell_iterator; + /// @} /*! \name @@ -275,11 +282,6 @@ that has as value type `Vertex_handle`. */ typedef Iterator_range Finite_vertex_handles; -/*! -iterator over the cells intersected by a line segment. -*/ -typedef unspecified_type Segment_cell_iterator; - /*! range type for iterating over the points of the finite vertices. */ @@ -1286,30 +1288,48 @@ Points points() const; /// @} -/*!\name Walk Iterator + +/*!\name Segment Cell Iterator \cgalModifBegin +The triangulation defines an iterator that visits the cells intersected by a line segment. -The triangulation defines an iterator that visits the cells intersected by a line segment. It is a non-mutable and forward iterator. It is invalidated by any modification of one of the cells traversed. - -The cells visited comprise a connected region containing both source and target points of the line segment `s`. Each cell falls within one or more of the following categories: -1. a finite cell whose interior intersects `s`. -2. a finite cell with a facet `f` whose interior intersects `s` in a line segment. If such a cell is visited, its neighbor incident to `f` is not visited. -3. a finite cell with an edge `e` whose interior intersects `s` in a line segment. If such a cell is visited, none of the other cells incident to `e` are visited. -4. a finite cell with an edge `e` whose interior intersects `s` in a point. This cell must form a connected component together with the other cells incident to `e` that are visited. Exactly two of these visited cells must also fall in category 1 or 2. -5. a finite cell with a vertex `v` that is an endpoint of `s`. This cell must also fit in either category 1 or 2. -6. a finite cell with a vertex `v` that lies on the interior of `s`. This cell must form a connected component together with the other cells incident to `v` that are visited. Exactly two of these cells must also fall in category 1 or 2. +The cells visited form a connected region containing both source and target points of the line segment `s`. +Each cell falls within one or more of the following categories: +1. a finite cell whose interior intersects `s` +2. a finite cell with a facet `f` whose interior intersects `s` in a line segment. +If such a cell is visited, its neighbor incident to `f` is not visited. +3. a finite cell with an edge `e` whose interior intersects `s` in a line segment. +If such a cell is visited, none of the other cells incident to `e` are visited. +4. a finite cell with an edge `e` whose interior intersects `s` in a point. +This cell must form a connected component together with the other cells incident to `e` that are visited. +Exactly two of these visited cells must also fall in category 1 or 2. +5. a finite cell with a vertex `v` that is an endpoint of `s`. +This cell must also fit in either category 1 or 2. +6. a finite cell with a vertex `v` that lies on the interior of `s`. +This cell must form a connected component together with the other cells incident to `v` that are visited. +Exactly two of these cells must also fall in category 1 or 2. 7. an infinite cell with a finite facet whose interior intersects the interior of `s`. -8. an infinite cell with a finite edge `e` whose interior intersects the interior of `s`. If such a cell is visited, its infinite neighbor incident to `e` is not visited. -9. an infinite cell with a finite vertex `v` that lies on the interior of `s`. If such a cell is visited, none of the other infinite cells incident to `v` are visited. +8. an infinite cell with a finite edge `e` whose interior intersects the interior of `s`. +If such a cell is visited, its infinite neighbor incident to `e` is not visited. +9. an infinite cell with a finite vertex `v` that lies on the interior of `s`. +If such a cell is visited, none of the other infinite cells incident to `v` are visited. -In the special case the segment does not intersect any finite facets, exactly one infinite cell is visited. This cell shares a facet `f` with a finite cell `c` such that `f` is intersected by the line through the source of `s` and the vertex of `c` opposite of `f`. +In the special case where the segment does not intersect any finite facets, exactly one infinite cell is visited. +This cell shares a facet `f` with a finite cell `c` such that `f` is intersected by the line through +the source of `s` and the vertex of `c` opposite of `f`. -Note that for categories 4 and 6, it is not predetermined which incident cells are visited. However, exactly two of the incident cells `c0,c1` visited also fall in category 1 or 2. The remaining incident cells visited make a facet-connected sequence connecting `c0` to `c1`. +Note that for categories 4 and 6, it is not predetermined which incident cells are visited. +However, exactly two of the incident cells `c0,c1` visited also fall in category 1 or 2. +The remaining incident cells visited make a facet-connected sequence connecting `c0` to `c1`. +`Segment_cell_iterator` implements the concept `ForwardIterator` and is non-mutable. +It is invalidated by any modification of one of the cells traversed. Its `value_type` +is `Cell_handle`. \cgalModifEnd */ /// @{ /*! +\cgalModifBegin returns the iterator that allows to visit the cells intersected by the line segment `st`. The starting point of the iterator is an arbitrary cell incident to `s`. @@ -1318,10 +1338,12 @@ The iterator remains valid until the first cell incident to `t` is passed. \pre `s` and `t` must be different vertices and neither can be the infinite vertex. \pre `t.dimension() >= 2` +\cgalModifEnd */ Segment_cell_iterator segment_walk_begin(Vertex_handle s, Vertex_handle t) const; /*! +\cgalModifBegin returns the past-the-end iterator over the cells intersected by the line segment `st`. This iterator cannot be dereferenced. It indicates when the `Segment_cell_iterator` has @@ -1329,10 +1351,12 @@ passed the target. \pre `s` and `t` must be different vertices and neither can be the infinite vertex. \pre `t.dimension() >= 2` +\cgalModifEnd */ Segment_cell_iterator segment_walk_end(Vertex_handle s, Vertex_handle t) const; /*! +\cgalModifBegin returns the iterator that allows to visit the cells intersected by the line segment `st`. If there is no such cell, the iterator visits exactly one infinite cell. @@ -1345,10 +1369,12 @@ The optional argument `hint` can reduce the time to construct the iterator if it \pre `s` and `t` must be different points. \pre `t.dimension() >= 2`. If the dimension is 2, both `s` and `t` must lie in the affine hull. +\cgalModifEnd */ Segment_cell_iterator segment_walk_begin(const Point& s, const Point& t, Cell_handle hint = Cell_handle()) const; /*! +\cgalModifBegin returns the past-the-end iterator over the cells intersected by the line segment `st`. This iterator cannot be dereferenced. It indicates when the `Segment_cell_iterator` has @@ -1358,8 +1384,10 @@ The optional argument `hint` can reduce the time to construct the iterator if it \pre `s` and `t` must be different and finite points \pre `t.dimension() >= 2` +\cgalModifEnd */ Segment_cell_iterator segment_walk_end(const Point& s, const Point& t, Cell_handle hint = Cell_handle()) const; + /// @} /*!\name Cell and Facet Circulators From 0673838883d01c1ce0b0af9312482186dbc1bedb Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 18 Oct 2019 11:27:26 +0200 Subject: [PATCH 096/138] document simplex traverser and improve cell traverser reference manual --- .../Triangulation_3/CGAL/Triangulation_3.h | 113 ++++++++++++++++-- 1 file changed, 105 insertions(+), 8 deletions(-) diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h index 07b6ad197a9..3d9f58244f1 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h @@ -222,11 +222,18 @@ typedef Triangulation_data_structure::Facet_circulator Facet_circulator; /*! \cgalModifBegin -iterator over cells intersected by a line segment +iterator over cells intersected by a line segment. \cgalModifEnd */ typedef unspecified_type Segment_cell_iterator; +/*! +\cgalModifBegin +iterator over simplices intersected by a line segment. +\cgalModifEnd +*/ +typedef unspecified_type Segment_simplex_iterator; + /// @} /*! \name @@ -1287,7 +1294,7 @@ Points points() const; /// @} - + /*!\name Segment Cell Iterator \cgalModifBegin @@ -1332,7 +1339,8 @@ is `Cell_handle`. \cgalModifBegin returns the iterator that allows to visit the cells intersected by the line segment `st`. -The starting point of the iterator is an arbitrary cell incident to `s`. +The starting point of the iterator is the cell containing `s` and intersecting the +line segment `st`. The iterator remains valid until the first cell incident to `t` is passed. @@ -1340,7 +1348,7 @@ The iterator remains valid until the first cell incident to `t` is passed. \pre `t.dimension() >= 2` \cgalModifEnd */ -Segment_cell_iterator segment_walk_begin(Vertex_handle s, Vertex_handle t) const; +Segment_cell_iterator segment_traverser_cells_begin(Vertex_handle s, Vertex_handle t) const; /*! \cgalModifBegin @@ -1353,7 +1361,7 @@ passed the target. \pre `t.dimension() >= 2` \cgalModifEnd */ -Segment_cell_iterator segment_walk_end(Vertex_handle s, Vertex_handle t) const; +Segment_cell_iterator segment_traverser_cells_end(Vertex_handle s, Vertex_handle t) const; /*! \cgalModifBegin @@ -1361,7 +1369,10 @@ returns the iterator that allows to visit the cells intersected by the line segm If there is no such cell, the iterator visits exactly one infinite cell. -The starting point of the iterator is a cell containing `s`. +The starting point of the iterator is the cell containing `s`. +If more than one cell +contains `s` (e.g. if `s` lies on a vertex), +the starting point is the cell intersecting the line segment `st`. The iterator remains valid until the first cell containing `t` is passed. @@ -1371,7 +1382,7 @@ The optional argument `hint` can reduce the time to construct the iterator if it \pre `t.dimension() >= 2`. If the dimension is 2, both `s` and `t` must lie in the affine hull. \cgalModifEnd */ -Segment_cell_iterator segment_walk_begin(const Point& s, const Point& t, Cell_handle hint = Cell_handle()) const; +Segment_cell_iterator segment_traverser_cells_begin(const Point& s, const Point& t, Cell_handle hint = Cell_handle()) const; /*! \cgalModifBegin @@ -1386,7 +1397,93 @@ The optional argument `hint` can reduce the time to construct the iterator if it \pre `t.dimension() >= 2` \cgalModifEnd */ -Segment_cell_iterator segment_walk_end(const Point& s, const Point& t, Cell_handle hint = Cell_handle()) const; +Segment_cell_iterator segment_traverser_cells_end(const Point& s, const Point& t, Cell_handle hint = Cell_handle()) const; + +/// @} + +/*!\name Segment Simplex Iterator +\cgalModifBegin +The triangulation defines an iterator that visits all the triangulation simplices +(vertices, edges, facets and cells) intersected by a line segment. +The iterator covers a connected sequence of simplices - possibly of all dimensions - +intersected by the line segment `s`. + +Each simplex falls within one or more of the following categories: +1. a finite cell whose interior intersects `s`, +2. a facet `f` whose interior intersects `s` in a point, +3. a facet `f` whose interior intersects `s` in a line segment, +4. an edge `e` whose interior intersects `s` in a point, +5. an edge `e` whose interior intersects `s` in a line segment, +6. a vertex `v` lying on `s`. + +In the special case where the segment does not intersect any finite facets, exactly one infinite cell is visited. +This cell shares a facet `f` with a finite cell `c` such that `f` is intersected by the line through +the source of `s` and the vertex of `c` opposite of `f`. + +`Segment_simplex_iterator` implements the concept `ForwardIterator` and is non-mutable. +It is invalidated by any modification of one of the cells traversed. +Its `value_type` is `Triangulation_simplex_3`. +\cgalModifEnd +*/ +/// @{ +/*! +\cgalModifBegin +returns the iterator that allows to visit the simplices intersected by the line segment `st`. + +The starting point of the iterator is `s`. +The iterator remains valid until `t` is passed. + +\pre `s` and `t` must be different vertices and neither can be the infinite vertex. +\pre `t.dimension() >= 2` +\cgalModifEnd +*/ +Segment_simplex_iterator segment_traverser_simplices_begin(Vertex_handle s, Vertex_handle t) const; + +/*! +\cgalModifBegin +returns the past-the-end iterator over the cells intersected by the line segment `st`. + +This iterator cannot be dereferenced. It indicates when the `Segment_cell_iterator` has +passed the target. + +\pre `s` and `t` must be different vertices and neither can be the infinite vertex. +\pre `t.dimension() >= 2` +\cgalModifEnd +*/ +Segment_simplex_iterator segment_traverser_simplices_end(Vertex_handle s, Vertex_handle t) const; + +/*! +\cgalModifBegin +returns the iterator that allows to visit the simplices intersected by the line segment `st`. + +If there is no such cell, the iterator visits exactly one infinite cell. + +The starting point of the iterator is the lowest dimension simplex containing `s`. + +The iterator remains valid until the first simplex containing `t` is passed. + +The optional argument `hint` can reduce the time to construct the iterator if it is close to `s`. + +\pre `s` and `t` must be different points. +\pre `t.dimension() >= 2`. If the dimension is 2, both `s` and `t` must lie in the affine hull. +\cgalModifEnd +*/ +Segment_simplex_iterator segment_traverser_simplices_begin(const Point& s, const Point& t, Cell_handle hint = Cell_handle()) const; + +/*! +\cgalModifBegin +returns the past-the-end iterator over the simplices intersected by the line segment `st`. + +This iterator cannot be dereferenced. It indicates when the `Segment_simplex_iterator` has +passed the target. + +The optional argument `hint` can reduce the time to construct the iterator if it is close to `s`. + +\pre `s` and `t` must be different and finite points +\pre `t.dimension() >= 2` +\cgalModifEnd +*/ +Segment_simplex_iterator segment_traverser_simplices_end(const Point& s, const Point& t, Cell_handle hint = Cell_handle()) const; /// @} From 145ed35cd0129dc773200e1cc2873a9fed5944a6 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 5 Nov 2019 16:38:33 +0100 Subject: [PATCH 097/138] doc after Monique's review --- .../Triangulation_3/CGAL/Triangulation_3.h | 139 +++++++++--------- 1 file changed, 71 insertions(+), 68 deletions(-) diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h index 3d9f58244f1..e1a5777db8c 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h @@ -1300,104 +1300,106 @@ Points points() const; \cgalModifBegin The triangulation defines an iterator that visits the cells intersected by a line segment. -The cells visited form a connected region containing both source and target points of the line segment `s`. +The cells visited form a connected region containing both source and target points of the line segment `st`. Each cell falls within one or more of the following categories: -1. a finite cell whose interior intersects `s` -2. a finite cell with a facet `f` whose interior intersects `s` in a line segment. +1. a finite cell whose interior is intersected by `st` +2. a finite cell with a facet `f` whose interior is intersected by `st` in a line segment. If such a cell is visited, its neighbor incident to `f` is not visited. -3. a finite cell with an edge `e` whose interior intersects `s` in a line segment. +3. a finite cell with an edge `e` whose interior is intersected by `st` in a line segment. If such a cell is visited, none of the other cells incident to `e` are visited. -4. a finite cell with an edge `e` whose interior intersects `s` in a point. +4. a finite cell with an edge `e` whose interior is intersected by `st` in a point. This cell must form a connected component together with the other cells incident to `e` that are visited. Exactly two of these visited cells must also fall in category 1 or 2. -5. a finite cell with a vertex `v` that is an endpoint of `s`. +5. a finite cell with a vertex `v` that is an endpoint of `st`. This cell must also fit in either category 1 or 2. -6. a finite cell with a vertex `v` that lies on the interior of `s`. +6. a finite cell with a vertex `v` that lies on the interior of `st`. This cell must form a connected component together with the other cells incident to `v` that are visited. Exactly two of these cells must also fall in category 1 or 2. -7. an infinite cell with a finite facet whose interior intersects the interior of `s`. -8. an infinite cell with a finite edge `e` whose interior intersects the interior of `s`. +7. an infinite cell with a finite facet whose interior is intersected by the interior of `st`. +8. an infinite cell with a finite edge `e` whose interior is intersected by the interior of `st`. If such a cell is visited, its infinite neighbor incident to `e` is not visited. -9. an infinite cell with a finite vertex `v` that lies on the interior of `s`. +9. an infinite cell with a finite vertex `v` that lies on the interior of `st`. If such a cell is visited, none of the other infinite cells incident to `v` are visited. In the special case where the segment does not intersect any finite facets, exactly one infinite cell is visited. This cell shares a facet `f` with a finite cell `c` such that `f` is intersected by the line through -the source of `s` and the vertex of `c` opposite of `f`. +the source of `st` and the vertex of `c` opposite of `f`. Note that for categories 4 and 6, it is not predetermined which incident cells are visited. However, exactly two of the incident cells `c0,c1` visited also fall in category 1 or 2. The remaining incident cells visited make a facet-connected sequence connecting `c0` to `c1`. `Segment_cell_iterator` implements the concept `ForwardIterator` and is non-mutable. -It is invalidated by any modification of one of the cells traversed. Its `value_type` -is `Cell_handle`. +It is invalidated by any modification of one of the cells traversed. + +Its `value_type` is `Cell_handle`. \cgalModifEnd */ /// @{ /*! \cgalModifBegin -returns the iterator that allows to visit the cells intersected by the line segment `st`. +returns the iterator that allows to visit the cells intersected by the line segment `vsvt`. The starting point of the iterator is the cell containing `s` and intersecting the -line segment `st`. +line segment `vsvt`. -The iterator remains valid until the first cell incident to `t` is passed. +The iterator remains valid until the first cell incident to `vt` is passed. -\pre `s` and `t` must be different vertices and neither can be the infinite vertex. -\pre `t.dimension() >= 2` +\pre `vs` and `vt` must be different vertices and neither can be the infinite vertex. +\pre `triangulation.dimension() >= 2` \cgalModifEnd */ -Segment_cell_iterator segment_traverser_cells_begin(Vertex_handle s, Vertex_handle t) const; +Segment_cell_iterator segment_traverser_cells_begin(Vertex_handle vs, Vertex_handle vt) const; /*! \cgalModifBegin -returns the past-the-end iterator over the cells intersected by the line segment `st`. +returns the past-the-end iterator over the cells intersected by the line segment `vsvt`. This iterator cannot be dereferenced. It indicates when the `Segment_cell_iterator` has passed the target. -\pre `s` and `t` must be different vertices and neither can be the infinite vertex. -\pre `t.dimension() >= 2` +\pre `vs` and `vt` must be different vertices and neither can be the infinite vertex. +\pre `triangulation.dimension() >= 2` \cgalModifEnd */ -Segment_cell_iterator segment_traverser_cells_end(Vertex_handle s, Vertex_handle t) const; +Segment_cell_iterator segment_traverser_cells_end(Vertex_handle vs, Vertex_handle vt) const; /*! \cgalModifBegin -returns the iterator that allows to visit the cells intersected by the line segment `st`. +returns the iterator that allows to visit the cells intersected by the line segment `pspt`. If there is no such cell, the iterator visits exactly one infinite cell. -The starting point of the iterator is the cell containing `s`. +The starting point of the iterator is the cell containing `ps`. If more than one cell -contains `s` (e.g. if `s` lies on a vertex), -the starting point is the cell intersecting the line segment `st`. +contains `ps` (e.g. if `ps` lies on a vertex), +the starting point is the cell intersecting the line segment `pspt`. -The iterator remains valid until the first cell containing `t` is passed. +The iterator remains valid until the first cell containing `pt` is passed. -The optional argument `hint` can reduce the time to construct the iterator if it is close to `s`. +The optional argument `hint` can reduce the time to construct the iterator +if it is geometrically close to `ps`. -\pre `s` and `t` must be different points. -\pre `t.dimension() >= 2`. If the dimension is 2, both `s` and `t` must lie in the affine hull. +\pre `ps` and `pt` must be different points. +\pre `triangulation.dimension() >= 2`. If the dimension is 2, both `ps` and `pt` must lie in the affine hull. \cgalModifEnd */ -Segment_cell_iterator segment_traverser_cells_begin(const Point& s, const Point& t, Cell_handle hint = Cell_handle()) const; +Segment_cell_iterator segment_traverser_cells_begin(const Point& ps, const Point& pt, Cell_handle hint = Cell_handle()) const; /*! \cgalModifBegin -returns the past-the-end iterator over the cells intersected by the line segment `st`. +returns the past-the-end iterator over the cells intersected by the line segment `pspt`. This iterator cannot be dereferenced. It indicates when the `Segment_cell_iterator` has passed the target. -The optional argument `hint` can reduce the time to construct the iterator if it is close to `s`. +The optional argument `hint` can reduce the time to construct the iterator if it is close to `ps`. -\pre `s` and `t` must be different and finite points -\pre `t.dimension() >= 2` +\pre `ps` and `pt` must be different points +\pre `triangulation.dimension() >= 2` \cgalModifEnd */ -Segment_cell_iterator segment_traverser_cells_end(const Point& s, const Point& t, Cell_handle hint = Cell_handle()) const; +Segment_cell_iterator segment_traverser_cells_end(const Point& ps, const Point& pt, Cell_handle hint = Cell_handle()) const; /// @} @@ -1406,84 +1408,85 @@ Segment_cell_iterator segment_traverser_cells_end(const Point& s, const Point& t The triangulation defines an iterator that visits all the triangulation simplices (vertices, edges, facets and cells) intersected by a line segment. The iterator covers a connected sequence of simplices - possibly of all dimensions - -intersected by the line segment `s`. +intersected by the line segment `st`. Each simplex falls within one or more of the following categories: -1. a finite cell whose interior intersects `s`, -2. a facet `f` whose interior intersects `s` in a point, -3. a facet `f` whose interior intersects `s` in a line segment, -4. an edge `e` whose interior intersects `s` in a point, -5. an edge `e` whose interior intersects `s` in a line segment, -6. a vertex `v` lying on `s`. +1. a finite cell whose interior is intersected by `st`, +2. a facet `f` whose interior is intersected by `st` in a point, +3. a facet `f` whose interior is intersected by `st` in a line segment, +4. an edge `e` whose interior is intersected by `st` in a point, +5. an edge `e` whose interior is intersected by `st` in a line segment, +6. a vertex `v` lying on `st`. In the special case where the segment does not intersect any finite facets, exactly one infinite cell is visited. This cell shares a facet `f` with a finite cell `c` such that `f` is intersected by the line through -the source of `s` and the vertex of `c` opposite of `f`. +the source of `st` and the vertex of `c` opposite of `f`. `Segment_simplex_iterator` implements the concept `ForwardIterator` and is non-mutable. It is invalidated by any modification of one of the cells traversed. + Its `value_type` is `Triangulation_simplex_3`. -\cgalModifEnd +\cgalModifEnd */ /// @{ /*! \cgalModifBegin -returns the iterator that allows to visit the simplices intersected by the line segment `st`. +returns the iterator that allows to visit the simplices intersected by the line segment `vsvt`. -The starting point of the iterator is `s`. -The iterator remains valid until `t` is passed. +The starting point of the iterator is `vs`. +The iterator remains valid until `vt` is passed. -\pre `s` and `t` must be different vertices and neither can be the infinite vertex. -\pre `t.dimension() >= 2` +\pre `vs` and `vt` must be different vertices and neither can be the infinite vertex. +\pre `triangulation.dimension() >= 2` \cgalModifEnd */ -Segment_simplex_iterator segment_traverser_simplices_begin(Vertex_handle s, Vertex_handle t) const; +Segment_simplex_iterator segment_traverser_simplices_begin(Vertex_handle vs, Vertex_handle vt) const; /*! \cgalModifBegin -returns the past-the-end iterator over the cells intersected by the line segment `st`. +returns the past-the-end iterator over the cells intersected by the line segment `vsvt`. This iterator cannot be dereferenced. It indicates when the `Segment_cell_iterator` has passed the target. -\pre `s` and `t` must be different vertices and neither can be the infinite vertex. -\pre `t.dimension() >= 2` +\pre `vs` and `vt` must be different vertices and neither can be the infinite vertex. +\pre `triangulation.dimension() >= 2` \cgalModifEnd */ -Segment_simplex_iterator segment_traverser_simplices_end(Vertex_handle s, Vertex_handle t) const; +Segment_simplex_iterator segment_traverser_simplices_end(Vertex_handle vs, Vertex_handle t) const; /*! \cgalModifBegin -returns the iterator that allows to visit the simplices intersected by the line segment `st`. +returns the iterator that allows to visit the simplices intersected by the line segment `pspt`. If there is no such cell, the iterator visits exactly one infinite cell. -The starting point of the iterator is the lowest dimension simplex containing `s`. +The starting point of the iterator is the lowest dimension simplex containing `ps`. -The iterator remains valid until the first simplex containing `t` is passed. +The iterator remains valid until the first simplex containing `pt` is passed. -The optional argument `hint` can reduce the time to construct the iterator if it is close to `s`. +The optional argument `hint` can reduce the time to construct the iterator if it is close to `ps`. -\pre `s` and `t` must be different points. -\pre `t.dimension() >= 2`. If the dimension is 2, both `s` and `t` must lie in the affine hull. +\pre `ps` and `pt` must be different points. +\pre `triangulation.dimension() >= 2`. If the dimension is 2, both `ps` and `pt` must lie in the affine hull. \cgalModifEnd */ -Segment_simplex_iterator segment_traverser_simplices_begin(const Point& s, const Point& t, Cell_handle hint = Cell_handle()) const; +Segment_simplex_iterator segment_traverser_simplices_begin(const Point& ps, const Point& pt, Cell_handle hint = Cell_handle()) const; /*! \cgalModifBegin -returns the past-the-end iterator over the simplices intersected by the line segment `st`. +returns the past-the-end iterator over the simplices intersected by the line segment `pspt`. This iterator cannot be dereferenced. It indicates when the `Segment_simplex_iterator` has passed the target. -The optional argument `hint` can reduce the time to construct the iterator if it is close to `s`. +The optional argument `hint` can reduce the time to construct the iterator if it is close to `ps`. -\pre `s` and `t` must be different and finite points -\pre `t.dimension() >= 2` +\pre `ps` and `pt` must be different and finite points +\pre `triangulation.dimension() >= 2` \cgalModifEnd */ -Segment_simplex_iterator segment_traverser_simplices_end(const Point& s, const Point& t, Cell_handle hint = Cell_handle()) const; +Segment_simplex_iterator segment_traverser_simplices_end(const Point& ps, const Point& pt, Cell_handle hint = Cell_handle()) const; /// @} From e54cc309d4d4dc5c24cb92ad635bc76eec65aaf2 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 28 Jan 2020 15:35:17 +0100 Subject: [PATCH 099/138] doc --- .../Triangulation_3/CGAL/Triangulation_3.h | 73 ++++++++++--------- .../doc/Triangulation_3/Triangulation_3.txt | 10 ++- 2 files changed, 45 insertions(+), 38 deletions(-) diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h index e1a5777db8c..5cdeffbe758 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h @@ -1300,30 +1300,34 @@ Points points() const; \cgalModifBegin The triangulation defines an iterator that visits the cells intersected by a line segment. -The cells visited form a connected region containing both source and target points of the line segment `st`. +The cells visited form a connected region containing both source and target points of the line segment `[s,t]`. Each cell falls within one or more of the following categories: -1. a finite cell whose interior is intersected by `st` -2. a finite cell with a facet `f` whose interior is intersected by `st` in a line segment. +1. a finite cell whose interior is intersected by `[s,t]` +2. a finite cell with a facet `f` whose interior is intersected by `[s,t]` in a line segment. If such a cell is visited, its neighbor incident to `f` is not visited. -3. a finite cell with an edge `e` whose interior is intersected by `st` in a line segment. +3. a finite cell with an edge `e` whose interior is intersected by `[s,t]` in a line segment. If such a cell is visited, none of the other cells incident to `e` are visited. -4. a finite cell with an edge `e` whose interior is intersected by `st` in a point. +4. a finite cell with an edge `e` whose interior is intersected by `[s,t]` in a point. This cell must form a connected component together with the other cells incident to `e` that are visited. Exactly two of these visited cells must also fall in category 1 or 2. -5. a finite cell with a vertex `v` that is an endpoint of `st`. +5. a finite cell with a vertex `v` that is an endpoint of `[s,t]`. This cell must also fit in either category 1 or 2. -6. a finite cell with a vertex `v` that lies on the interior of `st`. +6. a finite cell with a vertex `v` that lies on the interior of `[s,t]`. This cell must form a connected component together with the other cells incident to `v` that are visited. Exactly two of these cells must also fall in category 1 or 2. -7. an infinite cell with a finite facet whose interior is intersected by the interior of `st`. -8. an infinite cell with a finite edge `e` whose interior is intersected by the interior of `st`. +7. an infinite cell with a finite facet whose interior is intersected by the interior of `[s,t]`. +8. an infinite cell with a finite edge `e` whose interior is intersected by the interior of `[s,t]`. If such a cell is visited, its infinite neighbor incident to `e` is not visited. -9. an infinite cell with a finite vertex `v` that lies on the interior of `st`. +Among the other cells incident to `e` that are visited, +exactly one must also fall in category 1 or 2. +9. an infinite cell with a finite vertex `v` that lies on the interior of `[s,t]`. If such a cell is visited, none of the other infinite cells incident to `v` are visited. +Among the other cells incident to `v` that are visited, +exactly one must also fall in category 1, 2 or 3. -In the special case where the segment does not intersect any finite facets, exactly one infinite cell is visited. +In the special case where the segment does not intersect any finite facet, exactly one infinite cell is visited. This cell shares a facet `f` with a finite cell `c` such that `f` is intersected by the line through -the source of `st` and the vertex of `c` opposite of `f`. +the source of `[s,t]` and the vertex of `c` opposite of `f`. Note that for categories 4 and 6, it is not predetermined which incident cells are visited. However, exactly two of the incident cells `c0,c1` visited also fall in category 1 or 2. @@ -1338,10 +1342,10 @@ Its `value_type` is `Cell_handle`. /// @{ /*! \cgalModifBegin -returns the iterator that allows to visit the cells intersected by the line segment `vsvt`. +returns the iterator that allows to visit the cells intersected by the line segment `[vs,vt]`. -The starting point of the iterator is the cell containing `s` and intersecting the -line segment `vsvt`. +The starting point of the iterator is the cell containing `vs` and intersecting the +line segment `[vs,vt]`. The iterator remains valid until the first cell incident to `vt` is passed. @@ -1353,7 +1357,7 @@ Segment_cell_iterator segment_traverser_cells_begin(Vertex_handle vs, Vertex_han /*! \cgalModifBegin -returns the past-the-end iterator over the cells intersected by the line segment `vsvt`. +returns the past-the-end iterator over the cells intersected by the line segment `[vs,vt]`. This iterator cannot be dereferenced. It indicates when the `Segment_cell_iterator` has passed the target. @@ -1366,14 +1370,14 @@ Segment_cell_iterator segment_traverser_cells_end(Vertex_handle vs, Vertex_handl /*! \cgalModifBegin -returns the iterator that allows to visit the cells intersected by the line segment `pspt`. +returns the iterator that allows to visit the cells intersected by the line segment `[ps,pt]`. -If there is no such cell, the iterator visits exactly one infinite cell. +If `[ps,pt]` entirely lies outside the convex hull, the iterator visits exactly one infinite cell. The starting point of the iterator is the cell containing `ps`. If more than one cell contains `ps` (e.g. if `ps` lies on a vertex), -the starting point is the cell intersecting the line segment `pspt`. +the starting point is the cell intersecting the line segment `[ps,pt]`. The iterator remains valid until the first cell containing `pt` is passed. @@ -1388,7 +1392,7 @@ Segment_cell_iterator segment_traverser_cells_begin(const Point& ps, const Point /*! \cgalModifBegin -returns the past-the-end iterator over the cells intersected by the line segment `pspt`. +returns the past-the-end iterator over the cells intersected by the line segment `[ps,pt]`. This iterator cannot be dereferenced. It indicates when the `Segment_cell_iterator` has passed the target. @@ -1408,19 +1412,20 @@ Segment_cell_iterator segment_traverser_cells_end(const Point& ps, const Point& The triangulation defines an iterator that visits all the triangulation simplices (vertices, edges, facets and cells) intersected by a line segment. The iterator covers a connected sequence of simplices - possibly of all dimensions - -intersected by the line segment `st`. +intersected by the line segment `[s,t]`. Each simplex falls within one or more of the following categories: -1. a finite cell whose interior is intersected by `st`, -2. a facet `f` whose interior is intersected by `st` in a point, -3. a facet `f` whose interior is intersected by `st` in a line segment, -4. an edge `e` whose interior is intersected by `st` in a point, -5. an edge `e` whose interior is intersected by `st` in a line segment, -6. a vertex `v` lying on `st`. +1. a finite cell whose interior is intersected by `[s,t]`, +2. a facet `f` whose interior is intersected by `[s,t]` in a point, +3. a facet `f` whose interior is intersected by `[s,t]` in a line segment, +4. an edge `e` whose interior is intersected by `[s,t]` in a point, +5. an edge `e` whose interior is intersected by `[s,t]` in a line segment, +6. a vertex `v` lying on `[s,t]`, +7. an infinite cell with a finite facet whose interior is intersected by the interior of `[s,t]`. -In the special case where the segment does not intersect any finite facets, exactly one infinite cell is visited. +In the special case where the segment does not intersect any finite facet, exactly one infinite cell is visited. This cell shares a facet `f` with a finite cell `c` such that `f` is intersected by the line through -the source of `st` and the vertex of `c` opposite of `f`. +the source of `[s,t]` and the vertex of `c` opposite of `f`. `Segment_simplex_iterator` implements the concept `ForwardIterator` and is non-mutable. It is invalidated by any modification of one of the cells traversed. @@ -1431,7 +1436,7 @@ Its `value_type` is `Triangulation_simplex_3`. /// @{ /*! \cgalModifBegin -returns the iterator that allows to visit the simplices intersected by the line segment `vsvt`. +returns the iterator that allows to visit the simplices intersected by the line segment `[vs,vt]`. The starting point of the iterator is `vs`. The iterator remains valid until `vt` is passed. @@ -1444,7 +1449,7 @@ Segment_simplex_iterator segment_traverser_simplices_begin(Vertex_handle vs, Ver /*! \cgalModifBegin -returns the past-the-end iterator over the cells intersected by the line segment `vsvt`. +returns the past-the-end iterator over the cells intersected by the line segment `[vs,vt]`. This iterator cannot be dereferenced. It indicates when the `Segment_cell_iterator` has passed the target. @@ -1457,9 +1462,9 @@ Segment_simplex_iterator segment_traverser_simplices_end(Vertex_handle vs, Verte /*! \cgalModifBegin -returns the iterator that allows to visit the simplices intersected by the line segment `pspt`. +returns the iterator that allows to visit the simplices intersected by the line segment `[ps,pt]`. -If there is no such cell, the iterator visits exactly one infinite cell. +If `[ps,pt]` entirely lies outside the convex hull, the iterator visits exactly one infinite cell. The starting point of the iterator is the lowest dimension simplex containing `ps`. @@ -1475,7 +1480,7 @@ Segment_simplex_iterator segment_traverser_simplices_begin(const Point& ps, cons /*! \cgalModifBegin -returns the past-the-end iterator over the simplices intersected by the line segment `pspt`. +returns the past-the-end iterator over the simplices intersected by the line segment `[ps,pt]`. This iterator cannot be dereferenced. It indicates when the `Segment_simplex_iterator` has passed the target. diff --git a/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt b/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt index 8f7fd488e03..057efbce23b 100644 --- a/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt +++ b/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt @@ -1122,10 +1122,6 @@ In 2011, Pedro de Castro and Olivier Devillers implemented in release 3.8 the structural filtering method, improving the efficiency of point location. -\cgalModifBegin -In 2014, Thijs van Lankveld added the segment traverser utility class. -\cgalModifEnd - A new demo of this package was introduced in \cgal 3.8, coded by Fei (Sophie) Che, who was co-mentored by Manuel Caroli and Monique Teillaud in the framework of the Google Summer of Code, 2010. @@ -1133,6 +1129,12 @@ Teillaud in the framework of the Google Summer of Code, 2010. In 2013, Clément Jamin added parallel algorithms (insert, remove) to the Delaunay and regular triangulations. +\cgalModifBegin +In 2014, Thijs van Lankveld implemented the segment cell traverser iterator. +In 2018, Jane Tournois introduced the segment simplex traverser iterator +and finalized both iterators that were integrated in release 5.1. +\cgalModifEnd + The authors wish to thank Lutz Kettner for inspiring discussions about the design of \cgal. Jean-Daniel Boissonnat is also acknowledged \cgalCite{bdty-tcgal-00}. From 3aae44f63189359f2621bcdb6280ffe27a430b14 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 2 Apr 2020 07:44:53 +0200 Subject: [PATCH 100/138] apply Monique's doc review --- .../Triangulation_3/CGAL/Triangulation_3.h | 52 +++++++++++-------- .../doc/Triangulation_3/Triangulation_3.txt | 3 +- .../CGAL/Triangulation_segment_traverser_3.h | 2 +- 3 files changed, 32 insertions(+), 25 deletions(-) diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h index 197362c96e2..9a5707bd622 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h @@ -1302,32 +1302,32 @@ The triangulation defines an iterator that visits cells intersected by a line se The cells visited form a facet-connected region containing both source and target points of the line segment `[s,t]`. Each cell falls within one or more of the following categories: -1. a finite cell whose interior is intersected by `[s,t]` +1. a finite cell whose interior is intersected by `[s,t]`. 2. a finite cell with a facet `f` whose interior is intersected by `[s,t]` in a line segment. If such a cell is visited, its neighbor incident to `f` is not visited. 3. a finite cell with an edge `e` whose interior is intersected by `[s,t]` in a line segment. If such a cell is visited, none of the other cells incident to `e` are visited. 4. a finite cell with an edge `e` whose interior is intersected by `[s,t]` in a point. -This cell must form a connected component together with the other cells incident to `e` that are visited. -Exactly two of these visited cells must also fall in category 1 or 2. +This cell forms a connected component together with the other cells incident to `e` that are visited. +Exactly two of these visited cells also fall in category 1 or 2. 5. a finite cell with a vertex `v` that is an endpoint of `[s,t]`. -This cell must also fit in either category 1 or 2. -6. a finite cell with a vertex `v` that lies on the interior of `[s,t]`. -This cell must form a connected component together with the other cells incident to `v` that are visited. -Exactly two of these cells must also fall in category 1 or 2. +This cell also fits in either category 1 or 2. +6. a finite cell with a vertex `v` that lies in the interior of `[s,t]`. +This cell forms a connected component together with the other cells incident to `v` that are visited. +Exactly two of these cells also fall in category 1 or 2. 7. an infinite cell with a finite facet whose interior is intersected by the interior of `[s,t]`. 8. an infinite cell with a finite edge `e` whose interior is intersected by the interior of `[s,t]`. If such a cell is visited, its infinite neighbor incident to `e` is not visited. -Among the other cells incident to `e` that are visited, -exactly one must also fall in category 1 or 2. -9. an infinite cell with a finite vertex `v` that lies on the interior of `[s,t]`. +Among the finite cells incident to `e` that are visited, +exactly one also falls in category 1 or 2. +9. an infinite cell with a finite vertex `v` that lies in the interior of `[s,t]`. If such a cell is visited, none of the other infinite cells incident to `v` are visited. -Among the other cells incident to `v` that are visited, -exactly one must also fall in category 1, 2 or 3. - -In the special case where the segment does not intersect any finite facet, exactly one infinite cell is visited. +Among the finite cells incident to `v` that are visited, +exactly one also falls in category 1, 2, or 3. +10. an infinite cell in the special case where the segment does not intersect any finite facet. +In this case, exactly one infinite cell is visited. This cell shares a facet `f` with a finite cell `c` such that `f` is intersected by the line through -the source of `[s,t]` and the vertex of `c` opposite of `f`. +the point `s` and the vertex of `c` opposite of `f`. Note that for categories 4 and 6, it is not predetermined which incident cells are visited. However, exactly two of the incident cells `c0,c1` visited also fall in category 1 or 2. @@ -1344,10 +1344,11 @@ Its `value_type` is `Cell_handle`. \cgalModifBegin returns the iterator that allows to visit the cells intersected by the line segment `[vs,vt]`. -The initial value of the iterator is the cell containing `vs` and intersecting the -line segment `[vs,vt]`. +The initial value of the iterator is the cell containing `vs` and intersected by the +line segment `[vs,vt]` in its interior. -The iterator remains valid until the first cell incident to `vt` is passed. +The first cell incident to `vt` is the last valid value of the iterator. +It is followed by `segment_traverser_cells_end(vs, vt)`. \pre `vs` and `vt` must be different vertices and neither can be the infinite vertex. \pre `triangulation.dimension() >= 2` @@ -1377,9 +1378,14 @@ If `[ps,pt]` entirely lies outside the convex hull, the iterator visits exactly The initial value of the iterator is the cell containing `ps`. If more than one cell contains `ps` (e.g. if `ps` lies on a vertex), -the initial value is the cell intersected by the line segment `[ps,pt]`. +the initial value is the cell intersected by +the interior of the line segment `[ps,pt]`. +If `ps` lies outside the convex hull and `pt` inside the convex full, +the initial value is the infinite cell which finite facet is intersected by +the interior of `[ps,pt]`. -The iterator remains valid until the first cell containing `pt` is passed. +The first cell containing `pt` is the last valid value of the iterator. +It is followed by `segment_traverser_cells_end(ps, pt)`. The optional argument `hint` can reduce the time to construct the iterator if it is geometrically close to `ps`. @@ -1424,9 +1430,9 @@ Each simplex falls within one or more of the following categories: 4. an edge `e` whose interior is intersected by `[s,t]` in a point, 5. an edge `e` whose interior is intersected by `[s,t]` in a line segment, 6. a vertex `v` lying on `[s,t]`, -7. an infinite cell with a finite facet whose interior is intersected by the interior of `[s,t]`. - -In the special case where the segment does not intersect any finite facet, exactly one infinite cell is visited. +7. an infinite cell with a finite facet whose interior is intersected by the interior of `[s,t]`, +8. an infinite cell in the special case where the segment does not intersect any finite facet. +In this case, exactly one infinite cell is visited. This cell shares a facet `f` with a finite cell `c` such that `f` is intersected by the line through the source of `[s,t]` and the vertex of `c` opposite of `f`. diff --git a/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt b/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt index 057efbce23b..8b1dd478d10 100644 --- a/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt +++ b/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt @@ -520,7 +520,8 @@ simplices can be stored in a set. \cgalModifBegin \subsection Triangulation3exsegmenttraverser Traversing the Triangulation Along a Segment -The package provides a utility class that can be used to traverse the triangulation along a segment. All cells visited by this traverser are guaranteed to intersect the interior of the segment. +The package provides iterators that can be used to traverse the triangulation along a segment. +All cells (resp. simplices) visited by this traversal iterator are guaranteed to intersect the segment. \cgalModifEnd \cgalExample{Triangulation_3/segment_traverser_3.cpp} diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 7e0d0b81694..b161fbd21aa 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -120,7 +120,7 @@ struct Incrementer { * If \f$ st \f$ is coplanar with a facet or collinear with an edge, at most one of the * incident cells is traversed. * If \f$ st \f$ intersects an edge or vertex, at most two incident cells are traversed: - * the cells intersecting \f$ st \f$ strictly in their interior. + * the cells intersected by \f$ st \f$ strictly in their interior. * * If \f$ s \f$ lies on the convex hull, traversal starts in an incident cell inside * the convex hull. Similarly, if \f$ t \f$ lies on the convex hull, traversal ends in From b9660603b97ac5d038a89c79682249a8b867ab2b Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 3 Apr 2020 06:52:25 +0200 Subject: [PATCH 101/138] add the new API in the code and adapt examples and tests consistently --- .../segment_simplex_traverser_3.cpp | 53 ++--- .../Triangulation_3/segment_traverser_3.cpp | 45 +--- .../include/CGAL/Triangulation_3.h | 58 +++++ .../CGAL/Triangulation_segment_traverser_3.h | 130 ++++------- .../Triangulation_segment_traverser_3_impl.h | 214 +++++++++--------- .../test_segment_cell_traverser_3.cpp | 100 +++----- .../test_segment_simplex_traverser_3.cpp | 43 ++-- .../test_simplex_iterator_3.cpp | 177 ++++++++------- 8 files changed, 376 insertions(+), 444 deletions(-) rename Triangulation_3/include/CGAL/{ => internal}/Triangulation_segment_traverser_3_impl.h (83%) diff --git a/Triangulation_3/examples/Triangulation_3/segment_simplex_traverser_3.cpp b/Triangulation_3/examples/Triangulation_3/segment_simplex_traverser_3.cpp index 00900ff107b..193c31d5b8d 100644 --- a/Triangulation_3/examples/Triangulation_3/segment_simplex_traverser_3.cpp +++ b/Triangulation_3/examples/Triangulation_3/segment_simplex_traverser_3.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include #include @@ -18,11 +18,10 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; typedef Kernel::Point_3 Point_3; // Define the structure. -typedef CGAL::Delaunay_triangulation_3< Kernel > DT; - -typedef DT::Cell_handle Cell_handle; - -typedef CGAL::Triangulation_segment_simplex_iterator_3
Simplex_traverser; +typedef CGAL::Delaunay_triangulation_3< Kernel > DT; +typedef DT::Cell_handle Cell_handle; +typedef DT::Segment_simplex_iterator Segment_simplex_iterator; +typedef CGAL::Triangulation_simplex_3 Simplex; int main(int argc, char* argv[]) { @@ -52,7 +51,6 @@ int main(int argc, char* argv[]) time.start(); unsigned int nb_cells = 0, nb_facets = 0, nb_edges = 0, nb_vertex = 0; - unsigned int nb_collinear = 0; for (int i = 0; i < nb_seg; ++i) { @@ -69,45 +67,21 @@ int main(int argc, char* argv[]) << "\n\t(" << p1 << ")\n\t(" << p2 << ")" << std::endl; #endif - Simplex_traverser st(dt, p1, p2); + Segment_simplex_iterator st = dt.segment_traverser_simplices_begin(p1, p2); + Segment_simplex_iterator stend = dt.segment_traverser_simplices_end(p1, p2); - // Count the number of finite cells traversed. - unsigned int inf = 0, fin = 0; - for (; st != st.end(); ++st) + for (; st != stend; ++st) { - if( dt.is_infinite(st) ) - ++inf; - else - { - ++fin; - if (st.is_facet()) ++nb_facets; - else if (st.is_edge()) ++nb_edges; - else if (st.is_vertex()) ++nb_vertex; - else if (st.is_cell()) ++nb_cells; - - if (st.is_collinear()) ++nb_collinear; - -#ifdef CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE - if (st.is_facet()) - std::cout << "facet " << std::endl; - else if (st.is_edge()) - std::cout << "edge " << std::endl; - else if (st.is_vertex()) - std::cout << "vertex " << std::endl; - else - { - CGAL_assertion(st.is_cell()); - std::cout << "cell " << std::endl; - } -#endif - } + const Simplex s = st; + if (s.dimension() == 3) ++nb_cells; + else if (s.dimension() == 2) ++nb_facets; + else if (s.dimension() == 1) ++nb_edges; + else if (s.dimension() == 0) ++nb_vertex; } #ifdef CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE std::cout << "While traversing from " << st.source() << " to " << st.target() << std::endl; - std::cout << "\tinfinite cells : " << inf << std::endl; - std::cout << "\tfinite cells : " << fin << std::endl; std::cout << "\tfacets : " << nb_facets << std::endl; std::cout << "\tedges : " << nb_edges << std::endl; std::cout << "\tvertices : " << nb_vertex << std::endl; @@ -123,7 +97,6 @@ int main(int argc, char* argv[]) std::cout << "\tnb facets : " << nb_facets << std::endl; std::cout << "\tnb edges : " << nb_edges << std::endl; std::cout << "\tnb vertices : " << nb_vertex << std::endl; - std::cout << "\tnb collinear : " << nb_collinear << std::endl; return 0; } \ No newline at end of file diff --git a/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp b/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp index ab75a14ac39..ee21eafacb5 100644 --- a/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp +++ b/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp @@ -1,7 +1,6 @@ #include #include -#include #include #include @@ -13,18 +12,15 @@ #include #include -//#define CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE // Define the kernel. typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; typedef Kernel::Point_3 Point_3; // Define the structure. -typedef CGAL::Delaunay_triangulation_3< Kernel > DT; - -typedef DT::Cell_handle Cell_handle; - -typedef CGAL::Triangulation_segment_cell_iterator_3< DT > Cell_traverser; +typedef CGAL::Delaunay_triangulation_3< Kernel > DT; +typedef DT::Cell_handle Cell_handle; +typedef DT::Segment_cell_iterator Segment_cell_iterator; int main(int argc, char* argv[]) { @@ -72,8 +68,6 @@ int main(int argc, char* argv[]) CGAL::Timer time; time.start(); - unsigned int nb_facets = 0, nb_edges = 0, nb_vertex = 0; - for (unsigned int i = 0; i < nb_seg; ++i) { // Construct a traverser. @@ -89,43 +83,21 @@ int main(int argc, char* argv[]) << "\n\t(" << p1 << ")\n\t(" << p2 << ")" << std::endl; #endif - Cell_traverser ct(dt, p1, p2); + Segment_cell_iterator ct = dt.segment_traverser_cells_begin(p1, p2); + Segment_cell_iterator ctend = dt.segment_traverser_cells_begin(p1, p2); // Count the number of finite cells traversed. unsigned int inf = 0, fin = 0; - for( ; ct != ct.end(); ++ct ) + for( ; ct !=ctend; ++ct ) { if( dt.is_infinite(ct) ) ++inf; else - { ++fin; - - DT::Locate_type lt; - int li, lj; - ct.entry(lt, li, lj); - - switch (lt) - { - case DT::Locate_type::FACET: - ++nb_facets; - break; - case DT::Locate_type::EDGE: - ++nb_edges; - break; - case DT::Locate_type::VERTEX: - ++nb_vertex; - break; - default: - /*when source is in a cell*/ - CGAL_assertion(lt == DT::Locate_type::CELL); - } - } } #ifdef CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE - std::cout << "While traversing from " << ct.source() - << " to " << ct.target() << std::endl; + std::cout << "While traversing from " << p1 << " to " << p2 << std::endl; std::cout << inf << " infinite and " << fin << " finite cells were visited." << std::endl; std::cout << std::endl << std::endl; @@ -138,9 +110,6 @@ int main(int argc, char* argv[]) std::cout << "Traversing cells of triangulation with " << nb_seg << " segments took " << time.time() << " seconds." << std::endl; - std::cout << "\tnb facets : " << nb_facets << std::endl; - std::cout << "\tnb edges : " << nb_edges << std::endl; - std::cout << "\tnb vertices : " << nb_vertex << std::endl; return 0; } diff --git a/Triangulation_3/include/CGAL/Triangulation_3.h b/Triangulation_3/include/CGAL/Triangulation_3.h index 5341859314a..e10347846fb 100644 --- a/Triangulation_3/include/CGAL/Triangulation_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_3.h @@ -43,6 +43,8 @@ #include #include +#include + #include #include #include @@ -524,6 +526,9 @@ public: typedef Iterator_range Finite_edges; typedef Iterator_range Finite_facets; + typedef Triangulation_segment_cell_iterator_3 Segment_cell_iterator; + typedef Triangulation_segment_simplex_iterator_3 Segment_simplex_iterator; + private: // Auxiliary iterators for convenience // do not use default template argument to please VC++ @@ -2187,6 +2192,59 @@ public: return _tds.incident_edges_threadsafe(v, edges, Finite_filter(this)); } + Segment_cell_iterator segment_traverser_cells_begin(Vertex_handle vs, + Vertex_handle vt) const + { + Segment_cell_iterator it(this, vs, vt); + return it; + } + Segment_cell_iterator segment_traverser_cells_end(Vertex_handle vs, + Vertex_handle vt) const + { + Segment_cell_iterator it(this, vs, vt); + return it.end(); + } + Segment_cell_iterator segment_traverser_cells_begin(const Point& ps, + const Point& pt, + Cell_handle hint = Cell_handle()) const + { + Segment_cell_iterator it(this, ps, pt, hint); + return it; + } + Segment_cell_iterator segment_traverser_cells_end(const Point& ps, + const Point& pt, + Cell_handle hint = Cell_handle()) const + { + Segment_cell_iterator it(this, ps, pt, hint); + return it.end(); + } + Segment_simplex_iterator segment_traverser_simplices_begin(Vertex_handle vs, + Vertex_handle vt) const + { + Segment_simplex_iterator it(this, vs, vt); + return it; + } + Segment_simplex_iterator segment_traverser_simplices_end(Vertex_handle vs, + Vertex_handle vt) const + { + Segment_simplex_iterator it(this, vs, vt); + return it.end(); + } + Segment_simplex_iterator segment_traverser_simplices_begin(const Point& ps, + const Point& pt, + Cell_handle hint = Cell_handle()) const + { + Segment_simplex_iterator it(this, ps, pt, hint); + return it; + } + Segment_simplex_iterator segment_traverser_simplices_end(const Point& ps, + const Point& pt, + Cell_handle hint = Cell_handle()) const + { + Segment_simplex_iterator it(this, ps, pt, hint); + return it.end(); + } + size_type degree(Vertex_handle v) const { return _tds.degree(v); diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index b161fbd21aa..f5ecab1f672 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -47,48 +47,6 @@ #define CGAL_TST_ASSUME_CORRECT_TYPES namespace CGAL { - -/* -add the following to Triangulation_segment_traverser_3.h to get a superclass of the Incrementer visitor. - - - - - -template < class Tr, class Inc > -class Test_super_SCI; - -namespace internal { - -template < class Tr > -struct Test_incrementer: public Incrementer { - typedef Incrementer Base; - typedef Test_incrementer Self; - typedef Test_super_SCI SCI; - Test_incrementer() {} - void increment( SCI& sci ) { - ++sci._superclass; - sci.increment(); - } -}; // struct Test_incrementer - -} // namespace internal - -template < class Tr_, class Inc = internal::Test_incrementer > -class Test_super_SCI: public Triangulation_segment_cell_iterator_3 { - typedef Tr_ Tr; - typedef Triangulation_segment_cell_iterator_3 SCI; - - int _superclass; - - friend internal::Test_incrementer; - -public: - Test_super_SCI( const Tr& tr, const Point& s, const Point& t, Cell_handle hint = Cell_handle() ) - : SCI(tr,s,t,hint), _superclass(0) {} - -}; -*/ template < class Tr, class Inc > class Triangulation_segment_cell_iterator_3; @@ -143,8 +101,9 @@ struct Incrementer { * \sa `Forward_circulator_base` */ template < class Tr_, class Inc = internal::Incrementer > -class Triangulation_segment_cell_iterator_3 { - typedef Tr_ Tr; +class Triangulation_segment_cell_iterator_3 +{ + typedef Tr_ Tr; typedef typename Tr::Triangulation_data_structure Tds; typedef typename Tr::Geom_traits Gt; typedef Inc Incrementer; @@ -192,7 +151,7 @@ protected: // \internal \name Protected Attributes // \{ // \internal The triangulation to traverse. - const Tr& _tr; + const Tr* _tr; // \} @@ -218,7 +177,7 @@ public: * \param t the target vertex. This vertex must be initialized and cannot be the infinite vertex. * It cannot equal `s`. */ - Triangulation_segment_cell_iterator_3( const Tr& tr, Vertex_handle s, Vertex_handle t ); + Triangulation_segment_cell_iterator_3( const Tr* tr, Vertex_handle s, Vertex_handle t ); // constructs an iterator. /* \param tr the triangulation to iterate though. This triangulation must have dimension > 0. @@ -226,7 +185,7 @@ public: * \param t the target point. This point must be initialized and it cannot be be at the same location as `s`. * If `tr` has dimension < 3, `t` must lie inside the affine hull of `tr`. */ - Triangulation_segment_cell_iterator_3( const Tr& tr, Vertex_handle s, const Point& t ); + Triangulation_segment_cell_iterator_3( const Tr* tr, Vertex_handle s, const Point& t ); // constructs an iterator. /* \param tr the triangulation to iterate though. This triangulation must have dimension > 0. @@ -235,7 +194,7 @@ public: * If `tr` has dimension < 3, `s` must lie inside the affine hull of `tr`. * \param hint the starting point to search for `s`. */ - Triangulation_segment_cell_iterator_3( const Tr& tr, const Point& s, Vertex_handle t, Cell_handle hint = Cell_handle() ); + Triangulation_segment_cell_iterator_3( const Tr* tr, const Point& s, Vertex_handle t, Cell_handle hint = Cell_handle() ); // constructs an iterator. /* \param tr the triangulation to iterate though. This triangulation must have dimension > 0. @@ -245,7 +204,7 @@ public: * If `tr` has dimension < 3, `t` must lie inside the affine hull of `tr`. * \param hint the starting point to search for `s`. */ - Triangulation_segment_cell_iterator_3( const Tr& tr, const Point& s, const Point& t, Cell_handle hint = Cell_handle() ); + Triangulation_segment_cell_iterator_3( const Tr* tr, const Point& s, const Point& t, Cell_handle hint = Cell_handle() ); // constructs an iterator. /* \param tr the triangulation to iterate though. This triangulation must have dimension > 0. @@ -253,7 +212,7 @@ public: * the affine hull of `tr`. `S` must not be degenerate, i.e. its source and target must not be equal. * \param hint the starting point to search for `S`. */ - Triangulation_segment_cell_iterator_3( const Tr& tr, const Segment& S, Cell_handle hint = Cell_handle() ); + Triangulation_segment_cell_iterator_3( const Tr* tr, const Segment& S, Cell_handle hint = Cell_handle() ); // \} #ifndef CGAL_TST_ASSUME_CORRECT_TYPES @@ -265,13 +224,13 @@ public: private: // private constructor that does not initialize the source and target. - Triangulation_segment_cell_iterator_3( const Tr& tr ); + Triangulation_segment_cell_iterator_3( const Tr* tr ); public: // \name Accessors // \{ - const Tr& triangulation() const { return _tr; } + const Tr* triangulation() const { return _tr; } // gives the source point of the segment followed. /* \return the source point. @@ -568,12 +527,11 @@ public: typedef typename SCI::Triangulation::Facet Facet; //< defines the type of a facet in the triangulation. typedef typename SCI::Locate_type Locate_type; //< defines the simplex type returned from location. - //typedef boost::variant Simplex_type; //types sorted by dimension - typedef CGAL::Triangulation_simplex_3 Simplex_type; + typedef CGAL::Triangulation_simplex_3 Simplex_3; - typedef Simplex_type value_type; //< defines the value type the iterator refers to. - typedef const Simplex_type& reference; //< defines the reference type of the iterator. - typedef const Simplex_type* pointer; //< defines the pointer type of the iterator. + typedef Simplex_3 value_type; //< defines the value type the iterator refers to. + typedef const Simplex_3& reference; //< defines the reference type of the iterator. + typedef const Simplex_3* pointer; //< defines the pointer type of the iterator. typedef std::size_t size_type; //< defines the integral type that can hold the size of a sequence. typedef std::ptrdiff_t difference_type; //< defines the signed integral type that can hold the distance between two iterators. typedef std::forward_iterator_tag iterator_category; //< defines the iterator category. @@ -581,26 +539,26 @@ public: private: SCI _cell_iterator; - Simplex_type _curr_simplex; + Simplex_3 _curr_simplex; public: - Triangulation_segment_simplex_iterator_3(const Tr& tr + Triangulation_segment_simplex_iterator_3(const Tr* tr , Vertex_handle s, Vertex_handle t) : _cell_iterator(tr, s, t) { set_curr_simplex_to_entry(); } - Triangulation_segment_simplex_iterator_3(const Tr& tr + Triangulation_segment_simplex_iterator_3(const Tr* tr , Vertex_handle s, const Point& t) : _cell_iterator(tr, s, t) { set_curr_simplex_to_entry(); } - Triangulation_segment_simplex_iterator_3(const Tr& tr + Triangulation_segment_simplex_iterator_3(const Tr* tr , const Point& s, Vertex_handle t, Cell_handle hint = Cell_handle()) : _cell_iterator(tr, s, t, hint) { set_curr_simplex_to_entry(); } - Triangulation_segment_simplex_iterator_3(const Tr& tr + Triangulation_segment_simplex_iterator_3(const Tr* tr , const Point& s, const Point& t, Cell_handle hint = Cell_handle()) : _cell_iterator(tr, s, t, hint) { set_curr_simplex_to_entry(); } - Triangulation_segment_simplex_iterator_3(const Tr& tr + Triangulation_segment_simplex_iterator_3(const Tr* tr , const Segment& seg, Cell_handle hint = Cell_handle()) : _cell_iterator(tr, seg, hint) { set_curr_simplex_to_entry(); } @@ -619,7 +577,7 @@ public: const Point& source() const { return _cell_iterator.source(); } const Point& target() const { return _cell_iterator.target(); } - const Tr& triangulation() const { return _cell_iterator.triangulation(); } + const Tr* triangulation() const { return _cell_iterator.triangulation(); } private: Triangulation_segment_simplex_iterator_3 @@ -665,7 +623,7 @@ private: case Locate_type::OUTSIDE_CONVEX_HULL: case Locate_type::OUTSIDE_AFFINE_HULL: if (Cell_handle(_cell_iterator) == Cell_handle()) - _curr_simplex = Simplex_type(); + _curr_simplex = Simplex_3(); else _curr_simplex = cell; break; @@ -719,12 +677,12 @@ public: { if (_cell_iterator == _cell_iterator.end()) { - _curr_simplex = Simplex_type(); + _curr_simplex = Simplex_3(); break; } //if the entry vertex is a vertex of current facet int i; - if (triangulation().has_vertex(get_facet(), chnext->vertex(linext), i)) + if (triangulation()->has_vertex(get_facet(), chnext->vertex(linext), i)) set_curr_simplex_to_entry(); else _curr_simplex = ch; @@ -773,13 +731,13 @@ public: case Locate_type::EDGE: { CGAL_assertion(_cell_iterator == _cell_iterator.end() - || triangulation().is_infinite(chnext) - || _curr_simplex != Simplex_type(Edge(chnext, linext, ljnext))); + || triangulation()->is_infinite(chnext) + || _curr_simplex != Simplex_3(Edge(chnext, linext, ljnext))); if (_cell_iterator == _cell_iterator.end()) - _curr_simplex = Simplex_type(); - else if (triangulation().is_infinite(chnext) - && _curr_simplex == Simplex_type(Edge(chnext, linext, ljnext))) + _curr_simplex = Simplex_3(); + else if (triangulation()->is_infinite(chnext) + && _curr_simplex == Simplex_3(Edge(chnext, linext, ljnext))) _curr_simplex = chnext; else _curr_simplex = shared_facet(get_edge(), Edge(chnext, linext, ljnext)); @@ -817,7 +775,7 @@ public: { CGAL_assertion(_cell_iterator == _cell_iterator.end() || get_vertex() != chnext->vertex(linext) - || triangulation().is_infinite(chnext)); + || triangulation()->is_infinite(chnext)); if (_cell_iterator == _cell_iterator.end()) { Cell_handle prev; @@ -843,13 +801,13 @@ public: } else { - if (triangulation().is_infinite(chnext) && get_vertex() == chnext->vertex(linext)) + if (triangulation()->is_infinite(chnext) && get_vertex() == chnext->vertex(linext)) _curr_simplex = chnext; else { Cell_handle ec; int ei, ej; - if (!triangulation().is_edge(get_vertex(), chnext->vertex(linext), ec, ei, ej)) + if (!triangulation()->is_edge(get_vertex(), chnext->vertex(linext), ec, ei, ej)) CGAL_assertion(false); _curr_simplex = Edge(ec, ei, ej); } @@ -866,7 +824,7 @@ public: default ://FACET CGAL_assertion(ltnext == Locate_type::FACET); if(chnext == Cell_handle()) - _curr_simplex = Simplex_type(); + _curr_simplex = Simplex_3(); else _curr_simplex = shared_cell(Facet(chnext, linext), get_vertex()); }; @@ -889,17 +847,17 @@ public: // provides a dereference operator. /* \return a pointer to the current cell. */ - const Simplex_type* operator->() { return &_curr_simplex; } + const Simplex_3* operator->() { return &_curr_simplex; } // provides an indirection operator. /* \return the current cell. */ - const Simplex_type& operator*() { return _curr_simplex; } + const Simplex_3& operator*() { return _curr_simplex; } // provides a conversion operator. - /* \return a handle to the current cell. + /* \return the current simplex */ - operator const Cell_handle() const { return Cell_handle(_cell_iterator); } + operator const Simplex_3() const { return _curr_simplex; } bool is_vertex() const { return _curr_simplex.dimension() == 0; } bool is_edge() const { return _curr_simplex.dimension() == 1; } @@ -911,7 +869,7 @@ public: return _cell_iterator.cell(); } - const Simplex_type& get_simplex() const { return _curr_simplex; } + const Simplex_3& get_simplex() const { return _curr_simplex; } Vertex_handle get_vertex() const { CGAL_assertion(is_vertex()); @@ -1045,7 +1003,7 @@ private: Vertex_handle nsv2 = (sv == v2a) ? v2b : v2a; typename Tr::Facet_circulator circ - = triangulation().incident_facets(e1); + = triangulation()->incident_facets(e1); typename Tr::Facet_circulator end = circ; do { @@ -1065,13 +1023,13 @@ private: Facet shared_facet(const Edge& e, const Vertex_handle v) const { typename Tr::Facet_circulator circ - = triangulation().incident_facets(e); + = triangulation()->incident_facets(e); typename Tr::Facet_circulator end = circ; do { Facet f = *circ; int i; - if (triangulation().has_vertex(f, v, i)) + if (triangulation()->has_vertex(f, v, i)) return f; } while (++circ != end); @@ -1083,7 +1041,7 @@ private: Cell_handle shared_cell(const Edge& e, const Vertex_handle v) const { typename Tr::Cell_circulator circ - = triangulation().incident_cells(e); + = triangulation()->incident_cells(e); typename Tr::Cell_circulator end = circ; do { @@ -1114,6 +1072,6 @@ private: } // namespace CGAL -#include +#include #endif // CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_H diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h similarity index 83% rename from Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h rename to Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h index d1410483443..884ba454282 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h @@ -27,12 +27,12 @@ namespace CGAL { template < class Tr, class Inc > Triangulation_segment_cell_iterator_3:: -Triangulation_segment_cell_iterator_3( const Tr& tr, Vertex_handle s, Vertex_handle t ) +Triangulation_segment_cell_iterator_3( const Tr* tr, Vertex_handle s, Vertex_handle t ) : _tr(tr) { - CGAL_triangulation_precondition( !_tr.is_infinite(s) ); - CGAL_triangulation_precondition( !_tr.is_infinite(t) ); + CGAL_triangulation_precondition( !_tr->is_infinite(s) ); + CGAL_triangulation_precondition( !_tr->is_infinite(t) ); CGAL_triangulation_precondition( s->point() != t->point() ); - CGAL_triangulation_precondition( _tr.dimension() >= 2 ); + CGAL_triangulation_precondition( _tr->dimension() >= 2 ); _source = s->point(); _target = t->point(); @@ -42,7 +42,7 @@ Triangulation_segment_cell_iterator_3( const Tr& tr, Vertex_handle s, Vertex_han Cell_handle c = s->cell(); // If a vertex of an infinite cell, we start inside the convex hull. int inf; - if( c->has_vertex( _tr.infinite_vertex(), inf ) ) + if( c->has_vertex( _tr->infinite_vertex(), inf ) ) c = c->neighbor(inf); _cur = Simplex( c, Tr::VERTEX, c->index(s), -1 ); @@ -52,13 +52,13 @@ Triangulation_segment_cell_iterator_3( const Tr& tr, Vertex_handle s, Vertex_han template < class Tr, class Inc > Triangulation_segment_cell_iterator_3:: -Triangulation_segment_cell_iterator_3( const Tr& tr, Vertex_handle s, const Point& t ) +Triangulation_segment_cell_iterator_3( const Tr* tr, Vertex_handle s, const Point& t ) : _tr(tr) { - CGAL_triangulation_precondition( !_tr.is_infinite(s) ); + CGAL_triangulation_precondition( !_tr->is_infinite(s) ); CGAL_triangulation_precondition( s->point() != t ); - CGAL_triangulation_precondition( _tr.dimension() >= 2 ); - CGAL_triangulation_precondition( _tr.dimension() == 3 || - orientation( *_tr.finite_facets_begin(), t ) == COPLANAR ); + CGAL_triangulation_precondition( _tr->dimension() >= 2 ); + CGAL_triangulation_precondition( _tr->dimension() == 3 || + orientation( *_tr->finite_facets_begin(), t ) == COPLANAR ); _source = s->point(); _target = t; @@ -68,7 +68,7 @@ Triangulation_segment_cell_iterator_3( const Tr& tr, Vertex_handle s, const Poin Cell_handle c = s->cell(); // If a vertex of an infinite cell, we start inside the convex hull. int inf; - if( c->has_vertex( _tr.infinite_vertex(), inf ) ) + if( c->has_vertex( _tr->infinite_vertex(), inf ) ) c = c->neighbor(inf); _cur = Simplex( c, Tr::VERTEX, c->index(s), -1 ); @@ -78,13 +78,13 @@ Triangulation_segment_cell_iterator_3( const Tr& tr, Vertex_handle s, const Poin template < class Tr, class Inc > Triangulation_segment_cell_iterator_3:: -Triangulation_segment_cell_iterator_3( const Tr& tr, const Point& s, Vertex_handle t, Cell_handle hint ) +Triangulation_segment_cell_iterator_3( const Tr* tr, const Point& s, Vertex_handle t, Cell_handle hint ) : _tr(tr) { - CGAL_triangulation_precondition( !_tr.is_infinite(t) ); + CGAL_triangulation_precondition( !_tr->is_infinite(t) ); CGAL_triangulation_precondition( s != t->point() ); - CGAL_triangulation_precondition( _tr.dimension() >= 2 ); - CGAL_triangulation_precondition( _tr.dimension() == 3 || - orientation( *_tr.finite_facets_begin(), s ) == COPLANAR ); + CGAL_triangulation_precondition( _tr->dimension() >= 2 ); + CGAL_triangulation_precondition( _tr->dimension() == 3 || + orientation( *_tr->finite_facets_begin(), s ) == COPLANAR ); _source = s; _target = t->point(); @@ -92,7 +92,7 @@ Triangulation_segment_cell_iterator_3( const Tr& tr, const Point& s, Vertex_hand _t_vertex = t; using CGAL::cpp11::get; - get<0>(_cur) = _tr.locate( s, get<1>(_cur), get<2>(_cur), get<3>(_cur), hint ); + get<0>(_cur) = _tr->locate( s, get<1>(_cur), get<2>(_cur), get<3>(_cur), hint ); CGAL_triangulation_postcondition( get<0>(_cur) != Cell_handle() ); @@ -101,12 +101,12 @@ Triangulation_segment_cell_iterator_3( const Tr& tr, const Point& s, Vertex_hand template < class Tr, class Inc > Triangulation_segment_cell_iterator_3:: -Triangulation_segment_cell_iterator_3( const Tr& tr, const Point& s, const Point& t, Cell_handle hint ) +Triangulation_segment_cell_iterator_3( const Tr* tr, const Point& s, const Point& t, Cell_handle hint ) : _tr(tr) { CGAL_triangulation_precondition( s != t ); - CGAL_triangulation_precondition( _tr.dimension() >= 2 ); - CGAL_triangulation_precondition( _tr.dimension() == 3 || - coplanar( *_tr.finite_facets_begin(), _target ) ); + CGAL_triangulation_precondition( _tr->dimension() >= 2 ); + CGAL_triangulation_precondition( _tr->dimension() == 3 || + coplanar( *_tr->finite_facets_begin(), _target ) ); _source = s; _target = t; @@ -114,7 +114,7 @@ Triangulation_segment_cell_iterator_3( const Tr& tr, const Point& s, const Point _t_vertex = Vertex_handle(); using CGAL::cpp11::get; - get<0>(_cur) = _tr.locate( s, get<1>(_cur), get<2>(_cur), get<3>(_cur), hint ); + get<0>(_cur) = _tr->locate( s, get<1>(_cur), get<2>(_cur), get<3>(_cur), hint ); CGAL_triangulation_postcondition( get<0>(_cur) != Cell_handle() ); @@ -123,12 +123,12 @@ Triangulation_segment_cell_iterator_3( const Tr& tr, const Point& s, const Point template < class Tr, class Inc > Triangulation_segment_cell_iterator_3:: -Triangulation_segment_cell_iterator_3( const Tr& tr, const Segment& s, Cell_handle hint ) +Triangulation_segment_cell_iterator_3( const Tr* tr, const Segment& s, Cell_handle hint ) : Triangulation_segment_cell_iterator_3( tr, s.source(), s.target(), hint ) {} template < class Tr, class Inc > Triangulation_segment_cell_iterator_3:: -Triangulation_segment_cell_iterator_3( const Tr& tr ) +Triangulation_segment_cell_iterator_3( const Tr* tr ) : _tr(tr) {} template < class Tr, class Inc > @@ -271,10 +271,10 @@ walk_to_next() { // Walks to the next cell over a facet intersected by the line from source to target. // This method is based on Triangulation_3::locate(). int inf; - switch( _tr.dimension() ) { + switch( _tr->dimension() ) { case 3: { // Infinite cells should be handled differently. - if( get<0>(_cur)->has_vertex( _tr.infinite_vertex(), inf ) ) + if( get<0>(_cur)->has_vertex( _tr->infinite_vertex(), inf ) ) walk_to_next_3_inf( inf ); else { @@ -285,13 +285,13 @@ walk_to_next() { _cur = p.second; } while (get<0>(_cur) != Cell_handle()//end - && !get<0>(_cur)->has_vertex(_tr.infinite_vertex(), inf) + && !get<0>(_cur)->has_vertex(_tr->infinite_vertex(), inf) && have_same_entry(backup, _cur)); } break; } case 2: { - if( get<0>(_cur)->has_vertex( _tr.infinite_vertex(), inf ) ) + if( get<0>(_cur)->has_vertex( _tr->infinite_vertex(), inf ) ) walk_to_next_2_inf( inf ); else walk_to_next_2(); @@ -299,17 +299,17 @@ walk_to_next() { } } #ifdef CGAL_TRIANGULATION_3_TRAVERSER_CHECK_INTERSECTION - if(_tr.dimension() == 3) + if(_tr->dimension() == 3) { Cell_handle c = get<0>(_cur); - if (c != Cell_handle() && !_tr.is_infinite(c)) //hard to say anything in this case + if (c != Cell_handle() && !_tr->is_infinite(c)) //hard to say anything in this case { typename Tr::Segment seg(_source, _target); bool intersects = false; for (int i = 0; i < 4; ++i) { - if (!_tr.is_infinite(c, i) - && CGAL::do_intersect(_tr.triangle(c, i), seg)) + if (!_tr->is_infinite(c, i) + && CGAL::do_intersect(_tr->triangle(c, i), seg)) { intersects = true; break; @@ -343,8 +343,8 @@ have_same_entry(const Simplex& s1, const Simplex& s2) const || (v1a == v2b && v1b == v2a); } case Locate_type::FACET: - return triangulation().are_equal(Facet(get<0>(s1), get<2>(s1)), - Facet(get<0>(s2), get<2>(s2))); + return triangulation()->are_equal(Facet(get<0>(s1), get<2>(s1)), + Facet(get<0>(s2), get<2>(s2))); default: CGAL_assertion(false); }; @@ -373,11 +373,11 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre int j0 = Tr::vertex_triple_index(i, 0); int j1 = Tr::vertex_triple_index(i, 1); int j2 = Tr::vertex_triple_index(i, 2); - Orientation o0 = _tr.orientation(_source, *vert[i], *vert[j0], _target); + Orientation o0 = _tr->orientation(_source, *vert[i], *vert[j0], _target); if (o0 == POSITIVE) { - Orientation o1 = _tr.orientation(_source, *vert[i], *vert[j1], _target); + Orientation o1 = _tr->orientation(_source, *vert[i], *vert[j1], _target); if (o1 != POSITIVE) { - if (_tr.orientation(*vert[i], *vert[j0], *vert[j1], _target) == POSITIVE) { + if (_tr->orientation(*vert[i], *vert[j0], *vert[j1], _target) == POSITIVE) { nnext = get<0>(cur)->neighbor(j2); outside = j2; if (o1 == ZERO) degenerate = 1; //EDGE i j1 @@ -386,7 +386,7 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre inside = 1; } else { - if (_tr.orientation(*vert[i], *vert[j1], *vert[j2], _target) == POSITIVE) { + if (_tr->orientation(*vert[i], *vert[j1], *vert[j2], _target) == POSITIVE) { nnext = get<0>(cur)->neighbor(j0); outside = j0; } @@ -395,9 +395,9 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre } } else if (o0 == ZERO) { - Orientation o1 = _tr.orientation(_source, *vert[i], *vert[j1], _target); + Orientation o1 = _tr->orientation(_source, *vert[i], *vert[j1], _target); if (o1 == NEGATIVE) { - if (_tr.orientation(*vert[i], *vert[j0], *vert[j1], _target) == POSITIVE) { + if (_tr->orientation(*vert[i], *vert[j0], *vert[j1], _target) == POSITIVE) { nnext = get<0>(cur)->neighbor(j2); //EDGE i j0 degenerate = 2; outside = 44; @@ -406,7 +406,7 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre inside = 3; } else if (o1 == ZERO) { - if (_tr.orientation(*vert[i], *vert[j0], *vert[j2], _target) == POSITIVE) + if (_tr->orientation(*vert[i], *vert[j0], *vert[j2], _target) == POSITIVE) inside = 55; else { @@ -416,7 +416,7 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre } } else { - if (_tr.orientation(*vert[i], *vert[j1], *vert[j2], _target) == POSITIVE) { + if (_tr->orientation(*vert[i], *vert[j1], *vert[j2], _target) == POSITIVE) { nnext = get<0>(cur)->neighbor(j0); outside = j0; } @@ -425,9 +425,9 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre } } else { - Orientation o2 = _tr.orientation(_source, *vert[i], *vert[j2], _target); + Orientation o2 = _tr->orientation(_source, *vert[i], *vert[j2], _target); if (o2 != NEGATIVE) { - if (_tr.orientation(*vert[i], *vert[j2], *vert[j0], _target) == POSITIVE) { + if (_tr->orientation(*vert[i], *vert[j2], *vert[j0], _target) == POSITIVE) { nnext = get<0>(cur)->neighbor(j1); outside = j1; if (o2 == ZERO) degenerate = 4; // EDGE i j2 @@ -436,7 +436,7 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre inside = 5; } else { - if (_tr.orientation(*vert[i], *vert[j1], *vert[j2], _target) == POSITIVE) { + if (_tr->orientation(*vert[i], *vert[j1], *vert[j2], _target) == POSITIVE) { nnext = get<0>(cur)->neighbor(j0); outside = j0; } @@ -504,7 +504,7 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre vert[li] = &_target; // Check if the target is on the opposite side of the supporting plane. - op[li] = _tr.orientation( *vert[0], *vert[1], *vert[2], *vert[3] ); + op[li] = _tr->orientation( *vert[0], *vert[1], *vert[2], *vert[3] ); if( op[li] == POSITIVE ) pos += li; if( op[li] != NEGATIVE ) { @@ -527,7 +527,7 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre if( !calc[oij] ) { const Point* backup2 = vert[lj]; vert[lj] = &_source; - o[oij] = _tr.orientation( *vert[0], *vert[1], *vert[2], *vert[3] ); + o[oij] = _tr->orientation( *vert[0], *vert[1], *vert[2], *vert[3] ); vert[lj] = backup2; calc[oij] = true; } @@ -663,7 +663,7 @@ template < class Tr, class Inc > void Triangulation_segment_cell_iterator_3:: walk_to_next_3_inf( int inf ) { using CGAL::cpp11::get; - CGAL_triangulation_precondition( _tr.is_infinite( get<0>(_cur)->vertex(inf) ) ); + CGAL_triangulation_precondition( _tr->is_infinite( get<0>(_cur)->vertex(inf) ) ); // If this cell was reached by traversal from a finite one, it must be the final cell. Cell_handle fin = get<0>(_cur)->neighbor(inf); @@ -681,7 +681,7 @@ walk_to_next_3_inf( int inf ) { Orientation o[4]; // Check if the target lies outside the convex hull. - if( _tr.orientation( *vert[0], *vert[1], *vert[2], *vert[3] ) == POSITIVE ) { + if( _tr->orientation( *vert[0], *vert[1], *vert[2], *vert[3] ) == POSITIVE ) { // The target lies in an infinite cell. // Note that we do not traverse to other infinite cells. _prev = Simplex( get<0>(_cur), Tr::OUTSIDE_CONVEX_HULL, -1, -1 ); @@ -690,7 +690,7 @@ walk_to_next_3_inf( int inf ) { } vert[inf] = &(_source); - CGAL_triangulation_assertion( _tr.orientation( *vert[0], *vert[1], *vert[2], *vert[3] ) == POSITIVE ); + CGAL_triangulation_assertion( _tr->orientation( *vert[0], *vert[1], *vert[2], *vert[3] ) == POSITIVE ); int li = 0; // Check if the line enters an adjacent infinite cell. @@ -711,7 +711,7 @@ walk_to_next_3_inf( int inf ) { Point* backup = vert[li]; vert[li] = &(_target); - o[li] = _tr.orientation( *vert[0], *vert[1], *vert[2], *vert[3] ); + o[li] = _tr->orientation( *vert[0], *vert[1], *vert[2], *vert[3] ); if( o[li] != NEGATIVE ) { vert[li] = backup; @@ -720,7 +720,7 @@ walk_to_next_3_inf( int inf ) { // The target lies behind the plane through the source and two finite vertices. // Traverse to the incident infinite cell. - CGAL_triangulation_assertion( _tr.is_infinite( next ) ); + CGAL_triangulation_assertion( _tr->is_infinite( next ) ); _prev = Simplex( get<0>(_cur), Tr::FACET, li, -1 ); _cur = Simplex( next, Tr::FACET, next->index( get<0>(_prev) ), -1 ); return; @@ -784,17 +784,17 @@ walk_to_next_2() switch( get<1>(_cur) ) { case Tr::VERTEX: { // First we try the incident edges. - Orientation ocw = CGAL::coplanar_orientation( *vert[get<2>(_cur)], *vert[_tr.cw(get<2>(_cur))], *vert[_tr.ccw(get<2>(_cur))], _target ); - if( get<0>(_cur)->neighbor( _tr.ccw(get<2>(_cur)) ) != get<0>(_prev) && ocw == NEGATIVE) { - Cell_handle tmp = get<0>(_cur)->neighbor( _tr.ccw(get<2>(_cur)) ); + Orientation ocw = CGAL::coplanar_orientation( *vert[get<2>(_cur)], *vert[_tr->cw(get<2>(_cur))], *vert[_tr->ccw(get<2>(_cur))], _target ); + if( get<0>(_cur)->neighbor( _tr->ccw(get<2>(_cur)) ) != get<0>(_prev) && ocw == NEGATIVE) { + Cell_handle tmp = get<0>(_cur)->neighbor( _tr->ccw(get<2>(_cur)) ); _prev = _cur; get<0>(_cur) = tmp; get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex(get<2>(_cur)) ); return; } - Orientation occw = CGAL::coplanar_orientation( *vert[get<2>(_cur)], *vert[_tr.ccw(get<2>(_cur))], *vert[_tr.cw(get<2>(_cur))], _target ); - if( get<0>(_cur)->neighbor( _tr.cw(get<2>(_cur)) ) != get<0>(_prev) && occw == NEGATIVE) { - Cell_handle tmp = get<0>(_cur)->neighbor( _tr.cw(get<2>(_cur)) ); + Orientation occw = CGAL::coplanar_orientation( *vert[get<2>(_cur)], *vert[_tr->ccw(get<2>(_cur))], *vert[_tr->cw(get<2>(_cur))], _target ); + if( get<0>(_cur)->neighbor( _tr->cw(get<2>(_cur)) ) != get<0>(_prev) && occw == NEGATIVE) { + Cell_handle tmp = get<0>(_cur)->neighbor( _tr->cw(get<2>(_cur)) ); _prev = _cur; get<0>(_cur) = tmp; get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex(get<2>(_cur)) ); @@ -802,7 +802,7 @@ walk_to_next_2() } // Then we try the opposite edge. - Orientation op = CGAL::coplanar_orientation( *vert[_tr.ccw(get<2>(_cur))], *vert[_tr.cw(get<2>(_cur))], *vert[get<2>(_cur)], _target ); + Orientation op = CGAL::coplanar_orientation( *vert[_tr->ccw(get<2>(_cur))], *vert[_tr->cw(get<2>(_cur))], *vert[get<2>(_cur)], _target ); if( op == NEGATIVE) { Cell_handle tmp = get<0>(_cur)->neighbor(get<2>(_cur)); get<0>(_prev) = get<0>(_cur); @@ -811,8 +811,8 @@ walk_to_next_2() switch( ocw+occw ) { case 2: get<1>(_prev) = Tr::EDGE; - get<2>(_prev) = _tr.ccw( get<2>(_cur) ); - get<3>(_prev) = _tr.cw( get<2>(_cur) ); + get<2>(_prev) = _tr->ccw( get<2>(_cur) ); + get<3>(_prev) = _tr->cw( get<2>(_cur) ); get<1>(_cur) = Tr::EDGE; get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); get<3>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<3>(_prev) ) ); @@ -820,8 +820,8 @@ walk_to_next_2() case 1: get<1>(_prev) = Tr::VERTEX; get<1>(_cur) = Tr::VERTEX; - if( ocw == COLLINEAR ) get<2>(_prev) = _tr.cw( get<2>(_cur) ); - else get<2>(_cur) = _tr.ccw( get<2>(_cur) ); + if( ocw == COLLINEAR ) get<2>(_prev) = _tr->cw( get<2>(_cur) ); + else get<2>(_cur) = _tr->ccw( get<2>(_cur) ); get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); return; default: @@ -838,17 +838,17 @@ walk_to_next_2() break; case 2: if( ocw == 0 ) - _prev = Simplex( get<0>(_cur), Tr::EDGE, _tr.ccw(get<2>(_cur)), -1 ); + _prev = Simplex( get<0>(_cur), Tr::EDGE, _tr->ccw(get<2>(_cur)), -1 ); else if( occw == 0 ) - _prev = Simplex( get<0>(_cur), Tr::EDGE, _tr.cw(get<2>(_cur)), -1 ); + _prev = Simplex( get<0>(_cur), Tr::EDGE, _tr->cw(get<2>(_cur)), -1 ); else _prev = Simplex( get<0>(_cur), Tr::EDGE, get<2>(_cur), -1 ); break; case 1: if( ocw == 1 ) - _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr.ccw(get<2>(_cur)), -1 ); + _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr->ccw(get<2>(_cur)), -1 ); else if( occw == 1 ) - _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr.cw(get<2>(_cur)), -1 ); + _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr->cw(get<2>(_cur)), -1 ); else _prev = Simplex( get<0>(_cur), Tr::VERTEX, get<2>(_cur), -1 ); break; @@ -973,37 +973,37 @@ walk_to_next_2() Orientation o[3]; bool calc[3] = { false, false, false }; - for( int j = 0; j != 3; ++j, li = _tr.ccw(li) ) { + for( int j = 0; j != 3; ++j, li = _tr->ccw(li) ) { Cell_handle next = get<0>(_cur)->neighbor(li); if( next == get<0>(_prev) ) continue; // The target should lie on the other side of the edge. - Orientation op = CGAL::coplanar_orientation( *vert[_tr.ccw(li)], *vert[_tr.cw(li)], *vert[li], _target ); + Orientation op = CGAL::coplanar_orientation( *vert[_tr->ccw(li)], *vert[_tr->cw(li)], *vert[li], _target ); if( op == POSITIVE ) continue; // The target should lie inside the wedge. - if( !calc[_tr.ccw(li)] ) { - o[_tr.ccw(li)] = CGAL::coplanar_orientation( _source, *vert[_tr.ccw(li)], *vert[_tr.cw(li)], _target ); - calc[_tr.ccw(li)] = true; + if( !calc[_tr->ccw(li)] ) { + o[_tr->ccw(li)] = CGAL::coplanar_orientation( _source, *vert[_tr->ccw(li)], *vert[_tr->cw(li)], _target ); + calc[_tr->ccw(li)] = true; } - if( o[_tr.ccw(li)] == NEGATIVE ) + if( o[_tr->ccw(li)] == NEGATIVE ) continue; - else if( op == COLLINEAR && o[_tr.ccw(li)] == COLLINEAR ) { - _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr.ccw(li), -1 ); + else if( op == COLLINEAR && o[_tr->ccw(li)] == COLLINEAR ) { + _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr->ccw(li), -1 ); get<0>(_cur) = Cell_handle(); return; } - if( !calc[_tr.cw(li)] ) { - o[_tr.cw(li)] = CGAL::coplanar_orientation( _source, *vert[_tr.cw(li)], *vert[li], _target ); - calc[_tr.cw(li)] = true; + if( !calc[_tr->cw(li)] ) { + o[_tr->cw(li)] = CGAL::coplanar_orientation( _source, *vert[_tr->cw(li)], *vert[li], _target ); + calc[_tr->cw(li)] = true; } - if( o[_tr.cw(li)] == POSITIVE ) + if( o[_tr->cw(li)] == POSITIVE ) continue; - else if( op == COLLINEAR && o[_tr.cw(li)] == COLLINEAR ) { - _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr.cw(li), -1 ); + else if( op == COLLINEAR && o[_tr->cw(li)] == COLLINEAR ) { + _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr->cw(li), -1 ); get<0>(_cur) = Cell_handle(); return; } @@ -1011,20 +1011,20 @@ walk_to_next_2() get<0>(_prev) = get<0>(_cur); get<0>(_cur) = next; - switch( o[_tr.ccw(li)] + o[_tr.cw(li)] ) { + switch( o[_tr->ccw(li)] + o[_tr->cw(li)] ) { case 2: get<1>(_prev) = Tr::EDGE; - get<2>(_prev) = _tr.ccw(li); - get<3>(_prev) = _tr.cw(li); + get<2>(_prev) = _tr->ccw(li); + get<3>(_prev) = _tr->cw(li); get<1>(_cur) = Tr::EDGE; - get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( _tr.ccw(li) ) ); - get<3>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( _tr.cw(li) ) ); + get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( _tr->ccw(li) ) ); + get<3>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( _tr->cw(li) ) ); return; case 1: get<1>(_prev) = Tr::VERTEX; get<1>(_cur) = Tr::VERTEX; - if( o[_tr.ccw(li)] == COLLINEAR ) get<2>(_prev) = _tr.ccw(li); - else get<2>(_prev) = _tr.cw(li); + if( o[_tr->ccw(li)] == COLLINEAR ) get<2>(_prev) = _tr->ccw(li); + else get<2>(_prev) = _tr->cw(li); get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); return; default: @@ -1047,8 +1047,8 @@ template < class Tr, class Inc > void Triangulation_segment_cell_iterator_3:: walk_to_next_2_inf( int inf ) { using CGAL::cpp11::get; - CGAL_triangulation_precondition( _tr.is_infinite( get<0>(_cur)->vertex(3) ) ); - CGAL_triangulation_precondition( _tr.is_infinite( get<0>(_cur)->vertex(inf) ) ); + CGAL_triangulation_precondition( _tr->is_infinite( get<0>(_cur)->vertex(3) ) ); + CGAL_triangulation_precondition( _tr->is_infinite( get<0>(_cur)->vertex(inf) ) ); // If this cell was reached by traversal from a finite one, it must be the final cell. Cell_handle fin = get<0>(_cur)->neighbor(inf); @@ -1060,56 +1060,56 @@ walk_to_next_2_inf( int inf ) { // Check the neighboring cells. Orientation occw = CGAL::coplanar_orientation( _source, - get<0>(_cur)->vertex( _tr.ccw(inf))->point(), - get<0>(_cur)->vertex(_tr.cw(inf))->point(), + get<0>(_cur)->vertex( _tr->ccw(inf))->point(), + get<0>(_cur)->vertex(_tr->cw(inf))->point(), _target ); if( occw == NEGATIVE ) { - Cell_handle tmp = get<0>(_cur)->neighbor(_tr.cw(inf)); - _prev = Simplex( get<0>(_cur), Tr::EDGE, _tr.ccw(inf), inf ); + Cell_handle tmp = get<0>(_cur)->neighbor(_tr->cw(inf)); + _prev = Simplex( get<0>(_cur), Tr::EDGE, _tr->ccw(inf), inf ); _cur = Simplex( tmp, Tr::EDGE, tmp->index( get<0>(_prev)->vertex( get<2>(_prev) ) ), tmp->index( get<0>(_prev)->vertex( get<3>(_prev) ) ) ); return; } Orientation ocw = CGAL::coplanar_orientation( _source, - get<0>(_cur)->vertex( _tr.cw(inf))->point(), - get<0>(_cur)->vertex(_tr.ccw(inf))->point(), + get<0>(_cur)->vertex( _tr->cw(inf))->point(), + get<0>(_cur)->vertex(_tr->ccw(inf))->point(), _target ); if( ocw == NEGATIVE ) { - Cell_handle tmp = get<0>(_cur)->neighbor(_tr.ccw(inf)); - _prev = Simplex( get<0>(_cur), Tr::EDGE, _tr.cw(inf), inf ); + Cell_handle tmp = get<0>(_cur)->neighbor(_tr->ccw(inf)); + _prev = Simplex( get<0>(_cur), Tr::EDGE, _tr->cw(inf), inf ); _cur = Simplex( tmp, Tr::EDGE, tmp->index( get<0>(_prev)->vertex( get<2>(_prev) ) ), tmp->index( get<0>(_prev)->vertex( get<3>(_prev) ) ) ); return; } Orientation op = CGAL::coplanar_orientation( - get<0>(_cur)->vertex( _tr.ccw(inf) )->point(), - get<0>(_cur)->vertex( _tr.cw(inf) )->point(), + get<0>(_cur)->vertex( _tr->ccw(inf) )->point(), + get<0>(_cur)->vertex( _tr->cw(inf) )->point(), _source, _target ); switch( op ) { case NEGATIVE: if( occw == COLLINEAR ) { - _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr.ccw(inf), -1 ); + _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr->ccw(inf), -1 ); _cur = Simplex( fin, Tr::VERTEX, fin->index( get<0>(_prev)->vertex( get<2>(_prev) ) ), -1 ); return; } if( ocw == COLLINEAR ) { - _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr.cw(inf), -1 ); + _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr->cw(inf), -1 ); _cur = Simplex( fin, Tr::VERTEX, fin->index( get<0>(_prev)->vertex( get<2>(_prev) ) ), -1 ); return; } - _prev = Simplex( get<0>(_cur), Tr::EDGE, _tr.ccw(inf), _tr.cw(inf) ); + _prev = Simplex( get<0>(_cur), Tr::EDGE, _tr->ccw(inf), _tr->cw(inf) ); _cur = Simplex( fin, Tr::EDGE, fin->index( get<0>(_prev)->vertex( get<2>(_prev) ) ), fin->index( get<0>(_prev)->vertex( get<3>(_prev) ) ) ); return; case COLLINEAR: if( occw == COLLINEAR ) { - _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr.ccw(inf), -1 ); + _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr->ccw(inf), -1 ); get<0>(_cur) = Cell_handle(); return; } if( ocw == COLLINEAR ) { - _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr.cw(inf), -1 ); + _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr->cw(inf), -1 ); get<0>(_cur) = Cell_handle(); return; } - _prev = Simplex( get<0>(_cur), Tr::EDGE, _tr.ccw(inf), _tr.cw(inf) ); + _prev = Simplex( get<0>(_cur), Tr::EDGE, _tr->ccw(inf), _tr->cw(inf) ); get<0>(_cur) = Cell_handle(); return; case POSITIVE: @@ -1125,7 +1125,7 @@ CGAL::Orientation Triangulation_segment_cell_iterator_3::orientation( const Facet& f, const Point& p) const { - return _tr.orientation( + return _tr->orientation( f.first->vertex(Tr::vertex_triple_index(f.second, 0))->point(), f.first->vertex(Tr::vertex_triple_index(f.second, 1))->point(), f.first->vertex(Tr::vertex_triple_index(f.second, 2))->point(), diff --git a/Triangulation_3/test/Triangulation_3/test_segment_cell_traverser_3.cpp b/Triangulation_3/test/Triangulation_3/test_segment_cell_traverser_3.cpp index bf6ef9afd93..a947a952d60 100644 --- a/Triangulation_3/test/Triangulation_3/test_segment_cell_traverser_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_segment_cell_traverser_3.cpp @@ -1,30 +1,20 @@ #include #include -#include #include #include #include -#include -#include -#include -#include -#include - -//#define CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE // Define the kernel. typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; typedef Kernel::Point_3 Point_3; // Define the structure. -typedef CGAL::Delaunay_triangulation_3< Kernel > DT; - -typedef DT::Cell_handle Cell_handle; - -typedef CGAL::Triangulation_segment_cell_iterator_3< DT > Cell_traverser; +typedef CGAL::Delaunay_triangulation_3< Kernel > DT; +typedef DT::Cell_handle Cell_handle; +typedef DT::Segment_cell_iterator Segment_cell_iterator; int main(int argc, char* argv[]) { @@ -42,72 +32,44 @@ int main(int argc, char* argv[]) { 10, 10, 10 }, { 10, -10, 10 }, }; + std::vector vertices; vertices.reserve(points.size()); + DT dt; for(auto p: points) vertices.push_back(dt.insert(p)); - DT::Cell_handle c; + + Cell_handle c; assert( dt.is_valid() ); - assert(dt.is_cell(vertices[0], vertices[2], vertices[3], vertices[4], c)); - assert(dt.is_cell(vertices[1], vertices[2], vertices[3], vertices[4], c)); + assert( dt.is_cell(vertices[0], vertices[2], vertices[3], vertices[4], c)); + assert( dt.is_cell(vertices[1], vertices[2], vertices[3], vertices[4], c)); std::cerr << dt.number_of_finite_cells() << '\n'; - Cell_traverser ct(dt, points[0], points[1]); + Segment_cell_iterator ct = dt.segment_traverser_cells_begin(points[0], points[1]); + Segment_cell_iterator ctend = dt.segment_traverser_cells_end(points[0], points[1]); + unsigned int nb_cells = 0, nb_facets = 0, nb_edges = 0, nb_vertex = 0; + // Count the number of finite cells traversed. + unsigned int inf = 0, fin = 0; + while(ct != ctend) + { + std::cerr << "Cell ( "; + for(int i = 0; i < 4; ++i) + std::cerr << ct->vertex(i)->point() << " "; + std::cerr << " )\n"; -// Count the number of finite cells traversed. - unsigned int inf = 0, fin = 0; - for( ; ct != ct.end(); ++ct ) - { - std::cerr << "Cell ( "; - for(int i = 0; i < 4; ++i) - std::cerr << ct->vertex(i)->point() << " "; - std::cerr << " )\n"; - + if( dt.is_infinite(ct) ) + ++inf; + else + ++fin; - if( dt.is_infinite(ct) ) - ++inf; - else - { - ++fin; + ++ct; + } - DT::Locate_type lt; - int li, lj; - ct.entry(lt, li, lj); + std::cout << "While traversing from " << points[0] + << " to " << points[1] << std::endl; + std::cout << inf << " infinite and " + << fin << " finite cells were visited." << std::endl; - switch (lt) - { - case DT::Locate_type::FACET: - ++nb_facets; - break; - case DT::Locate_type::EDGE: - ++nb_edges; - break; - case DT::Locate_type::VERTEX: - ++nb_vertex; - break; - default: - /*when source is in a cell*/ - ++nb_cells; - CGAL_assertion(lt == DT::Locate_type::CELL); - } - } - } - -#ifdef CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE - std::cout << "While traversing from " << ct.source() - << " to " << ct.target() << std::endl; - std::cout << inf << " infinite and " - << fin << " finite cells were visited." << std::endl; - std::cout << std::endl << std::endl; -#endif - - std::cout << "Triangulation has " << dt.number_of_vertices() << " vertices." - << std::endl; - std::cout << "\tnb cells : " << nb_cells << std::endl; - std::cout << "\tnb facets : " << nb_facets << std::endl; - std::cout << "\tnb edges : " << nb_edges << std::endl; - std::cout << "\tnb vertices : " << nb_vertex << std::endl; - - return 0; + return 0; } diff --git a/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp b/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp index 15635868dbf..05830b55508 100644 --- a/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp @@ -12,25 +12,18 @@ #include #define CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE -#define CGAL_T3_TEST_SIMPLEX_TRAVERSER // Define the kernel. typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; typedef Kernel::Point_3 Point_3; // Define the structure. -typedef CGAL::Delaunay_triangulation_3< Kernel > DT; - -typedef DT::Cell_handle Cell_handle; - -#ifdef CGAL_T3_TEST_SIMPLEX_TRAVERSER -typedef CGAL::Triangulation_segment_simplex_iterator_3
Traverser; -#else -typedef CGAL::Triangulation_segment_cell_iterator_3
Traverser; -#endif +typedef CGAL::Delaunay_triangulation_3 DT; +typedef DT::Cell_handle Cell_handle; +typedef DT::Segment_simplex_iterator Segment_simplex_iterator; template -bool test(const DT dt, const Big_tuple& tuple); +bool test(const DT& dt, const Big_tuple& tuple); int main(int, char* []) { @@ -52,20 +45,20 @@ int main(int, char* []) vertices.reserve(points.size()); DT dt; for(auto p: points) vertices.push_back(dt.insert(p)); - DT::Cell_handle c; - assert( dt.is_valid() ); + Cell_handle c; + assert(dt.is_valid()); assert(dt.is_cell(vertices[0], vertices[2], vertices[3], vertices[4], c)); assert(dt.is_cell(vertices[1], vertices[2], vertices[3], vertices[4], c)); std::cerr << dt.number_of_finite_cells() << '\n'; const std::vector < std::tuple>> queries = { - // {{-1, 0, 0}, { 1, 0, 0}, {0, 0, 1, 2}}, // CFC - // {{-1, 0, 0}, { 2, 0, 0}, {1, 0, 1, 2}}, // CFCV - // {{ 2, 0, 0}, {-1, 0, 0}, {1, 0, 1, 2}}, // reverse - // {{-2, 0, 0}, { 2, 0, 0}, {2, 0, 1, 2}}, // VCFCV - // {{ 2, 0, 0}, {-2, 0, 0}, {2, 0, 1, 2}}, // reverse case: VCFCV - // {{-3, 0, 0}, { 3, 0, 0}, {2, 0, 3, 2}}, // FVCFCVF + {{-1, 0, 0}, { 1, 0, 0}, {0, 0, 1, 2}}, // CFC + {{-1, 0, 0}, { 2, 0, 0}, {1, 0, 1, 2}}, // CFCV + {{ 2, 0, 0}, {-1, 0, 0}, {1, 0, 1, 2}}, // reverse + {{-2, 0, 0}, { 2, 0, 0}, {2, 0, 1, 2}}, // VCFCV + {{ 2, 0, 0}, {-2, 0, 0}, {2, 0, 1, 2}}, // reverse case: VCFCV + {{-3, 0, 0}, { 3, 0, 0}, {2, 0, 3, 2}}, // FVCFCVF {{-2, 0, 0}, { 2, 2, -2}, {2, 1, 1, 0}}, // VEVF {{ 2, 2, -2}, {-2, 0, 0}, {2, 1, 1, 0}}, // reverse case: FVEV }; @@ -78,7 +71,8 @@ int main(int, char* []) } template -bool test(const DT dt, const Big_tuple& tuple) { +bool test(const DT& dt, const Big_tuple& tuple) +{ bool result = true; using std::get; const auto& p1 = get<0>(tuple); @@ -87,15 +81,18 @@ bool test(const DT dt, const Big_tuple& tuple) { std::cout << "\n#\n# Query segment: ( " << p1 << " , " << p2 << " )\n#\n"; - Traverser st(dt, p1, p2); + Segment_simplex_iterator st = dt.segment_traverser_simplices_begin(p1, p2); + Segment_simplex_iterator stend = dt.segment_traverser_simplices_end(p1, p2); unsigned int nb_cells = 0, nb_facets = 0, nb_edges = 0, nb_vertex = 0; unsigned int nb_collinear = 0; // Count the number of finite cells traversed. unsigned int inf = 0, fin = 0; - for (; st != st.end(); ++st) { - if (Cell_handle(st) != Cell_handle() && dt.is_infinite(st)) + for (; st != stend; ++st) + { + if (st->dimension() == 3 + && dt.is_infinite(Cell_handle(*st))) ++inf; else { ++fin; diff --git a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp index cabc98ffaa9..0a5810f72ad 100644 --- a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp @@ -21,7 +21,6 @@ #include #include -#include #include #include @@ -45,9 +44,7 @@ typedef DT::Vertex_handle Vertex_handle; typedef DT::Cell_handle Cell_handle; typedef DT::Edge Edge; typedef DT::Facet Facet; - -typedef CGAL::Triangulation_segment_simplex_iterator_3
Simplex_traverser; - +typedef DT::Segment_simplex_iterator Segment_simplex_iterator; void test_vertex_edge_vertex(const DT& dt, const std::size_t& nb_tests) { @@ -70,29 +67,36 @@ void test_vertex_edge_vertex(const DT& dt, const std::size_t& nb_tests) << " ** " << v2->point() <<")" << std::endl; std::cout << "\t("; - Simplex_traverser st(dt, v1->point() - 2.*v, v2->point() + 3.*v); - for (; st != st.end(); ++st) + Segment_simplex_iterator st + = dt.segment_traverser_simplices_begin((v1->point() - 2.*v), + (v2->point() + 3.*v)); + Segment_simplex_iterator stend + = dt.segment_traverser_simplices_end((v1->point() - 2. * v), + (v2->point() + 3. * v)); + for (; st != stend; ++st) { - std::cout << st.simplex_dimension(); - if(Cell_handle(st) != Cell_handle() && dt.is_infinite(st)) + std::cout << st->dimension(); + if(st->dimension() == 3 + && Cell_handle(*st) != Cell_handle() + && dt.is_infinite(Cell_handle(*st))) std::cout << "i"; std::cout << " "; - if (st.is_vertex() && st.get_vertex() == v1) + if (st->dimension() == 0 && Vertex_handle(*st) == v1) { ++st; - std::cout << st.simplex_dimension() << " "; - assert(st.is_edge()); - Edge e = st.get_edge(); + std::cout << st->dimension() << " "; + assert(st->dimension() == 1); + Edge e(*st); Vertex_handle ve1 = e.first->vertex(e.second); Vertex_handle ve2 = e.first->vertex(e.third); assert((ve1 == v1 && ve2 == v2) || (ve1 == v2 && ve2 == v1)); ++st; - std::cout << st.simplex_dimension() << " "; - assert(st.is_vertex()); - assert(st.get_vertex() == v2); + std::cout << st->dimension() << " "; + assert(st->dimension() == 0); + assert(Vertex_handle(*st) == v2); } } std::cout << ")" << std::endl; @@ -123,30 +127,35 @@ void test_edge_facet_edge(const DT& dt, const std::size_t& nb_tests) std::cout << "TEST " << i << " (" << p1 << " ** " << p2 << ")" << std::endl; std::cout << "\t("; - Simplex_traverser st(dt, p1 - 2.*v, p2 + 3.*v); - for (; st != st.end(); ++st) + Segment_simplex_iterator st + = dt.segment_traverser_simplices_begin((p1 - 2. * v), (p2 + 3. * v)); + Segment_simplex_iterator stend + = dt.segment_traverser_simplices_end((p1 - 2. * v), (p2 + 3. * v)); + for (; st != stend; ++st) { - std::cout << st.simplex_dimension(); - if (Cell_handle(st) != Cell_handle() && dt.is_infinite(st)) + std::cout << st->dimension(); + if (st->dimension() == 3 + && Cell_handle(*st) != Cell_handle() + && dt.is_infinite(Cell_handle(*st))) std::cout << "i"; std::cout << " "; - if (st.is_edge()) + if (st->dimension() == 1) { - Edge e = st.get_edge(); + Edge e = *st; Vertex_handle va = e.first->vertex(e.second); Vertex_handle vb = e.first->vertex(e.third); if ((va == v1 && vb == v2) || (va == v2 && vb == v1)) { ++st; - std::cout << st.simplex_dimension() << " "; - assert(st.is_facet()); + std::cout << st->dimension() << " "; + assert(st->dimension() == 2); ++st; - std::cout << st.simplex_dimension() << " "; - assert(st.is_edge()); - Edge e2 = st.get_edge(); + std::cout << st->dimension() << " "; + assert(st->dimension() == 1); + Edge e2 = *st; Vertex_handle va2 = e2.first->vertex(e2.second); Vertex_handle vb2 = e2.first->vertex(e2.third); assert(va == va2 || va == vb2 || vb == va2 || vb == vb2); @@ -181,37 +190,42 @@ void test_edge_facet_vertex(const DT& dt, const std::size_t& nb_tests) std::cout << "TEST " << i << " (" << p1 << " ** " << p2 << ")" << std::endl; std::cout << "\t("; - Simplex_traverser st(dt, p1 - 2.*v, p2 + 3.*v); - Simplex_traverser end = st.end(); - for (; st != end; ++st) + Segment_simplex_iterator st + = dt.segment_traverser_simplices_begin((p1 - 2. * v), (p2 + 3. * v)); + Segment_simplex_iterator stend + = dt.segment_traverser_simplices_end((p1 - 2. * v), (p2 + 3. * v)); + for (; st != stend; ++st) { - std::cout << st.simplex_dimension(); - if (Cell_handle(st) != Cell_handle() && dt.is_infinite(st)) + std::cout << st->dimension(); + if (st->dimension() == 3 && dt.is_infinite(Cell_handle(*st))) std::cout << "i"; std::cout << " "; - if (st.is_edge()) + if (st->dimension() == 1) { - Edge e = st.get_edge(); + Edge e = *st; Vertex_handle va = e.first->vertex(e.second); Vertex_handle vb = e.first->vertex(e.third); if ((va == v1 && vb == v2) || (va == v2 && vb == v1)) { ++st; - std::cout << st.simplex_dimension() << " "; - assert(st.is_facet()); + std::cout << st->dimension() << " "; + assert(st->dimension() == 2); ++st; - std::cout << st.simplex_dimension() << " "; - assert(st.is_vertex()); - assert(st.get_vertex() == v3); + std::cout << st->dimension() << " "; + assert(st->dimension() == 0); + assert(Vertex_handle(*st) == v3); } ++st; - std::cout << st.simplex_dimension() << " "; - if (st == st.end()) + std::cout << st->dimension() << " "; + if (st == stend) break; - else if (dt.is_infinite(st)) std::cout << "i "; - assert(st.is_cell()); + else if (st->dimension() == 3 + && Cell_handle(*st) != Cell_handle() + && dt.is_infinite(Cell_handle(*st))) + std::cout << "i "; + assert(st->dimension() == 3); } } std::cout << ")" << std::endl; @@ -243,26 +257,28 @@ void test_vertex_facet_edge(const DT& dt, const std::size_t& nb_tests) std::cout << "TEST " << i << " (" << p1 << " ** " << p2 << ")" << std::endl; std::cout << "\t("; - Simplex_traverser st(dt, p1 - 2.*v, p2 + 3.*v); - Simplex_traverser end = st.end(); - for (; st != end; ++st) + Segment_simplex_iterator st = dt.segment_traverser_simplices_begin(p1 - 2.*v, p2 + 3.*v); + Segment_simplex_iterator stend = dt.segment_traverser_simplices_begin(p1 - 2. * v, p2 + 3. * v); + for (; st != stend; ++st) { - std::cout << st.simplex_dimension(); - if (Cell_handle(st) != Cell_handle() && dt.is_infinite(st)) + std::cout << st->dimension(); + if (st->dimension() == 3 + && Cell_handle(*st) != Cell_handle() + && dt.is_infinite(Cell_handle(*st))) std::cout << "i"; std::cout << " "; - if (st.is_vertex() && st.get_vertex() == v1) + if (st->dimension() == 0 && Vertex_handle(*st) == v1) { ++st; - std::cout << st.simplex_dimension() << " "; - assert(st.is_facet()); - assert(st.get_facet() == facets[i] - || st.get_facet() == dt.mirror_facet(facets[i])); + std::cout << st->dimension() << " "; + assert(st->dimension() == 2); + assert(Facet(*st) == facets[i] + || Facet(*st) == dt.mirror_facet(facets[i])); ++st; - std::cout << st.simplex_dimension() << " "; - assert(st.is_edge()); - Edge e = st.get_edge(); + std::cout << st->dimension() << " "; + assert(st->dimension() == 1); + Edge e(*st); Vertex_handle va = e.first->vertex(e.second); Vertex_handle vb = e.first->vertex(e.third); assert((va == v2 && vb == v3) || (va == v3 && vb == v2)); @@ -294,28 +310,27 @@ void test_triangulation_on_a_grid() //along a border of the cube queries[4] = Segment_3(Point_3(0., 0., 0.), Point_3(11., 0., 5.)); - BOOST_FOREACH(Segment_3 s, queries) + for(const Segment_3& s : queries) { std::cout << "Query segment : (" << s.source() << ") to (" << s.target() << ") ["; - Simplex_traverser st(dt, s); + Segment_simplex_iterator st = dt.segment_traverser_simplices_begin(s.source(), s.target()); + Segment_simplex_iterator stend = dt.segment_traverser_simplices_end(s.source(), s.target()); + unsigned int inf = 0, fin = 0; unsigned int nb_facets = 0, nb_edges = 0, nb_vertex = 0; - unsigned int nb_collinear = 0; for (; st != st.end(); ++st) { - std::cout << st.simplex_dimension() << " "; + std::cout << st->dimension() << " "; std::cout.flush(); - if (st.is_cell()) + if (st->dimension() == 3) { - if (dt.is_infinite(st)) ++inf; - else ++fin; + if (dt.is_infinite(Cell_handle(*st))) ++inf; + else ++fin; } - if (st.is_facet()) ++nb_facets; - else if (st.is_edge()) ++nb_edges; - else if (st.is_vertex()) ++nb_vertex; - - if (st.is_collinear()) ++nb_collinear; + if (st->dimension() == 2) ++nb_facets; + else if (st->dimension() == 1) ++nb_edges; + else if (st->dimension() == 0) ++nb_vertex; } std::cout << "\b]" << std::endl; @@ -324,7 +339,6 @@ void test_triangulation_on_a_grid() std::cout << "\tfacets : " << nb_facets << std::endl; std::cout << "\tedges : " << nb_edges << std::endl; std::cout << "\tvertices : " << nb_vertex << std::endl; - std::cout << "\tcollinear : " << nb_collinear << std::endl; std::cout << std::endl; } } @@ -368,28 +382,29 @@ int main(int argc, char* argv[]) std::cout << "Traverser " << (i + 1) << "\n\t(" << p1 << ")\n\t(" << p2 << ")" << std::endl; - Simplex_traverser st(dt, p1, p2); + Segment_simplex_iterator st = dt.segment_traverser_simplices_begin(p1, p2); + Segment_simplex_iterator stend = dt.segment_traverser_simplices_end(p1, p2); // Count the number of finite cells traversed. unsigned int inf = 0, fin = 0; unsigned int nb_facets = 0, nb_edges = 0, nb_vertex = 0; - unsigned int nb_collinear = 0; - for (; st != st.end(); ++st) + for (; st != stend; ++st) { - if (st.is_cell()) + if (st->dimension() == 3) { - if (Cell_handle(st) != Cell_handle() && dt.is_infinite(st)) ++inf; - else ++fin; + if (Cell_handle(*st) != Cell_handle() + && dt.is_infinite(Cell_handle(*st))) + ++inf; + else + ++fin; } - if (st.is_facet()) ++nb_facets; - else if (st.is_edge()) ++nb_edges; - else if (st.is_vertex()) ++nb_vertex; - - if (st.is_collinear()) ++nb_collinear; + if (st->dimension() == 2) ++nb_facets; + else if (st->dimension() == 1) ++nb_edges; + else if (st->dimension() == 0) ++nb_vertex; } - std::cout << "While traversing from " << st.source() - << " to " << st.target() << std::endl; + std::cout << "While traversing from " << p1 + << " to " << p2 << std::endl; std::cout << "\tinfinite cells : " << inf << std::endl; std::cout << "\tfinite cells : " << fin << std::endl; std::cout << "\tfacets : " << nb_facets << std::endl; From 101262fcd77cf9a7563f1f271b7682381bdb2092 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 3 Apr 2020 07:12:25 +0200 Subject: [PATCH 102/138] doc : add iterator type and value type for both iterators --- Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h index 9a5707bd622..120a4cf619b 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h @@ -223,6 +223,8 @@ typedef Triangulation_data_structure::Facet_circulator Facet_circulator; /*! \cgalModifBegin iterator over cells intersected by a line segment. +`Segment_cell_iterator` implements the concept `ForwardIterator` and is non-mutable. +Its value type is `Cell_handle`. \cgalModifEnd */ typedef unspecified_type Segment_cell_iterator; @@ -230,6 +232,8 @@ typedef unspecified_type Segment_cell_iterator; /*! \cgalModifBegin iterator over simplices intersected by a line segment. +`Segment_simplex_iterator` implements the concept `ForwardIterator` and is non-mutable. +Its value type is `Triangulation_simplex_3 `. \cgalModifEnd */ typedef unspecified_type Segment_simplex_iterator; From 5377911c81a104fb0d10842c7cbc066955d66fbe Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 3 Apr 2020 07:31:06 +0200 Subject: [PATCH 103/138] add input data --- .../examples/Triangulation_3/data/blobby.xyz | 3288 +++++++++++++++++ 1 file changed, 3288 insertions(+) create mode 100644 Triangulation_3/examples/Triangulation_3/data/blobby.xyz diff --git a/Triangulation_3/examples/Triangulation_3/data/blobby.xyz b/Triangulation_3/examples/Triangulation_3/data/blobby.xyz new file mode 100644 index 00000000000..79361121744 --- /dev/null +++ b/Triangulation_3/examples/Triangulation_3/data/blobby.xyz @@ -0,0 +1,3288 @@ +0.092818821121200379 0.13662366613073784 0.11656471345703165 0 0 0 +0.076732984887419697 0.067323553856659224 0.029614529021827957 0 0 0 +-0.1090787838162971 0.10551983779004775 0.0071798521552504935 0 0 0 +-0.19017371055567872 0.064482799747027919 -0.025606212415708235 0 0 0 +0.077037077176859536 -0.0091049015008085599 0.057926846304230367 0 0 0 +-0.4751930092034885 0.010120850653908192 -0.055383754711487793 0 0 0 +0.061096696989897115 0.18971410578073139 -0.074216193202611053 0 0 0 +0.15813144726204448 0.0044570450138603224 -0.072325068392053243 0 0 0 +0.18047481433744766 0.0024795202240301129 0.022834356483752843 0 0 0 +0.0054709822961990229 -0.078060243231391546 -0.0021910989979146978 0 0 0 +0.073917650546617752 0.17745731952323435 0.10593594042180618 0 0 0 +0.023899231104743623 0.036552265552605046 -0.00060410184601694672 0 0 0 +-0.12062962633249352 0.021789626337054169 -0.093962736861220086 0 0 0 +-0.12735801671208119 0.081041522007081201 0.044450676795479843 0 0 0 +0.14527265444662646 0.15718773160348598 -0.023408421305891131 0 0 0 +-0.037808983531461615 -0.10990814383375459 -0.043411585236268119 0 0 0 +-0.036927650665578016 -0.02078558128123778 -0.040643593913508108 0 0 0 +-0.099040925895106102 0.13656844165697551 0.075222241964295972 0 0 0 +-0.14840794353207576 0.063877221312375276 0.0038798831721018057 0 0 0 +-0.11914788541866006 -0.063763862318915315 -0.10426757898470154 0 0 0 +0.20670465409602728 0.1562798424285371 0.0083928142622816393 0 0 0 +-0.17485731364776386 0.0091516551637710053 0.04095390886589978 0 0 0 +-0.067425944281036543 0.01638843155129624 -0.11843841263933526 0 0 0 +-0.035222607901843783 0.076335277411892999 -0.076777647780575317 0 0 0 +-0.094386643034904294 0.18258999531286069 -0.02409404881944599 0 0 0 +-0.03807958171492215 0.1824739440718377 -0.059334819384248005 0 0 0 +-0.118049084801646 -0.032766969953392178 -0.021283548122287721 0 0 0 +-0.23762281791643708 0.019804422140817152 0.0050083500379407841 0 0 0 +-0.014641109178469114 0.085474737628151165 -0.066357979276380957 0 0 0 +0.031518715638674311 -0.11907216380048731 -0.12732433956627642 0 0 0 +-0.10615637762651314 -0.0953622236567922 -0.12075074479965679 0 0 0 +-0.11636176767613043 0.042538447126362011 0.030594150237796353 0 0 0 +-0.093269521201250649 0.20371104167478343 0.036199827153661296 0 0 0 +-0.17825219907672613 -0.18630718420538772 0.02374822700102161 0 0 0 +-0.031764849269441342 -0.091252504984997679 0.10362536145503634 0 0 0 +0.01489489636494773 0.023318988208249652 -0.15178915478929272 0 0 0 +-0.42880569610386388 -0.03666748985762755 0.0043157472496600791 0 0 0 +-0.0053804417944327554 0.087519769015865834 -0.063325576514956544 0 0 0 +-0.27516054198599194 -0.051347934472712242 0.0160804523320347 0 0 0 +-0.042380522938622212 0.076683164267289883 -0.14282269104408427 0 0 0 +-0.20228381934855139 -0.0013196133103766661 -0.0016830996565753709 0 0 0 +0.09582001749888519 -0.076599680745615628 0.10674189820027771 0 0 0 +-0.33461192896884173 -0.056221297558355615 0.068857123705223205 0 0 0 +-0.029724681406135267 -0.15359253017353128 -0.14773454254007898 0 0 0 +-0.057178746969283156 -0.11313232167761215 0.12088940030908676 0 0 0 +-0.014144841569722677 -0.16193451632200229 -0.031078574778581031 0 0 0 +-0.10976760502734456 -0.10602949144352648 -0.094903084054041645 0 0 0 +-0.27308019374195958 -0.011690723948377196 0.073454419716617064 0 0 0 +-0.43599778774321313 -0.044772375859316926 -0.082610050827588419 0 0 0 +0.084346387794746513 -0.059768461319172766 0.144151905690975 0 0 0 +-0.025124808186991199 0.026963256033730232 0.10613168121456915 0 0 0 +-0.1568936564433715 0.13431044858185343 0.11060034862295307 0 0 0 +0.040437895135148338 -0.062026513293660712 0.11373850790302406 0 0 0 +0.14793975513820296 0.16859262377768103 0.065628728421847332 0 0 0 +-0.12562561928845012 0.012381078049700706 -0.12181399208568129 0 0 0 +0.073276971798625301 -0.065738702582740699 -0.12855506640263134 0 0 0 +0.14057596118776589 0.18493687973925421 -0.011459546990861186 0 0 0 +-0.097927504508087904 0.052702291538541168 -0.052960724826170119 0 0 0 +-0.12575101915636339 0.14217310119639431 -0.074543224504603531 0 0 0 +0.30743148607450527 0.13724651171765706 -0.018062072978262317 0 0 0 +-0.35022277024926385 -0.034235952478327808 -0.077905276106042323 0 0 0 +-0.03739091922401222 0.14929341554659231 -0.08347320329696592 0 0 0 +-0.10476585317573051 -0.15346478258935176 -0.0022274946574424304 0 0 0 +-0.09184670778381876 0.18651697388312499 0.046891041651219129 0 0 0 +-0.037775173496827519 0.03684563172811639 0.17853289391301294 0 0 0 +-0.31224533395711801 0.082246813142088204 -0.048855581283905547 0 0 0 +0.059822070739364686 0.20932668048435216 0.043632612253913655 0 0 0 +-0.082040458066393651 0.097069193448952873 -0.092859438644486939 0 0 0 +-0.13693621809168255 0.017960347464676479 -0.11423160689055686 0 0 0 +-0.10790408700855686 -0.0079847145949397402 0.046972486253949342 0 0 0 +-0.0085415524897515249 0.016361870721640054 -0.092594819659190711 0 0 0 +0.20599533984779145 0.0431126426938227 0.11401107102339622 0 0 0 +-0.076835748129556902 0.20732713996829233 0.10258882215324369 0 0 0 +0.15511630656446557 0.080659964847302978 0.015053284373283377 0 0 0 +-0.0032722914508777068 -0.10772159590356518 -0.10746471752255829 0 0 0 +-0.24027657137816077 0.028463762570156259 0.057499204451957692 0 0 0 +0.0021977860850770359 0.01469602616904303 -0.050111459133471814 0 0 0 +-0.028735730618415445 0.06878782807338002 -0.10003934896567557 0 0 0 +-0.13034406514216218 -0.05148557672199236 0.15384096382660603 0 0 0 +0.10700484533140658 -0.028739702254939825 -0.051144962276800071 0 0 0 +-0.0035745248251827788 -0.04844541334776209 -0.1338624958383357 0 0 0 +0.06606936904488131 0.12661353342827364 -0.08748575932144885 0 0 0 +0.10661446559499715 -0.003054907711571575 -0.11254836862046551 0 0 0 +-0.079160682971840757 0.0082037266282890819 0.065248478487768186 0 0 0 +-0.14710560890248281 -0.07133841500378868 -0.099865440853348003 0 0 0 +-0.041919899715813835 -0.19245985693780893 -0.0085115524050025371 0 0 0 +-0.039017455228662623 0.082371012414290568 -0.10771074029251654 0 0 0 +0.035495826212209647 -0.048071117515983086 0.14147394208232408 0 0 0 +-0.269338232720783 0.062618493459993485 0.053077323586484398 0 0 0 +0.21690678660377388 0.14102406880801355 0.026935514313866371 0 0 0 +0.03938348324993618 -0.047449303203414672 0.086546981416980723 0 0 0 +0.083674454784239571 -0.03802251538880963 -0.12711575297361985 0 0 0 +0.03892418080541532 -0.041856903941807827 0.19013943602400504 0 0 0 +-0.10805949065104364 -0.18808729631203089 0.010196053098883467 0 0 0 +-0.0048904534566518998 -0.068157382123389759 0.10203646315371431 0 0 0 +0.10518283036115811 0.036251687952920775 0.025911915674515534 0 0 0 +-0.26564186557073849 -0.069748848770994715 -0.02996346589613938 0 0 0 +0.21675739618706974 0.076054277747231502 0.054217822402097299 0 0 0 +-0.079024232025397989 -0.21737281363009245 0.059253834864929328 0 0 0 +-0.03461441425324191 0.0049846214119964039 0.13551447649973028 0 0 0 +-0.322037068717964 -0.072602460719276701 0.011688326562076329 0 0 0 +0.10831096808161583 0.062177576876792096 -0.081898734870143236 0 0 0 +-0.17426864295398586 0.14149260833707172 0.0055629803550373835 0 0 0 +-0.2644940699367877 0.024408234741798596 0.0013989873180421941 0 0 0 +0.20380027775805903 0.072504164734532583 -0.091077642642232115 0 0 0 +-0.2930076782025467 0.064158520399994645 0.074988043968761825 0 0 0 +-0.34910801334565977 0.014900128963470455 -0.0072978206304083471 0 0 0 +-0.051594148319223931 0.0067507139703151531 -0.16487840465431519 0 0 0 +-0.23273778129587652 0.12903579811977595 -0.014629370869716163 0 0 0 +-0.1477856555352593 -0.0071842610759595416 0.082971497250366039 0 0 0 +-0.0082395141144726014 -0.03638387527530268 0.17941430937214334 0 0 0 +-0.092238452891316325 0.14429927749078625 -0.038921546836602039 0 0 0 +-0.11634647007811122 -0.064414644624676581 -0.0027426380211715562 0 0 0 +-0.037591710779357301 0.15297302813187985 0.10825421884882122 0 0 0 +-0.32333868343836164 0.10390202063706749 -0.0095535907643330142 0 0 0 +-0.10981843401768016 0.06230836495332559 0.12965513508801116 0 0 0 +0.011809081369168084 -0.11816827100105491 -0.084511542016917837 0 0 0 +-0.09173225809377622 -0.041863294415910746 0.019251147238435684 0 0 0 +-0.16305483433596796 -0.13055807879903775 0.10114274248126617 0 0 0 +0.19324035982786442 0.12131775522822374 0.054370240898547223 0 0 0 +-0.18967814698411389 0.08365099629817252 -0.067838361505673739 0 0 0 +-0.14254226701252165 0.096213980868290139 -0.013495427037617663 0 0 0 +-0.048448055950063296 -0.078750032980796442 0.003557160411949728 0 0 0 +0.18849448070999691 0.001702548490039979 0.065677982319215317 0 0 0 +0.0060598147333552621 -0.006170933897351405 -0.045881778515715149 0 0 0 +-0.052852561307705492 -0.0750597236281354 -0.13038676103342789 0 0 0 +-0.21802572604998716 -0.069356770685222474 -0.058442852276633483 0 0 0 +-0.12344705691282643 0.02459037792502855 -0.0071712260957746687 0 0 0 +0.24794158980723463 0.096333124004750026 0.062972339823931439 0 0 0 +-0.16130684341463264 0.13664903205289597 -0.034303699253275532 0 0 0 +-0.074205317458331144 -0.17358730371874853 -0.0095352160187014423 0 0 0 +-0.12724506352619269 0.082820656384251512 0.10149884497734998 0 0 0 +0.19764474463378306 0.11509156430737205 0.12695799977693942 0 0 0 +0.22111524235913288 0.054955614215222159 0.058262301251987475 0 0 0 +-0.24721707157052125 0.034485543348980574 0.11827194805334881 0 0 0 +-0.032256349983389998 -0.07046525203821577 -0.16375752400771482 0 0 0 +-0.36553991163020494 -0.040384884779749441 0.058714632428318286 0 0 0 +-0.10128413158160871 0.018507051592500878 0.14827269190035572 0 0 0 +-0.1280111432758137 0.16572563546214952 -0.024241524067495496 0 0 0 +-0.030252890686753686 0.028100447721963295 -0.161886335369193 0 0 0 +0.25581176183918025 0.14225653739549216 -0.015865086436515213 0 0 0 +0.063953804959282212 0.19497613657177565 0.07727133500883307 0 0 0 +-0.24325866503148111 0.088278371215640528 -0.027787319041148284 0 0 0 +0.0076202116787829066 -0.1341607405408542 0.013362210939379865 0 0 0 +-0.044029570749448632 -0.0889732295342954 0.10054423443000113 0 0 0 +-0.29243351112819516 0.034850605045274374 -0.0080600805608350701 0 0 0 +-0.18959683465764626 0.05244262201149108 -0.014745300143577167 0 0 0 +-0.25082727636018076 -0.063579674149703724 0.064463853458533976 0 0 0 +-0.18303168113723867 -0.099591493691196686 -0.062578504616850522 0 0 0 +-0.17947552433346636 -0.090670401267411188 -0.026158213128118307 0 0 0 +-0.010119738561452873 0.062086289927677729 0.042868779387340877 0 0 0 +0.039197322668032719 0.028559628248880586 0.033951788410232858 0 0 0 +-0.13722103495413207 -0.13778776434545548 -0.042402019014047443 0 0 0 +-0.19609533667952989 0.11501707502903369 0.04624648442307347 0 0 0 +-0.12972773633070062 0.065908494664949802 0.12058473373461978 0 0 0 +0.0267003785105841 0.19887454637945767 0.11788256216900936 0 0 0 +-0.28248054240514298 -0.036825451317221869 0.062522996168124484 0 0 0 +-0.018172535873190565 0.1514015416484214 -0.0051154256564667488 0 0 0 +0.10837542886433654 0.19546956590193648 0.045264224320368834 0 0 0 +-0.071847682488660858 0.060172525950244637 -0.028698652031663802 0 0 0 +0.21121232074078627 0.066923949288651807 0.052942032699465263 0 0 0 +-0.023047460509368733 -0.0049240244704480407 0.088761762761892765 0 0 0 +0.058682848638177354 0.023449809482607498 0.0010895648069381703 0 0 0 +-0.28350851605030014 -0.036502602903509068 0.036651578201884416 0 0 0 +0.015818648321307249 -0.05606583900053988 -0.12793050976394676 0 0 0 +-0.063068958598861968 0.10321722384044901 -0.11545453346360661 0 0 0 +0.0050337899447441825 -0.17061796651066097 0.074756424340999689 0 0 0 +-0.0052253144005663388 -0.0027588484428748561 0.15511699170663393 0 0 0 +0.21659209332076595 0.17249615504585669 -0.028429683477867396 0 0 0 +0.035163377814385999 0.056175573005757262 -0.06428828509376569 0 0 0 +0.13151149116690269 0.089863355506131892 0.096718466846964307 0 0 0 +-0.31565589602290423 -0.080547369832162763 0.025384001695495567 0 0 0 +-0.33957446976628392 -0.12600532680792365 -0.023285033905077718 0 0 0 +-0.087835416450756654 0.17128929890115463 -0.048377469214469199 0 0 0 +-0.15058784936029235 -0.10065513442153391 0.056499707397276527 0 0 0 +-0.19174382495257541 0.11031838261762211 0.047900160849925127 0 0 0 +-0.2977987283157511 -0.10097974403337484 -0.028015337419258907 0 0 0 +0.079210125917228813 -0.0048077232819344062 0.16351903721331293 0 0 0 +-0.047458299468692899 -0.17270719641085436 -0.029429971363184981 0 0 0 +-0.2193542132233875 0.0034785854031061658 0.057032493709837068 0 0 0 +0.041226259947891808 0.19431016572591286 0.07713104518111516 0 0 0 +0.22740184997414464 0.16240951527987046 -0.045073230674088943 0 0 0 +-0.21163921053277329 -0.012956983209122919 0.15217934382160145 0 0 0 +-0.26616551731597871 0.02903801510936721 0.018231514818931455 0 0 0 +-0.10053109409243338 -0.1028880881982539 0.049844919942756194 0 0 0 +0.16323586761253878 0.15295643564507644 0.024563115596454604 0 0 0 +-0.031413034747405977 0.047772895451477226 -0.098796572358011259 0 0 0 +0.041616069425521374 0.11392155432085693 0.16296766563823309 0 0 0 +0.24930829641185231 0.072974657580741176 -0.0198353701501498 0 0 0 +0.12650558916159665 0.051582755738389219 0.051807392713637573 0 0 0 +-0.027054497764839369 -0.14041216887615671 0.01876022519781767 0 0 0 +0.074008074920601186 -0.0025406674149367203 -0.14786565204933891 0 0 0 +-0.44194686942761996 -0.0074228369195796784 -0.10139470291340491 0 0 0 +0.10714095200631296 0.099687983692103077 -0.077919028205270871 0 0 0 +-0.0047656793995667912 0.17105391990093233 0.080320820640208651 0 0 0 +-0.0047801939782407543 0.18820367759258627 0.096446930321291563 0 0 0 +0.11673725277226649 0.15981497208510709 -0.041764299686291723 0 0 0 +-0.21197309610365195 -0.085116626282300822 0.040359821669276791 0 0 0 +0.13291749272062209 0.00045779242395141417 0.12922656001845931 0 0 0 +-0.070510151668565835 0.0062593459037789123 0.10022209643898158 0 0 0 +-0.15927499891092073 -0.13733771514785759 0.074796644019372277 0 0 0 +0.051579879111873395 -0.089025886852425545 0.038812910719876637 0 0 0 +-0.062090632990635997 -0.093465234647106848 0.00048249369352171279 0 0 0 +-0.10328672585349535 0.17664467297880909 0.052439332851594772 0 0 0 +0.099051618074721126 0.068915290370449411 0.16640410395743374 0 0 0 +-0.080622002272547733 -0.035236691256111508 -0.11555658941466966 0 0 0 +0.016204922118920273 0.22454601317432565 0.055366337567132912 0 0 0 +-0.17483431245449699 -0.017579569286879621 0.11889761835235915 0 0 0 +-0.079993752067135659 0.17733978573162851 0.03250017348072351 0 0 0 +-0.014207506547458504 0.089444122670916337 0.030819877806035345 0 0 0 +0.050223525972990235 -0.017031604926805971 0.12465823644014776 0 0 0 +0.098261567049468812 -0.022062105523460551 0.097469369075708995 0 0 0 +-0.014080022532977188 0.092659406282174395 0.10119863025957113 0 0 0 +0.24135913616973897 0.15003978809622531 0.0035711716660065673 0 0 0 +-0.051243111147957432 -0.056153097661390455 0.06504898217768737 0 0 0 +-0.23612123585169442 -0.1740211954281321 0.044240068201111621 0 0 0 +0.1293091714099282 0.16564327722853606 -0.065782883339132181 0 0 0 +0.032369041391971998 0.14895420360397454 0.0099394038671203888 0 0 0 +-0.19774122860495469 0.081448533330976458 -0.073668228696702504 0 0 0 +-0.38907834459766749 0.016226504558035149 -0.083790422544196247 0 0 0 +-0.18288796496545201 0.10389548473507582 -0.012401411984453437 0 0 0 +0.18750470155432114 0.15440845086906241 0.10491108517856382 0 0 0 +-0.18549320183808221 -0.01221079442551129 -0.031742134218919554 0 0 0 +0.20300912891852202 0.18996608776255325 -0.0090253869997207192 0 0 0 +0.13527931979144919 0.10226648334215255 0.067302509582757936 0 0 0 +-0.017937692423954155 -0.0053727284065303582 -0.022714244281977408 0 0 0 +-0.081800967140367775 -0.13401957568113831 0.11334487028298854 0 0 0 +0.032590822173887812 0.031588969989081839 0.023616496893917205 0 0 0 +0.013021897841182073 0.21500355514404967 -0.0011562881994214846 0 0 0 +-0.17083368371353258 -0.18836325333425916 0.042331035903305281 0 0 0 +-0.36189042096116586 0.0038928981065693979 0.069459052006170169 0 0 0 +0.023163757132503682 0.02427324125054478 0.044387417584566852 0 0 0 +0.077961390322276836 0.051109710300755229 0.1149930515507632 0 0 0 +-0.19499043743018296 0.072039430104507141 -0.0012500161098321083 0 0 0 +-0.16059204765307489 -0.1221052498269193 0.1072941057167556 0 0 0 +-0.09629267575415551 0.10318277070995091 -0.1111252588656554 0 0 0 +-0.14671199921127415 0.0061834899459737303 -0.11562531760927941 0 0 0 +-0.057842559555228823 0.094298044039706708 0.015122441398590342 0 0 0 +0.1290439651762833 0.14154611594786493 -0.032252804377246175 0 0 0 +-0.016538227116661197 0.062963870774046971 -0.052239352510414089 0 0 0 +0.11952057326132431 0.074309745141140637 -0.00017514825447742521 0 0 0 +-0.087259065084988263 -0.095383628543053295 -0.030222321099839633 0 0 0 +-0.27259917158033004 0.023938327248196556 -0.025494818165700872 0 0 0 +-0.16800354002808687 0.074253119505010068 0.12773219326741295 0 0 0 +0.31153206164189612 0.11021003327185475 -0.018944358165451786 0 0 0 +0.18114183911665332 0.042692161620410618 0.14313880876268073 0 0 0 +0.10942317828282239 -0.034730521457672608 0.12533638837649672 0 0 0 +-0.10362528837776047 0.0051326562937428211 -0.11918829050107253 0 0 0 +-0.10165908296483805 -0.028361537484453997 0.16947783504524969 0 0 0 +-0.077984982448183027 0.11933793828925487 -0.032086798816411743 0 0 0 +-0.0030373059093277144 0.11644256047939272 0.13834751958284572 0 0 0 +0.061692453782006551 0.19870355359580782 0.09171021049741887 0 0 0 +0.19270878605823488 0.15245243548509524 -0.05660396795576253 0 0 0 +-0.24792703732713128 -0.069834374077053757 0.011926476297459576 0 0 0 +-0.1978589003137895 -0.10154818930929435 0.084248419363064236 0 0 0 +0.16315415508458148 0.17082330960754721 0.093658076663574202 0 0 0 +0.077623026576088716 -0.014297027740150708 -0.062278190952421625 0 0 0 +-0.40325250409968666 -0.023960073547695776 0.0020506768731949898 0 0 0 +0.090739415372461052 0.092937777107504171 0.077981315279323143 0 0 0 +0.0052727638966077461 -0.043893150328474129 -0.10093408639385039 0 0 0 +-0.1029826966742054 0.038480703396772009 0.12118471002051004 0 0 0 +0.083029616434927955 -0.010847433670256312 0.087292242758467781 0 0 0 +0.027030045904854749 -0.017508680366139867 -0.0018928084490434371 0 0 0 +0.1237080088018952 0.087106273835600323 0.15607492467086062 0 0 0 +-0.042832605884315034 -0.1152783905367302 0.0090722575173881048 0 0 0 +-0.46001748737689807 -0.011724214341968325 -0.04049914999725715 0 0 0 +-0.24068673217857028 0.11599133179522164 -0.032530674231085938 0 0 0 +0.13851815724974731 0.096083401188421957 -0.033447969639061492 0 0 0 +0.087941692920445902 0.062772617679448806 0.022262553075181796 0 0 0 +-0.053440696509971797 0.1404023575157905 0.0044921000682436873 0 0 0 +-0.051506098700822345 -0.10418201752434905 -0.091695812673784322 0 0 0 +-0.029501506532344568 -0.13508718515783502 0.13386859569515894 0 0 0 +0.22134574556841741 0.15643513435469242 -0.060087355810666931 0 0 0 +-0.3193981552111963 -0.056601033335562823 0.064276661247924888 0 0 0 +-0.00021469387231398684 0.13336808828532742 0.056950446702079854 0 0 0 +-0.058198180337324767 0.10639184975492255 0.021963468539777209 0 0 0 +-0.20950071365472867 0.068333162022219007 0.036753718990881923 0 0 0 +-0.21534044887942033 0.00089619582475766735 0.087810405572971789 0 0 0 +-0.025065848190751916 -0.14762430519589037 -0.058024485234084988 0 0 0 +-0.054809557929409225 0.04507737432721487 0.18196057498958193 0 0 0 +0.16612350199923615 0.003898005002856253 -0.053388079306183389 0 0 0 +-0.14747505194112892 -0.052633213516672162 0.12444209611542664 0 0 0 +0.040961594118524791 -0.080665015211294405 0.11028445522370514 0 0 0 +-0.055478355083484254 0.023280442107275118 -0.05489392201222526 0 0 0 +0.032607903106023961 -0.073779658998577413 -0.083550084472770333 0 0 0 +-0.14561237816231098 -0.079177719695534582 -0.036111707949589011 0 0 0 +-0.24737122321344682 0.020103978532587635 -0.038953652147106832 0 0 0 +-0.062845425848951586 -0.036950594264354569 -0.16481600588941153 0 0 0 +0.078054027708463758 0.16658404745636413 0.04463864517108676 0 0 0 +-0.083480797210251978 -0.13351210774067651 -0.11773319573112204 0 0 0 +0.03907949941925698 0.0720109840667853 0.033265885034160225 0 0 0 +0.099115737231241063 0.10193455093279247 0.15541264986620376 0 0 0 +-0.02159806033518169 0.17033914461218286 -0.021866911952506757 0 0 0 +0.029469149275794526 0.045174775458861616 -0.054188820943992577 0 0 0 +0.087825284926230041 0.18922911490916833 -0.004541460458515223 0 0 0 +-0.14075200816274624 -0.19926452530292749 0.073363383971908142 0 0 0 +0.18612775825664168 0.067356952581419105 0.034587717601879037 0 0 0 +-0.2105124336019904 0.048888668974319482 0.099931454484723042 0 0 0 +-0.3221069720897824 0.017496368888328756 0.094723705352275617 0 0 0 +-0.095462889520372296 -0.17628324506321363 0.030419938416801851 0 0 0 +-0.25234874114539241 0.053202128477165933 0.023519552196354598 0 0 0 +-0.089858340504833045 0.075239709584223546 -0.099975060746730307 0 0 0 +0.062160540252425622 0.058320170665806637 -0.13585490860316252 0 0 0 +0.1395675445088907 0.097810034384326505 0.13434297860829855 0 0 0 +-0.02512671736350286 -0.09599452141394002 -0.17072232468298357 0 0 0 +0.022323978710251324 0.18041490748582595 0.11746904499744112 0 0 0 +4.1768771277206351e-05 0.035906956175916827 0.081676963562164445 0 0 0 +0.008151871988677839 0.00051642320867439917 -0.18063261694658267 0 0 0 +0.082086257628814774 0.0006386785876247858 -0.094163903383328112 0 0 0 +0.11217054261424336 0.0031960110906716355 -0.075987647330705538 0 0 0 +-0.014655865238495214 0.036034064005893651 0.035230235192418552 0 0 0 +0.13438447908604984 0.10116385058909655 -0.023976226564364517 0 0 0 +0.024344448270772034 0.10880815447314129 -0.096779663521401577 0 0 0 +0.02515361675868738 0.17181103205384124 0.045004023033817758 0 0 0 +0.03633715026627754 0.17350104826363688 -0.0097162237852211064 0 0 0 +-0.081947437484445995 0.070089252825681125 -0.15893914312371238 0 0 0 +0.02839055033114507 0.020796144389499893 0.10602035528044776 0 0 0 +-0.05969378621098359 0.10178625389532325 -0.020973561262560531 0 0 0 +-0.031652116402220043 -0.14967139934648621 -0.13712731536995246 0 0 0 +0.018597792581222017 -0.021629810093980767 -0.087333912599261848 0 0 0 +0.051801432017020421 -0.016043922960439716 -0.17568310353383701 0 0 0 +-0.2416360641525267 0.076666919608014139 0.0044163921435242393 0 0 0 +-0.092325258446163516 0.1288671621674774 -0.025995718409771107 0 0 0 +0.095716350196853706 0.14345115296689748 -0.015669703930871554 0 0 0 +0.24311517080090234 0.082298506224054824 0.087453313239105518 0 0 0 +-0.11971726179019321 -0.11414244001876983 0.059419006897698606 0 0 0 +-0.11866793688538951 -0.08251438676094916 -0.044010461599266165 0 0 0 +0.072625025432487 0.061724643752063602 -0.036380297053192734 0 0 0 +-0.1119533498670976 0.025038999187819155 0.057986615464447527 0 0 0 +-0.15529258217202502 0.016926694650368751 -0.023256976682098113 0 0 0 +0.049988612233407281 0.20412898900456727 0.11302044241030232 0 0 0 +-0.14004719060716919 0.013639173858342207 0.13040939686183259 0 0 0 +-0.47291761129403953 -0.013405782026729096 -0.030633966081978742 0 0 0 +0.12432053475444199 0.019004661492558639 -0.079496863788451069 0 0 0 +-0.15698116641330534 -0.0040365776590327862 -0.06634106571101675 0 0 0 +-0.1168935126367654 -0.055236326033715172 -0.12420038943356229 0 0 0 +0.016805278771778009 -0.061184122355311205 -0.18098957116354908 0 0 0 +-0.041853398245610351 0.12117800288239028 0.12651302054091215 0 0 0 +-0.15704842369368771 0.14976115361591613 0.060304794016607571 0 0 0 +-0.054726236281581242 0.10372753222960046 -0.13258980188492731 0 0 0 +-0.46034893583785513 -0.02272568526925009 -0.047317088411040126 0 0 0 +-0.055335559110590293 0.007427071665797369 -0.17378473538295738 0 0 0 +-0.10251420320000504 0.20502322723413213 0.048758636094447222 0 0 0 +0.098296805565340872 0.010956937646677711 -0.046550111157303203 0 0 0 +0.03931856255672167 0.03293031501810717 0.18510374453445247 0 0 0 +0.25007769681349395 0.055882550160003819 0.057181773759634708 0 0 0 +-0.19100282525211809 -0.1964532388672908 0.055622953754798948 0 0 0 +-0.12638652740692258 0.060531925168597123 0.13606440360223224 0 0 0 +-0.31921062094429276 0.086777611090672169 0.041643483478278842 0 0 0 +-0.060346749519717469 -0.056730428602729005 -0.17707586395630892 0 0 0 +-0.13797381546784659 -0.037434828868060377 0.14144125237396873 0 0 0 +-0.15021163086129824 -0.10664711533394038 0.046734001622212112 0 0 0 +0.090626631865957707 0.070343061330382206 0.074382003348505615 0 0 0 +0.13317650055499047 -0.015096921179706707 -0.10456980122419446 0 0 0 +0.020168699067186047 0.024277137818408651 -0.10315968615335551 0 0 0 +0.001566551563173979 -0.026808754441070393 -0.022281221996762329 0 0 0 +-0.33685048642274462 0.038859285817306466 0.038204268526724067 0 0 0 +-0.21216890724782367 -0.06147134714749225 -0.035673751512382168 0 0 0 +-0.04082302641475577 -0.088639830637815886 0.045217016001118826 0 0 0 +-0.39397319163434907 0.0083942043930534116 -0.085559602384467609 0 0 0 +-0.20403455612826632 0.12816343811319392 0.0045234604014377233 0 0 0 +-0.21640406350936975 0.048158902833158157 -0.013738515751658464 0 0 0 +0.0027862115184519864 0.0087277861988362682 -0.13019441988419647 0 0 0 +-0.44422339462795063 0.023155703745240785 -0.090189494912437621 0 0 0 +-0.34074654920337488 -0.0027774165214980162 -0.044606524572993161 0 0 0 +-0.15882713829879186 0.094807124537715226 0.086902174272191685 0 0 0 +-0.029037181729185457 -0.057933379612386704 0.1159401208039941 0 0 0 +0.23886521917720088 0.03323685687466521 -0.0059899193054777644 0 0 0 +-0.023356206699984672 -0.086158910745126216 -0.0039109285931419602 0 0 0 +-0.3074515568807884 -0.095766974744296185 -0.0067702604831238189 0 0 0 +-0.067069627397765896 -0.045230567947785849 -0.13799817862367583 0 0 0 +-0.092342807602705468 0.098877720751468057 -0.077975936452122405 0 0 0 +-0.061620647169237541 -0.040271665420235608 0.087442107763038929 0 0 0 +0.057019357294833706 -0.0062047464169287248 0.17385743765936282 0 0 0 +0.033220623301786822 0.10538028977146885 -0.065001798483662304 0 0 0 +-0.36694474961415402 -0.012722285299749114 -0.047391618072367747 0 0 0 +-0.11108204849181236 0.028750272645305386 0.055569982767798926 0 0 0 +0.016040985001609609 0.025573586752284327 0.041027205685383178 0 0 0 +0.21890624124017771 0.067301754023377791 0.068104330908590943 0 0 0 +-0.34179849752530922 0.022348786931123577 -0.075430576020172793 0 0 0 +-0.017900312697845533 -0.15203027397032687 -0.046824053033341195 0 0 0 +-0.090802348173984804 -0.071631858283924404 0.029858650085438976 0 0 0 +0.17535347933305651 0.027160721619256756 -0.030701491879867399 0 0 0 +0.024638025729004254 0.014762614151000025 0.13470495664185703 0 0 0 +0.080356230047999355 0.17497444759847131 0.079839667771283068 0 0 0 +-0.21673504110058539 0.0080327826775680178 0.073464874646143069 0 0 0 +-0.25742116238244117 -0.033042865720280007 0.085122734982361531 0 0 0 +-0.12878883831626275 0.12667280182540414 -0.010516555898996527 0 0 0 +-0.41541436208178756 0.042620523713917002 -0.032482743025803479 0 0 0 +0.24139960753738404 0.050239117060968619 -0.044568246328140604 0 0 0 +0.036146423079273571 -0.089462425606399332 -0.010311868138505598 0 0 0 +0.018095370788094589 -0.16067907869528561 0.049891520102108372 0 0 0 +-0.19097555599877147 -0.085041635823904088 0.032257277276393964 0 0 0 +-0.31101088619778633 0.011189579218555706 0.10146499649790722 0 0 0 +-0.31738762871148302 0.00076851420786788749 -0.02580232077764022 0 0 0 +-0.37520357246672503 0.031601729090977471 -0.070527054978163445 0 0 0 +-0.052110954313769497 -0.085777824351915638 -0.1424500143343741 0 0 0 +0.021669101312239591 0.13465629580575644 0.016087533422127376 0 0 0 +-0.37216689760343641 0.038131445792497609 0.05197262972075492 0 0 0 +0.079002653377808152 0.10984454964192208 0.012221905004760253 0 0 0 +-0.052092512167501326 0.12508171620315123 -0.1002942245833776 0 0 0 +0.076935968292283274 0.001572358402704338 0.042054879515844384 0 0 0 +0.14068420378671492 0.018868450604957981 0.068485079103099172 0 0 0 +-0.33644189544007652 -0.076110656017121414 0.035352319764732854 0 0 0 +-0.16912320705251771 -0.0035013944613444814 0.085144686844315393 0 0 0 +-0.02603144142070557 -0.10395672509407021 -0.049853534176794806 0 0 0 +-0.15174613374999962 -0.018584760642540665 0.014549255707174552 0 0 0 +0.036200773011327236 0.20290795910229209 -0.017403524174005258 0 0 0 +-0.062274266899111697 -0.015066066050832633 -0.1238581266592564 0 0 0 +-0.07026758988578341 0.0081263114436357087 0.025357196249741587 0 0 0 +-0.19663413675027902 0.13182250595714101 0.040966749653486539 0 0 0 +0.050989468920968839 0.20123078616694035 0.048246108412330041 0 0 0 +0.0062243160629644745 -0.015848433609271434 -0.046754565567064088 0 0 0 +0.090363264140572774 -0.069556995545403566 -0.04067565485581523 0 0 0 +-0.037124915988533791 0.17786196630531592 -0.030037137524790591 0 0 0 +-0.14092213838866219 -0.13664038692216485 0.10002447398909878 0 0 0 +-0.058780939083884043 -0.0047190306892502254 -0.046454955296363204 0 0 0 +-0.15823955597167139 0.043945183516410191 -0.035628541247155504 0 0 0 +-0.0021787229298265154 0.066039989962232259 0.046476844847970183 0 0 0 +-0.16719965314170115 0.099422973598918385 0.12424924371089649 0 0 0 +-0.079608443817026031 0.061419357415805564 0.16326747955710488 0 0 0 +-0.15498843357472686 -0.099059686176798778 0.0053260025712521808 0 0 0 +0.08684771701770827 -0.033822192358005793 0.14565465042010137 0 0 0 +-0.10397604287602014 0.023719427005456734 0.043766186518657019 0 0 0 +0.03450906727400832 0.21049012586882104 0.01266877963534091 0 0 0 +-0.14213838510517268 -0.037556309131356436 -0.018757013914868226 0 0 0 +-0.088060753697468963 -0.16738288692963682 0.089071002045335274 0 0 0 +0.078124389857060661 -0.049940794782642767 -0.12842938986271527 0 0 0 +0.012631106566130146 0.073117688586546103 -0.0066094118434744942 0 0 0 +-0.14308716307026803 -0.13986682071882348 0.020395709178494287 0 0 0 +0.0019163163280044304 -0.07297826544571856 0.16363323408541361 0 0 0 +0.050080613227423687 0.054444819852757731 -0.068683495288847013 0 0 0 +-0.099093001972236694 0.10121851626851175 -0.03836701899333439 0 0 0 +-0.1301486398390867 -0.11194511521806942 0.013722650566017264 0 0 0 +-0.11240659335932002 0.11825132959057716 -0.048299464539366316 0 0 0 +0.079198532544896005 0.12864695799986786 -0.020846111294224395 0 0 0 +0.05173037149981824 -0.065855391864530294 0.18035224063306302 0 0 0 +0.22150635636513111 0.17474561863608845 0.0094556184232523766 0 0 0 +-0.029786376679411641 -0.1066183463135143 0.087003153134204897 0 0 0 +-0.21357949165656237 0.075068585936891807 0.035106134187622456 0 0 0 +0.053824294850472298 0.010115058169003099 0.17686870500792704 0 0 0 +-0.09146168182881087 0.02976322565230588 0.10045464055889611 0 0 0 +-0.15145235071139879 0.13575629907694226 0.092131772421482044 0 0 0 +-0.3316098184387456 0.052608072900264979 -0.0012707458971193963 0 0 0 +-0.089166231141602659 0.085833590902927304 0.012001690974056733 0 0 0 +-0.19888704855109801 -0.1878561028078343 0.01135532838723996 0 0 0 +-0.045297226918512068 0.087647690085450147 0.037559162729439793 0 0 0 +-0.25212051708170213 0.093666145727348937 -0.036115632028929895 0 0 0 +0.017766508709569473 -0.066418771580808805 -0.084700509697997944 0 0 0 +-0.29436373695336515 -0.049141764700700086 -0.026345725383801838 0 0 0 +-0.015914846596231269 0.18511938145898749 0.092849753076269276 0 0 0 +0.19027559274498834 0.14291682670143713 0.075743406222398418 0 0 0 +-0.37742458038618093 -0.056633434626334828 -0.026524694440920371 0 0 0 +-0.25735210438430778 -0.065475367159161274 0.088822068424583872 0 0 0 +0.0779743297925381 0.096302278299774502 0.051700023902954056 0 0 0 +0.0060481582508724596 0.05148304468070436 0.17409840932350282 0 0 0 +0.060558627031780776 0.19601019075848908 -0.014557542284857949 0 0 0 +0.085712619372666776 0.098639759174688701 0.1698888791074897 0 0 0 +-0.22448103427596161 0.043706067940419535 0.080165689743188689 0 0 0 +-0.093567432097143077 -0.15975988641076444 0.058313162614726438 0 0 0 +-0.072721275480408243 -0.069349726321069061 -0.1689780296467375 0 0 0 +-0.1138088615886611 -0.094574227460775068 0.15159682762816315 0 0 0 +-0.19041825558437037 0.0095136483101947167 0.11541404374261435 0 0 0 +-0.18351435701153945 0.070981075324528853 -0.044684561363988101 0 0 0 +-0.070833093863865382 0.079983741228195349 0.12241086006378757 0 0 0 +-0.0191642079554592 -0.13565361907395629 0.14672148614654876 0 0 0 +0.18531571617842652 -0.0035934601671649413 -0.057337190664399879 0 0 0 +-0.16140469853638906 0.05531207339141192 0.13620007263995706 0 0 0 +0.0087988587284227315 0.20733859964308793 -0.024706774186271707 0 0 0 +0.12498832441354862 0.089739438094167512 -0.050755076275621536 0 0 0 +-0.096235495312982255 0.060002217255956503 0.12331923263736441 0 0 0 +0.2188759056649357 0.094167596080238447 -0.058274351886474535 0 0 0 +-0.14828472455443353 0.068842801100395146 -0.065736361891561651 0 0 0 +-0.046522909925105105 0.057163886159145749 -0.062348648764176756 0 0 0 +-0.0037862487968593483 -0.13087623646725577 0.013356858166945623 0 0 0 +-0.020028717998382684 0.098949714624310847 0.13794651498558605 0 0 0 +-0.0641705753646023 0.087170762215800113 0.11436437925123141 0 0 0 +0.047770393253511234 0.019990914667399579 0.034466046452059418 0 0 0 +-0.43496257343654288 0.0060003707467070622 -0.05913027568116877 0 0 0 +-0.26302705447266816 0.11659752920866429 -0.03506503988949769 0 0 0 +-0.0024556071865442508 -0.11452350092461847 0.051664076752068938 0 0 0 +-0.050598080067050244 -0.076482880947197796 -0.06726619943870138 0 0 0 +-0.20069192476973174 -0.10053072225489655 0.07009331544117306 0 0 0 +-0.0086224049057253005 -0.01670751705625656 -0.037716411910820286 0 0 0 +-0.042058128327797206 0.022420174247588021 0.070972714282180632 0 0 0 +-0.26728570471571761 -0.10014995670259512 -0.016716700018600095 0 0 0 +0.070719518757120181 0.02873282344045347 -0.042302553683062072 0 0 0 +-0.13248276722267038 -0.0067316669973987164 -0.06133692929206136 0 0 0 +-0.12969699942025359 0.039816461553223881 0.085306095748485994 0 0 0 +-0.38738605764232115 -0.027765484469423091 0.032169098546589725 0 0 0 +0.055487100296078673 0.076001448014594131 0.08669208584388996 0 0 0 +-0.33697284680002371 0.078362234404759923 -0.019955692618144671 0 0 0 +-0.010318698788734648 -0.010099977372291985 -0.035818317580407488 0 0 0 +-0.045504699080027688 0.13791700603481566 0.04782527995583602 0 0 0 +-0.065140783949412917 -0.19634872012209753 0.072110165986510461 0 0 0 +0.1819342225721175 0.031221119033001787 -0.095772580433122811 0 0 0 +-0.13447378701747864 0.11177494508682984 -0.031278573990115882 0 0 0 +-0.15250014661221067 -0.014321768900671994 0.063414653440919261 0 0 0 +0.11804901159897913 0.036419627607625404 -0.13214150283099618 0 0 0 +0.06831451867516386 -0.065363259177135785 -0.10618303019117331 0 0 0 +-0.069007231819806669 0.044405455287941709 0.12457298601139008 0 0 0 +-0.46943475485093428 0.0089226212315950404 -0.09540900867162691 0 0 0 +0.10030124401406376 0.036280402143391788 -0.016243378600666769 0 0 0 +-0.082165882120232625 -0.15690459101151721 0.11686152686051002 0 0 0 +0.17548854374572626 0.024063731065975008 0.005250072248621368 0 0 0 +-0.00026848715017085967 -0.099680547390538277 -0.042756797889840797 0 0 0 +0.095131519396689235 0.065104509754173923 0.11041625420361847 0 0 0 +-0.1974709580652067 0.027385262921986619 0.066701654101117974 0 0 0 +-0.14682155503040883 -0.032524724572191022 0.096826897338495116 0 0 0 +-0.14153995387874546 0.14677574009364935 0.00011934779246711158 0 0 0 +-0.27494083250187107 -0.029153144532865854 0.070924118296497057 0 0 0 +-0.072201493861188681 -0.15668204993125101 0.13991734531403796 0 0 0 +-0.0028212938486016914 -0.075553747306442376 0.0025879070598809062 0 0 0 +-0.31049000676428207 -0.083332341102043656 -0.014094485885713243 0 0 0 +0.084252018091629688 -0.0083197106280410715 -0.15554211545943047 0 0 0 +-0.15440884847510844 0.0076366255429875796 0.093246356682473303 0 0 0 +0.075037583616231529 0.1900007707076678 -0.021505509406031104 0 0 0 +-0.099263070977528178 -0.11394296050329089 0.014390037366738551 0 0 0 +0.15288799411753656 0.037761249999118951 0.036335273979115762 0 0 0 +0.0098509842878439779 0.039188121833459932 -0.039927972941401407 0 0 0 +-0.12559187085234563 -0.075242481934924166 -0.13710422868459951 0 0 0 +-0.11087588388190606 -0.0046448264838424569 0.096640226593439488 0 0 0 +0.12887674897651186 0.15625337583786619 -0.0417339713313859 0 0 0 +0.26782304731745737 0.1515128079049643 -0.05434153813680262 0 0 0 +0.21820560180326914 0.092474303566446037 0.04345821386371973 0 0 0 +-0.08977161317633936 -0.087159632602728437 -0.034229501889327996 0 0 0 +0.13449574794895475 0.13236338290297939 0.062256212423191876 0 0 0 +0.08877137371870919 0.089487293121736922 -0.12107127105556241 0 0 0 +0.029238680833778286 -0.054657067262588094 -0.043153610899086564 0 0 0 +0.02410427900511064 -0.063176385694087955 0.16845486610015201 0 0 0 +0.20588360616162643 0.18362004712703123 -0.012385075391300016 0 0 0 +-0.095943470666762454 0.049424213707024212 0.10789591929156797 0 0 0 +-0.30790126280346886 -0.11012928246657552 0.013948128075836702 0 0 0 +-0.14079203851515198 -0.042910690701151749 0.14437346524760639 0 0 0 +0.16920130540712036 0.010275732854656855 -0.10859892440794594 0 0 0 +-0.0656478672018182 0.20589022804096202 0.0024263555834265482 0 0 0 +-0.18206419989345829 0.1637032811869979 0.049432980905281837 0 0 0 +0.10460844183442414 -0.018595396582932688 -0.15479239056587266 0 0 0 +0.10846170950901463 0.12745024775283409 -0.025328592620288026 0 0 0 +0.21161297685029218 0.046912283619493678 -0.071567065580911471 0 0 0 +-0.022486381799883715 0.18253894198509679 0.034190217349671759 0 0 0 +-0.28048819125070473 0.11436056299296438 0.018521593352771842 0 0 0 +0.14490639676997902 0.16415652851307067 0.067211791469790533 0 0 0 +-0.1195775608599815 0.1392086329311556 -0.038092481209704182 0 0 0 +0.19271950722562142 0.077292781056643445 0.031752179503798023 0 0 0 +0.050986726841640129 0.046193064962585906 0.086846959071209678 0 0 0 +-0.030390963601840237 -0.0061148769078254728 0.17410692838873851 0 0 0 +-0.0011802221025922766 0.010592667557860702 0.18616876914735789 0 0 0 +-0.019661835644622372 0.073285682000308272 0.14163482822145426 0 0 0 +0.13267534474391257 -0.0079290169986351577 -0.10972265779970819 0 0 0 +-0.25590460998548664 0.013990863899335709 0.064197265564850531 0 0 0 +-0.054765387248843944 0.044041018353284778 -0.1388599278327762 0 0 0 +-0.27652116998724641 0.028068297877938464 -0.045607125449027397 0 0 0 +0.089364321542289071 0.094754532330156738 0.082795327102520994 0 0 0 +0.0056580982221685616 -0.081614610705919105 0.086135681912732326 0 0 0 +0.049495802456228921 -0.112301315451229 -0.060496960041353937 0 0 0 +0.018204838177438287 0.17449280606611861 0.011010188734442927 0 0 0 +-0.028807734008815644 -0.072194310174556464 -0.10768859257931356 0 0 0 +-0.42195330372728879 -0.018455929738388888 0.040741987047136774 0 0 0 +-0.32500701461218534 0.08906122817426454 0.0094073363564903811 0 0 0 +0.1801842911081481 0.1606348431186555 -0.0095676729332497268 0 0 0 +-0.40725807735084091 0.041719818762342875 -0.064253259464777085 0 0 0 +-0.047914229866100999 0.03518908342306315 0.13803938579152522 0 0 0 +-0.091555038746288064 0.15523511160732434 -0.10194176873125928 0 0 0 +-0.02578782566062876 0.097015268188111015 0.04612015219916496 0 0 0 +-0.30658114660570401 -0.058293856153685153 0.043683153757219206 0 0 0 +-0.29515815996259687 0.09987083880803127 0.0027346406721575067 0 0 0 +-0.23879571287271106 -0.18509035500588361 0.0008653988507446031 0 0 0 +-0.065052110787613804 -0.18570633442600351 -0.041992731486896973 0 0 0 +0.19371802921554065 0.012914178779992735 0.080853646865583023 0 0 0 +-0.33940997788430194 -0.039040236245929283 0.003406166524491272 0 0 0 +-0.25443572049002861 0.037364596396429473 0.11166748880063135 0 0 0 +0.20882321421317523 0.089806075337412306 0.080221007046717668 0 0 0 +-0.0065218489428470194 0.13599833263460592 0.11357452582902924 0 0 0 +-0.11296683198579127 0.0073522574771391069 0.13984312771522209 0 0 0 +0.10805239181485954 0.012671911124122304 -0.10427134842509403 0 0 0 +0.11631187789086245 -0.020679297268505675 -0.038475912473505347 0 0 0 +-0.057617419197068143 -0.079360974470432388 0.10536129039422606 0 0 0 +0.010001752924409135 0.078863352351046634 0.038731657513011719 0 0 0 +-0.3126866246892675 0.094280041394995517 -0.0055802385907010033 0 0 0 +-0.072441903474486924 -0.051687564065378638 -0.042368813223727514 0 0 0 +-0.14349229395393753 0.039492032066352656 -0.054750541818872567 0 0 0 +-0.068139907139777245 0.19413964135285605 0.05706046182513938 0 0 0 +-0.007909492245228078 -0.019408800466112819 0.14971886068001064 0 0 0 +-0.33781108979389773 0.084569405542397391 -0.019950009961663268 0 0 0 +0.084597832992465649 -0.049121880703154486 0.11241616166667359 0 0 0 +-0.022345021488424432 0.13266484913345938 0.16533413368279484 0 0 0 +-0.18600060064123713 0.030640802000905354 -0.0095502126551568478 0 0 0 +-0.28259086121465316 -0.14187737884316595 0.002545023061955809 0 0 0 +-0.10178036404518181 0.078859836165996233 0.15240672897827998 0 0 0 +-0.21420110811603493 0.023294218347673756 -0.0055998476633047634 0 0 0 +-0.1530596086437232 -0.13179030450694962 -0.042702573083564177 0 0 0 +0.074055833809990423 0.056567386794011576 0.038457669041084136 0 0 0 +-0.25888507146672579 0.11169204583576881 0.047968450560505971 0 0 0 +0.19722311894877115 0.16118300773657296 0.0026862520474647267 0 0 0 +-0.1384836861481914 0.1843744297762378 0.074374610010260273 0 0 0 +-0.33746783633375776 0.088651696385870671 0.024405816412619324 0 0 0 +-0.18687998389476446 -0.048734517350982415 -0.02488866356187408 0 0 0 +0.034514709774898289 0.086648611198885339 0.17016610441579669 0 0 0 +-0.023681550104222293 0.085031551598839461 0.18165147772150023 0 0 0 +-0.035998054029105719 0.034516896016861309 0.071306318389222939 0 0 0 +0.017233571836282435 -0.09984238378586574 -0.019248928392242626 0 0 0 +-0.11336895021008797 -0.012480067333525524 0.0027341054691704947 0 0 0 +-0.37047881559801987 0.036213216172236939 -0.023405654883791677 0 0 0 +-0.063566543962655153 0.053922415461480133 -0.071279438065120937 0 0 0 +0.21538685120045903 0.10526867590157779 0.039573886014621695 0 0 0 +-0.23397202498645991 0.12507163948546535 -0.019957840855732545 0 0 0 +-0.098758083586748702 -0.21177358268458771 0.073017775761241105 0 0 0 +-0.050318710328559446 0.15790493183267162 -0.0049027458655233613 0 0 0 +-0.1410213777767611 -0.19059909082393023 0.0641345174235953 0 0 0 +0.14378834264446977 0.16346311677393643 -0.083400944210641551 0 0 0 +0.021906959310374174 -0.059966515469998594 -0.15953638677416415 0 0 0 +0.035863058128177638 0.053655045110072019 0.13129527123200893 0 0 0 +0.095386280711567906 -0.041555851291965706 -0.070212632598155633 0 0 0 +-0.2771556423999556 0.088933424689232377 -0.043613832003322889 0 0 0 +0.015788315391400742 -0.045809341602318004 0.035228548272701915 0 0 0 +0.14353160828711925 0.037381824782204309 0.10686111461922757 0 0 0 +-0.39704075948288664 0.020522477588794635 -0.036360091701714781 0 0 0 +-0.079433059198746936 0.095934200313411655 -0.10877971905860398 0 0 0 +0.30598598323550535 0.094941317854311758 -0.013019324903228324 0 0 0 +-0.16981011379638222 -0.044098063149816374 -0.032389020870263685 0 0 0 +-0.11645495831536834 0.16752285665657929 -0.035496612875469014 0 0 0 +-0.075260553554543308 0.0033716766287372191 0.11475958182485027 0 0 0 +-0.27068795891601827 -0.15837464036460269 -0.023815713377992154 0 0 0 +-0.20624362527013762 -0.00036515658336552792 -0.020960063677135377 0 0 0 +-0.39835249034462267 0.061755994920687729 -0.053155211242733508 0 0 0 +0.18574266805776857 0.12959216388539174 0.036646403830445845 0 0 0 +-0.44033935338611951 -0.021359359841188419 -0.019505944450610768 0 0 0 +-0.13579167395312108 -0.14395460034065369 -0.005070087855876898 0 0 0 +-0.17092293091316246 -0.12080369742362901 -0.02254580311129567 0 0 0 +-0.1173984520335985 -0.027556376299797569 0.077193384912182555 0 0 0 +-0.42078618731773693 -0.0024536664120392015 0.029321262846471741 0 0 0 +-0.36740585088690048 -0.09121503042412224 -0.0091999873673166144 0 0 0 +0.12191561629998487 0.069551946252309704 -0.04226016553223319 0 0 0 +-0.22944385925803101 -0.13139720028713486 0.067253722758132045 0 0 0 +-0.13773192106545207 0.043482268341340113 0.11300360254441297 0 0 0 +-0.073801664183561266 0.03534917189939224 -0.017533791058791326 0 0 0 +-0.19509360551959137 -0.052814066054162112 0.10666159974504727 0 0 0 +-0.095924243989528646 0.014447755918166133 0.090552562166737877 0 0 0 +0.19555712096096939 0.12967286179942727 -0.013237824724989022 0 0 0 +0.21671036778821834 0.065008413404115006 -0.0052282818293054589 0 0 0 +-0.21501951713919643 0.037922445140987138 0.0060469958080975328 0 0 0 +-0.047613881482381881 -0.036672068587237511 0.05364856116130437 0 0 0 +-0.06456113233849875 -0.18551578705289776 0.0045278547094175503 0 0 0 +0.13319461883659706 0.075104312792948436 -0.01838684168781432 0 0 0 +-0.10953245849822651 0.1400612798554427 -0.088378294119224418 0 0 0 +0.02040879917621613 -0.13112473010736381 0.09136067542279605 0 0 0 +-0.18819947239217583 0.14336192985156176 -0.00029739433445688523 0 0 0 +0.0010708489225362272 -0.062607399614900361 -0.098870353514849199 0 0 0 +-0.31578016255345431 0.074617986297947803 0.041197646209575223 0 0 0 +-0.12886456974036997 0.094164976664805278 -0.088870594729867289 0 0 0 +-0.1158672818898806 -0.0058513335159397772 0.073055619606166605 0 0 0 +-0.024358955558328954 -0.034529407966695735 0.13465375741250815 0 0 0 +0.18062291987684781 0.087313201229433535 0.049515135770456853 0 0 0 +0.27778446713202393 0.1620938159640925 -0.037193290810995261 0 0 0 +0.25263934346777611 0.14429121748738644 0.072425200424877018 0 0 0 +-0.073603017617503708 0.068125606439876807 -0.097454816798767066 0 0 0 +-0.14371900564146001 -0.17135129809816044 -0.0014938824739987033 0 0 0 +-0.31959212255643688 -0.05208735068597134 -0.053859593694676633 0 0 0 +-0.038824152240569287 0.17239492931066219 0.020569881829238967 0 0 0 +0.020325057675833758 -0.10199886305434956 0.083895884886893896 0 0 0 +-0.085962044934667692 0.079584816680138892 0.069170814102789829 0 0 0 +0.034300100875769235 0.11334648425844823 -0.064587800316277422 0 0 0 +-0.14313923574625287 0.013559857616339321 0.10136680614927177 0 0 0 +0.0085463958322978262 0.05801746369341293 0.17469709020653365 0 0 0 +-0.14819186155890818 -0.037681380970891104 -0.026566836617431588 0 0 0 +-0.31714271371370883 0.0820812648016363 0.046145271282125255 0 0 0 +-0.07030518804103375 -0.0011232650993648063 -0.068836429310338565 0 0 0 +-0.20587503743070878 0.1063128188000298 0.089932003492509932 0 0 0 +-0.153560151114841 -0.099422481639674876 -0.031451609218487525 0 0 0 +-0.033330916302830471 0.022725707104464504 0.12684144823446494 0 0 0 +0.050164567866276488 0.14225076996959002 0.0091511083441437324 0 0 0 +-0.038504054158972623 -0.066593492801405502 -0.052510801784819455 0 0 0 +-0.10559219480462378 0.15123627067043771 -0.075663295756468074 0 0 0 +-0.10885233326119143 -0.1199433231167244 -0.067071785236484827 0 0 0 +0.084068820663532218 0.14383703548192278 0.12138517444837696 0 0 0 +0.077439172348945873 0.075415997742130869 -0.11893547661225497 0 0 0 +-0.0032010559636191926 -0.060880360548820373 -0.14338534253726945 0 0 0 +-0.10998382077891383 0.10464108581010623 0.06924287900863399 0 0 0 +-0.29969316350571351 0.04754283795541292 0.0129045177085651 0 0 0 +0.076217300137274402 0.21212789684186784 -0.027314428495963106 0 0 0 +0.057220087629554273 -0.094764793039139372 0.020587818462123625 0 0 0 +-0.058584583000573343 0.023968640074545966 0.13620852171853789 0 0 0 +-0.2421790147548728 0.0042254090147917089 0.067717060217742348 0 0 0 +0.020731590209479844 -0.098340051583278465 0.070094326070746865 0 0 0 +-0.18960491086731202 0.041150193785670641 -0.087784199311320671 0 0 0 +-0.33123412862897156 -0.045592662186939276 -0.010060916971426442 0 0 0 +0.080594948536022504 -0.05212457230084297 -0.11958053711313661 0 0 0 +-0.29184258509684358 0.022827574307297815 0.0075602311098207642 0 0 0 +-0.19447135266794824 -0.15655764461835803 0.0019638217636812616 0 0 0 +-0.3119334855436231 0.065027100352367362 0.070848230856935951 0 0 0 +0.0032817002648091176 -0.17210265460504034 0.032119007779618736 0 0 0 +-0.15698421610737689 0.016608181229981117 0.094651630050535757 0 0 0 +-0.12596830324562036 -0.15863414347417187 0.054892294191372121 0 0 0 +-0.20088604705605895 -0.15590374471561846 -0.006137867195499136 0 0 0 +-0.21852827746456027 0.11226900731744893 0.086248210986138801 0 0 0 +-0.11118033669280125 -0.033621480239434648 0.1460108336700178 0 0 0 +-0.14239101050048603 -0.010083817099744014 0.096419597098190341 0 0 0 +-0.028908314204171781 -0.12136604072524841 0.068344170905228679 0 0 0 +-0.066131442112326688 0.048478646929022373 -0.11449500732836546 0 0 0 +-0.087833552244950597 -0.043676593423776333 -0.048796377771798516 0 0 0 +-0.11972776868539398 0.16658983158826829 0.11106513890898598 0 0 0 +-0.24597422184733678 0.019272668813835825 0.081255195947879472 0 0 0 +-0.10709339291779563 0.15085726931477755 -0.045714068027987609 0 0 0 +-0.1329405780758034 -0.054755337534694942 -0.023956529312288394 0 0 0 +0.037148308046583478 0.20964303090584696 0.049435719109950121 0 0 0 +-0.25008870583363813 -0.087811970922645199 -0.011339869254040069 0 0 0 +-0.030428752977065765 -0.16949158274896817 -0.091919822877183546 0 0 0 +-0.089037390447850362 0.1648583960593431 0.082140671746840727 0 0 0 +0.16674195350358495 0.062765874880048422 -0.023394124907266806 0 0 0 +-0.020902820028285529 0.15337248384512631 0.077407539806467945 0 0 0 +0.040108234165264267 -0.021666097886179597 -0.0368648480805219 0 0 0 +0.022523147919047581 -0.0057130519408160052 -0.14087388887603486 0 0 0 +0.042325248005830207 0.21088072975701139 -0.027901201808686354 0 0 0 +-0.084628505926032105 -0.0099777331306762085 -0.00082488765098340244 0 0 0 +0.10966489166867915 0.089804535600899682 0.10933279506868124 0 0 0 +-0.36506293796579825 -0.032107350600961149 0.067863345507017309 0 0 0 +0.0023170230767922129 0.025303858498627319 -0.1133685303483461 0 0 0 +0.3074077358733513 0.11980102823480682 0.017637383254110822 0 0 0 +-0.11127161966714777 -0.058467023930280471 0.024146024650102016 0 0 0 +-0.18359449367527386 0.069969882873117895 0.11396763270146168 0 0 0 +-0.01143029413836083 -0.033712803384886608 0.1169615615524254 0 0 0 +-0.2654841294980399 -0.060486237477066468 0.1033180701025487 0 0 0 +-0.36031235808652362 -0.0044695644599776763 -0.018598352683056596 0 0 0 +0.040912577560998031 0.057149459455568818 0.079128856757342797 0 0 0 +0.080035855339877282 0.12735031908876493 0.065840897514414992 0 0 0 +0.061863396125959647 0.14269324385202398 0.10996576904133662 0 0 0 +-0.01774202828486221 0.10483189555311434 0.060490536927972932 0 0 0 +-0.11846344526131408 -0.090673350305113476 0.099028999774767562 0 0 0 +-0.091200242175192126 0.16656956035416476 -0.064931272727303202 0 0 0 +-0.29186104991741713 -0.016752096379907822 0.10962121285818519 0 0 0 +-0.11387185156477386 0.029378107543959253 -0.032348893084183344 0 0 0 +0.15153282382158323 0.11961799299390891 0.021328410746959042 0 0 0 +0.20438690020625244 0.12405837056368446 0.02240746109391889 0 0 0 +0.052769422676861188 -0.11369024388574252 0.014444148003803559 0 0 0 +-0.059846094432883024 -0.12324624705672359 0.10417515860884216 0 0 0 +-0.31832644812166228 0.02878064265758451 -0.054026678386611848 0 0 0 +0.075973414175058707 -0.012875389810547255 0.11768606674560392 0 0 0 +-0.086079091966389742 0.07475534240339976 0.10788210277491436 0 0 0 +-0.042954357456495118 0.0047018616201043861 -0.19280847691887104 0 0 0 +-0.019483908480901757 -0.055016192545344594 0.065182172722495185 0 0 0 +-0.060631235715213727 -0.081516414539923449 0.074851774196778881 0 0 0 +-0.16288378051001351 0.11050874493962942 -0.0022816125345062332 0 0 0 +-0.11332868480071662 -0.1067359625642323 -0.13957635690013179 0 0 0 +0.091600811099542712 0.19854825224575401 0.096104853373621096 0 0 0 +0.22903518411344842 0.062750598954705972 0.050811179833789355 0 0 0 +-0.089678971255291284 0.062689796389730157 -0.015657184673487201 0 0 0 +0.15046194887905612 0.14859728008660256 0.094862864626337334 0 0 0 +-0.11961830507510113 -0.1569855159558356 -0.024343288933479229 0 0 0 +0.076959888928632647 -0.056218748607981955 0.054534731443225876 0 0 0 +0.027501537300129331 -0.048013111492896943 -0.18178060767580895 0 0 0 +-0.037643644008364119 0.0071997316793827315 0.14905962184817714 0 0 0 +-0.058133683275715498 0.049340469303608414 -0.16404693312012916 0 0 0 +-0.11560015438676119 -0.081853787323070692 -0.080517444647795977 0 0 0 +0.14755207969061329 0.13799923490400379 0.077355117759888542 0 0 0 +-0.01406651129231562 -0.13288422700760699 0.089796517311164642 0 0 0 +0.011556113969748816 -0.15930775003382097 -0.0026031104353768653 0 0 0 +0.22264133761540511 0.14977356232012995 0.0093844490495654798 0 0 0 +0.02983328161421922 0.18393048897832537 0.072540086581990099 0 0 0 +0.24182092711927367 0.15374067448991258 -0.077148815414641511 0 0 0 +-0.11015243409380088 -0.094490186418734967 -0.11651008797246171 0 0 0 +0.043682078438841254 -0.095050713263912151 -0.15029273057910475 0 0 0 +-0.026566181657079191 -0.1696118023516559 0.036569234354177027 0 0 0 +-0.32983658837020402 -0.021594014486300772 0.051007011776280586 0 0 0 +0.12611843408931506 0.060902368981850807 0.10244365256634538 0 0 0 +0.15402227851082567 0.14708360515123325 0.034724832411668738 0 0 0 +0.1269941607331973 -0.034586959072498147 0.05396356051352294 0 0 0 +-0.0063740086928196771 0.14706162904821335 -0.0085738108253143597 0 0 0 +0.1192160388229298 0.18396020552891307 0.071247746984702071 0 0 0 +-0.039804210921535299 0.17290428181665107 0.011731024176443006 0 0 0 +0.006079108677695011 -0.1303669923361 0.11600519205665402 0 0 0 +0.17182579578824569 0.10527647760448605 -0.018022560035155621 0 0 0 +-0.091785928174573983 -0.025309239555785457 -0.11157543307927158 0 0 0 +-0.14431969107174553 -0.18484130278560801 0.048324106775639114 0 0 0 +-0.095573100626932028 -0.054732701544598222 -0.02520307591726817 0 0 0 +0.022390291227910197 -0.14486597785731639 -0.061727358664430687 0 0 0 +-0.02027690716585151 -0.10241631241676771 0.11951935139151801 0 0 0 +-0.06499545412289448 -0.050255376295547022 0.020500378397836361 0 0 0 +0.18068008482391246 0.13677800260208967 0.049371158555665984 0 0 0 +0.126480225683616 -0.01287820905546519 -0.12297916723048267 0 0 0 +0.12930999373140278 0.091199316490581717 0.14780720341854262 0 0 0 +0.067672751182608681 0.15208083660173277 0.010498202752747571 0 0 0 +-0.22373787635953868 0.12859314903850105 0.048000235825936322 0 0 0 +-0.030306984399156689 0.16411511561932646 0.088767983220335106 0 0 0 +0.052749104231824162 0.0013074954508445202 0.018294958000069944 0 0 0 +0.16166393171311116 0.026463784485353137 0.0050577676706658747 0 0 0 +-0.2509121678257501 0.13172955461903801 -0.025590981871599805 0 0 0 +0.011456042434642988 0.16530804773976654 -0.068706077773259017 0 0 0 +-0.12782537798263371 0.058766767932207753 0.026688011242618326 0 0 0 +0.0087526182616827763 -0.03258775738842648 -0.15721335779410089 0 0 0 +-0.20078976175204388 0.082939047322264869 0.083620737086955915 0 0 0 +-0.034362651615247652 -0.021652783630988576 0.19105033480023451 0 0 0 +-0.22231122456011365 -0.069071214137261278 0.019574843871244696 0 0 0 +0.098922238866216483 0.098505209891742995 -0.011795389928296679 0 0 0 +-0.044160158498429247 0.093523501958101996 0.10259336775863401 0 0 0 +0.24334598578188565 0.11146229247461165 -0.035092012783428661 0 0 0 +0.13921938546278506 0.21049086864336902 0.019069230944889132 0 0 0 +-0.15700659564677166 -0.031199024928166535 0.11365048121319429 0 0 0 +0.08973117933221858 0.15349685745945152 -0.0464949546188754 0 0 0 +-0.006392982173643591 -0.10113082326270641 -0.040928234836979771 0 0 0 +-0.08872551142404328 -0.13714642585692183 0.11872202499108389 0 0 0 +0.13025328564831512 0.12570344784242798 0.020407910804137119 0 0 0 +-0.020158294473344052 -0.11129527551634098 -0.15760567884820373 0 0 0 +0.11479329576567271 -0.0032246910235164961 0.0099377741248300178 0 0 0 +-0.29958312736921011 -0.096560577731581415 0.045213065560756716 0 0 0 +-0.10657749465127481 0.12375637124039884 -0.073229506119111554 0 0 0 +0.01231999620127483 -0.1538790224717809 0.035255965405532635 0 0 0 +0.19325416583449578 0.021934467802274954 0.10162995318712295 0 0 0 +-0.26788029831596188 -0.061853591823504334 -0.0055640003872746702 0 0 0 +0.015555348240933353 -0.037552314255096503 0.021150075839477589 0 0 0 +0.14902069293745085 -0.032422804038659214 0.062203049297762575 0 0 0 +-0.23862030028945536 0.033344168734875945 0.06873509779546319 0 0 0 +0.085507188654444122 -0.067103603931226302 0.13439099038177263 0 0 0 +0.028425762015755696 0.15943024528272914 0.079613159025739427 0 0 0 +-0.11214643518185946 0.06499850803003876 -0.13048964123050635 0 0 0 +0.099619644191369872 0.0065325018863477691 -0.0040735339535218629 0 0 0 +0.10377004465527367 0.03636841407358643 0.15553637996029293 0 0 0 +-0.03531800286146819 0.0058120493412706919 0.12156558148063859 0 0 0 +-0.015286137991945781 -0.01170052758718515 0.013620224632452244 0 0 0 +0.097095348920314517 0.12823985650639791 0.030135524903548427 0 0 0 +0.13270794094739941 -0.035764316487176345 -0.040754832967644095 0 0 0 +-0.1591474869314628 -0.026734124232613038 -0.014767268898861485 0 0 0 +-0.052573998018675516 -0.11439779554208696 0.0069880441669551707 0 0 0 +0.18826550574889406 0.074470432891744653 0.10953668568674194 0 0 0 +0.12889757910504002 0.14042789927932803 0.14019942829024698 0 0 0 +0.16322774605426232 0.089122833484051756 0.0413716449147081 0 0 0 +-0.058308091009338425 -0.17512019398322656 0.047991401913573956 0 0 0 +-0.099653121936509881 -0.084614034138432243 0.15707893744273202 0 0 0 +-0.10551528733987831 -0.069074418905301027 0.16105172730979181 0 0 0 +0.12907960880641117 0.12485198618756094 0.088819162586097594 0 0 0 +-0.02570528363100022 0.16050754316965626 -0.11652934284204802 0 0 0 +-0.03389484366087947 -0.00017384159088834616 -0.13201308474487392 0 0 0 +-0.19975865716322094 -0.015672779422719968 -0.061075592625188163 0 0 0 +-0.35838914806933841 0.074711062502706427 0.0060154717395463908 0 0 0 +-0.14544241837159033 0.077612226372088311 -0.081806846847628706 0 0 0 +-0.35143877775185278 0.020166013486476148 -0.0133469094153843 0 0 0 +-0.17167163609839281 0.039617163447791703 0.11445802974934735 0 0 0 +-0.16558648288425293 0.11821433886121957 -0.073286122352678784 0 0 0 +-0.15306517329616476 -0.0061980179675556746 -0.0057605323819560073 0 0 0 +-0.42366475802876991 0.0016136622790768607 -0.026373800428316913 0 0 0 +-0.21663586482263641 -0.16623551785934718 0.055117820153491121 0 0 0 +0.077117892180229519 -0.033773203292379622 -0.099073199902316084 0 0 0 +-0.25364148000895514 0.049312649526779995 0.11409217571746558 0 0 0 +-0.07571733763954841 -0.16561421779178737 -0.0161543500063899 0 0 0 +-0.12028864294822567 0.010111898592840396 -0.032213718965349719 0 0 0 +0.17005285066014147 0.074308666104758614 -0.088404345862540881 0 0 0 +-0.030740949441148024 0.06778669456275549 0.10297053623784611 0 0 0 +0.085759346959067007 -0.013074284401778602 0.14278157552729967 0 0 0 +0.031273598083772225 0.078819702566477912 -0.024906639550649562 0 0 0 +-0.38631905471534006 -0.10193899045681536 -0.055468973395635363 0 0 0 +0.058997351457020175 0.033235698806043212 -0.0023178814012347615 0 0 0 +-0.1777143346989784 0.0046543724536015629 -0.016334057914666356 0 0 0 +-0.25023174593321984 -0.10643429928860117 0.085255287107789429 0 0 0 +0.026383132478697224 0.22252609155007264 0.082283736721784823 0 0 0 +0.051967466129672235 -0.0015628394195637829 -0.14048916629347624 0 0 0 +-0.088432972448996783 0.014074372062749668 0.1457822581832828 0 0 0 +-0.37222093878703194 -0.034041344904210902 0.059197896592273841 0 0 0 +-0.21275370630396068 0.14069614969435146 -0.025025452757359484 0 0 0 +-0.33402515120165654 0.01025090045366342 0.030937214795557305 0 0 0 +0.061968459409391496 -0.0071124456146503812 0.10388423689360496 0 0 0 +-0.19948123174641519 0.04302027627996724 0.11974645975747381 0 0 0 +0.020187187317875221 0.068733699770360701 0.058624118706085721 0 0 0 +-0.27529694720591891 0.087596521100749725 0.006206739141265849 0 0 0 +-0.17796249363404004 0.042276255635556759 -0.071932286020079145 0 0 0 +-0.051912597978820585 0.069156611352876263 0.024562219878656338 0 0 0 +-0.031923771586215621 0.016833447102000465 -0.032330056092475551 0 0 0 +-0.014876701635592682 0.05438586737040757 -0.18872184790990687 0 0 0 +-0.14471260163853877 -0.17897291287558947 0.030496774853126601 0 0 0 +-0.37588332282191145 -0.01516012426865429 -0.083899969666308721 0 0 0 +-0.24318476833658295 -0.18542373955233582 0.016699539987022533 0 0 0 +0.15310912905965463 -0.024683737072018458 0.071199281690278532 0 0 0 +-0.15027182736299005 -0.11069221176334006 0.10671505469811984 0 0 0 +-0.19856722785183695 0.04421102633953794 -0.0086273777199066259 0 0 0 +-0.21682937414690856 -0.041634451317680093 -0.033660857533559657 0 0 0 +-0.17184893367223447 0.013188347831653874 0.068092672654138903 0 0 0 +-0.070450078363933188 0.17726562136361002 0.077167066774039089 0 0 0 +-0.14429656252446355 -0.14709917194344896 0.071797155406265495 0 0 0 +-0.42013954107047757 0.0054726343564754087 0.011823302787609874 0 0 0 +0.14160512334442926 0.017099757264823628 0.044226370494694439 0 0 0 +0.065858934107464739 0.075226229768269703 0.16689792608166718 0 0 0 +-0.051965621841915444 -0.010468017020522163 -0.096382489254780573 0 0 0 +0.26094865179495647 0.14893325984620304 0.0066680328791681731 0 0 0 +0.035073370269716186 -0.0072139514966467477 0.15343100000931273 0 0 0 +-0.022740813581524466 -0.029924963750333072 -0.078838414487767031 0 0 0 +0.049245380625491941 0.068785742607470612 0.048111197532426569 0 0 0 +-0.094786327172520168 0.11405985560049581 0.0334268465435342 0 0 0 +0.11978506185320431 0.20407175831131497 0.047011251063848375 0 0 0 +-0.025096566961754607 0.13044821990497313 -0.05950058045589271 0 0 0 +-0.031270630284184642 -0.10408883851342464 0.069504111159627319 0 0 0 +-0.1866030225454085 0.11476219262825882 0.0042462274818499679 0 0 0 +0.020616354854756491 0.042663385103701601 -0.17918628665926262 0 0 0 +-0.25181429869822924 0.072677484792761038 -0.033174694771116592 0 0 0 +-0.25943527331192751 -0.049052794959727225 0.06744116799741659 0 0 0 +-0.096530615379789408 0.086709476304278721 -0.029604074398556723 0 0 0 +-0.21979638787554112 0.086338772477097314 -0.043855110160744754 0 0 0 +-0.29179097724411873 -0.084781113219857235 0.037474324052407859 0 0 0 +0.090126172911864699 -0.019674772439486371 -0.13630234758236631 0 0 0 +-0.32520470243303107 0.07008135795468512 0.039961496242849143 0 0 0 +-0.16890684769701447 -0.088187655280201255 0.091547626114471342 0 0 0 +-0.15057966280234047 -0.1366545900223311 0.085771423465197921 0 0 0 +0.22455732586633176 0.15140381409304493 0.083770797571494221 0 0 0 +-0.14167171729045924 -0.071820460478701165 -0.038491171977608929 0 0 0 +-0.076684827953050871 -0.17602085716979579 0.023775523281564931 0 0 0 +-0.11739258808032615 0.082587009239564191 0.0027664743898874189 0 0 0 +-0.00061143979785965863 0.021958503455483336 0.0061673208750663289 0 0 0 +0.081764129441077749 -0.086075050470594328 0.081434993335115252 0 0 0 +-0.022000412104823674 -0.093317631122897871 -0.16138357815825519 0 0 0 +-0.045470200124415605 -0.06595737493847964 -0.079068135379437812 0 0 0 +-0.42510658082800923 0.036167272310913989 -0.045026668571140627 0 0 0 +-0.10800211218760353 -0.031769312576249265 -0.027791113171793058 0 0 0 +-0.11127832332552878 -0.17424814560783469 0.11057716280530908 0 0 0 +-0.17162394485401461 -0.071000898292009257 -0.062193543856895989 0 0 0 +0.085974854516498722 -0.046485843012252837 0.088218973926909722 0 0 0 +-0.10131416483277922 -0.027625149769496177 -0.14243306698234892 0 0 0 +-0.085965002419897407 0.10853118802287243 -0.06292457952897762 0 0 0 +0.13172296874446093 0.14677141816527439 0.088012805122565013 0 0 0 +0.07330904082451245 -0.080031631778199691 -0.048028142243401156 0 0 0 +0.16464149201697903 0.1670917267920044 -0.065563131554504855 0 0 0 +-0.062660331337305308 -0.16413046202082421 0.00030059874868951231 0 0 0 +0.10015893175968432 0.022957655163082291 -0.018195917165011621 0 0 0 +-0.17081578952964399 -0.086032304309387242 -0.024859325416032696 0 0 0 +0.13786326171229119 0.11388223910125439 0.090621924882266641 0 0 0 +-0.43244180477578198 0.040083620509453577 -0.0093498007636912961 0 0 0 +-0.0051467879904178448 0.1706245090411217 0.085000054873737046 0 0 0 +-0.073121218483010342 -0.12267844860293066 -0.0090564523493745219 0 0 0 +-0.23705574449851879 -0.05096876498613509 -0.048749117287429033 0 0 0 +-0.097013938605508332 0.05784925567177962 0.10464656365478972 0 0 0 +-0.040184652887808647 -0.086435529367867414 0.018099972023590455 0 0 0 +0.014506733419792639 -0.0030557792080063428 0.17563595134319457 0 0 0 +0.019399754796987356 0.20361605991490556 0.11831577102342386 0 0 0 +-0.12476621927814563 -0.18683877218578571 0.047026821516617662 0 0 0 +-0.063147012249743617 0.092560603988159407 -0.0042517086528250925 0 0 0 +-0.46218276034214767 -0.029892654556751275 -0.0147571759692747 0 0 0 +-0.043540721417607287 -0.17054581243154315 0.070371064442725367 0 0 0 +0.0098551884819637059 0.0018591944590709009 0.19802480105952078 0 0 0 +0.080596174082227467 0.055831023495518106 0.1047218332811212 0 0 0 +-0.12707854871826718 0.058212006156958152 0.12771421932068841 0 0 0 +-0.14837021802281031 -0.045960286326915983 -0.11881652992967004 0 0 0 +0.016013386215025072 -0.01857953894603534 0.015203945035156791 0 0 0 +-0.28485961101776924 0.074423110999440767 -0.02632174149552266 0 0 0 +-0.16383452244785851 0.12303585893923785 0.018774188556497928 0 0 0 +-0.016852146072140917 -0.14046808664899973 -0.14561504533403413 0 0 0 +0.21668259403157736 0.16754408034697316 0.061809276902365012 0 0 0 +0.26051532579047137 0.12198165667164046 0.016923776672434998 0 0 0 +-0.047237959638882943 0.14696131528938139 0.1403990770115843 0 0 0 +0.05811207023876247 -0.090224597750281937 0.12709170139140494 0 0 0 +-0.052928094709545903 -0.029709334028743234 -0.16026666614483437 0 0 0 +-0.058754958108987232 0.21737972347841644 0.010306069521429956 0 0 0 +0.189948771353946 0.10117453943182808 -0.043664407478930439 0 0 0 +-0.15773568831367191 0.13363821277108179 -0.073452029523786155 0 0 0 +0.29311412775276685 0.14892536947297674 -0.017792060936436066 0 0 0 +-0.019416105505570325 0.22512513208623136 0.062128483993364042 0 0 0 +-0.076969633100442636 0.12149041111578512 -0.039706036347910284 0 0 0 +-0.21042108600587356 0.063787005689180443 -0.050551761701566639 0 0 0 +0.17335258261083158 0.085960902845979181 0.092287928242432399 0 0 0 +-0.0056825221171766249 -0.15603821089691344 -0.00091596980594099708 0 0 0 +-0.25405615526356273 -0.00059145865586449076 -0.040328343760306001 0 0 0 +0.16895544640243282 0.024893238892491426 -0.017729555984883572 0 0 0 +0.075049525417056839 0.16619208931111867 -0.083155388142143377 0 0 0 +-0.086272160653327656 0.014564383944615233 0.15584174751515498 0 0 0 +-0.029636999489385696 -0.075773786984186631 0.11716395497586576 0 0 0 +-0.13691580970523415 -0.10368661538670214 0.019321988398844386 0 0 0 +-0.14602016345132846 -0.12712171588268364 -0.0099018484432729925 0 0 0 +0.25521253436672958 0.16675228246461599 -0.063140536440396217 0 0 0 +-0.038108508082085768 0.054878559066328658 -0.13162734763428058 0 0 0 +-0.094456455331596134 -0.021181205108833034 -0.081376325703531968 0 0 0 +0.29191610550919306 0.12247354241005748 -0.012126180089144956 0 0 0 +0.071566137261490803 0.10042362820415385 0.050897638785420918 0 0 0 +0.13035088114927523 -0.037413839918411823 -0.0078260017468193555 0 0 0 +-0.044920321388065398 0.063977736399948582 0.16379169333982327 0 0 0 +0.023895586588061402 0.05040283502331 -0.14101540022149633 0 0 0 +0.14084788997504621 0.046612043780900059 0.12748776311154617 0 0 0 +-0.33760788720408225 0.029684882213647013 -0.07729963888366706 0 0 0 +-0.24458934632183055 0.0098523770638331565 -0.032623067011464391 0 0 0 +-0.039720840523950807 -0.10433291984140362 -0.10150130484114028 0 0 0 +-0.10028210527779541 0.040659702355877458 0.06336119273297583 0 0 0 +0.0088862235828022773 -0.020098814033107842 0.15519751181721173 0 0 0 +0.058414324019942343 0.078967950128479847 -0.10430256618600431 0 0 0 +0.2661555339302471 0.14107287732031104 -0.0094972149358536206 0 0 0 +-0.35240108623076932 -0.066416015090487918 -0.07367734626850439 0 0 0 +0.0045658954501104909 -0.11239015839793069 -0.10485491683168895 0 0 0 +-0.19087966598348 -0.13138274317006721 0.069439685937628143 0 0 0 +-0.13079414027811498 -0.18596931581084944 0.063659576473626328 0 0 0 +-0.3764740852203593 -0.017016039644942638 0.0064397731677647563 0 0 0 +0.16308717178538906 0.023016979889424499 0.045478939293534498 0 0 0 +0.029908406122752862 0.1532977527581188 -0.083494603433884207 0 0 0 +0.02998165697785321 -0.067242915067264819 0.022906873982341508 0 0 0 +0.021398387867726798 -0.12785343534099544 -0.13953408124774555 0 0 0 +-0.04171269926805754 -0.060248633794251855 -0.051633265479909263 0 0 0 +-0.37761060454434719 -0.014229648793255445 -0.024506401279415002 0 0 0 +0.09548577858674806 -0.041498637733074384 -0.089973213871842705 0 0 0 +-0.095348778433289871 -0.092494390831444423 0.031909656531705993 0 0 0 +-0.31453610655722442 0.012604632199059218 -0.036450101223006376 0 0 0 +0.090856619234795211 -0.01130723617447682 0.013964078164439647 0 0 0 +-0.14066128411002693 -0.14872631704254077 0.0043106224443670293 0 0 0 +0.052108213856981556 -0.034290755875169304 0.14799114189944182 0 0 0 +0.013607446283111335 0.085769481834643502 0.15649308917908419 0 0 0 +-0.04005862796487758 -0.10839577603594774 0.15343219201013816 0 0 0 +-0.1799814591323049 0.10837803960527431 -0.024175488966792363 0 0 0 +-0.38485593469688206 -0.079525816232673824 -0.035368960929730908 0 0 0 +-0.12019321208761774 0.14655917954789988 -0.047126060114921542 0 0 0 +0.16910807546575318 0.11631137509986433 0.075794034791330317 0 0 0 +-0.24285066206913211 0.03305278479074919 0.12599809029304468 0 0 0 +0.13605518501545527 0.022532730293152836 0.16045046119027209 0 0 0 +0.066710622964419819 0.052681222485755075 0.13361162289114251 0 0 0 +0.1674170752772362 0.14417921016973162 0.018998027970182241 0 0 0 +-0.03188818124070536 0.10493867903246867 -0.071567187918326808 0 0 0 +0.051756944651990155 0.088193289261171592 -0.064029951912541877 0 0 0 +-0.38456766793887132 -0.037052782522276534 0.026239787187648939 0 0 0 +0.15684269567508008 0.0020421391020351842 -0.032774057743025942 0 0 0 +0.072573803420858451 -0.016259162661137999 -0.15028738801692518 0 0 0 +0.20730796332134865 0.0390949196911482 0.026745593923202721 0 0 0 +-0.19743334252632228 0.034040836430953347 -0.031476356648176912 0 0 0 +-0.24058786653860476 0.081686507330167579 -0.021867783536975743 0 0 0 +-0.14212986447912179 0.00031783382324779286 -0.026630403435472405 0 0 0 +-0.31929757766117578 -0.1486696757713058 -0.0055140310295140327 0 0 0 +-0.0079796873597754447 -0.077329855969645089 -0.034025018148289982 0 0 0 +-0.26920196468040347 0.043222335373490128 -0.050356792061494654 0 0 0 +-0.073392072130311292 -0.035292631089444276 0.044470372005505021 0 0 0 +0.056515437863837004 0.021081177482733499 -0.07822992934689578 0 0 0 +0.27083740272826046 0.078265068656397041 -0.041760141699297815 0 0 0 +0.10206299068065355 0.020321994428121937 0.12228692316563053 0 0 0 +-0.22228106433283307 -0.07435290253810678 0.016360253223498822 0 0 0 +0.016086409949166602 -0.10736828216769036 -0.032922372459652377 0 0 0 +0.12247398165092799 0.10171009401679038 -0.093176734932729974 0 0 0 +-0.21888750648444988 -0.042374245343598543 0.050458150438727811 0 0 0 +-0.22295647331435237 0.060013824928794979 0.011248603008243263 0 0 0 +-0.28993476715394995 0.011418996103699314 0.047989185917023114 0 0 0 +-0.074526986869289602 -0.1440515756834303 0.032235069415508771 0 0 0 +-0.12964156263316284 0.18427128692023037 0.064099517784345889 0 0 0 +-0.1095396405844507 0.10385060234741494 -0.1235140921272994 0 0 0 +-0.18700498582861858 -0.006107834471287682 0.0067187197393723808 0 0 0 +-0.12212279849737656 -0.001216292685374154 0.11563571783973928 0 0 0 +0.094653776317520533 0.21476836183746439 0.025195095090302627 0 0 0 +0.09458517822988094 0.041465370931798085 -0.0038029428974338808 0 0 0 +0.17903555033356883 0.17375019793559049 0.067025312120600117 0 0 0 +-0.17948917728853647 0.070150567065511371 -0.073792912614221218 0 0 0 +-0.29366406193024486 -0.042388846389298351 0.049771728196075643 0 0 0 +-0.033264432216261075 -0.01173585735442631 -0.10967426267758058 0 0 0 +0.13424666239061384 0.012886587532703747 0.13058402600378263 0 0 0 +-0.36089915588267851 -0.12338386210520567 -0.049171160207308828 0 0 0 +0.21793782052434513 0.13884046627447472 0.055129660521758744 0 0 0 +-0.25321527713750025 -0.055929358460933443 -0.010773088176933121 0 0 0 +-0.042160686856296425 0.0088273878107904269 0.16605086163215152 0 0 0 +-0.05354125554264294 -0.094022244878874645 0.13286100951978516 0 0 0 +0.059487712409219184 0.19372584160932432 0.0021584017433058378 0 0 0 +0.0064785981941897774 -0.068987982265417941 -0.1176663636736297 0 0 0 +-0.0015865316722356027 0.19860469454422219 0.016803589722366064 0 0 0 +0.26754303325078915 0.1274506157132359 -0.020084257360652558 0 0 0 +0.10561499733073404 0.15040911367824628 -0.053221831298210176 0 0 0 +0.090191570899207096 0.00070037342444806416 0.17084052868097696 0 0 0 +-0.28042947764858372 -0.024636733878828587 -0.057619324134959377 0 0 0 +-0.11323077374900697 0.19290532396782889 0.01593351674235613 0 0 0 +0.053600869803512474 0.12934339952238044 0.12390660724126876 0 0 0 +-0.27783927346250514 -0.11420606011522749 0.0090220269627482585 0 0 0 +-0.052768666755761973 0.13948730168018675 0.13339740877737991 0 0 0 +0.024918789559369825 -0.15161028336799753 -0.081894030727343636 0 0 0 +0.036780771161208314 0.078352684354494329 -0.0090319314016983898 0 0 0 +-0.28720001767231851 0.050463789227380429 -0.055612779078147379 0 0 0 +-0.37961883716016775 -0.116671329054249 -0.046998864660388801 0 0 0 +0.1017187826322577 0.08947624145891192 -0.084585475585012226 0 0 0 +-0.082569762515961209 -0.077734535949551042 -0.044531048513875793 0 0 0 +0.10005792415367204 0.055941187584291674 0.051300915071529812 0 0 0 +-0.12676544792730599 0.17551739780198689 0.018799321933814783 0 0 0 +0.04711282063640182 0.030041740620447288 0.11139905637802697 0 0 0 +0.12656885387470945 0.00014937435486725437 -0.089585883404593905 0 0 0 +-0.042947878273737194 -0.036484441551779406 0.00060887307024282133 0 0 0 +-0.26347592106814499 -0.077055800647304884 -0.0014366159400278633 0 0 0 +0.040218316028283352 0.085307530467377934 0.11680028872310369 0 0 0 +-0.060272929161647393 0.12424856068536405 0.067494895657110004 0 0 0 +0.14387290495470623 0.11605203219657018 0.025930730574944993 0 0 0 +-0.30215210349270144 0.042434033757488721 -0.060802283042377336 0 0 0 +-0.43228990506928416 0.017695823558984303 -0.013713986264496575 0 0 0 +-0.089203424560502231 0.041287712881731331 -0.056329784189508764 0 0 0 +0.28770646237604319 0.10837993273798191 0.049165578233273693 0 0 0 +-0.21740754285825187 -0.069996093316188085 0.054457464134153005 0 0 0 +-0.045114405505978561 0.08421253385646732 0.012047098204378492 0 0 0 +0.22374364292421839 0.12274812418563846 -0.0036839084066585537 0 0 0 +-0.0084012189464201525 0.14885207702975206 0.059156174521333066 0 0 0 +0.056451203068359657 0.12210937962517604 0.027959597661853769 0 0 0 +0.088456119246643483 0.11416150284097015 0.016786487174469511 0 0 0 +-0.37692307274546477 -0.10895333970757481 -0.039723382456791578 0 0 0 +-0.40486873765578962 -0.055749334369796344 -0.038264549434135653 0 0 0 +-0.13010768626454755 -0.049295124941835661 0.081476572276849318 0 0 0 +0.021501911943729468 0.083521928939839341 0.1688741377712665 0 0 0 +-0.19898344382549404 0.13611882167511991 0.077406793529670198 0 0 0 +0.088816892764633504 -0.039353537179530607 -0.12488876907486002 0 0 0 +0.08889555408689892 0.20989722707546499 0.030736685578983264 0 0 0 +0.14854467046015424 0.17146525550917718 0.037171669826320836 0 0 0 +-0.38091414502252829 0.050845223876477663 0.0094006788991470858 0 0 0 +-0.027548519861544496 -0.054905182447498202 -0.17442777406776835 0 0 0 +-0.35678057011453668 -0.010933610938750227 0.01506222113075667 0 0 0 +0.001985813073946574 -0.1411790319797136 -0.17369613524809571 0 0 0 +-0.29184210780271563 0.082484537407968184 0.045194081541381298 0 0 0 +-0.03606618956091584 0.035953581128088274 0.048477545740635591 0 0 0 +0.05241161987077908 0.053812833298440998 0.12151224440959749 0 0 0 +0.046966556628502409 0.026733163412225869 0.06178967191386317 0 0 0 +0.039456935150544103 -0.097266927412503867 0.0016348185830456219 0 0 0 +-0.34734790905458857 -0.033718595227253179 0.037317642310520177 0 0 0 +0.019743364243721528 0.11164438189878406 -0.11794227501497789 0 0 0 +-0.15617576412751111 0.10933779706103075 0.1159546873102654 0 0 0 +-0.069568420121767616 0.009603496615526258 -0.079945853612522585 0 0 0 +-0.030279257124841696 0.074261402897641049 -0.0010418447960801325 0 0 0 +-0.30952299298909725 0.03229197375766607 -0.05546417364772363 0 0 0 +0.043837567487878204 0.047139422705525957 0.074309986894960961 0 0 0 +-0.069034634473649825 0.057071151999067982 0.0017291613364298908 0 0 0 +-0.23167952762752542 0.07749616913403895 0.0094621147442124909 0 0 0 +-0.23070340369435033 0.096297618610308944 0.08139252053199289 0 0 0 +0.051955243167460419 0.11601169041456605 0.051582774907263457 0 0 0 +-0.13018249333280607 -0.069676942283392884 0.014193536002821278 0 0 0 +0.21133177918488383 0.093550457520598984 -0.031170431984690494 0 0 0 +-0.25657946760348049 -0.011691243333694062 0.053789025677198093 0 0 0 +0.21996583004720965 0.17382433274683634 0.0312088510104441 0 0 0 +-0.19112638925710695 -0.017009468403331479 0.10226690693141752 0 0 0 +-0.41331106630701109 -0.053026908871940365 -0.085484673409360917 0 0 0 +0.095824780992537273 0.010166395070441064 -0.049466492938215367 0 0 0 +-0.074653823532352726 0.031863371425513654 -0.0036687792225331139 0 0 0 +-0.20290715716570618 0.061757024267422966 -0.030943995082211684 0 0 0 +-0.2321871289878083 0.07135894624072403 0.06710308214548602 0 0 0 +0.024629196732400438 -0.091276737254998186 -0.011718965986261598 0 0 0 +0.0018218188929673973 0.15852015819762694 -0.10229125665306951 0 0 0 +-0.15643247354312573 -0.13320023709785705 0.0052424485299019108 0 0 0 +-0.0076697685296671092 -0.1426718749590167 -0.0037917220131647722 0 0 0 +-0.026944212966787229 0.12128204914757978 0.1050343901547757 0 0 0 +0.044486912733286144 0.21044832059821067 -0.016283577487247985 0 0 0 +-0.35432969462215669 0.053727995294436337 -0.026117158622193604 0 0 0 +-0.063072001112736809 0.21106478106551474 0.071930303810567614 0 0 0 +-0.15799256400752582 -0.11145071222784651 -0.028586040719296768 0 0 0 +0.095496357283915867 -0.029515023949968633 0.13930300004389465 0 0 0 +-0.21539503046729375 -0.10499590609576508 -0.030349713333826522 0 0 0 +-0.2173026386728627 -0.06737696188507511 -0.035289818460972983 0 0 0 +-0.14983691604665483 0.13886790224161744 -0.046947709984878544 0 0 0 +-0.10288135122104319 -0.14128079916071473 0.13110811967677763 0 0 0 +0.19877797542768288 0.12687059403468665 -0.050371680097968302 0 0 0 +-0.033922991165653837 -0.099965126209026672 -0.17097331242133862 0 0 0 +0.11700217255385353 -0.0075376859710011845 -0.12130333585042925 0 0 0 +-0.11359637349289381 -0.15322090837296098 -0.044520198725954641 0 0 0 +0.071619178886124846 -0.0041428916568965746 -0.037880295223806038 0 0 0 +0.22514991052312078 0.11590343873465619 -0.030336307455052614 0 0 0 +0.026154216092883098 0.15438294037573363 -0.0702967331665936 0 0 0 +-0.031386741245000183 0.037564535969500434 -0.13936511118587058 0 0 0 +-0.057701555230363799 0.00023130401527693412 0.17422910244001213 0 0 0 +0.10554382419781522 0.046276345667357999 0.14956617151899079 0 0 0 +-0.25526268037164823 -0.032942531186035379 0.1186063541294872 0 0 0 +0.094210759692827606 0.072219450554592501 0.087431756978110869 0 0 0 +-0.016202267980556961 0.16372150422242704 0.004182346744887544 0 0 0 +-0.17229047760079386 0.093168525332495089 0.013092882613336215 0 0 0 +-0.084337146014864584 0.025765238863313555 -0.17386266728679042 0 0 0 +0.20985520347781245 0.17221191548771547 0.010736056947667605 0 0 0 +-0.28428136899283857 -0.059636605129412379 0.076970947273647422 0 0 0 +-0.093893422852798891 -0.14429027939221917 0.0335709769121455 0 0 0 +-0.10332575097836327 -0.043950116081669932 0.022848603316231619 0 0 0 +-0.1709796484206012 0.096154715041313787 -0.0049630970102581273 0 0 0 +-0.19218332139136041 -0.10940015500871932 0.0087800324167287835 0 0 0 +-0.11632240016925155 -0.027532600874696417 0.020194402311794452 0 0 0 +-0.012737962520385671 0.1553521690636952 0.098802022100071912 0 0 0 +-0.052871702200484039 0.098998647360725334 -0.1168128441154547 0 0 0 +0.10235981396569865 0.069983324565118632 0.11249072270132929 0 0 0 +0.016447936631999893 0.076118174135259786 -0.018583626154248134 0 0 0 +-0.10020383395358223 -0.0053878141404660462 -0.042395299366971007 0 0 0 +0.040576966853386243 0.15191415011135345 -0.053359416150997846 0 0 0 +0.13436621720050917 0.025054174877149948 0.042384229845139676 0 0 0 +0.049852672970455536 0.12058217861107828 -0.089494837449630257 0 0 0 +0.079828660938602358 0.16343296308296451 0.13989769967015833 0 0 0 +-0.165527029721872 0.0028475103967930127 -0.054476037636262353 0 0 0 +0.11034123520948452 -0.049557271454943347 -0.1008938657872728 0 0 0 +-0.018629824461489974 0.097917280277247498 1.8193128432153483e-05 0 0 0 +0.078507942738030023 0.19219126960731714 -0.0086090896686194518 0 0 0 +-0.25287044970266292 -0.04023487966067113 -0.058719351914293116 0 0 0 +-0.3704711225841148 -0.041748691670928151 -0.017933885086973189 0 0 0 +-0.40399675000486202 -0.046200170807355084 -0.071032194705624135 0 0 0 +0.030484761267572102 0.20343623222638108 0.016571125799361153 0 0 0 +0.16113469868760549 0.13214391572707096 0.10894283054136203 0 0 0 +0.027511746028214656 0.10062366522890281 0.057529815909380083 0 0 0 +-0.18329754379202384 -0.010017847239858962 -0.043973512729574921 0 0 0 +0.038833286695405811 0.022401934720336442 0.073271065819209419 0 0 0 +-0.28161527163927447 -0.063052484345586995 0.088885547805716308 0 0 0 +-0.1059746245516674 0.049772945500596411 -0.050060352724620144 0 0 0 +-0.06617320440375718 -0.08093742499244308 -0.11380829622832592 0 0 0 +-0.052723707387275109 0.058895754973223857 -0.13055014218752364 0 0 0 +0.07112661361353928 0.0061147710920506915 0.074900157066600886 0 0 0 +-0.43673445891877638 0.022965208203576948 -0.041650356399789451 0 0 0 +-0.16097938903256553 -0.064633058465744381 -0.07695870269990758 0 0 0 +-0.027815550620961027 0.13500615268430577 -0.11163900305320927 0 0 0 +-0.095936990350289297 0.041967497663586872 0.0090150594849442156 0 0 0 +-0.029423537910108044 -0.15181980276228629 0.14920201554528531 0 0 0 +0.0018330207556276346 0.1302400447013024 0.15900372434917417 0 0 0 +-0.070676463919363497 0.11757228608401304 0.12766086182913791 0 0 0 +-0.21476349702246489 -0.1915666465557227 0.04208782912159198 0 0 0 +0.19959976027700815 0.04787634522672557 -0.054629556612527469 0 0 0 +-0.23982997448065091 -0.00791498481371955 0.14545020993341504 0 0 0 +-0.12350762716265168 0.013977045251393677 0.078359826685489159 0 0 0 +-0.30093317667329689 0.026505078723647602 0.083373627760257113 0 0 0 +0.15607063784484981 -0.0020032124151634079 0.029803795770550146 0 0 0 +0.04593259432139335 0.011146610310656002 -0.046978451947920025 0 0 0 +-0.33869694882903717 0.090529906992651954 -0.028756351294792731 0 0 0 +-0.17047211735066498 -0.053400071265741256 -0.061594690699022264 0 0 0 +0.13336326162808104 0.17447990453484746 0.023795848557125299 0 0 0 +0.027254774724373043 -0.063393058684081321 0.16212314651239243 0 0 0 +0.12407444371602955 -0.0036720486271856478 0.023249319984308903 0 0 0 +-0.12624135252149082 0.16380074443070308 -0.0039772532937964455 0 0 0 +-0.055161944977655142 -0.009726071561404509 0.17897120492451915 0 0 0 +-0.1257120987112052 0.061238030899055274 -0.14574615187303813 0 0 0 +0.084646431964868596 0.14331894530855771 -0.049953584833835718 0 0 0 +0.10541442496034076 -0.0069848661613878815 0.06980226266339376 0 0 0 +-0.0084220007030968991 -0.059242380964928787 -0.17272098185394097 0 0 0 +-0.35778598660490712 -0.097404943619212148 0.015088735491431332 0 0 0 +-0.00034038812829184639 -0.10006724571532524 -0.15994720676772389 0 0 0 +-0.21053344172381566 0.078571151740440159 -0.068796819648273749 0 0 0 +-0.031993129263084896 -0.042047128332209333 -0.18972969621036481 0 0 0 +-0.055319407069163884 0.058808397147259217 0.030568116130374384 0 0 0 +-0.16712618272374385 0.10919849277873661 0.003764502838661421 0 0 0 +0.25563116024114191 0.04663320278908123 0.0370169995046081 0 0 0 +-0.029147017953896459 0.11284838388730772 -0.012991196579747843 0 0 0 +-0.27036390567975588 -0.092861260845358951 0.077850122045974718 0 0 0 +-0.043275080593109638 0.089327948490853404 0.13460050703581142 0 0 0 +0.080210139876441044 0.061089327563051576 -0.097619913275651629 0 0 0 +-0.30528529040305874 -0.11458321781364736 -0.02063217601323547 0 0 0 +-0.10312510264904706 0.028820575356720446 -0.11243825677844789 0 0 0 +-0.065912041376663899 -0.16717120732078888 0.066843362411674573 0 0 0 +-0.42630754921966002 0.019061779099028536 -0.00042840675347671775 0 0 0 +-0.0741675458446448 0.12026529274080322 -0.10947652847181912 0 0 0 +-0.13656060537454678 -0.087071470318516253 0.094225214913954497 0 0 0 +-0.027207237554350894 0.096461031581025092 -0.054436444496246045 0 0 0 +-0.22828161291136645 0.017771553150877334 0.10799914273884517 0 0 0 +-0.16368701021944876 -0.12029431771684207 -0.018080363442882441 0 0 0 +0.068924332402884037 0.16232246887091639 0.012939419329369428 0 0 0 +-0.12636583823699277 -0.16637512563400997 -0.035432186353982903 0 0 0 +-0.1272630684362725 0.16268086765676781 0.0073369866755236823 0 0 0 +-0.016059964040089414 0.022997465779896337 -0.040516055951340585 0 0 0 +-0.090840616732863755 -0.063181615743594266 0.14229063232360825 0 0 0 +0.23659677056444101 0.15547531671449305 -0.026633592562116226 0 0 0 +0.08583935097811507 -0.01084657074100201 -0.16981945617925143 0 0 0 +0.078247719560894102 0.020733930167359749 0.057221365785805028 0 0 0 +0.017766659115795058 -0.030544620204316919 0.092934218243620331 0 0 0 +-0.082158647505200966 0.024699128643201645 -0.16822602378228074 0 0 0 +0.030753050828841444 -0.11706158061714192 -0.084784606739256987 0 0 0 +-0.095441358755808337 -0.10115601612781874 0.025166866706326146 0 0 0 +0.19543692522404249 0.080058910312305165 0.044080713228903723 0 0 0 +0.03748320640310171 0.073971884242885255 -0.043790235316257003 0 0 0 +0.21989922729844219 0.0761363044309602 0.066264820235004657 0 0 0 +0.062058271199224968 -0.044966962443841629 0.0041924110857611552 0 0 0 +-0.37726208308726084 0.044858515635300411 0.0053754784952495249 0 0 0 +-0.095530932843340577 0.072891859636589396 0.12360233422571001 0 0 0 +0.18168680999960746 0.090224945780893295 0.09635914385090863 0 0 0 +-0.087039068770904615 0.003168148692120315 0.18503200765624547 0 0 0 +-0.13572500204772225 -0.044312461981750095 -0.072398317501801063 0 0 0 +0.0032365001707803098 -0.087543844517559283 -0.18748669854814093 0 0 0 +-0.085820437473279942 -0.18415098358444917 0.070797233976270996 0 0 0 +0.23777717298322115 0.038803141442539602 0.012563193349486218 0 0 0 +0.055898488154313475 -0.092329678219448791 -0.057155040091918324 0 0 0 +-0.045033050476235847 -0.053333604937747137 0.041327920705642091 0 0 0 +-0.066356773690462612 -0.12123872642622191 -0.058552509298214678 0 0 0 +-0.0096729009384010634 -0.12685229069303627 -0.027830531066710601 0 0 0 +-0.069271711341964581 0.076716719557273161 0.086487654824894372 0 0 0 +0.011362902056781976 0.17937851081778855 -0.056892697807778142 0 0 0 +-0.36259297108620642 0.030485581824886587 0.022780109771838891 0 0 0 +-0.24775450400275181 0.060603151636247965 0.039860424003415745 0 0 0 +-0.11028473072959577 -0.19665165840836429 0.067778447424867189 0 0 0 +-0.19603162150355058 -0.17931396397767776 0.053344115870902792 0 0 0 +0.055526374460400485 -0.043143546880900885 -0.051486097096423628 0 0 0 +0.083004025080178401 0.13295716732861801 -0.086481459734241012 0 0 0 +-0.1593051478010486 -0.11701108822552023 0.071995383602713209 0 0 0 +-0.12866970109149117 0.11432094899294243 0.032052186489304052 0 0 0 +-0.40579782487620136 0.0089412396424035367 -0.0091664760119197775 0 0 0 +0.055027112709630732 -0.048813765698079964 -0.040009484003607654 0 0 0 +-0.17978146646831888 0.01315656701892845 0.1102150535235675 0 0 0 +-0.099842737326740816 -0.043804004317762824 -0.089967857015306588 0 0 0 +-0.43604022270570281 0.022800495805760823 -0.05586787542299182 0 0 0 +0.003108327991131199 -0.10567989929085413 -0.052943156133736485 0 0 0 +-0.17187438293467044 0.07595177378870871 -0.071763407107932498 0 0 0 +-0.0076230537920399244 0.071492527432274966 -0.14876462450552033 0 0 0 +-0.035793937664784059 -0.0032240478424415964 -0.1337719273520098 0 0 0 +0.0076965666462876503 0.033174387350546675 -0.17786909864358416 0 0 0 +0.026652017240482329 0.10656897792487635 -0.094629686106117439 0 0 0 +-0.22170941146104134 0.0014835741411889647 -0.020567978015813504 0 0 0 +-0.01538818597066921 -0.096889861168735686 -0.061934956533150731 0 0 0 +0.045113304023563339 -0.074922813016068679 0.05573751819606873 0 0 0 +-0.074697928835337546 0.035050983257986112 -0.13299506081685702 0 0 0 +-0.0094157796062389609 0.0080910641355067259 2.2330152154859118e-06 0 0 0 +0.014647975069053853 -0.15430025360184443 -0.11059998321644868 0 0 0 +-0.35736042201514823 0.022990154333891344 -0.017088130891596442 0 0 0 +-0.017475844788656159 0.038662772902249787 -0.13480042542848641 0 0 0 +0.26685493610589289 0.15749472345119897 -0.020389688776016712 0 0 0 +-0.08744518787638289 0.15532616831346319 0.038001846328929528 0 0 0 +-0.19188640703118875 -0.013077670794044649 -0.046899766898572448 0 0 0 +-0.19416723354724702 0.053747865798672634 0.056005198215722557 0 0 0 +-0.044091634480187269 0.15554473165183047 -0.10904124062390765 0 0 0 +-0.066262075209918003 0.036519255349480084 -0.13695978421142557 0 0 0 +-0.25134421386569739 -0.00059008619355085945 -0.045222102684980725 0 0 0 +-0.03573930543762871 -0.16348404961964863 -0.087933763206198806 0 0 0 +-0.12614637741442075 0.008117132780644104 0.13709420042310608 0 0 0 +-0.095323424402936396 0.0060534604932721559 -0.1753404665072863 0 0 0 +0.22055812069383912 0.068331508770565041 -0.077662151377648578 0 0 0 +-0.15523551850352441 -0.13325738725961281 0.02562210446370719 0 0 0 +-0.054302304619713748 0.12385366828080263 -0.065265403497846791 0 0 0 +0.13426925469057399 0.16862633820304179 -0.079530869134534152 0 0 0 +0.022595052298314322 -0.0011294925828590208 0.13366231067955167 0 0 0 +-0.065070680287897142 -0.09153330289255876 0.13134361010491521 0 0 0 +-0.073776584134397583 0.073948146085019206 0.11755926299356947 0 0 0 +-0.2547691514410847 0.040188629083191041 0.09073954274661325 0 0 0 +0.066247483649526206 -0.088677985218642286 0.04571825318359396 0 0 0 +-0.025150405588222235 -0.15422457883990651 0.14276176763319084 0 0 0 +-0.17757677082204731 0.011051163781236856 0.14091408133020858 0 0 0 +-0.039627052794671658 -0.015527296489860398 0.15766190511506886 0 0 0 +-0.10163488041129198 0.02374411590617706 -0.11139823280954826 0 0 0 +0.10311430487784784 0.18969256724645472 -0.047861556183177056 0 0 0 +-0.17997735470512888 -0.019150191770186203 0.051519693726064159 0 0 0 +-0.1413042612767732 0.025398550687804777 -0.14009185279610939 0 0 0 +-0.43463780369223098 -0.00078902640501829491 -0.094675510657394768 0 0 0 +0.0063951616632146324 0.083395340923538397 0.12443198016635656 0 0 0 +0.041277942625824349 -0.089566276968232827 -0.070978701696147672 0 0 0 +-0.41265374499678614 -0.014856195402144001 -0.058650092229516254 0 0 0 +0.077235885486295397 0.10293997938517341 0.15684097000680539 0 0 0 +-0.15720466364013735 -0.011189836030886524 0.16105824832100421 0 0 0 +-0.011772010658502141 0.081590487442194493 0.056851821396594421 0 0 0 +-0.078484963730243051 0.12527855531360488 -0.085581654492558445 0 0 0 +-0.28281659072684828 -0.0065611906005526022 0.085427428103490716 0 0 0 +-0.44329687149357055 0.038884691148494799 -0.030429521882472554 0 0 0 +0.14089536959257437 0.040538276708357024 0.034105624461316514 0 0 0 +-0.032133371353384621 -0.15799530403218559 -0.10142452038429398 0 0 0 +0.1144605798110459 0.087256769425761382 -0.061364778782768165 0 0 0 +0.043478055794981707 -0.076782079445003537 0.17061372216727819 0 0 0 +0.091795061873600259 -0.034394031308294742 -0.10008976794592477 0 0 0 +-0.22168856735002485 -0.012572980119316374 0.037700597033888561 0 0 0 +0.045988859098534951 0.15034990632227668 0.083714544637353144 0 0 0 +0.078846458402064112 -0.050372999400009416 -0.09574697125793713 0 0 0 +-0.32356764328326104 -0.027547243257042026 -0.029342008905139272 0 0 0 +0.031497059787525761 0.18626736415357931 0.066701394389366703 0 0 0 +0.045745070635832386 0.09445567095090307 0.067139636342423009 0 0 0 +-0.25295247438022406 -0.0084514443071205259 -0.02094116319620748 0 0 0 +0.21187049498279803 0.11954158873655274 -0.054456562410815618 0 0 0 +0.08617544049147513 -0.047612619364991338 0.13175286477360967 0 0 0 +-0.4081034419661248 -0.0079305843643047991 -0.087833478084581904 0 0 0 +0.14508957794815763 0.21297750370215995 0.02749853449006659 0 0 0 +-0.3258867969334871 0.013923773238063764 0.0020711114913010975 0 0 0 +0.08179869830913139 0.16377551515507371 0.10652542799150941 0 0 0 +0.011652003985040349 -0.16503363389201883 0.061609485237461986 0 0 0 +-0.075897775982588123 0.017052678680445521 0.10108764107821369 0 0 0 +-0.032926575240797895 0.02589868190907918 -0.13580710957426811 0 0 0 +-0.30882524792726851 -0.071562095304879836 0.038407711935629141 0 0 0 +-0.1855357021781523 -0.10455014155930702 0.10742716631286733 0 0 0 +-0.20111177316710821 -0.16296334324354306 0.040068970126335507 0 0 0 +-0.062200508517476327 0.010061524856668419 0.072914258072987653 0 0 0 +-0.27679990182194625 0.041229885055999282 -0.064270054034263835 0 0 0 +-0.15061497198646429 0.13992621804092448 -0.023158050452560641 0 0 0 +-0.26200959830405424 0.05646460397376396 -0.058988656292648517 0 0 0 +-0.031582964683624482 0.039763925032338554 0.10284687390271993 0 0 0 +-0.11672307781934743 0.12999541079018218 0.052576264805004908 0 0 0 +-0.061086080013394883 0.098830117427285258 -0.075857719983298322 0 0 0 +-0.0078016577837756174 -0.13113829730855861 0.15726732610955044 0 0 0 +0.1247779805512586 0.13278623066000034 -0.056736824903703298 0 0 0 +0.098727077718798462 0.095117903293381878 0.15834688789745002 0 0 0 +0.15738761478503699 0.1988138044272838 0.015970081706470823 0 0 0 +-0.23929513183199802 -0.034735489351456067 0.05541346012024348 0 0 0 +-0.29434143148336794 -0.05745666806404387 -0.013769846382293394 0 0 0 +0.26848548054982674 0.16273045792428448 -0.017877215203158547 0 0 0 +0.1241648839620268 0.097303119669544469 0.017343269998896876 0 0 0 +0.01778699040960513 -0.085293042091197341 -0.013999996475943355 0 0 0 +0.13526031758983853 0.17680265050186683 -0.015019290471914692 0 0 0 +0.10462381274603066 0.049021802959049121 -0.11329402797624469 0 0 0 +-0.18508910074578133 0.065959515651607403 -0.075506069158261635 0 0 0 +-0.083580763309837824 -0.014943582999060873 -0.15022513238122825 0 0 0 +-0.19926854260514026 -0.15657553760315898 -0.018843396568051063 0 0 0 +0.14155675451622568 0.19043239082914587 0.042711577293745695 0 0 0 +-0.067802957136528619 0.2069873561663772 0.081704914227213238 0 0 0 +-0.2157260809941916 0.064905727607186381 0.068209436012987984 0 0 0 +0.13942911107234884 0.1130558632217436 -0.083824483768218661 0 0 0 +0.071561923619743839 -0.0062020580356926813 -0.1279815779307536 0 0 0 +0.01185583654263983 -0.023101805696292804 0.15627583593660124 0 0 0 +0.055930400349588572 0.21550348268060804 0.014507466434193789 0 0 0 +0.047818101503618482 -0.024034253550818674 0.16667625773941305 0 0 0 +-0.14971934750590943 -0.086474651397550034 -0.086703678502043705 0 0 0 +-0.34038853250301215 -0.068887907102562512 -0.057533028176120937 0 0 0 +0.23723861288220388 0.16368738328435223 -0.025295944309874446 0 0 0 +0.033460833003292778 0.11752068102982594 -0.12473083314241375 0 0 0 +0.015793947688853283 -0.041635701483492299 -0.15875681730613206 0 0 0 +-0.010178811929218989 0.15784369641090185 0.06102635438669099 0 0 0 +0.17027111125614952 0.19700838658292541 0.005836847974677567 0 0 0 +-0.13008988542321609 -0.10569657530766727 0.090101984740881741 0 0 0 +0.024109088981088711 -0.016951416331650232 -0.014197400055093679 0 0 0 +-0.22599226728087762 -0.0014747221130491373 0.023818461857942397 0 0 0 +-0.031595576888078403 -0.078407882709451954 0.011475955677747729 0 0 0 +-0.20766509107802067 -0.13366650739498437 0.070732474229199788 0 0 0 +-0.24029109011379074 0.083859993736990268 -0.012992931023559057 0 0 0 +-0.029381594602139682 -0.084903497963232932 0.05588563557631801 0 0 0 +-0.17915381373085315 0.14617714690960476 0.02437461498811655 0 0 0 +0.020090770124983892 0.0032471310282638222 -0.16472059198748926 0 0 0 +-0.071172700539892553 -0.04497751528258298 0.10104084358248441 0 0 0 +-0.0082789273478673375 0.1375445532177384 -0.010721243845128459 0 0 0 +0.054863666113126042 -0.055371602027745465 0.073604620360106204 0 0 0 +0.22505360292270543 0.026782036820915511 -0.045007491113848969 0 0 0 +0.0056800099150626226 0.11659396847427544 0.025543814458395819 0 0 0 +0.022138487398261131 0.12523116531221612 -0.096992647392293893 0 0 0 +-0.069903329437533412 -0.035032939287724912 0.1495638376404084 0 0 0 +0.11398334123517145 0.045415856988593906 0.11408473188486976 0 0 0 +0.0090118040893482632 -0.12293413396269644 -0.0098710656392127227 0 0 0 +-0.19396731797589922 0.082068734015100619 0.093627188044147075 0 0 0 +-0.16056297730407215 0.063675321782588945 0.039626941096992219 0 0 0 +-0.018927382771933954 -0.11793801517476236 -0.11636159429791662 0 0 0 +-0.28776492531616943 -0.0074328470274373226 -0.068542438763821961 0 0 0 +-0.32185480925029841 0.028738109604991957 0.049585340367895553 0 0 0 +-0.16009952886281537 -0.14380619171565867 -0.0093621533154626402 0 0 0 +0.034038531978609898 -0.020059621966724756 -0.14590090072089154 0 0 0 +0.020930783604201808 -0.11128762866522 -0.033487722430333017 0 0 0 +-0.17627524906630165 0.000933029560532872 0.16259479326291473 0 0 0 +0.024463674681144687 0.14553558310422438 0.048530133564623074 0 0 0 +-0.29550372733559926 0.0075633662975872762 0.063752053535016256 0 0 0 +-0.19717881400097864 -0.10626428744711681 0.087741040072828042 0 0 0 +-0.29641228864107982 0.050895611105958916 0.022199545779098301 0 0 0 +-0.032194808895390059 -0.066247888457069193 -0.14696182136833247 0 0 0 +-0.1158449382514693 -0.15388181194574668 0.017011425211559045 0 0 0 +-0.05901639738470088 0.14236165969855058 -0.10906872403057338 0 0 0 +-0.17382960944893538 -0.021017244909463467 0.0020334527304470551 0 0 0 +0.039121160054218451 0.014802224509970263 -0.11403758216314669 0 0 0 +0.30067848651549539 0.14041774395776119 -0.045870752740131221 0 0 0 +-0.11168144753317355 -0.18165889808543401 0.054888375309979059 0 0 0 +-0.22236111559001731 0.085765643523606938 -0.017827792186844632 0 0 0 +-0.006477863813680651 -0.080934351516444236 0.13759116749142666 0 0 0 +0.012316805926510133 0.094376128106976376 -0.1097877151292935 0 0 0 +0.23297221634063164 0.15574660333828022 0.046502087567832778 0 0 0 +-0.14691979599326155 -0.097811726199388521 -0.030095748470843314 0 0 0 +-0.0011606394387642105 -0.056985350198354573 -0.084324370226818129 0 0 0 +0.034570841151543352 0.050119733829275703 0.09672616927746544 0 0 0 +0.099029115716172289 0.038568072788430385 0.06161806964832775 0 0 0 +0.0049726411222270062 -0.007129980919666129 0.046299582017231722 0 0 0 +-0.2192464770172583 -0.021662156768977203 -0.047018963453935914 0 0 0 +0.12777068464577429 0.20221654801398048 -0.0065160310817235223 0 0 0 +-0.058673099709665444 -0.025400939657178712 -0.11303093588812789 0 0 0 +-0.047581841555186577 -0.13497853617493016 0.044511919202629008 0 0 0 +-0.28239790589924207 0.044311577837628291 0.10358476975211081 0 0 0 +-0.078182487362965514 -0.040146256462148866 0.079359910365712855 0 0 0 +-0.25044643419241769 0.00081250518039938102 0.025478152124809555 0 0 0 +-0.13633196674897341 0.083925369248729176 0.031470181179882484 0 0 0 +-0.32032276085515277 0.012375948664565095 -0.0056346805969411384 0 0 0 +0.014299914656176693 0.032018107555835007 -0.10837470981381181 0 0 0 +-0.41943381389735035 -0.084077133006877275 -0.073590918318918896 0 0 0 +-0.090055390799792967 -0.18437128734553188 0.025908873204257332 0 0 0 +-0.35765709640558813 0.074463283793809787 -0.017221523042524223 0 0 0 +-0.13927869982307778 0.10894837308777261 0.082224048872323235 0 0 0 +0.096603705358242087 -0.042692465980593119 -0.14698101776100556 0 0 0 +0.019766935317863166 -0.034540170487179445 0.17875213277157256 0 0 0 +0.011800725887641306 -0.095896869478084623 -0.081926717279802067 0 0 0 +0.19990981099599264 0.17590430152492598 -0.059384749571758794 0 0 0 +-0.050066453012803158 0.11349118372265249 -0.080516168922882062 0 0 0 +-0.01288695689255609 -0.0080954025667999141 -0.051543729157512541 0 0 0 +0.22643496997736151 0.031577757049084165 0.028735349608475819 0 0 0 +-0.055432951676517295 0.07344730335940558 -0.08583921095186145 0 0 0 +-0.23848728298865496 0.095917249290104922 -0.0099224690736555432 0 0 0 +-0.11844105703010227 0.097515185872411814 -0.047629590520601256 0 0 0 +-0.30949053698839857 0.0067148952312478527 0.1098362072210475 0 0 0 +0.035577387956036211 -0.081440276936059819 -0.17166228332920372 0 0 0 +0.13579410134843078 0.13358003026407766 0.038072192384805997 0 0 0 +-0.0040148741957545808 0.05938157621875545 -0.11968008895282541 0 0 0 +-0.03446941282624616 0.060885599796949852 0.07473332893052001 0 0 0 +-0.078047474723293042 0.20025261270001438 -0.016337303476172488 0 0 0 +0.047586333445999773 -0.044395269992338976 0.030168411020075891 0 0 0 +-0.066192302593260588 0.054750479289725873 -0.13391904746883687 0 0 0 +-0.073641869283935568 0.20930327687488404 0.019361437852730978 0 0 0 +-0.018105950130152093 0.0011590277123041393 0.025658151860729339 0 0 0 +0.10884685828317647 0.017669327197361251 0.095484238078889921 0 0 0 +0.30625956762498235 0.10572022928188923 -0.040519937704534742 0 0 0 +-0.077884193649217504 0.1949204237687257 0.0018909238866949563 0 0 0 +0.041282657747624907 0.11290148027343766 0.17338212821201979 0 0 0 +0.069362546987605744 0.012472312524834633 0.1549829741311958 0 0 0 +0.2133893643158557 0.14334930739619489 -0.066414575275079796 0 0 0 +0.02153016790726453 -0.093876811635661889 0.13568617882576164 0 0 0 +-0.21706628133583816 0.14908171601904974 -0.00086845332264015584 0 0 0 +0.29160130149999391 0.12776567013450291 -0.0050086093133827614 0 0 0 +-0.18102039315877022 0.073958673436398614 0.014825682387923367 0 0 0 +-0.33579154950199186 0.057276141925034552 -0.01494158672086382 0 0 0 +-0.0014158667106181633 -0.039788181729899258 0.03573995245552064 0 0 0 +-0.0064643639101716888 -0.16058669450453064 -0.085509740512842769 0 0 0 +0.20180838084553826 0.17953775050071114 0.013446703395957132 0 0 0 +-0.040892521271172488 0.17192283225990784 0.084547817260467423 0 0 0 +-0.013229229688989042 -0.11569720829205123 0.13335619053609807 0 0 0 +-0.13692927106242397 0.1343971098960447 0.016369036641510681 0 0 0 +-0.29864062980879569 -0.059030537508754061 -0.060369282477158587 0 0 0 +-0.3341650471308944 -0.019807857162928211 0.081797414122445483 0 0 0 +-0.10334883757818031 0.066513308050385189 0.12488278797268679 0 0 0 +-0.13510420224114789 0.074719934032277668 -0.025609599064370159 0 0 0 +-0.02487782075770667 -0.00043978764854094021 0.12039926315859331 0 0 0 +-0.066706248224184417 0.062628742592186648 0.10504125812900669 0 0 0 +-0.27530505138056122 -0.027977397748118749 0.068112415945181609 0 0 0 +0.017591947168575095 -0.065938959998207647 0.043423463911607868 0 0 0 +0.15784097731736252 0.18205554696507842 -0.063372782792155635 0 0 0 +-0.11074180542361461 -0.022589837415922437 0.17373279198388894 0 0 0 +-0.020874435199115027 0.044056704218213449 0.16585120121543154 0 0 0 +-0.074682515976266017 -0.037935894768725636 -0.154092314613719 0 0 0 +-0.014337380433725233 -0.089033610379811862 -0.067390110718401147 0 0 0 +-0.31363599709906853 -0.10029448225303554 0.019405328396128019 0 0 0 +-0.36886451502644924 0.023100431081088252 -0.016248394620337059 0 0 0 +0.11075011226630532 0.15652773936452435 -0.086331058412836864 0 0 0 +0.068588988874170365 0.17504119193147216 0.13655980924414843 0 0 0 +-0.01065740945179483 -0.068673926563215915 0.1386370554880593 0 0 0 +-0.14138555697541688 -0.20254011993718102 0.079829123362797766 0 0 0 +0.093743641793152699 0.068478952088498968 -0.057769373295397025 0 0 0 +-0.10799152215328306 -0.015241055424178501 -0.065647120738346137 0 0 0 +8.4551784354236492e-05 -0.00105293004684337 -0.067974340563859315 0 0 0 +-0.23869724063194359 -0.12823165172874371 0.043755383883548438 0 0 0 +0.23222267485143849 0.037790717458934031 -0.058906513679779143 0 0 0 +0.12688878454435143 0.1036392602854781 -0.078109434418417042 0 0 0 +-0.39258876846123492 -0.029108355527472235 -0.035135210885916368 0 0 0 +-0.35065525276958942 0.046819644340939826 -0.0055764726774874263 0 0 0 +0.28062509125931417 0.092381323314108865 -0.048024810358832576 0 0 0 +-0.35131045894502899 -0.077937106932107841 0.0094549267249070257 0 0 0 +-0.017432050501559881 0.045320514978776649 -0.015874728444126435 0 0 0 +-0.14259160289984896 0.018086053061387497 0.063723059381937591 0 0 0 +-0.074096686372950249 -0.0075132343811802615 -0.096135464580375238 0 0 0 +0.042680949281710123 0.033467058941900274 0.16946045682047631 0 0 0 +-0.010753655453680566 0.032696851425261686 0.046574206495206327 0 0 0 +0.15178120836598324 -0.02586967901572168 -0.047014646558250772 0 0 0 +-0.089538220126836154 0.018642389270230653 0.10215627251000051 0 0 0 +-0.070389528898887832 0.15236470948454922 -0.092364378480461418 0 0 0 +-0.10860275075765796 0.018708410533198605 0.11925008841110438 0 0 0 +0.084711049200296318 0.021170005008510295 0.07741769826732578 0 0 0 +-0.14833773519085025 0.018951113401837638 0.050144108251476666 0 0 0 +-0.253918685862904 -0.012825739786946705 0.015322300079892381 0 0 0 +0.15691326907262199 0.10602315578828286 -0.089823714208748656 0 0 0 +0.033128762510558574 0.14305149763834568 0.081387712615877378 0 0 0 +-0.019905998233363531 -0.1278200912320111 -0.041076669292047618 0 0 0 +-0.13391172197571027 0.088929003595743294 -0.049980219675515775 0 0 0 +-0.18788409358933572 -0.15253976505046013 0.028303466416402717 0 0 0 +-0.19896681713527536 0.016702031479496504 0.099866135215694568 0 0 0 +-0.10146830740598267 -0.1460613734705048 0.022126696911334537 0 0 0 +-0.10118515408173673 0.090866269491040597 -0.068922142356454386 0 0 0 +-0.093277103866869604 -0.096850737853975993 0.13992850178088204 0 0 0 +-0.30966795284653315 0.063379611198137953 0.023121045027393372 0 0 0 +0.18621450372457965 0.1645716298254975 -0.034984124920524662 0 0 0 +0.038467791253323613 0.0086050784727562946 0.093288642730755239 0 0 0 +-0.11254864296966238 0.17334752588861063 0.028193144057497371 0 0 0 +-0.02469182720985269 -0.0066433582144002634 -0.10617517089403188 0 0 0 +-0.013900426540381761 -0.14194908485874441 -0.075552517834562335 0 0 0 +-0.069760441255797667 0.13669241818248523 0.11815989960447701 0 0 0 +-0.43616160241927487 0.01710283095500198 -0.079917373684998599 0 0 0 +-0.023391055217804435 -0.16086112314176049 -0.01369028158027305 0 0 0 +-0.19647815226766985 0.14054591797334931 0.065141045630941613 0 0 0 +0.14090005108082199 0.0062994460912933481 -0.13263742009949311 0 0 0 +0.047836005513039404 -0.091161938964121059 -0.12302223575555626 0 0 0 +-0.016985607411421411 0.13106709952986656 0.086149475966825623 0 0 0 +-0.075462406267379434 0.053182186008613519 -0.11123872022813605 0 0 0 +-0.067204476782439793 -0.11111273524429557 0.034722544943334988 0 0 0 +-0.35419090179787482 0.021090845331730779 -0.036421610899586704 0 0 0 +-0.03254586269448051 0.21363686261230425 0.015730458167232564 0 0 0 +0.055769612693293003 0.090158430834149927 0.077384622240060957 0 0 0 +0.095329952446371269 -0.030123358232403641 -0.12472736351222731 0 0 0 +0.15581171844027236 0.21105356255684976 0.036075229187923025 0 0 0 +0.15496879433605587 0.1826465247823903 -0.056256371530044813 0 0 0 +-0.32530949702594431 0.034262699204704705 0.052585288628104604 0 0 0 +-0.052339380934587731 0.1365792722865441 0.055104251838847068 0 0 0 +0.11455187563416541 0.033262073942062431 -0.069128466171029496 0 0 0 +0.078112689159682447 0.076999854377490906 -0.018702099081015222 0 0 0 +-0.027294399473697439 0.00015363845477392446 0.16831662909055081 0 0 0 +-0.15907160623484529 0.00055519848172691511 -0.025625623038088907 0 0 0 +-0.10745648866256002 -0.055146831552937647 -0.0011397334780995638 0 0 0 +-0.058591479390549983 -0.15487134163876393 -0.080232263323389452 0 0 0 +-0.18034508205466909 0.090812096852862234 0.055711860939865493 0 0 0 +-0.33473624084800252 0.0091142208686438297 -0.059123952748897479 0 0 0 +-0.016013327906720831 -0.019054338085514516 0.12253604651147823 0 0 0 +-0.30958587828550022 -0.031576955600445628 0.088056479208562549 0 0 0 +0.10480926702332211 0.089152002805985953 -0.035575254484823904 0 0 0 +0.012449461194234901 -0.016472106143286924 -0.052845270607613959 0 0 0 +-0.41827579404120568 -0.034205712687192025 -0.048919398346006865 0 0 0 +-0.034946153323212659 -0.17166691045705651 0.11666422705467558 0 0 0 +-0.3571822393875872 0.075628624024422331 -0.059669319951652533 0 0 0 +-0.042676272973213358 -0.098818932341719984 0.13356931048183937 0 0 0 +-0.12379990198204066 -0.063607693756016909 -0.083703025177337687 0 0 0 +-0.28290455645031998 -0.045349315708866356 -0.044669229831178658 0 0 0 +-0.00055035710873319044 -0.029798162625417596 -0.091371525888253924 0 0 0 +-0.2071703796824324 0.10985512561205074 0.03069598044941016 0 0 0 +0.12122253798810528 -0.030076972732926727 0.078173265468620218 0 0 0 +-0.021656577804561261 -0.13437569024249307 -0.1266073387246579 0 0 0 +0.13039332669310738 0.048875701475758537 0.14814048228256263 0 0 0 +-0.25994890943858306 -0.0010739183539534014 0.07261431253465081 0 0 0 +0.025143428437476911 0.13402229574984637 0.1077850052948133 0 0 0 +-0.060044559982402768 -0.16176710826084673 0.010351904468602957 0 0 0 +-0.3356898975678021 -0.035995188936284284 -0.024799632739905264 0 0 0 +0.16531333508607465 0.18902588660968883 -0.05636051148691168 0 0 0 +0.11925859849409898 0.11586178124790919 0.078464077470029731 0 0 0 +-0.36996285459925421 0.080446369402719153 -0.01110889454309269 0 0 0 +-0.081095442902273551 -0.11863932221325162 -0.10889424841372575 0 0 0 +-0.023642133091776651 0.012814215418842617 0.010923214814692744 0 0 0 +-0.032913268824694697 0.11634220238540183 -0.070909287929345394 0 0 0 +0.20561769286755932 0.12347919532256713 0.067810220623632872 0 0 0 +-0.001031172934183866 -0.063521025373901724 0.10985533826809049 0 0 0 +0.12586820272274307 -0.02289061120403979 0.14091410936199875 0 0 0 +-0.052803324809416685 0.044877671636684324 -0.0017551363449883617 0 0 0 +0.038149007525627943 0.054840997548571302 -0.0046096666306485456 0 0 0 +-0.015792962379364783 -0.021100101967160612 -0.010347055832082397 0 0 0 +0.15830386645908695 -0.025314751465529695 0.055328404985812013 0 0 0 +-0.35040264022304912 0.089613210327805948 -0.032227963941418553 0 0 0 +-0.19172511940645987 0.10925912314338471 -0.039832400687710851 0 0 0 +0.042245629072068247 -0.10254356888732595 -0.092240495232551817 0 0 0 +0.042820603729595896 0.13580100326724909 0.065413912274339708 0 0 0 +-0.14019694343485406 -0.10301274902730483 -0.033759162051406694 0 0 0 +-0.098928460206782975 -0.13865214123908245 0.071901539666681086 0 0 0 +-0.11074683760778514 -0.078395816692457543 0.03064878976605459 0 0 0 +-0.02748968155074405 0.16816699404297719 -0.00066757305894560304 0 0 0 +-0.28737317794124134 0.084096664025491097 0.069930531679797431 0 0 0 +0.14014672713958881 0.036409453438261519 0.010343810892526534 0 0 0 +-0.18428971886596646 0.1040003585899002 -0.031745685531143569 0 0 0 +-0.051907555213307532 -0.18747929743471184 0.067154243875354042 0 0 0 +0.17441989579789102 0.13027190111939563 0.12263079990274225 0 0 0 +0.14454337547251722 0.050375729535154512 -0.037882620005979667 0 0 0 +-0.23562986249176088 -0.1641331726767295 -0.0089012405128809646 0 0 0 +-0.11121090392386312 -0.12677541309895834 -0.040295951263182805 0 0 0 +-0.44093752952661136 0.033048079266868036 -0.067086102055618546 0 0 0 +-0.014852961637876028 0.16934280829427062 -0.056023192146647249 0 0 0 +-0.35107357367459457 -0.072311806270568185 -0.04203051369901234 0 0 0 +-0.18105704050481558 0.067177580024357864 -0.056468935109725671 0 0 0 +-0.26092698449573482 -0.0031384520713230724 -0.01141012044736836 0 0 0 +0.23337401750255832 0.15768886711249264 0.0090813563394495367 0 0 0 +0.14179212325353635 0.022704619418060845 0.091737122686744693 0 0 0 +-0.034676269380371105 -0.077110225803127985 0.0052191409317655368 0 0 0 +-0.074123432605653128 0.083341619775771592 -0.088291862642460028 0 0 0 +-0.17771820822614481 -0.14956090263693037 0.070043565696708859 0 0 0 +-0.069242489830926124 -0.084081602933295085 -0.067536848971702618 0 0 0 +0.083574204877931602 0.183972263407086 -0.0063968807509676429 0 0 0 +0.10222912191491335 -0.063916267105247365 -0.11115114297515387 0 0 0 +-0.38036362687076675 0.038842332866384166 0.01241905963933701 0 0 0 +0.10613205614378435 0.069554751361379841 0.15546427477035299 0 0 0 +0.26623105259378904 0.14693018022788501 0.054139393351681081 0 0 0 +-0.16451422329747822 0.053799799832590367 0.034620920607584066 0 0 0 +-0.056013481916764307 -0.091715880431839286 0.1039751269101333 0 0 0 +-0.1406183064758289 -0.13391461294181645 0.083106051513919116 0 0 0 +0.16382741680938279 0.17201167927602024 -0.072994157706334717 0 0 0 +0.17973285022320223 0.021967287385634138 0.094773434304948417 0 0 0 +-0.22762932907598327 0.033598363191057912 -0.044073751440943221 0 0 0 +0.10248306317574801 0.049307327594262984 0.068078388507820192 0 0 0 +0.070363038996756055 0.16554485360389853 -0.060884322810135783 0 0 0 +-0.11273509567220003 0.10312073447098535 0.028035426067578612 0 0 0 +0.0054379828679817499 -0.092348330042261173 0.080209771311169048 0 0 0 +-0.12300555190849122 0.086340738430839004 -0.061504864405392212 0 0 0 +-0.036137207374842883 0.049559001371766886 0.16621966795866935 0 0 0 +-0.15523322121848587 -0.14913941663324742 -0.023866166330543337 0 0 0 +-0.31631949358085409 -0.030419215529820437 0.053358626870516707 0 0 0 +0.049078427069757569 -0.086011159008694826 -0.11242134841103153 0 0 0 +-0.37607510134087413 -0.038932385295886551 0.0060238317104498729 0 0 0 +-0.13479620241308354 -0.067935339867207234 0.021561223303751542 0 0 0 +0.0068919942400696987 0.10000367358398249 -0.10453528889255551 0 0 0 +0.0083486944068688618 0.1407319864244978 0.001643257822653732 0 0 0 +-0.026054433166345148 0.16241866460026894 0.11602334588950222 0 0 0 +-0.16530148235992997 -0.028777208086024048 0.089717212406536545 0 0 0 +-0.1125998838765454 -0.070524900389800804 -0.0087710475132106724 0 0 0 +-0.30378296348738487 -0.060733973778419686 -0.059501416768572762 0 0 0 +-0.15383472523774722 0.060673181697144141 -0.039457214297396598 0 0 0 +-0.13507587674307642 -0.13330837526262551 0.0086968134573735256 0 0 0 +-0.24984771613602763 -0.11189722489334039 0.0098442298133629424 0 0 0 +-0.44851449406940724 -0.066083198333922316 -0.038501898685550789 0 0 0 +0.28145080027508779 0.13936744018564323 0.036628290467334457 0 0 0 +-0.18992449537589218 0.080059964503863823 0.0025102003385741312 0 0 0 +0.10502880078157634 0.082548159646220975 -0.11341956083003105 0 0 0 +0.15593780269430252 0.02720104391092526 -0.1060779739103578 0 0 0 +-0.05062422958761692 -0.1854792315363088 0.11264674189050775 0 0 0 +-0.034371714535101849 0.10177221250068863 -0.15871928403859026 0 0 0 +0.11217859237055289 0.066097473387308869 0.0010830831516166206 0 0 0 +0.028313503419421571 0.10403201860538075 -0.14237018740726959 0 0 0 +0.061243728900938266 -0.0096252523389240008 0.12215884517381012 0 0 0 +-0.15837029866173868 0.13781031593772858 0.088817762667358385 0 0 0 +0.088257778783708274 -0.001232863540046869 -0.034745796041581789 0 0 0 +-0.033016813685477264 -0.12306517284343858 -0.11338091074626659 0 0 0 +-0.15285285261235204 -0.058829799046102915 0.09851121715302022 0 0 0 +-0.010471722384968352 -0.051887584384125662 0.18172653256120111 0 0 0 +-0.25742967129343425 -0.012871798234308618 -0.04980682486053789 0 0 0 +0.021320627471194509 0.086321675597542891 0.073759973840678589 0 0 0 +-0.0040222527926252472 0.028590891389725259 0.17464286317256514 0 0 0 +0.12287995375132649 0.096545102179837861 0.11796550173866796 0 0 0 +-0.15642115150664704 -0.0047720429028319244 0.16711501688827993 0 0 0 +0.058287384566694966 0.055676167853028979 0.13106170794303482 0 0 0 +-0.17901946129137186 -0.099354108899843419 -0.047159708659013255 0 0 0 +0.024744970601876248 0.071228442166223649 -0.1597848789406307 0 0 0 +-0.085032863993793784 -0.10212271000125447 0.14981942556260616 0 0 0 +-0.12882020141544293 0.092200638050817851 -0.026040945382687253 0 0 0 +-0.34084709236403232 -0.013782048095840049 -0.0085579678515652069 0 0 0 +-0.0037724885167437772 -0.032769693888427237 0.18839882410508904 0 0 0 +-0.098236451744211417 -0.056862307067158641 0.15426975089817355 0 0 0 +0.20341414756437987 0.10093923817876865 0.084968135761149671 0 0 0 +-0.030402395608699895 -0.13841494342644328 0.15835597038310392 0 0 0 +0.18880565531871746 0.072504777502116757 -0.033568489814715469 0 0 0 +-0.36802996340948857 -0.12629760088210273 -0.021787254701271186 0 0 0 +-0.085534336867241711 0.060784893875431234 -0.1561026020073383 0 0 0 +-0.33328890743674944 -0.080627899615281273 0.0026703557947501677 0 0 0 +-0.093735314165682093 0.097502109142299731 -0.1136136330815358 0 0 0 +0.082065246105843592 -0.062862272163417665 0.16465455620924943 0 0 0 +0.01574092420366352 -0.14231173103850056 0.13594888366676403 0 0 0 +0.065442185287631516 0.11228600310427367 -0.10166337072879029 0 0 0 +-0.164626548027203 0.10683254894591915 0.070737562091934963 0 0 0 +0.14186461111826115 0.085880652567123961 0.015962665348742161 0 0 0 +0.16337669356620171 0.081039458815841015 -0.047868384615876253 0 0 0 +0.19965511657031482 0.11824969304492511 -0.0005002570583312882 0 0 0 +-0.45160367015305208 -0.063180037026410479 -0.052455737509965905 0 0 0 +-0.14613549554975475 0.041223505719230946 -0.072202902880265374 0 0 0 +-0.026122995353001222 -0.17268815028356016 0.088685495872139003 0 0 0 +0.069083905094317111 0.066335864179830506 -0.030532727879496291 0 0 0 +0.084308116968437041 0.040350172480945912 0.16050476990627824 0 0 0 +0.013354044670744247 0.033763513800155798 -0.1484390218966212 0 0 0 +0.077223308049109762 0.17110541615192731 0.13545774776772038 0 0 0 +0.1566374833859992 -0.02826654458724151 0.088843554884564607 0 0 0 +-0.10000453776867596 0.01397839929426925 -0.0074321409863084553 0 0 0 +-0.030777237021548276 0.15693305545758129 0.096939950290787974 0 0 0 +-0.098057890077845711 0.18160855303822082 0.077464380851279463 0 0 0 +-0.029225371661419086 0.03722080034140729 0.08217859801636776 0 0 0 +-0.25619355546103795 0.048203876247111699 -0.033465370697677133 0 0 0 +-0.068745589986965117 0.0498188675156091 0.07068545582068711 0 0 0 +0.0034148668381198677 0.22042556817838499 0.032669214271817348 0 0 0 +-0.13407003624319569 0.13323878361609481 0.092880995527431814 0 0 0 +-0.29028973113700052 0.027204902997374547 -0.05110893437208236 0 0 0 +-0.10798148310458289 -0.14724457584406855 0.094385130150683699 0 0 0 +0.10216433764543614 0.017490502511491979 0.083664262288875885 0 0 0 +-0.21067953983138088 -0.057641890720298988 -0.043811107490187046 0 0 0 +0.16067248901923187 0.15861172122413242 -0.063953230759274671 0 0 0 +0.062813321788811549 0.083380183011107112 -0.0063805493557620718 0 0 0 +-0.37518463337526425 -0.033432722121973069 -0.068709430263977966 0 0 0 +2.7409511594966851e-05 -0.095643247737918075 0.010832276531505869 0 0 0 +0.14385858084019737 0.15264099591486713 -0.057558332528793721 0 0 0 +0.004413885017421515 -0.037732459143478447 -0.1310829322129041 0 0 0 +-0.23778356097993208 0.049770023021153631 0.12183033561257881 0 0 0 +-0.11000172441042966 -0.013413573234841242 -0.026300732875461696 0 0 0 +0.0025392694377782132 -0.010141239055300622 0.15699788008711626 0 0 0 +0.19715829537716462 0.082949854606266582 -0.0044456949525494005 0 0 0 +0.061996298165707786 -0.064750076727264572 0.17261140323788673 0 0 0 +0.15903173055654157 -0.0048851678091809403 -0.01869519769140518 0 0 0 +0.17230267951124106 0.052122681513014246 0.05468848896816883 0 0 0 +0.053404335726904673 -0.066448823750691971 -0.13662725051035732 0 0 0 +-0.22994532192804157 0.093102011456649258 -0.035503113280531018 0 0 0 +-0.35757021942667899 -0.014796028307780651 -0.048864689759298696 0 0 0 +0.061669597326389047 0.082329630790755115 0.15474018578428403 0 0 0 +0.16276229282650628 0.10188262996382497 0.022842300247546743 0 0 0 +-0.30106287521160213 -0.14549736021122944 0.0029617178504262043 0 0 0 +0.16945813575236351 0.13007932075436085 0.075803266903625793 0 0 0 +0.13296372185020938 0.053731087618232198 0.078588183115850668 0 0 0 +0.032282916822095775 0.074580143776670549 -0.044465812226371831 0 0 0 +-0.14249685151259184 0.036350695430908353 0.035180191392619159 0 0 0 +-0.41159074824165787 -0.035441498915313285 0.040410900603261302 0 0 0 +-0.084291527201996674 0.12181335184086767 -0.10889571961860685 0 0 0 +-0.42143306408710079 -0.028772164372693282 -0.0010435807250193385 0 0 0 +0.21747433542629463 0.040399129419645297 -0.046582439793924346 0 0 0 +0.17177481903702013 0.098543950896073595 0.1191314482218013 0 0 0 +0.054859094217354409 0.0099542766077727884 -0.077787129907425492 0 0 0 +0.19068249071285587 0.02531574653244717 0.052937134933108448 0 0 0 +0.15884057066821028 0.13043905602036787 -0.07344046297598536 0 0 0 +0.045875842046686433 0.10552696975362158 0.17521074844230713 0 0 0 +-0.062781982386731605 0.13706312115294855 -0.097279303820042407 0 0 0 +-0.11921565551624869 -0.010734845926123698 -0.089412243543503342 0 0 0 +-0.19858431218511896 -0.099856949277766532 -0.012577960283004203 0 0 0 +-0.37523022724639626 0.046020341180119162 -0.062811148240338066 0 0 0 +-0.029185178431919812 0.065542573680453464 0.028401753483996262 0 0 0 +-0.066392182263624866 0.11216687688799526 0.11925840215740027 0 0 0 +0.033855706031215294 -0.11652517959474773 -0.060146571946361554 0 0 0 +-0.099077679054576484 0.20634360173294691 0.024016760597968007 0 0 0 +0.10303160148274609 0.11641113006434917 0.071943536115011669 0 0 0 +0.057953748413175299 -0.080359886939516317 0.15280580439432526 0 0 0 +0.0046974476128792686 0.11471510676177732 -0.093133142343129027 0 0 0 +0.089522050812696097 0.1522417693736986 0.14694912674523566 0 0 0 +-0.021521245079278051 0.0043324056027606028 -0.17341853345985198 0 0 0 +-0.19755194501539231 -0.13249640252694533 -0.00096105309272742634 0 0 0 +-0.17667173990591201 -0.1642932977777552 0.04558119610815356 0 0 0 +-0.11326784812780333 -0.13635656094466153 0.060471687683959469 0 0 0 +-0.16675101026603723 -0.1948821119912332 0.019427109468366954 0 0 0 +0.094817192303712938 0.13338778701759502 -0.03581876070546125 0 0 0 +0.00049031301371282865 -0.082172056578814517 0.098338960317338325 0 0 0 +-0.03775656242698433 -0.13179143259043993 0.10523142635039798 0 0 0 +-0.16248452264933849 0.12868497229311382 0.039310370293755559 0 0 0 +-0.13758999691959939 0.011545177393106731 0.033390594198854179 0 0 0 +-0.068549226723457701 0.11941205853629389 0.13390898616324645 0 0 0 +-0.21642278152635325 -0.12038025146323071 0.080419593344643686 0 0 0 +-0.073398248233187524 -0.1015524833943327 0.033940120131167123 0 0 0 +-0.13967059458099074 -0.11266173866182894 0.042111854593453929 0 0 0 +-0.20903703733670298 -0.13062667964004959 0.054433564712526278 0 0 0 +0.03280589589627686 0.10693799723019498 -0.12833838140723247 0 0 0 +-0.018867533187114205 -0.15965217017963484 0.031351056096301871 0 0 0 +-0.13812711909175157 -0.17867648093454169 0.058611294811829445 0 0 0 +0.23515993422285647 0.10512368793757071 0.096615164873546461 0 0 0 +-0.25559263043892572 -0.024296526858197526 0.026097684946902094 0 0 0 +0.078954579315574314 -0.030847833068718217 0.037970336740375948 0 0 0 +-0.10575726866044338 0.16053305344880558 0.11412959425887279 0 0 0 +-0.31767246522499715 -0.0065742808239739603 -0.0076501934132724991 0 0 0 +-0.10103252766375198 0.0028907913642418348 0.040046635843933087 0 0 0 +-0.27252650647811827 -0.0013596323238560248 -0.022559935403280884 0 0 0 +-0.18523666550299855 -0.020856313422574685 0.0017305965269580614 0 0 0 +0.011761252567337344 -0.15388474599088309 0.071186062751986107 0 0 0 +-0.13638446796932957 0.015687640471251679 0.093902314309729701 0 0 0 +-0.14930500783102124 -0.21984214598281776 0.056248747876352617 0 0 0 +0.21600653694282984 0.10132782106908267 0.081906509394377464 0 0 0 +-0.25156768010431207 0.099747925255440184 0.027363897616270921 0 0 0 +-0.033595686056097085 0.12049120693420573 0.15691013947005897 0 0 0 +0.071802545993607414 -0.041257557060060096 0.017506824356040451 0 0 0 +-0.36697742744514023 0.006887678127259933 -0.078646596103576008 0 0 0 +-0.21839242474187404 -0.065186126509412218 -0.037329384595315429 0 0 0 +-0.14747416273045355 0.0098650614170790463 0.1013350247823023 0 0 0 +-0.035459193493542318 -0.12949957345086244 -0.15614458750285021 0 0 0 +-0.41630264273273992 -0.071811424673444146 -0.079369473596515125 0 0 0 +-0.11145045682632371 0.070805457976853448 0.15907858036737002 0 0 0 +-0.16072847554730718 -0.10892163300096058 -0.031583863390119288 0 0 0 +0.064401183742422152 0.01449907525688407 0.068491995715270731 0 0 0 +-0.072889192694120586 -0.08638461804112002 0.06442071865962537 0 0 0 +-0.24585789737014568 -0.027684329924667739 0.093226588329896304 0 0 0 +-0.093297798705375801 -0.093532483158679236 -0.029960361978712019 0 0 0 +-0.25821022631959989 0.0032861515368576844 -0.038886375293791769 0 0 0 +-0.01054787630696552 -0.067132178905014439 -0.17073543242232037 0 0 0 +0.037523598410678038 0.15919685215494317 0.047344518789408735 0 0 0 +-0.19948259598378792 0.13362663872442671 0.015165871552321131 0 0 0 +-0.024350193073020832 -0.032695697865505247 0.066376129461436534 0 0 0 +-0.25927073834876535 0.0040836982114994813 0.081262198140549496 0 0 0 +-0.14691499055214463 0.043775130338279955 0.03915593684995175 0 0 0 +0.15279798581705656 0.094595585430627183 0.049194368738181421 0 0 0 +-0.1892395994650084 -0.017713389931125118 -0.026557671335894151 0 0 0 +-0.048121208483569822 -0.038820484211269768 0.021451634412415321 0 0 0 +-0.16685943728266983 0.096731321627542388 0.057256624765523706 0 0 0 +-0.27114493913376475 0.023174744518047186 -0.019281270951938351 0 0 0 +0.11945420027885117 -0.02729836709232536 0.050958368823425387 0 0 0 +0.21355427453877168 0.051808343736394757 0.078713049147184938 0 0 0 +-0.29252337960379204 -0.0034103653843626514 0.087072551307163654 0 0 0 +-0.29967986729304774 -0.030985904319561108 0.024266329667843423 0 0 0 +0.023467241750559753 0.073709242975104561 -0.043172752898948258 0 0 0 +0.01088398747183611 -0.085224387062768941 -0.17596043410058784 0 0 0 +0.080784818256378566 -0.011186070112525037 -0.091977986614080604 0 0 0 +0.057775012154658245 -0.013205436155123651 -0.084699098269517062 0 0 0 +-0.21533087578769544 0.012870683847211295 0.032359100433649951 0 0 0 +0.070967305455668817 0.12468188139216835 0.12894410835923534 0 0 0 +-0.00028817713904433218 0.035659035894362701 0.10900767141354781 0 0 0 +-0.023531273500083494 0.041067476587194951 -0.090249259802911888 0 0 0 +-0.25765159152232808 0.062975467737909852 0.040770554782851132 0 0 0 +-0.12481898427625421 -0.17463823096742623 -0.02950461296603224 0 0 0 +-0.16381113012282417 0.061790053746703988 -0.089232270539886777 0 0 0 +-0.040055594142819784 0.12343642153220297 0.067658774885993894 0 0 0 +-0.13908963315103673 0.14035585614519752 -0.021028538657428708 0 0 0 +0.040180884529177507 -0.069735285853390117 -0.067576437099412079 0 0 0 +-0.043725460698469609 0.081565324133854811 -0.12351561883883783 0 0 0 +0.004918425724385278 0.042704614231424409 -0.14519692370888032 0 0 0 +-0.26088810335270596 -0.16264697118991756 0.038027412621045475 0 0 0 +0.035737440964837941 0.22179249202400353 0.090961208861175452 0 0 0 +-0.21776178277515112 0.13591614253190948 -0.020159712071055547 0 0 0 +-0.28651164049975109 -0.093738244773427959 0.020612357416976257 0 0 0 +0.043608894095036599 -0.11500985183608348 -0.0575118541499339 0 0 0 +-0.13119172553086422 -0.025347938795111158 -0.1387550351016768 0 0 0 +0.030168302789891521 -0.042672488814959775 0.12181460309522132 0 0 0 +-0.15236057416972942 0.045425002667940695 0.095049801023656039 0 0 0 +-0.16158832564257319 -0.019212407491582928 0.048363825037685687 0 0 0 +-0.027410418603576292 -0.12548094875244192 0.033908923347689218 0 0 0 +-0.010860390967133038 0.19936812799125164 0.08311737635714514 0 0 0 +-0.11379567005570518 0.037177674439925201 -0.1307075494144177 0 0 0 +0.0088453501241421151 -0.15170463501175074 0.08094985661044854 0 0 0 +0.067051293065368667 -0.093282028705137798 0.067107232335558181 0 0 0 +0.0079750619124015487 -0.11065914009069514 -0.038674335778638241 0 0 0 +0.15479770952188404 0.068755999284443869 -0.041067596088443403 0 0 0 +-0.053184666945613024 0.12269151011520157 0.03705113015836245 0 0 0 +-0.104497639195479 -0.1461009891839628 0.037915910327979363 0 0 0 +0.18709902799894335 0.1418831955192601 0.093608307612446623 0 0 0 +0.013350338933437567 0.058221190174437554 0.17977341294054358 0 0 0 +0.055826652553773004 0.066613545989669842 -0.040541367172730158 0 0 0 +-0.035325796776032092 0.19566712015778104 -0.020748260854249828 0 0 0 +-0.066299922404622236 0.057942077859636842 -0.15997484518461999 0 0 0 +-0.10936152938095156 0.072561770670290071 -0.067434661401174489 0 0 0 +-0.29715510606501716 -0.033541945320149896 -0.038925384221598497 0 0 0 +0.01343401921319537 -0.12146707905336983 -0.13830404091178811 0 0 0 +-0.1633291242742469 0.061001264443953485 0.084102843779311071 0 0 0 +-0.22860382726146378 -0.02533919127547743 0.047738460489393203 0 0 0 +0.018595306721543803 -0.051762474420637833 0.17133265497472602 0 0 0 +0.035277915556314376 -0.06839838612013871 -0.01611577863440708 0 0 0 +-0.20210350155723517 0.029756910569391226 -0.016257494741885453 0 0 0 +0.015954463631389582 0.033601445234237248 0.19247321677354443 0 0 0 +0.11599241846886693 0.098583778647248599 -0.047973636562299915 0 0 0 +-0.10093710814029683 -0.11708246633226566 0.019387675793964887 0 0 0 +-0.11859843220344052 -0.06308221032007319 0.029781482836862105 0 0 0 +0.048322939999792702 0.15719030818301671 -0.030419542750815404 0 0 0 +-0.085943133808183525 0.12516717832625424 -0.021342804356437178 0 0 0 +0.27031342787416884 0.10418935316154315 -0.054015223223407738 0 0 0 +0.06051120561163631 0.086291242402307677 -0.04053856492191879 0 0 0 +-0.22646939399684551 -0.028314742473749932 0.10558000945800125 0 0 0 +0.0062956921309162417 -0.0021578860050672777 -0.17065432512927706 0 0 0 +-0.40589892053409948 0.039728402289357034 -0.012202680515269737 0 0 0 +0.16625601555255237 0.088629319767163095 -0.022843461181298819 0 0 0 +-0.17186743061474063 -0.12383093806281641 -0.023632046675508833 0 0 0 +0.22224840286268616 0.051884226466638927 0.068334134596145263 0 0 0 +-0.12247967279065403 0.081888028833114967 0.10941183469232821 0 0 0 +-0.13202881818164608 0.15050874484697307 -0.033919759704431507 0 0 0 +-0.48129316071481676 -0.0018411220029345976 -0.082076491320285938 0 0 0 +-0.15188842446378903 -0.19314001225022043 0.033423541019986847 0 0 0 +0.018971811672595706 -0.11891078403587967 -0.037286933697830427 0 0 0 +-0.17076872787514474 0.066541105552544333 -0.10226662079361779 0 0 0 +0.052965301466044001 0.043985408998939213 -0.14164679179031495 0 0 0 +-0.00070515610307692045 -0.069423245366217579 0.18260634148316549 0 0 0 +0.069171206460641621 0.066553243319675326 0.034808680879636206 0 0 0 +-0.20643383737250465 0.0071743389847855887 0.14194511247805461 0 0 0 +-0.038529757751533777 -0.10932183127457556 -0.039246042468251197 0 0 0 +0.0087145088008464544 -0.019773296300135579 -0.1048924179833387 0 0 0 +-0.098805598727355282 -0.039307599957772554 0.15997468355634112 0 0 0 +-0.27541496545372068 0.10868803639154229 -0.035312087954668336 0 0 0 +-0.13586212642103435 0.031544620265867573 -0.040398012226552704 0 0 0 +-0.047516651415643318 -0.017324347411578067 0.17835058313235316 0 0 0 +0.052481372458466791 -0.051837283468987805 -0.094391716442498844 0 0 0 +-0.38704955545660347 0.020210419324722589 -0.071548084160509978 0 0 0 +0.17712309133827214 0.069107188573738099 0.1397482519865427 0 0 0 +-0.34755672353498174 0.047210767400267528 0.053649650502659824 0 0 0 +0.12356401751520335 0.20079642990219498 0.051399290689877697 0 0 0 +-0.032308753326328044 -0.1039024258758002 -0.072186794254253145 0 0 0 +0.10561590165761298 0.041820657046799992 0.084499339899379272 0 0 0 +-0.032741907383997515 -0.064941481460957323 -0.098223200468678024 0 0 0 +0.077363065665084829 -0.095048407407284735 0.089371206367218375 0 0 0 +-0.073549927998923292 0.075499958252674415 -0.00271368879321357 0 0 0 +0.036012047209676823 0.16105922075993145 -0.016502627734557268 0 0 0 +0.16283965755640989 0.00083364212809083904 -0.0081059006567285319 0 0 0 +0.18627987185742007 0.1429591063796668 0.048465776658509846 0 0 0 +-0.33689667322696193 0.0084468574275932962 -0.022088085747151626 0 0 0 +-0.32192372062125713 -0.072582052838644495 -0.064297867881899701 0 0 0 +0.014364569304208208 0.062223051042444966 0.097382159206254898 0 0 0 +-0.21862345550666334 -0.19600438157867781 0.020158128061477099 0 0 0 +-0.017432056548041308 0.12369467554685754 0.15334889508156527 0 0 0 +-0.38506705855527662 -0.074893244035164841 -0.077225955930915191 0 0 0 +-0.049804924173583343 0.071942168403722806 -0.075313123747593261 0 0 0 +0.17421969944306176 0.042858719174723614 0.13570179698826654 0 0 0 +-0.1734061860694131 0.038598332069901709 -0.035286532801012044 0 0 0 +0.10510587981523239 0.15016294881197345 0.10993512361161226 0 0 0 +0.079779634555543211 -0.044584001123182032 -0.050488171121478548 0 0 0 +-0.13511073999919465 0.073452075493114999 -0.11170418513354285 0 0 0 +-0.049273588484160191 -0.12705501866917546 0.035738381375784528 0 0 0 +-0.21122685561541471 -0.11734250810330782 0.063141547877561294 0 0 0 +0.023882899936304824 0.056890486654471606 -0.15178799806025622 0 0 0 +-0.011055309877388675 0.1241552268226524 -0.12674936169670009 0 0 0 +-0.035966710203085117 0.018809410737366861 -0.0037500639883670805 0 0 0 +0.0050922813386725663 0.054615763375119752 0.12441072482941393 0 0 0 +-0.10350570938193943 -0.09349637142203937 0.11529619215625572 0 0 0 +-0.21399313636399109 0.042554601616063115 0.093783174560510579 0 0 0 +-0.13520323869421386 0.0084122284557157923 -0.029182977690825701 0 0 0 +-0.11448789543579801 0.14866292310855211 -0.032663148944219095 0 0 0 +0.027161575015413109 0.02457371111793441 0.021897090374516315 0 0 0 +-0.041826793349410918 0.11556223042480601 -0.066619183766866097 0 0 0 +-0.33874978260587207 0.016818501441465683 -0.038576511328402896 0 0 0 +-0.20562954272652745 -0.029531885017880261 -0.009791952687372929 0 0 0 +-0.14169729881967652 0.12785822888156023 -0.019217405623178474 0 0 0 +-0.23306748459113069 -0.1115068962258231 -0.02343589524486614 0 0 0 +-0.12503100150228014 -0.075894696030723879 0.038321706319306037 0 0 0 +0.11131040644482476 0.054958413969804498 0.076448766631100312 0 0 0 +-0.33051299804440004 -0.081330413983680322 -0.051231796223240422 0 0 0 +-0.14514599302060438 -0.020296262698452944 0.11642372376276458 0 0 0 +-0.42111269466964996 -0.008728819840257529 -0.070405500225247358 0 0 0 +0.0070091958349733363 -0.055350853815868517 -0.13928013717655371 0 0 0 +0.0085950458218878589 -0.12819624935464796 -0.10607483843396139 0 0 0 +0.1309609518524561 0.14446381104870976 0.12498621673890389 0 0 0 +0.042444946419659513 0.03288360567920795 0.083219889170695588 0 0 0 +-0.006851408634167222 0.038388021496495228 0.11987399642015437 0 0 0 +-0.020582650144721881 -0.17069702145365906 0.0040495744492402286 0 0 0 +0.076717167669902497 0.16821916603033288 0.11928214304161769 0 0 0 +0.0097199521224782814 -0.12452288502826729 0.14579533120775365 0 0 0 +-0.18841703084052774 0.00012158284973445843 0.078746542681046278 0 0 0 +0.032971482191397727 0.058691554941297963 0.038924908674397962 0 0 0 +-0.10473410234592861 0.053942043300329201 -0.10189116689463053 0 0 0 +-0.18546954649110559 -0.13104834234183005 0.049013959478227898 0 0 0 +0.011328864145378981 0.057253785867560192 0.074566992000510451 0 0 0 +0.072094278519193089 0.031052843973181199 -0.13847968402484989 0 0 0 +0.013380111430096375 -0.0044129825164675729 -0.080854971534692219 0 0 0 +0.057879528609425746 0.025815306536962734 0.00031689635723411436 0 0 0 +0.19675866716950191 0.15929700699257709 -0.060175664860449257 0 0 0 +-0.18793983232259287 0.024114159632102117 0.076772946673058923 0 0 0 +-0.062288786012646757 -0.0047973739137295857 0.065895904054919269 0 0 0 +-0.41694006998534316 0.051836054281671984 -0.030500320159811523 0 0 0 +-0.11498032995322255 0.058082107782118031 -0.0053177414819714497 0 0 0 +0.014211589544964875 -0.096309759387048915 0.10509536746658479 0 0 0 +-0.09000873123630887 0.11249917490178252 0.025221441445877318 0 0 0 +0.16364340801905836 0.011466378180446102 0.014810584391484971 0 0 0 +0.070744180087444819 0.020073269259961307 -0.062348252791935566 0 0 0 +-0.14933226990417114 -0.07341560822958082 -0.0038683523879856907 0 0 0 +-0.24327157502514546 0.14908291285416342 0.016020105457042799 0 0 0 +-0.059416435997290573 0.055177137514446861 0.17265474001419731 0 0 0 +-0.11192705485307147 0.0029855747938914989 -0.065692747767605336 0 0 0 +0.21500124327161346 0.091074519443361091 -0.043277330225998056 0 0 0 +-0.2873293141196086 -0.075092185317529841 0.068107240088615101 0 0 0 +0.14081237936750984 0.17951509994640757 -0.074160786605763709 0 0 0 +0.10065522506597685 0.010135817518214685 -0.14702916486676457 0 0 0 +-0.11450527944781591 0.033778670213330531 0.057507630325414255 0 0 0 +-0.10725637053408432 -0.18900067041010551 0.11396091453951315 0 0 0 +0.096962549670750742 -0.060003655910835146 0.046253408832166804 0 0 0 +0.11625763452804411 -0.018678492879144859 0.15784916879746083 0 0 0 +-0.18869958594101716 -0.18288232958257852 0.042411562325676916 0 0 0 +0.018347070315938907 0.038045353124910974 -0.049549548347854522 0 0 0 +-0.25178075168553743 -0.11589229991186552 0.014815449485026777 0 0 0 +-0.14834316682070031 0.020322432853583233 -0.099901166534526728 0 0 0 +-0.15418990689412926 -0.034935775252798118 0.15087830842885094 0 0 0 +-0.19717645776274617 -0.0028802156193885042 0.1017749536550753 0 0 0 +-0.1044847847538628 -0.099590802748090596 -0.12058862600432335 0 0 0 +0.044272558164282161 0.11030729475845952 0.0024462468303418639 0 0 0 +-0.13629608050377812 -0.040628813397736302 0.12377337604108316 0 0 0 +-0.006637805718386125 -0.022670707958644731 0.097901611483106415 0 0 0 +0.033164926515994508 -0.1037749063928011 -0.022250788940335609 0 0 0 +0.15800547864697173 0.17814714139956606 0.08463930411279294 0 0 0 +-0.010600294388202036 -0.029523088879497283 0.023243988560589041 0 0 0 +-0.18111529721968345 -0.070478195762850832 0.017495783357894978 0 0 0 +0.039713387968602964 0.046675178546583262 0.053039653687170701 0 0 0 +-0.039983368922132112 -0.082146826874826107 -0.015257324738599365 0 0 0 +-0.18243338822407418 0.058290968788586528 0.12130591279810063 0 0 0 +-0.036128378378239012 0.10994085631626194 0.041233417372797621 0 0 0 +-0.25995516074457209 -0.12998468661892695 0.00023204152943567813 0 0 0 +0.19420511259689927 0.17968900749903777 -0.053656250531908589 0 0 0 +-0.19129388057178354 -0.019251577283296739 0.019013516740913977 0 0 0 +-0.15664701328562342 -0.13676337522340568 0.090784527272390642 0 0 0 +-0.017486141190722171 -0.16003712401229564 -0.061670272202224458 0 0 0 +-0.19471477078366328 -0.093001593617670242 -0.056835608746598015 0 0 0 +0.0040715211458620115 -0.028100235909521598 -0.025694380378334769 0 0 0 +0.042076791281558112 -0.06904846998651093 -0.040655537498168637 0 0 0 +-0.33154016977495748 0.010650699710847339 0.061208693384781937 0 0 0 +-0.25641649301043246 0.022088007097482654 0.071678177721634512 0 0 0 +-0.23371898880831432 0.031649194483554466 -0.050623189487517817 0 0 0 +-0.19815861872972457 -0.0098295802360186535 0.0049057696510683702 0 0 0 +-0.22596118572098906 -0.0016577089493773067 0.020827143861924774 0 0 0 +-0.12058363792844817 0.10567736532195049 0.12156444944185438 0 0 0 +0.19215219912864262 0.16891752638709451 -0.0048525130831915952 0 0 0 +-0.39678610813838899 0.003624315284943197 -0.044343233477730309 0 0 0 +-0.24601801726814829 -0.0023131241721650597 0.10416559661249955 0 0 0 +-0.37737071832959779 -0.088781265149537492 -0.050468740078588481 0 0 0 +0.2416661931246053 0.04473637227223487 0.016661899418985937 0 0 0 +-0.21728755761445967 -0.017133377890653917 -0.058776376186766205 0 0 0 +-0.15482123060163344 -0.031803779628415602 -0.031772093333887391 0 0 0 +-0.089429932557181513 0.037045350267930877 -0.13521799607116869 0 0 0 +0.047870401678467178 0.18128512719654338 -0.02589908503215621 0 0 0 +-0.10742890725960957 -0.038400517597045769 0.077586312084132331 0 0 0 +-0.16410959653919799 0.16523056830125954 0.051253131265196955 0 0 0 +-0.14792954025271587 -0.21981090233230871 0.059885902723890744 0 0 0 +0.0015682249269098336 -0.04359159092990636 0.092321723257268756 0 0 0 +-0.35356565442630328 -0.09517724366592431 -0.059614717180311222 0 0 0 +-0.052828628956298362 0.16486103582182993 -0.10319208886073343 0 0 0 +0.078048655409712786 0.055497601681830822 -0.13642792480435034 0 0 0 +-0.077115770510137127 0.017854052957148286 -0.14740864123481978 0 0 0 +-0.042188106137963532 -0.0025086120240767618 0.086416028403079131 0 0 0 +0.19242190470028203 0.013702443342938547 0.070880502687412777 0 0 0 +-0.1581399122251268 -0.080727257276771131 -0.039671283796824525 0 0 0 +0.17962321542190379 0.098678634469573367 0.10543089073022779 0 0 0 +-0.081837939862695108 0.042892460800882437 0.10168732683594758 0 0 0 +-0.15576355999428315 0.12733014466380094 -0.037458770984864803 0 0 0 +-0.085677700831485015 -0.15293273819241349 0.11848610628917208 0 0 0 +0.054063993246392272 0.15666128650153288 -0.088452962268733878 0 0 0 +0.12146443616955066 0.053956859382259192 0.081025958836640238 0 0 0 +0.078001959945245114 0.079981141088918295 -0.11343959687692205 0 0 0 +-0.10184853169892455 0.1695123412303659 0.10944160333963579 0 0 0 +0.031894371059085158 -0.045682157738614365 -0.11918469593449682 0 0 0 +-0.21192236574654472 -0.18461078094836139 0.053175358924889476 0 0 0 +0.18111551802717613 0.082478698231929437 0.043139586715187417 0 0 0 +0.11956885025859104 0.05510598172603498 -0.12174264635304967 0 0 0 +0.10878966537113527 0.12329307953774649 -0.043289463721395943 0 0 0 +-0.062816236081940646 0.037213774396691934 0.019812718486674125 0 0 0 +0.039783493141739068 0.10206953242999361 -0.073551509520410091 0 0 0 +-0.022747186195047175 -0.17271284368205025 -0.004643072170678525 0 0 0 +-0.45318916566499279 0.021496737567675284 -0.0086592118089185155 0 0 0 +-0.43737731440008387 0.028032135166574712 -0.037017682227158455 0 0 0 +-0.33416417379223279 -0.054554129804732759 0.051494153423687433 0 0 0 +-0.0087811257990869085 -0.1867493931477652 0.046072189991836432 0 0 0 +0.072920538898492204 0.11824847757619383 0.00383704131468246 0 0 0 +-0.081879420614833998 0.15061611346475451 -0.0088822189940246654 0 0 0 +0.15827702386058634 0.037387520886328962 -0.081748182436969588 0 0 0 +-0.1489682082339982 0.11810034352933335 -0.051768056621371294 0 0 0 +-0.44150865370918302 -0.052799717097748083 -0.062532857724004881 0 0 0 +-0.40568718711479568 0.0013153260679868717 -0.051939869960717394 0 0 0 +-0.059075083021845221 -0.077086281176212246 -0.098807448135671661 0 0 0 +-0.35655281427525221 0.050427222787636339 -0.029977308959455218 0 0 0 +-0.39360765877966308 0.010419912076826188 -0.048876138610708997 0 0 0 +0.016766978846776748 0.14899610247103168 -0.015713750412703953 0 0 0 +0.20160343686907084 0.15885549777466568 -0.029164676644668902 0 0 0 +0.15518283977869657 0.093971769396338611 0.056987622053784298 0 0 0 +0.036006321191762114 -0.10066339896636783 0.11533768570313233 0 0 0 +0.0067897852737782149 0.049629528543310708 -0.019429130291205354 0 0 0 +0.03494409838625695 0.084552535050587241 0.091318789987780175 0 0 0 +0.062346591619758363 -0.076290998593193021 -0.040816587743937954 0 0 0 +-0.021476814022106161 -0.067497831308402589 0.15425592324306023 0 0 0 +-0.047414737215321578 -0.12726112554129773 0.11777276721616928 0 0 0 +-0.26746423992872703 -0.16075584962796655 0.017127616053581235 0 0 0 +-0.095964684746861484 0.12131131742044865 -0.048211502638243614 0 0 0 +-0.045316487229298819 -0.10882042418594753 0.10522575873083714 0 0 0 +-0.017398928632093635 0.15431633376015907 0.011897142792643062 0 0 0 +-0.043081711849530746 -0.17681201165689855 0.10847903380593146 0 0 0 +-0.19480387551307449 0.13782846272525145 -0.030589254262822219 0 0 0 +0.07895484233751654 0.16254218792193104 -0.064294855856764588 0 0 0 +-0.15491155936562923 0.039098880512865697 -0.017047548470720653 0 0 0 +-0.13174925079879357 0.072881268031356361 -0.13267871630999259 0 0 0 +-0.067594896198883703 0.17458003752617118 0.040836781836342539 0 0 0 +0.024777597415675368 -0.14820662994673339 0.10331926136081013 0 0 0 +-0.19952973737626106 0.012674731868296846 0.10720456939435888 0 0 0 +-0.45243814316575415 -0.067730040237666128 -0.051273887162837206 0 0 0 +-0.17858424009286339 0.15536410742970042 0.0064579977298318547 0 0 0 +0.075737382970126277 0.12159675445624207 -0.033226858219790739 0 0 0 +-0.27908016790475698 0.047230056835487477 -0.035658162681154432 0 0 0 +0.1237888249389803 0.14813926576712866 -0.044214867928009466 0 0 0 +-0.13644241669154961 -0.032922267448214831 -0.023044874605929466 0 0 0 +-0.2434710832148069 -0.0051546493280399674 0.067025146528833096 0 0 0 +0.090968511263192553 0.13816030132398521 0.098920456784794081 0 0 0 +-0.31225368981654988 -0.028042441495793408 -0.042517122928047074 0 0 0 +-0.11206673953336432 0.11780749374062566 -0.077012808139024766 0 0 0 +-0.046733270793124115 -0.20006680191791479 0.031796801658354246 0 0 0 +-0.10760617611266443 0.19420430643115333 0.036648763327485429 0 0 0 +0.12380108115684002 0.07454172811101889 0.037553299444270799 0 0 0 +-0.046801334145062157 0.079051136594266602 0.086713057150111045 0 0 0 +0.24380485023440784 0.13525120959996245 0.072841770648240128 0 0 0 +0.17212751974649027 0.13121997101335553 -0.07161581787631241 0 0 0 +0.0096952749201399402 -0.12090294928043989 0.12124235897492944 0 0 0 +-0.062537791833013778 0.096013207922737542 -0.02928088178104768 0 0 0 +-0.22316426064871253 -0.064953848828525285 0.045204149409433819 0 0 0 +0.017455939882707272 -0.051053828306986487 -0.12100343171003414 0 0 0 +-0.093199947740575328 -0.20718404600480667 0.087372243259902088 0 0 0 +0.060881704895007382 -0.072943504539261572 -0.10878912827240815 0 0 0 +-0.085911927161710366 -0.036901059897690547 0.10382412949549594 0 0 0 +-0.46233010704812827 -0.046992952630390883 -0.069460433667064642 0 0 0 +-0.094786829786289051 0.017688779194830889 -0.011977852006366946 0 0 0 +-0.22205887087855958 -0.10780872862686265 -0.0099091825620410967 0 0 0 +0.049208038689892264 0.17668261809207264 0.10120732921093048 0 0 0 +-0.15092863547810359 0.031766202250278541 0.00066445676859888669 0 0 0 +0.041137270101627765 0.15966885710850731 0.042441251889920789 0 0 0 +0.069624237570203806 -0.046838194867938776 0.036022933748501823 0 0 0 +0.048246711252587782 -0.092760438624365282 0.11236888057615377 0 0 0 +-0.27029625122112455 0.029795907304059233 0.0081646503416313854 0 0 0 +-0.17064756848023976 0.15585987752774916 0.064552040170900965 0 0 0 +-0.083263377075162737 0.0072635556747359109 0.14540577954600611 0 0 0 +-0.18027913837237752 0.15925545830902221 0.052176416379858731 0 0 0 +0.11654364216943031 0.12540354255223224 -0.041352709282604982 0 0 0 +-0.08194147187470463 -0.15493357171018796 0.11109784383990287 0 0 0 +0.022125876327522553 0.09522682835367785 0.051387405396489422 0 0 0 +-0.050225475474426073 0.052264545883016655 -0.087620003750182224 0 0 0 +-0.00014265269140484316 0.083102431592926351 0.18106540798814594 0 0 0 +-0.25065360478567195 0.035814472391688723 -0.059382853620282366 0 0 0 +-0.44727974398600406 -0.033503332180988055 -0.048879651680888148 0 0 0 +0.20763153624024239 0.12071965958318576 0.1168271309257746 0 0 0 +-0.089056259626869638 -0.094756794933618521 0.035715606938584249 0 0 0 +0.21411752355718511 0.084538035954335233 -0.018050022464388971 0 0 0 +-0.15745833280930766 0.084382553836773122 0.047595734866186984 0 0 0 +0.18799113720635646 0.17998912032918074 0.059615874531297935 0 0 0 +-0.0069247989362455353 -0.044494806922080465 0.024123466855942272 0 0 0 +0.088125823018304017 0.16617754373791255 0.12586456021085798 0 0 0 +-0.010374901211536558 0.035517815347973714 0.18218878197894292 0 0 0 +-0.059315978998993546 -0.10544063828697477 0.083955578676867287 0 0 0 +-0.10785204343126392 0.08289701330793553 -0.14458919041403662 0 0 0 +-0.1658627095861151 -0.029897855906202947 0.022309662262140761 0 0 0 +-0.27975196373571642 -0.024023117287086337 -0.018875807072350759 0 0 0 +0.10844368645949048 -0.012290938685507985 0.093490599712217709 0 0 0 +-0.083950125854699909 -0.046441771508224788 0.091427265404431607 0 0 0 +-0.24770312818375187 -0.0059859322743527621 0.069666071974474469 0 0 0 +-0.25767803505305437 -0.16960436925168804 0.0040282420712849099 0 0 0 +-0.1480922128995974 -0.098079349282620965 -0.046008751757977528 0 0 0 +-0.10566883206723027 -0.10185351012845385 0.11948510378393715 0 0 0 +-0.37932674108988607 0.014270906609937073 -0.044532691065394786 0 0 0 +-0.027224646886009785 -0.075672316013450758 0.1804367395870751 0 0 0 +0.076127993984450526 -0.056297436447296317 0.043490535074701075 0 0 0 +-0.022288100290142498 -0.013869719908969486 0.10696068446609283 0 0 0 +0.12187429389007848 0.053660784050099053 -0.013377410973337944 0 0 0 +0.13104573750460052 0.042547362562733226 -0.094139850807880981 0 0 0 +0.14028449092831224 0.019696781086696286 0.0016154929842404075 0 0 0 +0.17324905853482891 0.058849156365132382 -0.076739905852555759 0 0 0 +0.037606646455221326 0.17231662656611063 -0.067224397356491994 0 0 0 +-0.072897047829309058 0.17471134434548297 0.1298037004199801 0 0 0 +-0.28493305309284478 0.031024423851180316 0.034469662924272476 0 0 0 +-0.034114327913567 -0.10134414305825812 -0.024353761684540648 0 0 0 +-0.12656262513210537 -0.17374562114469197 0.02290419128433055 0 0 0 +-0.029236623407551121 -0.056984107528825295 -0.012699464727210813 0 0 0 +0.050715952554407917 0.02009811429754596 -0.055168245937429833 0 0 0 +0.054864932473080608 -0.052924563620436016 0.1768056412769812 0 0 0 +-0.37583487161039841 -0.02224791396068132 0.057930720631784755 0 0 0 +0.010662997645272398 0.05915569372392071 -0.023246457520788077 0 0 0 +0.15192571246988135 0.088980849387702066 -0.067186739523842937 0 0 0 +0.13787061234418535 0.070831734590297069 0.10614565422658109 0 0 0 +-0.15829442892436874 -0.027318322197468964 0.092736987867517856 0 0 0 +0.10233917241181006 0.0087844418200985486 0.10398832969765923 0 0 0 +0.051320164972892879 -0.063051133087045075 0.11098599718279203 0 0 0 +0.090890739529507603 0.035309784501294128 -0.13803662487362836 0 0 0 +-0.080582306366146106 0.21563399575064796 0.043644216301195332 0 0 0 +-0.12476422620670408 -0.028709415772670416 0.13453639925991276 0 0 0 +-0.19179066628840757 0.010868127255261872 -0.050765118153934835 0 0 0 +-0.1670622517639585 0.13427603057679532 0.062090504816153552 0 0 0 +-0.12256326577433624 -0.073979551666335214 0.057195032053818012 0 0 0 +-0.092471040625073997 -0.060643953486939906 0.1201562759901765 0 0 0 +0.10572830650321668 0.043020708065863666 -0.025637551585828894 0 0 0 +-0.010178430245078696 -0.12305520899835556 0.014396547796414222 0 0 0 +-0.1160065108166356 -0.11015799879884162 -0.090776317420024427 0 0 0 +-0.23442877468210183 0.04693888043130795 -0.044909894630754843 0 0 0 +-0.29179315019838281 0.088607643943819203 0.017133038998311395 0 0 0 +-0.27795828673440737 0.082264236859578177 -0.042295271915054417 0 0 0 +0.075715030261992944 0.022826206771112967 -0.16195195333458157 0 0 0 +-0.42282903415022188 0.025655233481558515 -0.050508001106865708 0 0 0 +-0.16136169747207552 -0.0002586729553281375 0.047732005009451878 0 0 0 +0.11131832657968849 0.20809147789540139 0.031485756459317643 0 0 0 +-0.096291295644769015 -0.15008829376978849 0.029025327710538174 0 0 0 +-0.005622125703692471 0.096802936188469135 -0.15884709749199355 0 0 0 +-0.18278607381734069 -0.13720352654321027 0.084393976011435973 0 0 0 +-0.2364293649232993 0.048492941912199383 0.098325621083681453 0 0 0 +0.059855367956792416 0.046678645898704851 0.071172358733775115 0 0 0 +-0.07667484332268365 0.0827289061648524 -0.064972875431084542 0 0 0 +-0.016984539451638747 0.15425113858756934 -0.035077518305863253 0 0 0 +0.2114082853144244 0.034589658579973037 0.10256243087254838 0 0 0 +-0.035274018488111958 -0.10495862600988663 0.036580445213832413 0 0 0 +-0.20254325119243005 0.114708276577136 -0.05720361324375961 0 0 0 +-0.24339606867665428 -0.013620589941530981 0.078256379169531626 0 0 0 +-0.021721351492695995 0.070009509723910568 0.092434951640301383 0 0 0 +-0.058538655061342315 -0.035220452379682576 0.10807658844891374 0 0 0 +-0.37360199936066057 0.012656541388153558 -0.045093777604996693 0 0 0 +-0.33698603871088478 0.088099332350259185 -0.05987273477184446 0 0 0 +-0.20441906662073223 0.15322406215518108 0.043725403976789201 0 0 0 +-0.0016167980908463053 0.041447889814198946 -0.083618852951475878 0 0 0 +0.11638978113551851 0.17915780696937722 -0.066997391464365175 0 0 0 +-0.031973121078126165 0.1812609516841136 0.0070700442075408154 0 0 0 +0.19193200403648186 0.1238486862511714 -0.049246483483887743 0 0 0 +-0.26116019010431368 0.056865361684264593 -0.0005203885246934381 0 0 0 +0.14658527111789205 0.056048353159895592 -0.063291894926767789 0 0 0 +-0.079475731107727654 -0.033315876917498655 0.12829213774361695 0 0 0 +-0.10875478802160832 -0.16158039941295704 0.041724455624678164 0 0 0 +-0.26487999228266768 0.0011338644039644852 -0.022785099551101667 0 0 0 +-0.064370205239702494 -0.091995233698591139 -0.15842972251491946 0 0 0 +-0.097068906790288179 -0.021381817848110579 -0.15532477310927026 0 0 0 +0.065780364238230915 0.011556292453067357 -0.12008556731241056 0 0 0 +-0.24448072166083618 0.049918709222796342 -0.011478172351835292 0 0 0 +0.1308348131800931 0.068629251490226917 0.0801842341646892 0 0 0 +-0.056375952606510848 0.20059390603913085 0.010212476757663291 0 0 0 +-0.28128666313506434 0.012186611834061778 0.0078286869231904976 0 0 0 +0.28611629557929225 0.14926343684028182 -0.043477505239554681 0 0 0 +0.1111824783918634 -0.057666435478207656 -0.046156639871598681 0 0 0 +-0.25255082853728905 -0.10643215042555614 -0.021664352380376312 0 0 0 +-0.17710940199339298 0.077708434095493495 -0.034753097301893854 0 0 0 +-0.16526833781615835 -0.00070808368380043119 -0.035371408791883857 0 0 0 +0.13506767329031594 0.021304150348896156 -0.093085712368531609 0 0 0 +-0.33550981332183116 0.013994005698598905 -0.067932375674497808 0 0 0 +0.077585533856358302 -0.053874029322276362 0.10104635136514903 0 0 0 +0.011142386501105495 -0.094835821604921017 -0.084913430822234126 0 0 0 +-0.052027294818791592 -0.033817082463205805 0.12548438750343258 0 0 0 +0.22383421128004083 0.093414908661870244 0.051573739017499148 0 0 0 +0.086968699175126341 0.18894090703302668 0.041470491689899941 0 0 0 +-0.078204660944086513 -0.037156167829491688 -0.14519534446094046 0 0 0 +-0.04790907410696621 -0.13454870980686601 0.099153895323019964 0 0 0 +0.044570697692753736 0.074403156536835713 0.094267483326341966 0 0 0 +-0.20162286825994263 0.0062612306834854969 0.0061286570538682805 0 0 0 +0.1409852717017242 0.016698790300939681 0.038829993589827805 0 0 0 +0.05904597499325398 -0.10355373327707873 0.12240896763949002 0 0 0 +-0.26025488445117839 -0.044226701292407244 -0.024542411176956269 0 0 0 +0.040572998849947417 0.12150422483759837 -0.05304841402067198 0 0 0 +-0.13859971510360253 0.079239064980298257 0.098531407467577631 0 0 0 +-0.1376720442714659 0.12349130567472055 -0.0041919898013174639 0 0 0 +0.018764959275426818 0.062558590448968554 -0.082833380842383952 0 0 0 +0.14468674472743176 0.094573328109907928 0.0041589312893333952 0 0 0 +0.063801607085668899 0.021322184906354624 0.049010023146581372 0 0 0 +-0.10604646808821477 -0.12463909433377023 0.057947031235198981 0 0 0 +-0.20266650266990999 -0.080019298679353673 0.098977311010116226 0 0 0 +0.17102784692452982 0.029540932591914648 0.087296326117781903 0 0 0 +0.18282611712943991 0.11380907366648035 0.094372413185640242 0 0 0 +-0.063316904017548137 -0.0049366437131222463 -0.16510239388028206 0 0 0 +-0.10071405495194491 -0.084247686508347769 -0.060872838501295545 0 0 0 +-0.085026624402862572 -0.041174293703828496 0.07385734699765642 0 0 0 +0.057387119411642151 0.13345530796550681 0.0063763587609804162 0 0 0 +-0.068072800643525611 0.1008663991535711 0.014520998177561917 0 0 0 +0.18008694691407251 0.15350826808713885 -0.077636692571668414 0 0 0 +0.12801826387442877 0.15191890232636823 0.056246438131099558 0 0 0 +0.053463854644771158 -0.11391569395214228 0.029182325784680441 0 0 0 +-0.0047693707764800974 0.12870470807843698 -0.035172648177064031 0 0 0 +0.0083030925997299443 0.039455525382692425 0.18030598093929465 0 0 0 +-0.19636344786959703 -0.13996073864906469 0.062318191453807043 0 0 0 +-0.20441979144269373 -0.11327719933917049 -0.030574092220240739 0 0 0 +-0.13081105228667617 0.067565993927036883 -0.11472006269056349 0 0 0 +0.17082633357046401 0.012442274919158308 0.044665553461951668 0 0 0 +-0.027584987324767329 0.09884619138548989 -0.041964059420943722 0 0 0 +-0.3525096447583731 0.018685940103864762 0.039067370687392078 0 0 0 +-0.10035556284697961 0.1445555122210006 0.008173632209866305 0 0 0 +0.17017912915738759 0.023605284103886681 0.053964487233367303 0 0 0 +0.12182161089737426 0.01278344724685046 0.013920474622020035 0 0 0 +-0.44608582012312487 -0.041999796159288866 -0.017100419582865678 0 0 0 +-0.080519115344525827 0.093163039552651317 -0.079898989286035296 0 0 0 +0.11900908250186121 0.052998740828129443 0.048941975511857305 0 0 0 +-0.15509979502437871 0.1261760008813636 -0.023173604940204401 0 0 0 +-0.20840561915292638 0.0053582329402342421 0.041609467921941062 0 0 0 +-0.068578640210281649 0.024404098721240164 -0.034732086082858965 0 0 0 +-0.131846412842616 -0.069374359749295761 0.15047761459461598 0 0 0 +0.00017303183665262623 -0.11293516600983963 0.14831644599762187 0 0 0 +-0.24535560482055882 -0.074383518642645335 0.054911084030267315 0 0 0 +-0.19251978843190476 0.011346263097360254 0.069821910349324362 0 0 0 +-0.1180063660324342 0.06769907436688849 0.01381731763421884 0 0 0 +-0.20303622233508156 -0.025156627229506151 0.03350079941829201 0 0 0 +-0.051717064594889561 -0.14328602121669243 0.096083838070484345 0 0 0 +-0.052352936390144766 0.22211305642739915 0.07167346355422119 0 0 0 +0.25956518358800323 0.15010842406267716 -0.046631911262537823 0 0 0 +0.020890296364543037 -0.11175547789371061 0.11439015457510718 0 0 0 +-0.019447654534054504 -0.1469757747735195 0.11925636549005006 0 0 0 +-0.082972461958285448 -0.16232491845309222 -0.045578170837480558 0 0 0 +-0.14621328466707378 0.17586698224419678 0.037182103964055413 0 0 0 +0.0047670751139823886 0.036227617388451927 0.078029826983995271 0 0 0 +-0.20511058305087737 0.11449634809169495 0.027482028963608213 0 0 0 +-0.029602761666190358 0.11666342881766939 0.043491342241744974 0 0 0 +-0.20727582540581474 -0.14942241352185934 -0.016956228880931151 0 0 0 +-0.4397431056952989 0.021605895869459935 -0.079023533831031986 0 0 0 +-0.075277965531537816 -0.1157882999094506 0.065989484009457283 0 0 0 +-0.04812376652312006 -0.037184158307391246 0.031282932163129107 0 0 0 +-0.1877967597231735 -0.069969835764721044 0.12794682878623295 0 0 0 +0.17184988874931578 0.18497148450884687 -0.0062121425286643106 0 0 0 +0.098980470261443354 -0.048182972552004738 -0.047831736855878021 0 0 0 +-0.10166598162224522 0.17167318976089685 -0.015903757126430051 0 0 0 +0.099746706841676469 0.042714125943557335 -0.038312901858834542 0 0 0 +-0.33337272678558016 -0.0099245864123609084 -0.075753775877680632 0 0 0 +0.037045161119860059 -0.083671617084335542 -0.16026746143085463 0 0 0 +-0.12943950093881229 -0.10075848267569347 -0.086856525643549856 0 0 0 +-0.024261210029048408 -0.084650390682254467 -0.027813266639866857 0 0 0 +-0.025984931885541906 -0.022211407062841582 0.030522080319645345 0 0 0 +-0.060329636465648706 0.042122900106370431 0.094226925967000413 0 0 0 +-0.21088454842961862 0.014117057825334345 0.076911387516472002 0 0 0 +-0.089628181944990115 0.17475371162313313 0.053361027765498031 0 0 0 +-0.19889602001792056 -0.045894512441284507 -0.010120342510162861 0 0 0 +-0.16715909825703135 0.078762739597615761 0.10086761510183753 0 0 0 +-0.17797081170296297 0.13707659261590149 0.091360486811545655 0 0 0 +-0.012739913644362277 0.16092612896856573 -0.095706869275955009 0 0 0 +-0.12325355816989675 0.15790036531129387 0.036742305782542561 0 0 0 +-0.048509948489796395 -0.035079615642979289 -0.18709355751776555 0 0 0 +-0.24674627211946532 -0.054609078629462987 -0.028675272404821595 0 0 0 +-0.13427610146406344 -0.098126596426275109 -0.06669738187988522 0 0 0 +-0.21063431668514154 -0.032650143810894344 0.11231831234054498 0 0 0 +-0.10794962457183055 0.07262708128563683 -0.074694635341735552 0 0 0 +0.075414653913297214 0.081504454959050732 0.11510280269232856 0 0 0 +0.0069622656914451464 0.16448201411911612 -0.0095985402039624745 0 0 0 +-0.32979792452260159 0.013014341970627646 0.028007288647689393 0 0 0 +0.060071199000980624 -0.041122545363547758 0.18112804994275236 0 0 0 +0.038744982746879042 0.064147820848287518 -0.058416930110731152 0 0 0 +-0.075977010586874116 -0.011324819669882774 0.093439527832590991 0 0 0 +-0.046129140757948661 0.15234357039506269 0.051343364483886877 0 0 0 +-0.11925036572080577 0.099438631192151461 -0.090774640896203462 0 0 0 +-0.13231878513465406 0.10521656816807573 0.092321328770155558 0 0 0 +0.050351432107456462 -0.0770429732221449 0.16680491975780201 0 0 0 +0.18947025961582548 0.080981785841896192 0.030206394281388271 0 0 0 +-0.12526333188267197 -0.032012365200031562 0.020129309896061209 0 0 0 +0.014631063816302914 -0.039075340267964664 0.0070756277317311489 0 0 0 +-0.19896989025946243 -0.02072560095140899 0.086075316659281947 0 0 0 +-0.34107056162588767 0.0013255195135069009 0.022792416099002594 0 0 0 +0.1150723189651966 -0.027812563053801198 -0.032168542301143049 0 0 0 +-0.038569053456445734 0.0034772829774930014 0.057954549509833558 0 0 0 +-0.3644783289959212 0.069267226075343302 -0.060653052001802238 0 0 0 +-0.15988210381496004 0.040854345483793408 -0.039534724796172233 0 0 0 +-0.030807604340817807 0.10247823577203458 0.054154746047563845 0 0 0 +-0.054397636847093256 0.10664306690170661 0.0017027319993306866 0 0 0 +0.10708165491873395 0.14386148385905101 0.13094124160326923 0 0 0 +-0.19506839244783625 0.14567955264465138 0.055694069292597487 0 0 0 +0.20551740403702706 0.16775170982124704 0.025923214528002309 0 0 0 +-0.27846816572866406 0.05160223643591344 -0.050500164643566575 0 0 0 +-0.1511065006653895 0.031868118286040581 0.044067126350160218 0 0 0 +-0.067630526980238526 -0.094197834811572456 -0.0061538638799917 0 0 0 +0.083725787144154296 0.047103095504296921 0.1282659217080204 0 0 0 +-0.0056390845724847427 0.022544786029530667 0.031141502870987159 0 0 0 +-0.0536345327221463 -0.097288075925888978 -0.13791970817531785 0 0 0 +0.056160174579955646 0.20763275742607606 0.0052018360351850368 0 0 0 +-0.17221379461167152 0.085529041986729448 0.080320018671112575 0 0 0 +0.062874330030635417 0.074017209553777219 0.13590500593259555 0 0 0 +-0.35796575038736222 -0.033805465152289271 -0.022927466887188608 0 0 0 +-0.24712535173789135 -0.08465276379124867 0.037884328525078947 0 0 0 +0.13393337793777921 0.0076829675640235628 -0.084244630365340037 0 0 0 +-0.14146707979501927 -0.17298921342819837 0.044012063931716611 0 0 0 +-0.063166179595878391 -0.13073859807320687 -0.096222846353390248 0 0 0 +-0.055480623647735983 -0.03705027212421505 0.078358816055915298 0 0 0 +-0.28433247687713015 0.020662796653617171 0.041992337250452011 0 0 0 +-0.00016681821025216204 -0.024195538648081966 -0.015467451037663976 0 0 0 +-0.10102535578096522 -0.0049309859471302619 -0.1022333227397236 0 0 0 +0.042424620416520564 -0.06478864531708789 -0.097158200917306814 0 0 0 +-0.068315030625639539 -0.095644911056009141 -0.097393342154733831 0 0 0 +-0.33218274711811918 0.056849526750395507 -0.03103470149979648 0 0 0 +0.1852691809457167 0.17563942036780761 -0.034068770946069166 0 0 0 +-0.026791382857959289 0.16170106385539562 -0.079136725457147686 0 0 0 +-0.18108155331844 -0.12724876074388392 0.0281338415987403 0 0 0 +0.058130108404490122 -0.039371109965960965 0.17538944182254887 0 0 0 +-0.16276972459707412 0.11658041904998012 0.030551953482832767 0 0 0 +0.064979517598289516 0.10771467768004861 -0.022687997429975765 0 0 0 +-0.23654614968888932 -0.122418610302425 0.041282345655861308 0 0 0 +-0.21861434043590683 0.021986929146151496 -0.059680784953829363 0 0 0 +0.0023309258271264621 0.087809458800051809 0.064360962494277835 0 0 0 +-0.33896211916169849 0.073983842741764616 -0.06848511059704096 0 0 0 +-0.057743140284307326 -0.11128463529235871 -0.052616023471761031 0 0 0 +-0.22888510882180185 -0.024737160296083915 0.04724093018629541 0 0 0 +0.21638050615073173 0.098732779478594657 -0.084089107580180747 0 0 0 +-0.00089577898827619684 -0.0045790007667690646 0.10173226031045149 0 0 0 +0.048780723265854087 -0.055655398234296605 -0.13255063534791628 0 0 0 +-0.36122665939240717 -0.085067691404091206 0.018041308726777311 0 0 0 +0.033326096234335523 -0.08023077674528073 0.024304575239880943 0 0 0 +0.097766062809002963 0.1285495740025821 -0.039117999933860725 0 0 0 +-0.060414212758373498 -0.12317786317955751 -0.14258681466831918 0 0 0 +-0.27749466596842975 0.032326294311046111 -0.022454963403476857 0 0 0 +-0.19782811314196563 -0.032300211112797739 -0.043469611598829283 0 0 0 +0.050924224740997837 0.20375884268665589 0.014479530806065538 0 0 0 +-0.30083995202260094 -0.13682311181694967 -0.022376682865856201 0 0 0 +-0.35984076125572906 0.0067023843634067826 0.017594880005865371 0 0 0 +0.24478382924053349 0.11777468208190844 -0.039044891168704715 0 0 0 +0.10323900070857955 -0.028207133332376372 0.033011813056323225 0 0 0 +-0.24920516033345605 -0.081642013475237418 -0.016974294163024983 0 0 0 +0.16589251318191173 -0.00048023887627574036 0.023402406973979911 0 0 0 +0.0181237386115361 -0.12175789756358463 0.13263379329641165 0 0 0 +-0.44770650086632002 -0.02835397352080421 -0.014958382775478535 0 0 0 +0.085172563145400393 0.088281575126962275 0.074817133215930781 0 0 0 +-0.074674063373131261 0.11228751606834725 0.028189172825343917 0 0 0 +-0.054689568528661081 0.03054555808530468 -0.09074107719004619 0 0 0 +-0.063931273013215995 -0.13089794120483381 0.092873927432208764 0 0 0 +-0.03501134610809159 0.22028367575086649 0.052026906135228007 0 0 0 +-0.20367013733778383 0.10047473422007774 -0.052079920497193455 0 0 0 +0.14563100861623418 0.18027852975238534 0.10691093899137152 0 0 0 +0.18550913934033825 0.023919956428904071 0.09323604766676899 0 0 0 +0.12070812488858579 0.14562568157122607 0.046846723205329843 0 0 0 +-0.061390430034105714 0.0031469474905752304 0.067629495217065766 0 0 0 +0.15996718169865892 0.016662709406149556 -0.017645794768183481 0 0 0 +-0.14291291481259283 0.064719183249162038 -0.078997254863138314 0 0 0 +0.15769754155115218 -0.017774283308214067 0.056911067977412161 0 0 0 +-0.21186293374684878 -0.047065079937069682 0.045107490227720703 0 0 0 +0.049828939775030501 0.17193884239261781 -0.0026563834602748859 0 0 0 +0.2584516578991804 0.088911718880756718 -0.042739547014789658 0 0 0 +0.044201784477042871 -0.12598154774177076 -0.14926637572790913 0 0 0 +-0.29211030553304829 0.10438274098333855 -0.0091317576187769922 0 0 0 +-0.13568142354443208 0.072292108598102311 -0.12976443988359859 0 0 0 +0.1952087019161623 0.041750856372161305 0.072147402599743088 0 0 0 +0.017000558959299139 0.13404505018121327 0.030856660712677508 0 0 0 +-0.19272846837808616 0.079414334928805008 -0.0040194075369723026 0 0 0 +-0.051349490296910549 0.054594282669311378 0.05435503077494816 0 0 0 +-0.066272320972702026 -0.053962055388318858 0.14160481248598314 0 0 0 +0.17033796720132693 0.078800872546311462 0.046742767775611482 0 0 0 +-0.0052846190462471632 -0.13657232431426691 0.14396039082980996 0 0 0 +-0.26417728910606592 0.02231254818603301 0.031668897055222661 0 0 0 +-0.19780679249263139 0.13078656206459227 0.0060396271601044493 0 0 0 +0.20060568920667982 0.11168857098736429 -0.071783623969152111 0 0 0 +-0.10777903216799029 -0.058685887976682755 -0.13337910766619582 0 0 0 +0.15206907870155523 0.076717398934685599 -0.0031287440004209022 0 0 0 +0.049164477948141216 -0.05931601588119334 -0.13856262359450849 0 0 0 +0.24508785766401325 0.10722471334603473 -0.019652380851655271 0 0 0 +-0.1994952244381607 0.093405321344369518 0.10872923015672711 0 0 0 +0.024469759330989327 -0.099336285737563396 0.13310582896481735 0 0 0 +-0.11748631685641131 0.080773164288122201 0.0053010147364749571 0 0 0 +-0.43713418122480624 -0.043131107549016834 -0.093954865683055014 0 0 0 +0.012306672779442696 0.021159017599538893 -0.12945985870398907 0 0 0 +-0.073095455181445057 -0.090614608789582746 0.12259590904911563 0 0 0 +0.14780111460967221 0.037861351506054408 0.061051795928058677 0 0 0 +-0.023770654455728402 -0.023626630101877738 -0.084197154351775993 0 0 0 +0.070877985698261703 0.20399777663842028 0.085075065716522263 0 0 0 +-0.031099413203231563 0.1391783325272179 0.11129575477589107 0 0 0 +-0.056581465708043011 -0.18119479164391758 -0.016266214856318184 0 0 0 +0.06519065279383679 -0.081478846382601194 0.0045870656471643512 0 0 0 +-0.052832210740735797 -0.090057004852207384 -0.010363653622115027 0 0 0 +-0.10155098321401285 0.086591566841808576 0.06009750171296438 0 0 0 +-0.062999336766335234 -0.023270201553358238 0.1836665208661156 0 0 0 +-0.11793196672376716 0.14692870838627775 0.052609727708102211 0 0 0 +-0.36588718826792671 -0.10466499232416461 -0.053960143911633646 0 0 0 +0.04759443119625556 0.064168404570299209 -0.040722411324884744 0 0 0 +0.19419333367316743 0.052075014791695851 0.027720007909276534 0 0 0 +-0.038201777703487372 -0.18786001286900744 0.011477976008690438 0 0 0 +-0.29158491580230184 -0.045120785312723372 -0.027325231131071687 0 0 0 +-0.092980723108684216 -0.099762598276551817 0.1081160631499756 0 0 0 +0.084301534239684617 -0.057841845500115313 -0.12399442316354252 0 0 0 +-0.13281659497407033 -0.019760305670187356 -0.057542425508901485 0 0 0 +-0.032869272736280708 0.19986316923642061 0.093034560171381592 0 0 0 +-0.16267443356134931 0.10268382454391706 -0.041854680860854226 0 0 0 +-0.37297836224267494 0.0033736102413725877 -0.060393514381806374 0 0 0 +-0.080338658484136738 0.071494641598239039 0.046558755038314498 0 0 0 +0.017318669260125541 -0.0034942798463110936 -0.080269294246400238 0 0 0 +0.073462249972145066 0.18517171686531092 0.063243229205097534 0 0 0 +-0.20250518330115364 -0.08475488908039408 -0.046179137889358207 0 0 0 +-0.23297792939885292 0.012572242259801358 0.082876514778114835 0 0 0 +-0.14764589678556894 -0.20616872481494072 0.067471044502141891 0 0 0 +-0.043545797060863145 -0.10612959209374387 0.063128806593547554 0 0 0 +0.14186109924626528 0.18449837031958949 0.026468375483612527 0 0 0 +-0.39378957095255146 0.07074700153425334 -0.041880144493500221 0 0 0 +0.017670966366960139 0.055635879830082391 -0.16452823023210744 0 0 0 +-0.14918385221516717 -0.19132599724024582 0.06325801588158822 0 0 0 +-0.0041979990660748756 -0.025436626033307541 0.14445076949923716 0 0 0 +0.098117253787640857 0.19119165034584329 0.0042387595159248392 0 0 0 +-0.26982589883178942 -0.035781452561581523 0.080503871942795319 0 0 0 +-0.047924699348697919 -0.15525081975801802 -0.10736074742720136 0 0 0 +-0.15784460774063602 0.015923119707485639 -0.10080275597180705 0 0 0 +0.126538893181316 -0.029566462586674863 0.093133054414324928 0 0 0 +-0.3775293020434119 0.058646283389463538 -0.048235877300816132 0 0 0 +-0.34641330253034597 0.031911189571747101 0.062116103781084536 0 0 0 +0.142784590070208 0.16740512346384767 0.093754580835056972 0 0 0 +0.040649379892903348 0.10973729411092303 -0.0388944985724273 0 0 0 +-0.16876288361948916 -0.042670858266334072 -0.045394821024174803 0 0 0 +-0.16527364435942382 0.058441332015809144 0.020806486474625296 0 0 0 +-0.29595059330153284 0.011386404835700054 -0.054833527056215803 0 0 0 +0.07063844677828951 -0.067803761254094541 0.10516811720205752 0 0 0 +-0.091400770708594981 -0.06903094945988153 -0.078682691952897704 0 0 0 +-0.29411732431772164 0.081112760040425669 -0.0081881565106045329 0 0 0 +0.0072797641639317789 0.055367551667896087 -0.057660693488010673 0 0 0 +0.18579747676660069 0.047863600260677708 0.07827996411531371 0 0 0 +-0.06227474419323964 0.022006895174450231 0.092462406272612957 0 0 0 +-0.12939775111824975 -0.1951049103010935 0.055715267266472829 0 0 0 +0.096501009272290383 0.068328960891088919 0.0067131677741510687 0 0 0 +-0.29201339592982556 0.044930432617698302 -0.04578859936008417 0 0 0 +-0.076498229001243645 0.031535582104635862 -0.0021771943017886985 0 0 0 +-0.08351239272106209 0.13662606815396622 -0.049933661656669348 0 0 0 +-0.020995162270597667 -0.0050327362079499449 -0.17579044913939618 0 0 0 +0.0092467756484099772 -0.095788821268711244 -0.050744473204582002 0 0 0 +-0.2950117221183563 -0.053252345016671837 0.064034828766493607 0 0 0 +0.24081125881874227 0.11206816047996465 0.039947113706803428 0 0 0 +0.064335269158822428 0.043716975460432905 -0.008317223783284422 0 0 0 +-0.15719587130032714 -0.11013702012980964 0.092529184122934954 0 0 0 +-0.10392748547317698 0.017423955009462755 -0.066759699334033307 0 0 0 +0.00046862050577062275 0.20759159833505375 0.038251961925892614 0 0 0 +0.06152570316130529 0.1448333349609589 -0.048372158768181683 0 0 0 +-0.085534024339732728 0.21249943982437763 0.060875921135035788 0 0 0 +0.1548496151638194 -0.00070880097098649508 -0.052697233424274237 0 0 0 +0.01142335817927026 0.057761698444689147 0.013503855389434383 0 0 0 +-0.0037030076428153924 0.032903683080852952 0.13777137328885028 0 0 0 +-0.044751544440274627 -0.055229483426662174 -0.065114208932473328 0 0 0 +-0.36385101637303596 -0.023753937975518891 -0.063479046296358116 0 0 0 +-0.014340315622554667 -0.10198505618628069 0.077371259986920765 0 0 0 +0.17452381969747827 0.14134638262966415 -0.041234234870709929 0 0 0 +0.16221586058457144 0.17386155457588748 0.037990262702157246 0 0 0 +0.055391913940063653 -0.040967586272354251 -0.1542218567560627 0 0 0 +-0.084576863683944126 -0.18542899101979332 0.038212349107930893 0 0 0 +-0.233490168410393 -0.10553210514687934 0.020987757851357119 0 0 0 +-0.015594419737206822 -0.005812369336557599 0.022882262070578058 0 0 0 +-0.019473123069650045 -0.15929648504820187 0.046904658975085722 0 0 0 +-0.21468173120989004 0.010502148228117708 0.10940529901547733 0 0 0 +-0.063307054299297782 -0.11809857163332543 -0.12757360010081903 0 0 0 +-0.011913962391426336 0.1349761137935524 0.15457363889430978 0 0 0 +0.17623986970275168 0.13165424289137312 -0.022022827554010305 0 0 0 +0.09991738314044657 0.18742943643319604 0.074190966327260272 0 0 0 +0.079483298768063537 -0.018070245125232753 0.1148662470561648 0 0 0 +0.0049132321747415442 0.12722842395975392 -0.12666880538612835 0 0 0 +-0.049950156500588649 0.036464895304228639 -0.050299401890621515 0 0 0 +-0.089162858338679707 0.024616806391746265 -0.042461410394840859 0 0 0 +0.048393299503053988 0.027582350480674311 0.18992606360651135 0 0 0 +0.14112500891082452 0.0011061966945896673 -0.012740950662806616 0 0 0 +-0.1106189420546615 0.058039255173693405 -0.10938223287124745 0 0 0 +0.07999262602088969 0.1678722089281981 0.091080856152873507 0 0 0 +0.075580533840672481 0.15157023478664966 -0.074898872737173924 0 0 0 +-0.46560803727630529 -0.050881930829077521 -0.073875032207607286 0 0 0 +0.064077464952163765 0.022418092422730268 -0.13949175584357276 0 0 0 +-0.26086125395191373 0.015365893796949165 -0.029302093306715599 0 0 0 +-0.24520699062090837 0.026062887558169656 -0.060870498125278394 0 0 0 +0.01058749787698493 0.11797346679905008 -0.038613422327331254 0 0 0 +-0.098206030762419128 -0.051689697079139785 0.0019464041830170864 0 0 0 +-0.42001325652675009 -0.029348787450744318 -0.059743347825372134 0 0 0 +0.012984953839641433 0.21343625244318087 0.065130724177290683 0 0 0 +-0.18614140089735393 0.029200169775449647 0.017635804934375915 0 0 0 +0.021256367356076333 0.074188093320055382 -0.029544073929660492 0 0 0 +0.044783327880834667 0.070842565648224665 0.13434735565166592 0 0 0 +-0.43053548447075768 0.0012038501297016446 -0.092284722899994814 0 0 0 +-0.23717313617968239 0.034935570700268259 0.13039197705347652 0 0 0 +0.14003447232230565 0.10581223266147166 0.020547641295538738 0 0 0 +-0.10106061470371208 0.035260199588265262 -0.12426021614248771 0 0 0 +-0.2845453617732413 -0.041560822184262353 0.019306409035307365 0 0 0 +-0.1219995322815981 -0.045263802396859981 0.10293427034137351 0 0 0 +-0.21603351736576765 0.077172462503021122 0.03753500470990781 0 0 0 +-0.14333731885582213 0.094585770868664099 -0.031330444126018792 0 0 0 +-0.20488173128683357 0.064350749724809087 0.11121036196049069 0 0 0 +0.054784046801459041 0.0080393447094601334 0.074533862694280223 0 0 0 +-0.14432011508125581 0.0640326323223393 -0.003274051704219072 0 0 0 +0.212824749170544 0.15859006810381682 -0.031450795925290792 0 0 0 +-0.089760784306002372 0.20911561814085811 0.056427855421652989 0 0 0 +-0.26145228995364628 -0.039415599548396657 -0.058834905636422324 0 0 0 +-0.033382333313485169 0.020172662689429688 -0.025947202435356087 0 0 0 +-0.14060732455393071 0.1234341938510975 0.061376622928882935 0 0 0 +0.045369169199208248 -0.032983104067733054 -0.11980836743691982 0 0 0 +0.18859950620291982 0.20047118310630552 0.011102829345548987 0 0 0 +-0.16524123521895617 0.045127026706790085 -0.075161911731966305 0 0 0 +-0.35035045228601203 -0.050023878013904677 0.038749978051472928 0 0 0 +-0.052806238835561126 -0.090026388747668828 -0.043555150884974275 0 0 0 +-0.16655539941156289 0.013422231430522624 -0.017534743025810928 0 0 0 +0.22160367032679956 0.11672110843117905 0.025531193841028504 0 0 0 +0.029966024933829882 0.070797578098423297 0.033800328378237321 0 0 0 +-0.079797459849785146 -0.13600090087223149 -0.07518390851904079 0 0 0 +-0.029283314715062791 0.12888420742976942 0.066756626112397272 0 0 0 +-0.019141543475627021 0.13920352517815071 -0.11172323839700921 0 0 0 +-0.010245615345588932 -0.17096454258744373 0.096166633025808274 0 0 0 +-0.057119419271391858 0.21238422195583628 0.10043794512170043 0 0 0 +-0.091736173190502479 -0.19627976138712094 0.089348347092083641 0 0 0 +0.13020441118310205 0.14568334040932307 -0.088125393907344432 0 0 0 +0.056831489337736241 -0.0098543601630316224 0.01006474124093959 0 0 0 +-0.18773519633877328 -0.15762066379975109 0.060253858211829797 0 0 0 +-0.02648592859857718 0.049891961628605597 -0.18200754153922991 0 0 0 +-0.034213460732430701 -0.11575211256744294 -0.022497038563589089 0 0 0 +-0.2272853583519836 0.11704685255189562 -0.044014640934974425 0 0 0 +-0.013029828068562843 -0.042772463955983081 0.057033606627598848 0 0 0 +-0.052261017779437868 -0.11067021531326651 0.13326575701077517 0 0 0 +-0.044594377492640669 0.0077562499408111718 -0.12408243388824676 0 0 0 +0.023703043567102788 -0.11570263967029891 0.0075799057136955728 0 0 0 +-0.056110449717370836 0.047910528276858821 -0.078197252447769039 0 0 0 +-0.035308368171213689 -0.20567273454035354 0.051771291666368041 0 0 0 +-0.091305433568449279 -0.0384306877798401 -0.085916767675244712 0 0 0 +-0.27290745105816056 -0.12224155238335115 -0.025789852014606346 0 0 0 +-0.069688705422200792 -0.081160389933963795 -0.12303360106851904 0 0 0 +-0.14326034110073005 0.11488245528102853 0.039059868749164978 0 0 0 +-0.092756755390015933 0.13337132068252422 0.080889598471852037 0 0 0 +-0.40274668191656471 -0.065123341070513263 -0.065107022212654825 0 0 0 +-0.22818354313951922 0.085631346972485534 0.095031932706657357 0 0 0 +0.16021121579966974 0.18647549737806568 0.087250299589102603 0 0 0 +-0.0089240408120840331 -0.013097513240764858 -0.18280704123878619 0 0 0 +-0.18482041551788342 -0.17920118025929155 0.061202305478162605 0 0 0 +0.23989341049568952 0.15309860157983191 0.040451945084572311 0 0 0 +-0.25619533274867345 -0.027548356562145992 -0.048404376391488119 0 0 0 +-0.10484024908325174 0.13737588685194912 0.054368496430122287 0 0 0 +0.052867469396498057 0.096191536783036269 0.15818107651709576 0 0 0 +0.17253898809850904 0.054057861299863563 -0.061191326047800004 0 0 0 +0.21097387963509878 0.078959327475501662 -0.0067531842962484656 0 0 0 +-0.10270821173690031 -0.0055888016938897833 -0.035865938208306219 0 0 0 +0.085621765320596677 0.15699864793316598 0.04753549714809982 0 0 0 +0.039818756221441987 0.16656269418736547 -0.043228954410533871 0 0 0 +0.22323152144116115 0.12961629677609865 -0.063787392460976255 0 0 0 +-0.26451677711989502 0.027712526646341662 -0.055604524736969724 0 0 0 +-0.34554846597742528 0.0045100128922830329 0.010052592522980186 0 0 0 +-0.036207330309518171 0.069618643037458849 0.0059462373019447679 0 0 0 +-0.12866772200253795 0.16342237383370611 0.098054286535410679 0 0 0 +-0.16831845136233142 0.12713695752820836 -0.044744152865773518 0 0 0 +0.019111168331270967 0.092667497341603511 0.062559027414380103 0 0 0 +-0.0048912735106959593 0.21025930782130919 0.1032497553304336 0 0 0 +0.042264792261246964 0.034802656892077066 -0.060991471821881832 0 0 0 +-0.014176672137498458 -0.0048652733168392526 -0.029389121990559153 0 0 0 +-0.23241218356151372 -0.01264067283919687 0.0046890408443948373 0 0 0 +-0.39470230395231398 0.035938995931672379 0.023567179136047139 0 0 0 +-0.46592358991548655 -0.018482852959779583 -0.036503047519754139 0 0 0 +-0.0064890709670121227 0.097951861272914331 0.11742262955087843 0 0 0 +-0.052376664294898567 0.089221837320987596 0.12043395927481679 0 0 0 +-0.42957765189972008 -0.060661429678410317 -0.043248425366237769 0 0 0 +0.26223096614662783 0.073450832823585721 0.037638751107866408 0 0 0 +-0.16266256620782665 -0.11168892996332237 0.051152714152832984 0 0 0 +-0.066597629609671471 -0.11624698653841299 0.11688905612050135 0 0 0 +-0.16261945290570151 0.033201552594786021 0.073945339900825163 0 0 0 +0.020963098646302247 -0.046831885996229949 -0.054905633731283709 0 0 0 +-0.14362548055621799 -0.067246830482925762 0.13080129428318607 0 0 0 +0.0089198764089191696 0.10547948101547777 -0.0063874668961386161 0 0 0 +-0.074294298234873046 0.1006015914600254 0.085967723222995202 0 0 0 +-0.02693642245336908 -0.18399018060526764 0.042705879043420769 0 0 0 +0.095261290114866559 -0.0024854707845109736 -0.055170327529900698 0 0 0 +-0.027263884015632844 -0.030055471465885192 -0.19407592298700707 0 0 0 +-0.21860489620981743 -0.032997469301790011 0.012433362721037122 0 0 0 +-0.22829798716098537 0.0057932739368798114 0.041369233995113053 0 0 0 +0.025144147212956935 0.14435622889395477 0.041684347516543235 0 0 0 +-0.34798234670002948 0.02867418473108857 -0.074995447266593573 0 0 0 +0.011335689867103926 -0.031091479398108107 0.19069972913399666 0 0 0 +-0.31996822692809396 0.06256819532918928 0.043760881084676378 0 0 0 +-0.0010166553322691896 -0.013362902645865482 -0.042367534157275677 0 0 0 +0.091958170245049986 0.039739734098983903 -0.06583746940278401 0 0 0 +-0.026554856219454692 0.0083428028094028051 -0.031730356226026074 0 0 0 +-0.020342519047474528 -0.093743887118495073 0.036026564886353446 0 0 0 +-0.14508007465795386 -0.075373886848452504 0.12419631709209408 0 0 0 +-0.11053683650541124 -0.014112415495505098 -0.10306554259275831 0 0 0 +-0.32719102373386266 -0.035125094306401927 -0.046815996399822646 0 0 0 +-0.13905260147551546 0.09127056480454282 0.09774306961845422 0 0 0 +-0.10777751714648681 -0.05066972605206585 -0.016860986511287757 0 0 0 +-0.20650640724263392 0.050740724193260978 -0.030307917006487967 0 0 0 +0.16947966538321219 0.17121918124083801 0.0045456225946382545 0 0 0 +-0.0089220205314760603 0.043833577785340583 0.035227122178582482 0 0 0 +-0.042367343498629084 0.0028199260032484297 -0.12180336580951744 0 0 0 +0.24743218319433974 0.034794345441929997 0.05206975244803122 0 0 0 +-0.25170197585802995 -0.15900518292064875 -0.021222628359186924 0 0 0 +0.20452315350833344 0.13979995300732784 -0.037160813104655604 0 0 0 +-0.16663566758626841 -0.16968024512818783 0.081833349763588997 0 0 0 +0.01531116637903257 0.087179358953057284 -0.0064799085000986356 0 0 0 +-0.066638420685022182 -0.066046805807942061 0.052989843052460323 0 0 0 +0.0017191065570967834 0.055091333132483489 0.097118287611602322 0 0 0 +-0.056959178821665735 0.084244792503684274 -0.14420266043075591 0 0 0 +-0.055586678932027456 0.0092626836810554281 -0.081581603616744269 0 0 0 +-0.11390072880427587 0.15798298034614228 0.036887204890511921 0 0 0 +-0.058637115964957076 -0.16864245522242413 0.064053802018691347 0 0 0 +0.03540117005703497 0.02941822957778395 -0.15958623193809948 0 0 0 +0.032947968558829699 -0.065960286923126332 0.063937908016619277 0 0 0 +-0.12029204144869471 -0.010212097562549649 0.14130783014919981 0 0 0 +0.24035036161474416 0.12737479145399849 0.067070071835133221 0 0 0 +-0.21321493644234263 0.049060352272716323 -0.053305193015490193 0 0 0 +0.051046286951161368 0.0098596358216782032 0.088072033324924276 0 0 0 +-0.12503019505281937 -0.05593030342094088 -0.07525796553839649 0 0 0 +-0.15704910656818427 0.081063926469125303 0.089449220324370998 0 0 0 +-0.26924173578991789 0.01252066954672057 0.13188295344304105 0 0 0 +-0.11734693714552563 -0.045345554288274609 0.11503188820372709 0 0 0 +-0.33965511773560431 -0.010488439251181675 0.091784051987580023 0 0 0 +-0.13595447924468901 0.13341519706901672 0.099445823026806129 0 0 0 +0.048656957081642471 -0.068329941630170699 -0.11291713313185842 0 0 0 +-0.082848487926274583 0.037974695732223784 0.082323694275073217 0 0 0 +0.18894572054943531 0.092460459431142061 -0.030230885461478035 0 0 0 +0.067573891589124691 -0.053683676852526618 -0.01554823847127379 0 0 0 +-0.10602609371322441 -0.051815039855757278 0.11580569166247126 0 0 0 +0.022858548889334751 0.037135193647133635 -0.10497332831128686 0 0 0 +0.016827765636218184 0.13967935195092901 -0.027028632142941933 0 0 0 +0.047584251944767286 -0.017549999235078245 -0.036941290772297408 0 0 0 +-0.29153066525928678 0.070716752319219034 0.050946903264325577 0 0 0 +0.20161381489863611 0.06791853490323202 0.035218909235346596 0 0 0 +0.0089540892903785529 -0.026051972124610107 0.17553174548377468 0 0 0 +-0.30263529709697468 -0.06780552052460706 -0.0068360004146457709 0 0 0 +0.16455912080045082 0.17337194770747932 0.05465670258889252 0 0 0 +0.16716265785598888 0.11194833882281041 0.045830953232356336 0 0 0 +-0.022934002820185873 0.078485563679784043 0.11832321782627561 0 0 0 +-0.26403332427273041 0.056421287238336615 -0.06735797811867017 0 0 0 +-0.14569473917540166 -0.080409085472705311 0.084176733164848777 0 0 0 +-0.14833093554457655 -0.096884960527319014 0.12339637092594616 0 0 0 +0.11948393007223485 0.11722828401660684 -0.059015256790744597 0 0 0 +0.17620950918577377 0.019222393386059883 0.12263426934728769 0 0 0 +0.13973815769751091 0.098932281268742872 0.14010883604187377 0 0 0 +-0.12234804277943684 -0.16097526047466323 -0.01429467537926743 0 0 0 +-0.43074373020399132 0.0173629641806958 -0.0072722959218751715 0 0 0 +0.097994125885125183 -0.022997339425080005 0.061008567566088884 0 0 0 +-0.25770948355878476 -0.14039168474761815 0.029015294000428626 0 0 0 +0.1785419257930177 0.059865015788112264 0.052926370725685706 0 0 0 +-0.071033834779928473 -0.0097497831610110774 0.080938460109798688 0 0 0 +-0.36796654262157391 -0.076216613191918026 -0.03955745022414997 0 0 0 +0.13807731509093885 0.096676666871282235 -0.0017338507485636367 0 0 0 +-0.17888873938608452 -0.010561055315507134 0.15152138405621982 0 0 0 +0.17976448125709071 0.022816313391089416 -0.043621048796982503 0 0 0 +0.12222781956635881 0.053358156324124884 0.14172758095972102 0 0 0 +-0.13932222579756059 0.038948102634107695 -0.044242708507948564 0 0 0 +-0.2154693787587737 -0.051846256305468269 0.0087116786600048568 0 0 0 +-0.12130005490283952 -0.10617053336420237 -0.089750447277465367 0 0 0 +-0.23542196480911459 0.063112257124372739 -0.057688276769531421 0 0 0 +-0.020445856816268093 -0.076018117617117714 -0.092817395228984759 0 0 0 +-0.05306007768411658 0.008389159823004616 -0.094165495254855597 0 0 0 +-0.13837903138016122 -0.082491671096073943 -0.12244942988561512 0 0 0 +-0.10801615476282084 -0.142205951632699 -0.072719336820187969 0 0 0 +0.12961078010712052 0.16314121182097446 0.10699249832023636 0 0 0 +0.086004129690059827 0.18073610843073157 -0.039323849250053972 0 0 0 +0.097703171088213525 -0.027943090045509406 0.049457528585261201 0 0 0 +0.24380903931232395 0.12996674329084484 -0.021491027923335321 0 0 0 +-0.31567499647983821 -0.049527890309471662 -0.027976032208424984 0 0 0 +-0.027024385153600061 0.03166253379774836 0.12685071617547236 0 0 0 +-0.0014400594386319021 0.0035905687326555913 0.078288261153920097 0 0 0 +-0.23373327475440925 -0.14027297039854156 0.057501467786962163 0 0 0 +0.065518738655308162 -0.071505880250873982 -0.1683489060539482 0 0 0 +0.075994786975295214 0.044123210383596789 0.06750646758849968 0 0 0 +-0.092538267673049179 0.19955481542119008 0.035900990077702338 0 0 0 +0.19161770604219747 0.097989888202751507 -0.088474658131756354 0 0 0 +-0.12447871966746638 0.093860200718324627 -0.091133191254440221 0 0 0 +-0.1834632846503263 -0.11095060735065213 -0.014030028547822038 0 0 0 +-0.24463496475679336 -0.050810401297417013 0.026043743800065022 0 0 0 +-0.22573774102296451 0.037296303759735527 -0.056495163768909867 0 0 0 +-0.20438663745129482 0.049632294671709654 0.079793628804657152 0 0 0 +0.04449372825157355 -0.06952049271697458 0.069817133063972941 0 0 0 +-0.07043012724264297 0.044110364753178311 0.13104173074433903 0 0 0 +-0.0095684819831466927 -0.087493585795785311 -0.06038949469735333 0 0 0 +-0.074444978819552365 0.12954419966873104 0.12965728351124003 0 0 0 +-0.19370451937557898 -0.053927327893865784 -0.055800642195310446 0 0 0 +-0.013136291112445797 -0.10796217860921381 -0.066857745625257037 0 0 0 +-0.25638529241044078 0.020842259380253025 0.10017340336305788 0 0 0 +0.13542570283945182 0.015587502339619669 -0.058359525831142428 0 0 0 +0.12574892794051901 -0.017368752821465494 -0.0043744143799068491 0 0 0 +-0.056232797623781972 -0.10427735525057606 -0.033736828325927254 0 0 0 +-0.098536155799753056 0.21276596887866217 0.048744479854773731 0 0 0 +-0.23942936863252196 -0.015708495998159988 0.091396380683465367 0 0 0 +-0.24596269649791999 0.10596375417149578 0.015374413405498027 0 0 0 +-0.065629324154891089 0.087191252983903511 -0.13958481043409648 0 0 0 +-0.20533636962674096 0.0093632377492999519 0.013306230340577652 0 0 0 +-0.050848631519232912 0.042618256409601762 -0.069798665247175845 0 0 0 +-0.38390282896270278 0.037345697196280558 -0.031811296070892364 0 0 0 +0.014497690151003162 0.11096050671660618 -0.10588005833334475 0 0 0 +0.067997724239858781 0.20960222563937864 0.011752873378926887 0 0 0 +-0.13801103269476678 0.022139051001348053 -0.099427433921790681 0 0 0 +-0.099640945456624053 -0.044898971800259785 -0.042551841321189887 0 0 0 +0.26014565109600546 0.068149259140117546 0.030270630892137079 0 0 0 +0.24833152663887942 0.049331874065607795 0.063128308518759418 0 0 0 +-0.37754364807641605 0.018820159978720802 -0.078087597282597787 0 0 0 +-0.013777154278121928 0.10651197490444547 -0.051963955208979534 0 0 0 +-0.21735783511231654 -0.076641808570571263 0.084911590442442314 0 0 0 +-0.40647132883816495 0.045440566022188378 0.003335160886161509 0 0 0 +0.011091131611734084 -0.15871185658252659 0.097418184883280662 0 0 0 +0.015054721874885713 0.054070791959548337 0.10659241710128312 0 0 0 +-0.16888334086673801 -0.18574351748856299 0.053320726219446862 0 0 0 +-0.22211608041842473 0.017424684933240037 -0.061068649095072397 0 0 0 +-0.085706160863768366 -0.070568988599830795 0.13837953281541729 0 0 0 +-0.091522365450162957 0.019547137716813934 0.17264489398713315 0 0 0 +0.13321875752418294 0.1751785690265163 0.093118123123499569 0 0 0 +0.1797898923511127 0.099844538206482314 0.04870541486338667 0 0 0 +0.060195481781449567 0.11986266674241841 -0.11509248024544538 0 0 0 +-0.32170094103618996 0.063988537901103482 -0.032164192361360866 0 0 0 +-0.12285119959796315 0.041262256575819112 -0.015510659536047383 0 0 0 +0.012905467172660778 -0.022658324741792885 0.14111335394289112 0 0 0 +-0.32683683143300474 0.015518622208524013 -0.0025872412862474881 0 0 0 +0.074856191818651274 0.025783832429298659 0.050073696293047171 0 0 0 +-0.094562868869912386 0.03523598680860035 0.17231017306386817 0 0 0 +-0.30231085121732437 0.065818137897456497 -0.034936146005506624 0 0 0 +0.24501506898683728 0.15735507048465913 0.06347726383655658 0 0 0 +-0.1747535314625851 -0.10667528443755304 -0.043793168443969438 0 0 0 +0.078426170878973689 0.091906011214698158 -0.082532624238542282 0 0 0 +-0.055543102318262705 0.0033827533505652041 0.058612051855804842 0 0 0 +-0.09096296463927489 0.05763387332752623 -0.07217020314729633 0 0 0 +0.069460441411491491 0.03956256716253842 -0.12578896323442598 0 0 0 +-0.16316545622535983 0.039753443943733813 -0.11373277672921586 0 0 0 +-0.29641086847375386 -0.15895329472114661 0.013301838817212724 0 0 0 +0.14192267774686912 0.019541122913575237 -0.068057566763213367 0 0 0 +-0.077352606652909939 0.12079225294448293 0.0361079744029357 0 0 0 +0.043663847163612879 -0.11176152332461953 -0.052705071558342309 0 0 0 +-0.10927586661109473 0.1709086766349468 0.10345008665370756 0 0 0 +-0.034396916269704259 -0.083446234912841116 0.17938843695802756 0 0 0 +-0.2562400574380998 0.12086122196007609 0.0056393497186200681 0 0 0 +0.079409278498201175 0.038831739547715016 0.0025789413424124885 0 0 0 +-0.2157847125909082 0.076250392502575148 0.03083520878192178 0 0 0 +-0.11636547568086769 -0.102293591411558 0.10821523553947174 0 0 0 +-0.12693349854151487 0.060926395639519682 0.083430031991808679 0 0 0 +-0.069258138502773403 0.029223604012588 -0.11602553935846546 0 0 0 +-0.01152133147439921 -0.15704065175927989 0.13824288192247272 0 0 0 +-0.13573678210516932 -0.078580482267801677 -0.11289785969817265 0 0 0 +-0.19191116926217222 0.16427767272871219 0.0089380104896807921 0 0 0 +-0.030770726850573027 -0.15064675335431471 -0.069230674162066991 0 0 0 +0.1546328011884936 0.13935281279586348 0.1196029314226075 0 0 0 +-0.073004519879780738 0.11418983814788419 0.052647267287437821 0 0 0 +-0.37509008076608419 -0.0042172322946535667 -0.060942014090701935 0 0 0 +0.0209069948567287 0.15145644849396728 0.1574945885575316 0 0 0 +0.043803945272073597 -0.034519178324838196 -0.1358350962536698 0 0 0 +0.075278971247901116 0.015209012230454927 -0.10727141326784762 0 0 0 +0.080937995282078623 -0.040416666877551938 0.06825769320385669 0 0 0 +0.17072943228115328 0.17805602857839503 -0.047572238034849973 0 0 0 +0.022444413661099893 0.021379777348802864 -0.028607591967984569 0 0 0 +0.036402139360313279 -0.026435415777531002 -0.16194343742524273 0 0 0 +-0.20390017950285927 -0.088796789094754969 0.038797034516389495 0 0 0 +-0.27839878537748941 0.030991170125950096 -0.00014842950306787062 0 0 0 +-0.185241037864883 0.0084730425863852599 -0.048015251704027873 0 0 0 +-0.078397260272903391 -0.10713770871318133 -0.16940230954060051 0 0 0 +-0.038098145924534199 0.12360091589527578 0.16597907685856803 0 0 0 +-0.16052074300918501 -0.092211159202087223 -0.020491858896291348 0 0 0 +-0.091434654812626581 -0.19164831041935787 0.1008334811065453 0 0 0 +-0.32866418809169207 0.02891118721201269 -0.011547201841779042 0 0 0 +-0.030240256563804635 0.08867552342823426 -0.015002044609170401 0 0 0 +0.071178337861031726 0.039730354535609913 0.10915383269463849 0 0 0 +-0.038985892973500358 -0.067707878441009228 -0.092827366563720162 0 0 0 +-0.091272925794753268 0.048570125997159153 0.013640804607457008 0 0 0 +0.056668518901644205 -0.10220542805644825 0.11962083055601128 0 0 0 +0.051780715260018984 -0.058977683359652311 -0.05607176789746246 0 0 0 +-0.095276202516679231 -0.025402079948901202 0.029145598941618583 0 0 0 +-0.013919858042174049 -0.066007910166003742 0.045030096497130578 0 0 0 +0.0038359721478237185 -0.06801778655695917 0.0060232371023446196 0 0 0 +-0.24791745705520971 -0.064316517424483799 -0.0049402592694787195 0 0 0 +0.041611627151195429 -0.042459645783002042 0.02910442933827731 0 0 0 +-0.1110713824985689 0.17712892750120951 0.026577658067307913 0 0 0 +0.079956096581232206 0.057296149932517637 0.16806887744601115 0 0 0 +-0.036283041326750587 0.14533881403047122 0.14520271020370487 0 0 0 +0.0064811875998624369 0.15469805262546893 0.12280961766245027 0 0 0 +-0.16119322473788172 0.046322043436421545 -0.11366869995536329 0 0 0 +-0.090670978539374225 -0.14516859016236572 -0.0073135147200799611 0 0 0 +0.060097371573757774 0.071841312128186674 0.068563256981249904 0 0 0 +0.046054878361844465 -0.078873996869714941 0.11771222597505618 0 0 0 +-0.070548108077840899 -0.12789595340102214 -0.13017406175018009 0 0 0 +-0.087969479792844529 -0.0048282213321412248 -0.13392581946667376 0 0 0 +-0.16139354315605486 -0.045880128573609985 -0.090500727980160622 0 0 0 +-0.18809263333272891 -0.1178184813748724 -0.024359232339006387 0 0 0 +-0.14950198519029889 0.059162479787582489 0.1513130848358227 0 0 0 +-0.11129870752605148 0.04727724079618556 -0.13614142988426703 0 0 0 +0.050932821703876752 -0.017417907876213556 0.097913286259606963 0 0 0 +0.25586921815106872 0.11973219822171699 -0.033219757266111677 0 0 0 +-0.086322078136587543 0.15729837009987885 0.10162551432530439 0 0 0 +0.099770619542018879 0.21188736382586598 0.010737264171054584 0 0 0 +0.036875872866483361 0.12019166617753962 -0.065052224146987303 0 0 0 +-0.22167511317303173 -0.043552095585334127 -0.0045651475068442526 0 0 0 +-0.0053136240176693827 0.14478000661841733 -0.0097647687196312505 0 0 0 +-0.2644661695819418 -0.1639335697938516 0.011440795273397114 0 0 0 +0.11353413868207013 0.15778122474498812 0.056973087849046117 0 0 0 +-0.095187351361583017 -0.068439990490366726 -0.084409075056693053 0 0 0 +-0.42536150086302543 0.046548393699310686 -0.046533789786711327 0 0 0 +0.073027517782822182 0.14202216760913094 -0.070661095573084892 0 0 0 +0.11055449801068512 -0.01426800941477252 -0.12359697748978761 0 0 0 +-0.067791025161235641 -0.18823335538777802 0.036971893755261331 0 0 0 +-0.084276598061439612 0.092854660035879333 -0.097964053808616475 0 0 0 +0.21999300860333487 0.10368818466889157 0.04015739427353443 0 0 0 +0.12702004231905556 -0.0079248805497177111 -0.11344453734070761 0 0 0 +-0.11831314333753429 -0.12761391282393181 0.010039471603132788 0 0 0 +0.17454650307256486 0.044333351969368273 -0.044203530089913873 0 0 0 +-0.16653963661237858 -0.076629174121151694 -0.020683489411795986 0 0 0 +0.19917538004179941 0.17004950987213152 0.04723446115456148 0 0 0 +0.058300616913400549 0.13490794837948866 0.00018080034522199862 0 0 0 +-0.043184000931701216 -0.013576165898025988 0.18971281723925285 0 0 0 +0.15669447827577349 -0.00086307190340759177 -0.089024108136902563 0 0 0 +-0.35001206813294905 0.047760734338779476 0.016928851540300521 0 0 0 +-0.28878412022609967 -0.086029386327714202 0.073223594446670287 0 0 0 +0.15458019642214288 0.1563569652581564 0.081521733161571436 0 0 0 +0.03361289634269421 -0.11775526157992287 -0.064220477121565478 0 0 0 +-0.076428953707683878 0.057145240119180152 -0.13089754498968414 0 0 0 +0.072415704559273986 0.044842154462370054 0.1792534067109646 0 0 0 +-0.048366767809521427 0.18856785794018766 0.051784768088719818 0 0 0 +-0.31733391895065088 -0.068827898929397113 0.075949891730279634 0 0 0 +-0.054941662211513642 -0.05853489356243799 0.16381707473350873 0 0 0 +-0.083402198998136501 -0.045268177013394889 -0.1263198142396193 0 0 0 +0.17573183904228723 0.064960441262812363 -0.054876382651068728 0 0 0 +0.12825024129146706 -0.020549297586756304 0.11268177698718709 0 0 0 +-0.22019489786204421 0.11545798518684969 0.075216567847300325 0 0 0 +-0.060399730679537189 0.15813066397348885 0.051217716903965926 0 0 0 +-0.11099212710950296 0.073777000163018247 0.15776776782036431 0 0 0 +-0.0086472642583167447 -0.0010871942710117544 0.087752762002141188 0 0 0 +-0.075842770763109468 -0.15651646025415325 0.030800859999998931 0 0 0 +-0.28443159798093609 -0.065294131882883161 0.075872974540122345 0 0 0 +-0.029524620719233119 0.07869080805101103 -0.1643135354938102 0 0 0 +-0.25220796469729628 0.091173884172774833 0.016502749394435912 0 0 0 +0.008024865646229562 0.14452897623616784 -0.0042351400084285895 0 0 0 +0.016086297711355113 -0.053609942556968437 0.091676697471253094 0 0 0 +-0.032225452841185054 -0.063697563265120161 -0.0043272567406482942 0 0 0 +0.12300025152262756 0.19558917295121958 0.058901214993901524 0 0 0 +0.15921657716244925 0.15106641282402256 0.061786883029203404 0 0 0 +-0.10891201430034131 0.017277880298611215 0.10227292559809889 0 0 0 +0.096968041387509973 0.075800916020992648 -0.078351947274093045 0 0 0 +-0.27696599639941244 0.073698771310398314 -0.036743822033158041 0 0 0 +0.071725046729491926 0.080633642827802776 -0.11893072754433472 0 0 0 +-0.085252724639950372 0.00070577546010258674 0.076364428070907459 0 0 0 +-0.04255377541638683 -0.18613426059343621 -0.024735202691240243 0 0 0 +0.071246781763394773 0.14828435739401957 -0.022271127396406604 0 0 0 +-0.079212360359102063 0.014304702637691957 0.15823657166469748 0 0 0 +0.065138999214596038 0.10715089423538976 -0.010095953553233755 0 0 0 +-0.043289279243128864 -0.1446438109486578 0.15014299521697497 0 0 0 +0.033143880225755262 0.076012763974937114 0.18113052695054141 0 0 0 +-0.10567861980904597 -0.048768753945993726 -0.062658348066003511 0 0 0 +-0.1216578437264334 -0.11403570237383108 -0.031747989521525799 0 0 0 +0.013314248619493985 -0.090547935778359429 -0.095445194371189923 0 0 0 +-0.28488560219610348 -0.16499666308135585 0.010637667777527116 0 0 0 +0.11487186147795053 0.12808993277553421 0.0017443352600350071 0 0 0 +0.084218349015593941 0.061260762199034924 -0.010655573900261422 0 0 0 +0.25409592761771277 0.064944663729052499 -0.06507061021671956 0 0 0 +0.21230938979668074 0.11599519987721041 0.058221860475190429 0 0 0 +-0.40990814056936653 0.024246462386145251 -0.051268818049842485 0 0 0 +-0.061086855096733228 -0.1089148047439349 -0.10234670891760149 0 0 0 +0.29082559764146104 0.11169628723264718 -0.036980829519502351 0 0 0 +-0.36594800491187024 -0.0083714174174964462 0.013106369060301687 0 0 0 +-0.12951519041545462 0.18187441899273588 0.038546408592332632 0 0 0 +0.065733056189613392 -0.011523179240692877 -0.0047251650317614025 0 0 0 +-0.18051765316955748 0.1468319637148357 0.043349021687188655 0 0 0 +0.0031071564853540345 0.051111588012537901 0.099747556102278617 0 0 0 +-0.1786810926324176 -0.0026241832888131145 0.11474963499472615 0 0 0 +-0.15387074186019833 0.10706757797681865 0.0076675002312902307 0 0 0 +-0.041068844605693655 -0.046234920362297927 0.14756209363099512 0 0 0 +-0.14639358356313553 0.022723060059874317 -0.10370617796925502 0 0 0 +-0.0087081583728036427 -0.11056202060510685 -0.13197634880540332 0 0 0 +0.047545799346109863 -0.083661810018655386 0.080465961452752838 0 0 0 +-0.17203737264392205 0.0053800552623644304 -0.034906129156189514 0 0 0 +0.25841403744752983 0.15184391400976666 0.045265133589959705 0 0 0 +-0.2588897533328785 0.064218709983206779 0.035815797197652988 0 0 0 +-0.094362652486113419 0.11684930022366669 0.12426676432231257 0 0 0 +-0.048261009558630219 0.13656189633108534 0.029666155968028129 0 0 0 +0.28385533099892307 0.13140670449188907 0.032268117410983427 0 0 0 +-0.13103197522403909 -0.16972832285998996 0.024831313368842006 0 0 0 +0.26805102914398532 0.11081918015135872 0.014964589932796535 0 0 0 +0.06195647188205039 -0.077745636231125348 0.098960556539084282 0 0 0 +-0.41507570205800937 -0.066145912022684716 -0.0055824748221202647 0 0 0 +-0.12030106279898906 -0.19766902158569871 0.0085144868972292231 0 0 0 +0.081157687004660251 0.17401015767587952 0.11032490379742391 0 0 0 +-0.18057448556014338 0.056951777977094054 0.062177051204693495 0 0 0 +0.032402594451145184 0.060002756559968007 -0.042570633016495024 0 0 0 +-0.23094547533423176 0.15526585215015942 0.02150382496467465 0 0 0 +-0.1363662786415662 0.1756191414232417 0.075912054011506941 0 0 0 +0.0026965924602141422 0.066221710355105323 0.17065991762926244 0 0 0 +-0.19955022512277826 -0.11639835748024006 -0.022121006021622092 0 0 0 +-0.29943588231969864 0.027939157698571193 0.013547792528721042 0 0 0 +0.16090621727054938 0.042035135553512237 0.13403183483389394 0 0 0 +-0.27650423870552565 0.075099425430661504 -0.0014154714307589578 0 0 0 +-0.2499767786600674 -0.1314142406232981 0.0020147904269150474 0 0 0 +0.1575476700612693 0.046077642980969502 -0.026696508708471428 0 0 0 +-0.41722341037260835 -0.0070634167116349622 -0.063320749292177597 0 0 0 +-0.047980972061846427 0.19729692044028452 0.066849907927498203 0 0 0 +0.1153316521758469 -0.00036956482608385688 0.035715622161145794 0 0 0 +-0.17744607688173653 0.046530383129957609 0.082682076256928055 0 0 0 +0.01673470424052087 0.091037265273203605 0.17325766205138757 0 0 0 +-0.083006947309314294 -0.059354712764544432 -0.10669378314538346 0 0 0 +-0.039743105180198357 0.043684380123022948 0.08849129107296419 0 0 0 +-0.042853538803027502 0.14074141139392832 0.10464757112846665 0 0 0 +-0.09246183107804512 -0.076440102444884389 -0.045270539761973067 0 0 0 +-0.055714049952887035 -0.010223696239848645 0.16099282787763372 0 0 0 +0.088762155479863269 0.16311012987599705 0.059824154630672671 0 0 0 +0.0083445351834548487 -0.099148141030224513 -0.15295627025376818 0 0 0 +-0.046274970174995267 0.2069238660768834 0.0065109429127336582 0 0 0 +-0.40998593837850261 0.046525823676503708 -0.015421336329512286 0 0 0 +0.092528095334772853 0.21548676746894418 0.079820192731477307 0 0 0 +-0.26885597178627041 0.084925477696208729 -0.040039615579059357 0 0 0 +0.095529860837522407 0.1906571150411791 -0.0064347290512770383 0 0 0 +0.1908217672556522 0.052723953440216798 0.046984010104321405 0 0 0 +-0.35524007705226313 0.013699894178385352 -0.046982076031413855 0 0 0 +-0.086765411067840192 0.034722730881003194 -0.038882160686294548 0 0 0 +-0.06003751772106164 -0.056664623661068281 -0.0056029866668800832 0 0 0 +-0.013903197718402427 -0.08045728121741863 0.033899333319556441 0 0 0 +-0.12530258488430879 0.018678960207744483 -0.00079220054160197839 0 0 0 +0.021019396301186599 -0.026997375697823733 0.18875424362795426 0 0 0 +-0.010624580458772903 0.1510348431922961 0.0012853328889273208 0 0 0 +-0.27551898382958029 0.027725776005140479 0.11734093563229267 0 0 0 +0.1933080762629304 0.12681112794986643 -0.071028537021110283 0 0 0 +-0.020846181503010486 -0.022480002092700013 0.12959552910622815 0 0 0 +0.0130836592478491 -0.16108673427115336 0.037400062456676264 0 0 0 +-0.19467902247382562 -0.063233993985820108 -0.016066128393515955 0 0 0 +-0.034975473845384575 0.031819852504626822 0.14874435090318369 0 0 0 +0.03960631611962101 -0.012193451667876942 -0.17803561545971733 0 0 0 +-0.26529789598045406 0.0047916964321266797 0.022372150691644749 0 0 0 +-0.031433460895393561 -0.13770341145804571 0.058976821187356004 0 0 0 +-0.026415177585643268 -0.084557708139439136 0.1302506244310653 0 0 0 +0.022445738596343412 0.14546614375042261 0.010526387511090363 0 0 0 +0.040680009100399872 -0.11829191362070526 -0.034396834226349843 0 0 0 +-0.31776096719579072 -0.002712883377780223 -0.068943607096438764 0 0 0 +0.075364919336100511 0.1345318887794274 0.036562913649597684 0 0 0 +0.17848130188066974 0.17611154954548874 -0.030950256010390809 0 0 0 +-0.018658911438316605 -0.080821227252633798 0.052702270672045165 0 0 0 +0.093317503165563032 0.084282661797400571 0.11922332065047228 0 0 0 +-0.16393464953501247 0.1060352421523309 0.018374044590888539 0 0 0 +0.075229319431919073 0.16601787719522226 0.024490925568580152 0 0 0 +0.30420472646286473 0.11053653815819836 -0.030952819898165285 0 0 0 +0.026571206016163307 -0.01730399693105511 0.14697901104688274 0 0 0 +0.1850678947126097 0.13544571972240133 -0.054903235992199262 0 0 0 +0.10206216306850774 0.021693363355334838 0.11646009083357919 0 0 0 +-0.16987929839272053 0.05289907903173241 -0.068262611140054635 0 0 0 +0.16002012242263414 0.058314008935422601 0.1323709763282486 0 0 0 +0.020040695433206801 0.09341200246007042 0.098976347904636969 0 0 0 +0.021998553300609347 0.067912199473263657 -0.048296603811641692 0 0 0 +-0.075452551258457845 0.13915425318138908 -0.070562712714738213 0 0 0 +0.023822362942127417 -0.040010216703978391 -0.01630301762654679 0 0 0 +0.034345950966551853 -0.11581660009092466 0.052582526661389045 0 0 0 +-0.028628504206251848 -0.013398060855317417 -0.15385362874714378 0 0 0 +-0.22618676331533821 0.051031158465431048 0.0024276879288437914 0 0 0 +0.12683621945803519 -0.029689238636019188 0.13947714800438701 0 0 0 +-0.18729740954261276 0.12589009479243868 0.04968883058128179 0 0 0 +-0.044860164566407956 -0.079104405405999639 0.13374732255963143 0 0 0 +0.17780850611284366 0.19653995649959799 0.030670185633230013 0 0 0 +-0.085951573940450388 0.05500715565809422 0.016861132675777657 0 0 0 +-0.22101711956965275 -0.028909590086486664 -0.025844702059752311 0 0 0 +0.16811271162866609 0.18984936549711878 0.066775110386215614 0 0 0 +-0.16200715520782866 -0.090086615383936558 -0.075195834839088843 0 0 0 +0.046266713815522331 -0.10641335938606086 0.057515248660544888 0 0 0 +-0.30009345682633348 0.039008522888654362 0.084608689870755677 0 0 0 +0.033909929365063929 -0.13298215223651988 -0.096247183330840896 0 0 0 +0.26089717734272816 0.047711540303360167 -0.013988216997921937 0 0 0 +-0.12473789264635887 -0.1124883464251049 0.016791993843288167 0 0 0 +-0.13468818655718823 -0.11652667006997253 0.023875587861680425 0 0 0 +0.071922934462129995 0.011084057042348189 0.025648804651017293 0 0 0 +0.01200722910050761 -0.1462992106089876 -0.1616902908677631 0 0 0 +-0.099375289515922838 0.088823785768622543 -0.083564178708351686 0 0 0 +-0.15712757478094896 0.034545590502817192 0.05074913007395529 0 0 0 +0.039590374949234508 0.22094486096971061 0.093030171246990562 0 0 0 +-0.27962647808334795 0.0075943066699071526 -0.0068797068021763108 0 0 0 +-0.4675626398692676 0.011931463850691909 -0.043392768293787715 0 0 0 +-0.039581966072169628 -0.11862558131247249 0.014356911587687204 0 0 0 +-0.13029123703390366 -0.02640797831113173 0.00042226395799732641 0 0 0 +0.23837023909109406 0.088818125646655921 0.10456640758620203 0 0 0 +0.15950377331534166 0.07049683322454009 0.058733982903016707 0 0 0 +-0.21336755870337137 -0.048412108861987491 0.0021336632243841858 0 0 0 +0.018953452665447179 -0.034926113615006693 0.15499527971579555 0 0 0 +-0.0073016031881282251 -0.067688508902651739 -0.054322077020071441 0 0 0 +0.044614768984280462 -0.087780682936977134 0.033598814336187666 0 0 0 +-0.32832586326972818 0.074011803020352929 -0.047547933730214376 0 0 0 +0.1735348057996085 0.091540578345309931 -0.062581235581520012 0 0 0 +0.20887865024445568 0.06447497726870699 -0.068334994791486303 0 0 0 +-0.097245688901587912 0.16415960198906948 -0.07820518340233433 0 0 0 +-0.11827783075226472 0.073157376906858751 0.070873251550169186 0 0 0 +-0.38177836407853294 0.035338503617893868 0.011406807377567524 0 0 0 +-0.020997264556610051 -0.015574627377703792 0.087382194916692107 0 0 0 +-0.29519476498327224 0.013374660233266639 0.11494144632455941 0 0 0 +-0.053027295551325682 0.07561276338901185 0.13788717558427108 0 0 0 +0.10854021853552892 0.0434068182537104 -0.048527215780085869 0 0 0 +0.006777035511871754 0.026040707770433713 0.081378009718019978 0 0 0 +0.019657413132281476 0.14843205494303441 0.033634708579389383 0 0 0 +-0.077653645091322276 0.073992183320325311 -0.14679536247218958 0 0 0 +0.038640507861671447 -0.10508652908839193 -0.084999746644658966 0 0 0 +0.1095154438104014 -0.026848726763416098 -0.038371453028487046 0 0 0 +0.25139381893236884 0.16443931893263292 -0.048657039725459178 0 0 0 +0.10510751274312374 -0.014347154313165716 0.1563870473302291 0 0 0 +0.14927628753305172 0.15297781482979605 -0.064761582749651742 0 0 0 +-0.032854304671499468 0.099969203319123456 0.14252230615854075 0 0 0 +-0.1801936233634106 -0.020983766938284049 0.10796234089682158 0 0 0 +0.038458361387627649 0.0051936546187926758 0.1032996847753804 0 0 0 +-0.33878867319652817 -0.044677007933778712 0.036170526507300793 0 0 0 +0.11013784820198541 0.013130684067428094 0.012260142594235024 0 0 0 +-0.08632685069996171 -0.046618792160063538 -0.014848681571340644 0 0 0 +0.031644086785800718 0.11035105677309259 0.038263745673656924 0 0 0 +-0.093003839185098247 -0.13141520850051336 0.0034109562477893096 0 0 0 +-0.042645269261773255 -0.14134760924682582 0.10470618448785227 0 0 0 +-0.038916718202694378 -0.20308335285765261 0.071870097465808497 0 0 0 +-0.11329734173050621 0.066833746730407206 0.077237058812539089 0 0 0 +0.02599582662228489 0.080630282137078235 0.15941027404293837 0 0 0 +0.030473123302438732 0.11079262296275422 -0.13533597816314641 0 0 0 +0.28125363774231632 0.13159429211831697 -0.063897575217853775 0 0 0 +-0.10467762934308272 0.024383106773078422 -0.071487565010675214 0 0 0 +-0.0091763892029668725 0.12000480740399144 -0.0847635049274168 0 0 0 +0.080533314483370588 0.11153952303652559 -0.11819290186723973 0 0 0 +-0.14071613703375452 0.1736663335916479 0.076966187252908463 0 0 0 +0.15050475229900789 0.19445639785870583 0.08606729028524554 0 0 0 +-0.011042046164560615 0.10826099949744389 -0.070974773161422922 0 0 0 +-0.04727414065004798 0.16068894057982508 0.025454948485630097 0 0 0 +-0.094967832719532352 0.20602586535582923 0.064773177951192945 0 0 0 +0.27257187674035782 0.11251777810584568 0.023668516842102638 0 0 0 +-0.022491453286183571 -0.03714633591898811 0.030456075292783324 0 0 0 +-0.19282116471746708 0.084713305474482914 -0.037382389740258454 0 0 0 +-0.14353133495081916 -0.092870856944219676 -0.037798473769857094 0 0 0 +-0.38372914264989555 0.048507179709446624 -0.082868102948346636 0 0 0 +0.063951900317631594 -0.039330635178479845 0.03922007451405049 0 0 0 +-0.039881857568635659 0.12065898381248114 0.12813005811853331 0 0 0 +-0.2880138196545351 0.044456319709375969 -0.047273661227565267 0 0 0 +-0.011551192778754105 -0.088250890281896116 -0.16267337930058501 0 0 0 +-0.070182148568308955 -0.0029623596734898172 0.15768049594681802 0 0 0 +-0.22990903434764132 -0.042203013321433697 -0.0064544910920602272 0 0 0 +0.199039496708801 0.12992306137934934 0.11075085093305817 0 0 0 +0.056190618613958299 0.085848423905038718 0.024981797486129692 0 0 0 +-0.16383764281018176 -0.14518732829952147 0.055191135537073971 0 0 0 +0.05431915854181163 0.11112862328358786 -0.020195137756387233 0 0 0 +0.18595502653209023 0.17679067551116506 -0.056504388455565546 0 0 0 +0.1809374098469177 0.024847597452639592 0.070904932671001647 0 0 0 +0.26841093007912392 0.06141386799491011 -0.019262180745914098 0 0 0 +-0.19406005664065018 -0.011921385430665704 -0.051130322813617984 0 0 0 +-0.15439134542298738 0.060205714350723638 0.03554313772960474 0 0 0 +-0.055555978678374141 -0.15349785533289428 0.028586067887909239 0 0 0 +-0.46241777195914885 -0.022637367490712101 -0.011021141302447773 0 0 0 +-0.017332752538172125 0.060665190873726738 -0.044973904573849394 0 0 0 +-0.046982252049660334 -0.12594799352268504 -0.10865276642249198 0 0 0 +0.062482292046693588 -0.10261736122553192 0.008157001932659641 0 0 0 +-0.0029068829269661145 0.11871541932609164 -0.034301662214643314 0 0 0 +0.10867897810416288 0.19194788886052228 -0.044761233322391736 0 0 0 +-0.046000183291523777 -0.062197231713355533 -0.17384010262391389 0 0 0 +-0.097056537578806779 0.020073731459348459 -0.0049205384409963249 0 0 0 +-0.14548753494859445 0.1148680692715589 -0.0036843645265819402 0 0 0 +-0.063418918362718568 0.10652995077671762 -0.048473004896883859 0 0 0 +-0.063489878735072003 -0.072585019439066784 0.055748461732692073 0 0 0 +-0.33568084938624643 -0.027733367823222665 -0.034122983314399141 0 0 0 +0.072889588471669653 -0.05864762052325348 0.15540649716672442 0 0 0 +0.11993627830730053 0.020365197434228377 0.12063729816784199 0 0 0 +0.06750954304421547 -0.036569277413988965 -0.17293908050551265 0 0 0 +-0.049766269395703 0.0099377571561830025 0.0057994492968567735 0 0 0 +-0.058609819502444038 0.079131434420973534 0.066665571246665917 0 0 0 +0.21290510842037619 0.05566482147919527 0.0997762521159202 0 0 0 +-0.0030244839675492297 -0.023564675036947258 -0.0059405805701753245 0 0 0 +-0.05758650278170363 -0.023932391488293653 0.01142290542204305 0 0 0 +0.0061692662506852569 -0.094754305096790198 -0.1554535596927665 0 0 0 +0.0010469211059901395 0.036456914547248254 -0.18121931321829324 0 0 0 +0.16403800215302494 0.041229976296471404 -0.038724861873741245 0 0 0 +-0.40209061109428063 -0.014054136821900043 -0.091522110808601592 0 0 0 +-0.0077370072927000488 -0.047694481344675188 -0.008479802040079143 0 0 0 +0.15522701423831281 -0.003345106172098794 -0.027404576691077542 0 0 0 +-0.38226603699183093 -0.010829863453980071 0.028711061268965721 0 0 0 +0.095908875078367928 0.15226497401040001 0.063785868970362009 0 0 0 +-0.24993360905008394 0.13533206986206814 -0.015947658065722792 0 0 0 +-0.084859874537971391 0.03482573687630236 -0.10939480206605931 0 0 0 +0.15850673951566446 0.12301238871994147 0.090903169132462686 0 0 0 +0.07588115242653054 0.11114319648595106 -0.064784337137624631 0 0 0 +0.054851883788248512 -0.044690263289603877 0.10007952805369766 0 0 0 +0.30131616734241368 0.12962090120725006 -0.03552282891106559 0 0 0 +-0.35952365693825067 -0.042061510272268232 -0.038557334984957226 0 0 0 +0.0056661676295426955 -0.050771428122495327 -0.10995743907924695 0 0 0 +0.045319407034940029 0.1410862196330181 -0.095874161885804027 0 0 0 +0.24272477292504852 0.028758649634383127 0.030045405668429087 0 0 0 +-0.41722100311718885 -0.07129543474437483 -0.0532943499106448 0 0 0 +0.010087258107843777 -0.1138913314609984 0.15058026663891225 0 0 0 +-0.036553498551612773 0.097315687080776758 -0.042843700152167125 0 0 0 +-0.084014401841831898 -0.050770146043935815 -0.014838882325807129 0 0 0 +-0.031306923533161224 -0.026883454472048679 -0.016064475074819284 0 0 0 +-0.40159636225452183 -0.029033058792373168 0.0037536684589427882 0 0 0 +-0.14494484358913967 0.026390558009418197 0.13353119096003704 0 0 0 +-0.00047404030964248722 -0.0096216361320414778 -0.13270753614617745 0 0 0 +-0.29436809608857151 0.020071811125842831 0.085317806168057481 0 0 0 +-0.071028590591002749 0.0024896492015169802 0.052011595765491941 0 0 0 +-0.20237139507397084 0.1448458796691629 0.022564999197714042 0 0 0 +-0.1891650225409493 -0.13210636535774406 0.092855076331785386 0 0 0 +0.00057452613964670274 -0.043194054693447448 -0.090588580724378573 0 0 0 +-0.048331954058969895 -0.065103005582556134 0.052683872164366291 0 0 0 +-0.022026353777591157 -0.027978276526656937 -0.075351787568791295 0 0 0 +0.10272266407215497 0.064880014285859655 0.10947109798083546 0 0 0 +-0.14012463318552126 0.079930334710131834 -0.11995805998100713 0 0 0 +0.021659318105285041 0.13166324978239602 0.12012033515108514 0 0 0 +0.10618371161255052 0.085496146583822985 -0.012490203329539401 0 0 0 +-0.061210695350342459 -0.055456712039730516 -0.060244789769864165 0 0 0 +-0.065178879805665946 0.083694979346062015 -0.062030224892533375 0 0 0 +0.23287136518732637 0.084850930375222566 -0.079687143394439011 0 0 0 +-0.047278458593599526 0.031988734335005264 -0.18423004777720337 0 0 0 +-0.0014853075266070825 -0.074231765390389143 -0.049923328136353751 0 0 0 +0.064480821571438474 0.040644048617875628 0.030203371303434479 0 0 0 +-0.1251756749076583 0.19318933585314868 0.036563948598141771 0 0 0 +0.29484301254859185 0.15383286677582469 -0.046869271652412586 0 0 0 +-0.30268003047821812 0.10689763917054795 -0.019592435889416365 0 0 0 +-0.37157279301237783 -0.014243999677285096 0.00070335950975677908 0 0 0 +0.014417455231945431 0.11405341672182312 0.099551445698295743 0 0 0 +-0.39148592312604891 -0.045069104438988983 -0.029921335415010797 0 0 0 +0.10201478057258756 0.019725475786831675 0.12535451566268271 0 0 0 +-0.15888899796078215 -0.1886707249440793 0.036187201152705128 0 0 0 +0.027913123936441242 -0.11667910462725677 0.10091345097721552 0 0 0 +-0.23365098932233641 0.015987226848153846 0.011420810092138606 0 0 0 +-0.19407053594877949 -0.074711259987312373 -0.036013646435803737 0 0 0 +-0.13261287276475692 -0.042082978555664896 0.06283840170283897 0 0 0 +-0.44269063955028776 0.026233987003216497 -0.046907070200935458 0 0 0 +-0.14750943299035313 0.1240637567500551 -0.083961591709291558 0 0 0 +0.1749319768451037 0.17713410636181243 0.094390582426690933 0 0 0 +0.13107794786699106 0.091075485178781168 -0.030844948928591798 0 0 0 +-0.21395319897623738 0.05955550111992608 0.088943867852330688 0 0 0 +-0.090560664264725088 -0.12835496858135612 -0.032846179083732413 0 0 0 +0.075373229091111493 -0.062752602186778583 0.16582453741375638 0 0 0 +0.056813193440737597 0.13476625042696716 0.056460980458140381 0 0 0 +0.038316395672215064 -0.026026740707185608 0.079054277901151687 0 0 0 +0.010737058728884363 -0.056895031340634922 0.0001104010103801234 0 0 0 +-0.10698175068466231 0.039377433390780814 -0.1342471692260308 0 0 0 +-0.072692731553195056 0.21298267827917261 0.046972343681665613 0 0 0 +0.19266345218580444 0.13511775648775975 0.11866486445812088 0 0 0 +0.078729924943358565 0.026787490473832443 -0.083439443368277508 0 0 0 +-0.15495492888740497 0.13370531478386788 -0.01340294329315192 0 0 0 +0.044839475507398585 0.1306961374021936 0.12535573328196539 0 0 0 +-0.076054452787321092 0.059039170645432515 -0.080976536497863003 0 0 0 +-0.47151959487485934 -0.029814187964872924 -0.058028157955519383 0 0 0 +-0.067977334637744413 -0.094482272914121396 0.053044790559128391 0 0 0 +-0.048462802562462215 -0.11756332396760398 -0.029674648050292379 0 0 0 +-0.35890322218799264 -0.088729674659557195 -0.050904348528497373 0 0 0 +0.20780402723925179 0.09923296381638802 -0.017607709218683182 0 0 0 +-0.12732112675096841 0.018420107347174058 0.11183564816828354 0 0 0 +-0.10960823640465972 -0.11338416037334037 0.020230053550934407 0 0 0 +-0.36044424280577109 -0.015777648993954063 -0.015396549172650098 0 0 0 +-0.1311880813920871 -0.0077981055547027001 -0.10303911938181193 0 0 0 +-0.11334684994255428 0.0994183089833241 -0.13431694350764434 0 0 0 +-0.030745172152617073 -0.054772339104366491 -0.12699639639571914 0 0 0 +-0.15920399848062783 0.13612903182664188 0.085735555026094451 0 0 0 +-0.074728373625150446 0.030546637764225226 0.13783583229751048 0 0 0 +0.18349636543905828 0.1408242673807279 0.091189676119210666 0 0 0 +0.056390613167469794 0.0088376133832372694 0.08644365438202864 0 0 0 +0.21798905803008234 0.11869382146409013 -0.0067951566112497697 0 0 0 +-0.18672901761383753 0.076674219702505042 0.051405860153389632 0 0 0 +0.29738745960853991 0.14649341722796205 -0.011444298996499264 0 0 0 +-0.056485473658377361 -0.0045960430305479194 -0.1140609085110235 0 0 0 +0.03986155510653272 0.067197458881595173 -0.021039344819716171 0 0 0 +0.065225412881865619 -0.02385043120021374 0.06936437714104679 0 0 0 +0.047239665991282098 0.22552538047785214 0.069746526368140244 0 0 0 +0.15862386855279093 0.15243125420224479 0.071527777328435321 0 0 0 +0.19222925133103735 0.18060177418401602 0.0077153154109511624 0 0 0 +-0.039411354017264699 0.023574968707383126 0.089891644212109517 0 0 0 +-0.29226548999058322 -0.059510023752676333 -0.0047350539418952453 0 0 0 +-0.40327223716974026 0.013299054222952106 0.0086328055563298922 0 0 0 +0.052296847827695225 -0.10008091914955808 -0.11694572426851978 0 0 0 +-0.26616663931618911 -0.046896271784443416 -0.037815950198716475 0 0 0 +-0.29918401197875388 0.00054986327008016422 -0.026716761955325963 0 0 0 +-0.14992677885367539 -0.02082327109252291 -0.071165169164314396 0 0 0 +0.1811965900060068 0.011643104121276171 0.095053779681449263 0 0 0 +-0.065203444770192742 -0.041478827841640004 -0.078436008857922165 0 0 0 +0.06801020153219578 0.082162078800967431 0.021894767820034633 0 0 0 +-0.059359065091952268 0.13795358318353534 -0.064221301738862868 0 0 0 +-0.03181524858169027 0.13697335851942188 0.11683263907972116 0 0 0 +0.02445956836444324 0.021858206402653346 0.035541130579172631 0 0 0 +-0.25069112584828401 0.044482001117955416 0.11020180321194697 0 0 0 +-0.38482942654438551 -0.062764285250805324 0.030349273429696927 0 0 0 +-0.098822013034913725 -0.11415021366416199 -0.096428012882005879 0 0 0 +-0.19289778006157843 -0.054239148847038399 -0.0073428996474519392 0 0 0 +0.060030052316940863 -0.013816029174693406 -0.17772140638121217 0 0 0 +0.150461813211129 0.020151370033232946 0.12126005780170021 0 0 0 +-0.21487102046802875 -0.081036441894329153 0.021747221285843304 0 0 0 +-0.25188654394788668 -0.082261575476056448 -0.0012551548381997124 0 0 0 +-0.2224512164772442 -0.019110822363167079 -0.0008700696987789247 0 0 0 +0.13008934664147903 -0.036268413670476535 0.091310992694730891 0 0 0 +0.29173806761928128 0.10899640627023621 -0.027368533192516309 0 0 0 +0.0058042125796526345 0.077193771222681284 0.064018963887107067 0 0 0 +0.16328566756731594 0.089418852701179663 0.11951167699280704 0 0 0 +-0.18065854374499063 0.08706939126689639 -0.039621880272814991 0 0 0 +-0.22193035593899435 0.076715504731080464 0.075716044039302016 0 0 0 +0.020051497094377313 -0.057606851594655784 -0.08414754550882661 0 0 0 +-0.026507283259369463 -0.070513651896004115 0.17400371645120297 0 0 0 +0.17593314190321835 0.15015814455133719 0.080060387488055523 0 0 0 +-0.059126008755883697 -0.15519346162795603 -0.034628143276728224 0 0 0 +0.010443846326968542 0.038870562582798751 -0.043186937356052918 0 0 0 +-0.38715981871406552 0.059108667185164054 0.011729528652591636 0 0 0 +-0.051066894382671479 -0.14260742641620619 0.0068552731707948178 0 0 0 +0.1756239732147124 0.15931608417590054 -0.045220737109825465 0 0 0 +-0.41942967659243152 0.026185638548511081 0.025620976694665842 0 0 0 +0.044913144325527787 0.12071925842495962 0.093445678118737413 0 0 0 +-0.0018367210913426413 0.12519964986790622 -0.11254550789274088 0 0 0 +-0.16994714218180162 0.067828267876954285 -0.033105975301633589 0 0 0 +-0.21438210613651204 0.0070657039235490215 0.089525746368953024 0 0 0 +-0.25481902508735427 -0.022918127702679036 0.089035894548668032 0 0 0 +-0.10890919248303865 -0.099360562985261441 0.057984824028850995 0 0 0 +-0.041929208651881267 -0.059912645039111867 0.0018498951848684719 0 0 0 +-0.16795794464533453 0.16709353168275298 0.0067648435439327803 0 0 0 +-0.2064519794621319 0.079913789771180133 0.0085127272062427428 0 0 0 +0.082672940919727489 0.043471374314635991 0.11370894735927137 0 0 0 +-0.32906592047489247 -0.06656870216541691 0.013949924709381084 0 0 0 +0.0087280328902811233 -0.056196926714210782 -0.16810255080096889 0 0 0 +0.095226259446793693 -0.022348423907946335 0.06809163993328668 0 0 0 +-0.044477470285801735 -0.046607989588011073 -0.023801508500378099 0 0 0 +-0.12911451276535868 -0.030392348423461918 0.0061932354296878878 0 0 0 +-0.17797311956934403 -0.018399547410184069 0.034929755193658651 0 0 0 +-0.3274483325069491 -0.08231480358258636 -0.05608416333230351 0 0 0 +-0.34918220896348362 0.092709305396547537 -0.048655691971839415 0 0 0 +-0.12616324709761195 -0.22092892945197737 0.071428662116365532 0 0 0 +0.012141599679433235 0.21746110848032679 -0.010607173394544978 0 0 0 +-0.41851636993274327 -0.0052534079294344616 -0.036309210289748373 0 0 0 +-0.19583816244065533 -0.13648407721496794 0.0028597237178143164 0 0 0 +-0.421832956828326 0.032214739554700444 -0.023857562798655113 0 0 0 +-0.28061467759574998 0.062933197911937688 -0.016214286429143049 0 0 0 +-0.058663765831862169 -0.18948695556846029 0.058918816544791225 0 0 0 +-0.14783837934171318 -0.14399209482022376 0.014760601110649751 0 0 0 +-0.3880648103280715 0.012232501722147682 0.064351852348115773 0 0 0 +-0.1306700804616488 0.060681614158715591 -0.022782465862313278 0 0 0 +-0.2392790387437656 -0.020252205972811216 0.098352070655649076 0 0 0 +-0.31464388130967275 -0.042595362344288734 -0.0028562835395187225 0 0 0 +-0.087745354109848905 -0.078262665787546454 0.048926566195471199 0 0 0 +-0.23831137232649141 -0.028283243735441943 0.0024796167273009317 0 0 0 +-0.20206648915487346 0.028853905115677481 0.02008183666711208 0 0 0 +-0.33364777782470922 0.021610357014517745 0.095620567070350077 0 0 0 +-0.12712852061985996 -0.12457854321554165 0.022895995976989159 0 0 0 +-0.40254366185490742 0.05436304033218603 -0.025003865865600772 0 0 0 +-0.28714144465089081 0.12560238188514949 -0.0251551751571088 0 0 0 +-0.050912994802440548 0.076095934163080969 -0.037838561086200651 0 0 0 +-0.10031955907330153 -0.077983930428687037 -0.0084821706335274361 0 0 0 +-0.11374627408146865 0.14334289229144809 -0.07601950313971377 0 0 0 +-0.026334308541845597 -0.1323157780906358 0.062515541011428005 0 0 0 +-0.023302727461257056 -0.098967591985103215 0.067968316949898383 0 0 0 +0.041284601691404743 0.2038288290549316 0.039793072522420897 0 0 0 +-0.13008813118779106 0.16607775707485989 -0.0052213886078991967 0 0 0 +-0.16355717185626045 0.04812047710106937 0.11212756454796904 0 0 0 +0.19580077791270095 0.013357490104319053 -0.054776539911941619 0 0 0 +-0.073434968514915155 -0.042934624404912358 -0.054349192486286169 0 0 0 +0.078776544070998156 0.055274966148399718 0.032774565536173056 0 0 0 +-0.066270710341210959 0.10605378495777162 -0.089992314102480653 0 0 0 +-0.097555721481128177 0.11084903399101365 -0.024483443800194182 0 0 0 +-0.21983068087287949 -0.058190369111201734 -0.031415300067663188 0 0 0 +-0.059298637312345692 -0.045676322417806836 -0.064518851023243284 0 0 0 +0.081685614368082027 -0.061076968345400884 0.14276191540342245 0 0 0 +-0.22297438072491904 0.037695427494738254 0.066763549222003643 0 0 0 +0.03387447015261974 0.19765335198731721 0.066151715860156363 0 0 0 +-0.091792174567796814 0.15094071879300519 0.070605743062794185 0 0 0 +-0.13104013381701429 0.17577040356187662 0.086018663297515813 0 0 0 +-0.32824998673006661 -0.010222335985767217 -0.012948886955059608 0 0 0 +0.23246595994456204 0.087023074947401857 0.081051645424120605 0 0 0 +-0.20895364766595886 0.081445504404316194 0.08086931923525828 0 0 0 +0.019900918921977262 0.20448771527089271 0.00040937119093212293 0 0 0 +0.021782064323660422 0.0083780421928898174 -0.063444677279566875 0 0 0 +-0.16904687967208448 0.11442875496528759 -0.018520889708375565 0 0 0 +-0.12983210766991371 -0.010592970204607144 -0.081080219777883489 0 0 0 From 082cf96409bc3f2b6a3516b677e5f318988bcbed Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 3 Apr 2020 15:06:18 +0200 Subject: [PATCH 104/138] add segment cell iterator description in the doc --- Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h index 120a4cf619b..c6e397aebc5 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h @@ -1303,6 +1303,11 @@ Points points() const; /*!\name Segment Cell Iterator \cgalModifBegin The triangulation defines an iterator that visits cells intersected by a line segment. +Segment Cell Iterator iterates over a sequence of cells which union contains the segment `[s,t]`. +The sequence of cells is "minimal" (removing any cell would make the union of the +renaming cells not entirely containing `[s,t]`) and sorted along `[s,t]`. +The "minimality" of the sequence implies that in degenerate cases, +only one cell incident to the traversed simplex will be reported. The cells visited form a facet-connected region containing both source and target points of the line segment `[s,t]`. Each cell falls within one or more of the following categories: From 1ef0d4b83d9fba23adc33bfe460021e654b17f33 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 3 Apr 2020 18:02:37 +0200 Subject: [PATCH 105/138] segment traverser end() does not need s and t as parameters the API gets simpler and easier with these changes + fix last valid value of the simplex iterator in some cases after this commit, only the test test_triangulation_on_a_grid() keeps failing --- .../Triangulation_3/CGAL/Triangulation_3.h | 44 +++------------ .../segment_simplex_traverser_3.cpp | 30 ++++------- .../Triangulation_3/segment_traverser_3.cpp | 30 +++-------- .../include/CGAL/Triangulation_3.h | 24 ++------- .../CGAL/Triangulation_segment_traverser_3.h | 54 +++++++++++++++---- .../Triangulation_segment_traverser_3_impl.h | 15 +++--- .../test_segment_cell_traverser_3.cpp | 2 +- .../test_segment_simplex_traverser_3.cpp | 2 +- .../test_simplex_iterator_3.cpp | 11 ++-- 9 files changed, 87 insertions(+), 125 deletions(-) diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h index c6e397aebc5..3a98e391179 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h @@ -1357,7 +1357,7 @@ The initial value of the iterator is the cell containing `vs` and intersected by line segment `[vs,vt]` in its interior. The first cell incident to `vt` is the last valid value of the iterator. -It is followed by `segment_traverser_cells_end(vs, vt)`. +It is followed by `segment_traverser_cells_end()`. \pre `vs` and `vt` must be different vertices and neither can be the infinite vertex. \pre `triangulation.dimension() >= 2` @@ -1365,19 +1365,6 @@ It is followed by `segment_traverser_cells_end(vs, vt)`. */ Segment_cell_iterator segment_traverser_cells_begin(Vertex_handle vs, Vertex_handle vt) const; -/*! -\cgalModifBegin -returns the past-the-end iterator over the cells intersected by the line segment `[vs,vt]`. - -This iterator cannot be dereferenced. It indicates when the `Segment_cell_iterator` has -passed the target. - -\pre `vs` and `vt` must be different vertices and neither can be the infinite vertex. -\pre `triangulation.dimension() >= 2` -\cgalModifEnd -*/ -Segment_cell_iterator segment_traverser_cells_end(Vertex_handle vs, Vertex_handle vt) const; - /*! \cgalModifBegin returns the iterator that allows to visit the cells intersected by the line segment `[ps, pt]`. @@ -1394,7 +1381,7 @@ the initial value is the infinite cell which finite facet is intersected by the interior of `[ps,pt]`. The first cell containing `pt` is the last valid value of the iterator. -It is followed by `segment_traverser_cells_end(ps, pt)`. +It is followed by `segment_traverser_cells_end()`. The optional argument `hint` can reduce the time to construct the iterator if it is geometrically close to `ps`. @@ -1407,18 +1394,15 @@ Segment_cell_iterator segment_traverser_cells_begin(const Point& ps, const Point /*! \cgalModifBegin -returns the past-the-end iterator over the cells intersected by the line segment `[ps,pt]`. +returns the past-the-end iterator over the intersected cells. This iterator cannot be dereferenced. It indicates when the `Segment_cell_iterator` has passed the target. -The optional argument `hint` can reduce the time to construct the iterator if it is close to `ps`. - -\pre `ps` and `pt` must be different points \pre `triangulation.dimension() >= 2` \cgalModifEnd */ -Segment_cell_iterator segment_traverser_cells_end(const Point& ps, const Point& pt, Cell_handle hint = Cell_handle()) const; +Segment_cell_iterator segment_traverser_cells_end() const; /// @} @@ -1465,19 +1449,6 @@ The iterator remains valid until `vt` is passed. */ Segment_simplex_iterator segment_traverser_simplices_begin(Vertex_handle vs, Vertex_handle vt) const; -/*! -\cgalModifBegin -returns the past-the-end iterator over the cells intersected by the line segment `[vs,vt]`. - -This iterator cannot be dereferenced. It indicates when the `Segment_cell_iterator` has -passed the target. - -\pre `vs` and `vt` must be different vertices and neither can be the infinite vertex. -\pre `triangulation.dimension() >= 2` -\cgalModifEnd -*/ -Segment_simplex_iterator segment_traverser_simplices_end(Vertex_handle vs, Vertex_handle t) const; - /*! \cgalModifBegin returns the iterator that allows to visit the simplices intersected by the line segment `[ps,pt]`. @@ -1498,18 +1469,15 @@ Segment_simplex_iterator segment_traverser_simplices_begin(const Point& ps, cons /*! \cgalModifBegin -returns the past-the-end iterator over the simplices intersected by the line segment `[ps,pt]`. +returns the past-the-end iterator over the intersected simplices. This iterator cannot be dereferenced. It indicates when the `Segment_simplex_iterator` has passed the target. -The optional argument `hint` can reduce the time to construct the iterator if it is close to `ps`. - -\pre `ps` and `pt` must be different and finite points \pre `triangulation.dimension() >= 2` \cgalModifEnd */ -Segment_simplex_iterator segment_traverser_simplices_end(const Point& ps, const Point& pt, Cell_handle hint = Cell_handle()) const; +Segment_simplex_iterator segment_traverser_simplices_end() const; /// @} diff --git a/Triangulation_3/examples/Triangulation_3/segment_simplex_traverser_3.cpp b/Triangulation_3/examples/Triangulation_3/segment_simplex_traverser_3.cpp index 193c31d5b8d..fef102e449b 100644 --- a/Triangulation_3/examples/Triangulation_3/segment_simplex_traverser_3.cpp +++ b/Triangulation_3/examples/Triangulation_3/segment_simplex_traverser_3.cpp @@ -1,6 +1,5 @@ #include #include -#include #include #include @@ -9,9 +8,8 @@ #include #include -#include -//#define CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE +#define CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE // Define the kernel. typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; @@ -19,9 +17,7 @@ typedef Kernel::Point_3 Point_3; // Define the structure. typedef CGAL::Delaunay_triangulation_3< Kernel > DT; -typedef DT::Cell_handle Cell_handle; typedef DT::Segment_simplex_iterator Segment_simplex_iterator; -typedef CGAL::Triangulation_simplex_3 Simplex; int main(int argc, char* argv[]) { @@ -45,10 +41,8 @@ int main(int argc, char* argv[]) DT dt( points.begin(), points.end() ); assert( dt.is_valid() ); - CGAL::default_random = CGAL::Random(0); - CGAL::Random rng(0); - CGAL::Timer time; - time.start(); + CGAL::Random rng; + std::cout << "Random seed is " << CGAL::get_default_random().get_seed() << std::endl; unsigned int nb_cells = 0, nb_facets = 0, nb_edges = 0, nb_vertex = 0; @@ -67,16 +61,16 @@ int main(int argc, char* argv[]) << "\n\t(" << p1 << ")\n\t(" << p2 << ")" << std::endl; #endif + Segment_simplex_iterator st = dt.segment_traverser_simplices_begin(p1, p2); - Segment_simplex_iterator stend = dt.segment_traverser_simplices_end(p1, p2); + Segment_simplex_iterator stend = dt.segment_traverser_simplices_end(); for (; st != stend; ++st) { - const Simplex s = st; - if (s.dimension() == 3) ++nb_cells; - else if (s.dimension() == 2) ++nb_facets; - else if (s.dimension() == 1) ++nb_edges; - else if (s.dimension() == 0) ++nb_vertex; + if (st->dimension() == 3) ++nb_cells; + else if (st->dimension() == 2) ++nb_facets; + else if (st->dimension() == 1) ++nb_edges; + else if (st->dimension() == 0) ++nb_vertex; } #ifdef CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE @@ -89,14 +83,12 @@ int main(int argc, char* argv[]) #endif } - time.stop(); std::cout << "Traversing simplices of triangulation with " - << nb_seg << " segments took " << time.time() << " seconds." - << std::endl; + << nb_seg << " segments :" << std::endl; std::cout << "\tnb cells : " << nb_cells << std::endl; std::cout << "\tnb facets : " << nb_facets << std::endl; std::cout << "\tnb edges : " << nb_edges << std::endl; std::cout << "\tnb vertices : " << nb_vertex << std::endl; return 0; -} \ No newline at end of file +} diff --git a/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp b/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp index ee21eafacb5..21d44a5604f 100644 --- a/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp +++ b/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp @@ -6,11 +6,9 @@ #include #include #include -#include #include #include -#include // Define the kernel. @@ -49,7 +47,7 @@ int main(int argc, char* argv[]) double zmin = points[0].z(); double zmax = points[0].z(); - BOOST_FOREACH(Point_3 p, points) + for(const Point_3& p : points) { xmin = (std::min)(xmin, p.x()); ymin = (std::min)(ymin, p.y()); @@ -63,10 +61,8 @@ int main(int argc, char* argv[]) DT dt( points.begin(), points.end() ); assert( dt.is_valid() ); - CGAL::default_random = CGAL::Random(0); - CGAL::Random rng(0); - CGAL::Timer time; - time.start(); + CGAL::Random rng; + std::cout << "Random seed is " << CGAL::get_default_random().get_seed() << std::endl; for (unsigned int i = 0; i < nb_seg; ++i) { @@ -78,38 +74,28 @@ int main(int argc, char* argv[]) rng.get_double(ymin, ymax), rng.get_double(zmin, zmax)); -#ifdef CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE std::cout << "Traverser " << (i + 1) << "\n\t(" << p1 << ")\n\t(" << p2 << ")" << std::endl; -#endif + Segment_cell_iterator ct = dt.segment_traverser_cells_begin(p1, p2); - Segment_cell_iterator ctend = dt.segment_traverser_cells_begin(p1, p2); + Segment_cell_iterator ctend = dt.segment_traverser_cells_end(); // Count the number of finite cells traversed. unsigned int inf = 0, fin = 0; - for( ; ct !=ctend; ++ct ) + for( ; ct != ctend; ++ct ) { if( dt.is_infinite(ct) ) - ++inf; + ++inf; else ++fin; } -#ifdef CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE std::cout << "While traversing from " << p1 << " to " << p2 << std::endl; std::cout << inf << " infinite and " << fin << " finite cells were visited." << std::endl; std::cout << std::endl << std::endl; -#endif } - time.stop(); - std::cout << "Triangulation has " << dt.number_of_vertices() << " vertices." - << std::endl; - std::cout << "Traversing cells of triangulation with " - << nb_seg << " segments took " << time.time() << " seconds." - << std::endl; - - return 0; + return 0; } diff --git a/Triangulation_3/include/CGAL/Triangulation_3.h b/Triangulation_3/include/CGAL/Triangulation_3.h index e10347846fb..24c9f8ca0b7 100644 --- a/Triangulation_3/include/CGAL/Triangulation_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_3.h @@ -2198,12 +2198,6 @@ public: Segment_cell_iterator it(this, vs, vt); return it; } - Segment_cell_iterator segment_traverser_cells_end(Vertex_handle vs, - Vertex_handle vt) const - { - Segment_cell_iterator it(this, vs, vt); - return it.end(); - } Segment_cell_iterator segment_traverser_cells_begin(const Point& ps, const Point& pt, Cell_handle hint = Cell_handle()) const @@ -2211,11 +2205,9 @@ public: Segment_cell_iterator it(this, ps, pt, hint); return it; } - Segment_cell_iterator segment_traverser_cells_end(const Point& ps, - const Point& pt, - Cell_handle hint = Cell_handle()) const + Segment_cell_iterator segment_traverser_cells_end() const { - Segment_cell_iterator it(this, ps, pt, hint); + Segment_cell_iterator it(this); return it.end(); } Segment_simplex_iterator segment_traverser_simplices_begin(Vertex_handle vs, @@ -2224,12 +2216,6 @@ public: Segment_simplex_iterator it(this, vs, vt); return it; } - Segment_simplex_iterator segment_traverser_simplices_end(Vertex_handle vs, - Vertex_handle vt) const - { - Segment_simplex_iterator it(this, vs, vt); - return it.end(); - } Segment_simplex_iterator segment_traverser_simplices_begin(const Point& ps, const Point& pt, Cell_handle hint = Cell_handle()) const @@ -2237,11 +2223,9 @@ public: Segment_simplex_iterator it(this, ps, pt, hint); return it; } - Segment_simplex_iterator segment_traverser_simplices_end(const Point& ps, - const Point& pt, - Cell_handle hint = Cell_handle()) const + Segment_simplex_iterator segment_traverser_simplices_end() const { - Segment_simplex_iterator it(this, ps, pt, hint); + Segment_simplex_iterator it(this); return it.end(); } diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index f5ecab1f672..32a8687f698 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -16,7 +16,7 @@ // $Id$ // SPDX-License-Identifier: GPL-3.0+ // -// Author(s): Thijs van Lankveld +// Author(s): Thijs van Lankveld, Jane Tournois #ifndef CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_H #define CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_H @@ -215,6 +215,10 @@ public: Triangulation_segment_cell_iterator_3( const Tr* tr, const Segment& S, Cell_handle hint = Cell_handle() ); // \} + // private constructor that does not initialize the source and target. + // used for the end() + Triangulation_segment_cell_iterator_3(const Tr* tr); + #ifndef CGAL_TST_ASSUME_CORRECT_TYPES // The virtual destructor is mainly defined to indicate to the casting // operators that this is a dynamic type. @@ -222,9 +226,6 @@ public: #endif ~Triangulation_segment_cell_iterator_3() {} -private: - // private constructor that does not initialize the source and target. - Triangulation_segment_cell_iterator_3( const Tr* tr ); public: // \name Accessors @@ -562,6 +563,9 @@ public: , const Segment& seg, Cell_handle hint = Cell_handle()) : _cell_iterator(tr, seg, hint) { set_curr_simplex_to_entry(); } + Triangulation_segment_simplex_iterator_3(const Tr* tr) + : _cell_iterator(tr) + {} bool operator==(const Simplex_iterator& sit) const { @@ -648,9 +652,14 @@ public: { case 3 :/*Cell_handle*/ { - if (!cell_iterator_is_ahead()) - ++_cell_iterator; - set_curr_simplex_to_entry(); + if(Cell_handle(_cell_iterator) == Cell_handle()) + _curr_simplex = Simplex_3(); + else + { + if (!cell_iterator_is_ahead()) + ++_cell_iterator; + set_curr_simplex_to_entry(); + } break; } case 2 :/*Facet*/ @@ -663,6 +672,11 @@ public: //taking cell_iterator one step forward CGAL_assertion(cell_has_facet(Cell_handle(_cell_iterator), get_facet())); ++_cell_iterator; + if (Cell_handle(_cell_iterator) == Cell_handle()) + { + _curr_simplex = _cell_iterator.previous(); + break; + } } else ch = _cell_iterator.previous(); @@ -707,13 +721,24 @@ public: case 1:/*Edge*/ { Cell_handle ch = Cell_handle(_cell_iterator); - + if (ch == _cell_iterator.previous()) + { + _curr_simplex = Simplex_3(); + break; + } Locate_type lt; int li, lj; _cell_iterator.entry(lt, li, lj); if (!cell_iterator_is_ahead()) + { ++_cell_iterator;//cell_iterator needs to be ahead to detect degeneracies + if (Cell_handle(_cell_iterator) == Cell_handle()) + { + _curr_simplex = _cell_iterator.previous(); + break; + } + } Cell_handle chnext = Cell_handle(_cell_iterator); Locate_type ltnext; @@ -755,9 +780,20 @@ public: case 0 :/*Vertex_handle*/ { Cell_handle ch = Cell_handle(_cell_iterator); - + if (ch == _cell_iterator.previous()) + { + _curr_simplex = Simplex_3(); + break; + } if (!cell_iterator_is_ahead()) //_curr_simplex does contain v + { ++_cell_iterator;//cell_iterator needs to be ahead to detect degeneracies + if (Cell_handle(_cell_iterator) == Cell_handle()) + { + _curr_simplex = _cell_iterator.previous(); + break; + } + } else ch = _cell_iterator.previous(); diff --git a/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h index 884ba454282..16a024c0a0b 100644 --- a/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h @@ -16,7 +16,7 @@ // $Id$ // SPDX-License-Identifier: GPL-3.0+ // -// Author(s): Thijs van Lankveld +// Author(s): Thijs van Lankveld, Jane Tournois #ifndef CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_IMPL_H #define CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_IMPL_H @@ -174,12 +174,9 @@ template < class Tr, class Inc > inline bool Triangulation_segment_cell_iterator_3:: operator==( const SCI& sci ) const { // To be equal, the iterators must traverse the same triangulations - // along the same line segment and they must have the same current cell. - // Note that to limit cost, we just compare the triangulation pointers. + // and they must have the same current cell. using CGAL::cpp11::get; - return ( &_tr == &sci._tr && - ( _s_vertex == Vertex_handle() ? _source == sci._source : _s_vertex == sci._s_vertex ) && - ( _t_vertex == Vertex_handle() ? _target == sci._target : _t_vertex == sci._t_vertex ) && + return ( _tr == sci._tr && get<0>(_cur) == get<0>(sci._cur) ); } @@ -358,7 +355,7 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre const Simplex& cur) const { using CGAL::cpp11::get; - boost::array vert + std::array vert = {&(get<0>(cur)->vertex(0)->point()), &(get<0>(cur)->vertex(1)->point()), &(get<0>(cur)->vertex(2)->point()), @@ -673,7 +670,7 @@ walk_to_next_3_inf( int inf ) { return; } - boost::array < Point*, 4> vert; + std::array < Point*, 4> vert; for( int i = 0; i != 4; ++i ) if( i != inf ) vert[i] = &(get<0>(_cur)->vertex(i)->point()); @@ -776,7 +773,7 @@ void Triangulation_segment_cell_iterator_3:: walk_to_next_2() { using CGAL::cpp11::get; - boost::array vert + std::array vert = { &(get<0>(_cur)->vertex(0)->point()), &(get<0>(_cur)->vertex(1)->point()), &(get<0>(_cur)->vertex(2)->point()) }; diff --git a/Triangulation_3/test/Triangulation_3/test_segment_cell_traverser_3.cpp b/Triangulation_3/test/Triangulation_3/test_segment_cell_traverser_3.cpp index a947a952d60..e4bb0dbc401 100644 --- a/Triangulation_3/test/Triangulation_3/test_segment_cell_traverser_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_segment_cell_traverser_3.cpp @@ -46,7 +46,7 @@ int main(int argc, char* argv[]) std::cerr << dt.number_of_finite_cells() << '\n'; Segment_cell_iterator ct = dt.segment_traverser_cells_begin(points[0], points[1]); - Segment_cell_iterator ctend = dt.segment_traverser_cells_end(points[0], points[1]); + Segment_cell_iterator ctend = dt.segment_traverser_cells_end(); unsigned int nb_cells = 0, nb_facets = 0, nb_edges = 0, nb_vertex = 0; // Count the number of finite cells traversed. diff --git a/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp b/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp index 05830b55508..c5cf3bf0b2d 100644 --- a/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp @@ -82,7 +82,7 @@ bool test(const DT& dt, const Big_tuple& tuple) std::cout << "\n#\n# Query segment: ( " << p1 << " , " << p2 << " )\n#\n"; Segment_simplex_iterator st = dt.segment_traverser_simplices_begin(p1, p2); - Segment_simplex_iterator stend = dt.segment_traverser_simplices_end(p1, p2); + Segment_simplex_iterator stend = dt.segment_traverser_simplices_end(); unsigned int nb_cells = 0, nb_facets = 0, nb_edges = 0, nb_vertex = 0; unsigned int nb_collinear = 0; diff --git a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp index 0a5810f72ad..96fe5916243 100644 --- a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp @@ -71,8 +71,7 @@ void test_vertex_edge_vertex(const DT& dt, const std::size_t& nb_tests) = dt.segment_traverser_simplices_begin((v1->point() - 2.*v), (v2->point() + 3.*v)); Segment_simplex_iterator stend - = dt.segment_traverser_simplices_end((v1->point() - 2. * v), - (v2->point() + 3. * v)); + = dt.segment_traverser_simplices_end(); for (; st != stend; ++st) { std::cout << st->dimension(); @@ -130,7 +129,7 @@ void test_edge_facet_edge(const DT& dt, const std::size_t& nb_tests) Segment_simplex_iterator st = dt.segment_traverser_simplices_begin((p1 - 2. * v), (p2 + 3. * v)); Segment_simplex_iterator stend - = dt.segment_traverser_simplices_end((p1 - 2. * v), (p2 + 3. * v)); + = dt.segment_traverser_simplices_end(); for (; st != stend; ++st) { std::cout << st->dimension(); @@ -193,7 +192,7 @@ void test_edge_facet_vertex(const DT& dt, const std::size_t& nb_tests) Segment_simplex_iterator st = dt.segment_traverser_simplices_begin((p1 - 2. * v), (p2 + 3. * v)); Segment_simplex_iterator stend - = dt.segment_traverser_simplices_end((p1 - 2. * v), (p2 + 3. * v)); + = dt.segment_traverser_simplices_end(); for (; st != stend; ++st) { std::cout << st->dimension(); @@ -315,7 +314,7 @@ void test_triangulation_on_a_grid() std::cout << "Query segment : (" << s.source() << ") to (" << s.target() << ") ["; Segment_simplex_iterator st = dt.segment_traverser_simplices_begin(s.source(), s.target()); - Segment_simplex_iterator stend = dt.segment_traverser_simplices_end(s.source(), s.target()); + Segment_simplex_iterator stend = dt.segment_traverser_simplices_end(); unsigned int inf = 0, fin = 0; unsigned int nb_facets = 0, nb_edges = 0, nb_vertex = 0; @@ -383,7 +382,7 @@ int main(int argc, char* argv[]) << "\n\t(" << p1 << ")\n\t(" << p2 << ")" << std::endl; Segment_simplex_iterator st = dt.segment_traverser_simplices_begin(p1, p2); - Segment_simplex_iterator stend = dt.segment_traverser_simplices_end(p1, p2); + Segment_simplex_iterator stend = dt.segment_traverser_simplices_end(); // Count the number of finite cells traversed. unsigned int inf = 0, fin = 0; From 2eadd494a8cd56eeba239b46f58278c67d312f92 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 6 Apr 2020 07:02:21 +0200 Subject: [PATCH 106/138] replace CGAL::cpp11::tuple by std::tuple --- .../CGAL/Triangulation_segment_traverser_3.h | 40 +- .../Triangulation_segment_traverser_3_impl.h | 544 +++++++++--------- 2 files changed, 280 insertions(+), 304 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 32a8687f698..656a25c601c 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -40,7 +41,6 @@ #include #include -#include // If defined, type casting is done statically, // reducing type-safety overhead. @@ -127,8 +127,7 @@ public: typedef typename Tr::Locate_type Locate_type; //< defines the simplex type returned from location. - typedef CGAL::cpp11::tuple - Simplex; //< defines the simplex type. + typedef std::tuple Simplex; //< defines the simplex type. typedef Cell value_type; //< defines the value type the iterator refers to. typedef Cell& reference; //< defines the reference type of the iterator. @@ -251,8 +250,7 @@ public: */ const Cell cell() const { - using CGAL::cpp11::get; - return *get<0>(_cur); + return *std::get<0>(_cur); } // gives a handle to the current cell. @@ -263,8 +261,7 @@ public: */ Cell_handle handle() { - using CGAL::cpp11::get; - return get<0>(_cur); + return std::get<0>(_cur); } // gives the previous cell. @@ -277,8 +274,7 @@ public: */ Cell_handle previous() const { - using CGAL::cpp11::get; - return get<0>(_prev); + return std::get<0>(_prev); } // provides a dereference operator. @@ -286,8 +282,7 @@ public: */ Cell* operator->() { - using CGAL::cpp11::get; - return &*get<0>(_cur); + return &*std::get<0>(_cur); } // provides an indirection operator. @@ -295,8 +290,7 @@ public: */ Cell& operator*() { - using CGAL::cpp11::get; - return *get<0>(_cur); + return *std::get<0>(_cur); } // provides a conversion operator. @@ -304,8 +298,7 @@ public: */ operator const Cell_handle() const { - using CGAL::cpp11::get; - return get<0>(_cur); + return std::get<0>(_cur); } // provides a conversion operator. @@ -320,8 +313,7 @@ public: */ bool has_next() const { - using CGAL::cpp11::get; - return get<0>(_cur) != Cell_handle(); + return std::get<0>(_cur) != Cell_handle(); } // gives the simplex through which the current cell was entered. @@ -330,16 +322,14 @@ public: */ void entry( Locate_type& lt, int& li, int& lj ) const { - using CGAL::cpp11::get; - lt = get<1>(_cur); li = get<2>(_cur); lj = get<3>(_cur); + lt = std::get<1>(_cur); li = std::get<2>(_cur); lj = std::get<3>(_cur); } // gives the simplex through which the previous cell was exited. /* \pre the current cell is not the initial cell. */ void exit( Locate_type& lt, int& li, int& lj ) const { - using CGAL::cpp11::get; - lt = get<1>(_prev); li = get<2>(_prev); lj = get<3>(_prev); + lt = std::get<1>(_prev); li = std::get<2>(_prev); lj = std::get<3>(_prev); } // gives the past-the-end iterator associated with this iterator. @@ -399,8 +389,7 @@ public: */ bool operator==( const Cell_handle& ch ) const { - using CGAL::cpp11::get; - return ch == get<0>(_cur); + return ch == std::get<0>(_cur); } // compares the current cell with `ch`. @@ -411,8 +400,7 @@ public: */ bool operator!=( const Cell_handle& ch ) const { - using CGAL::cpp11::get; - return ch != get<0>(_cur); + return ch != std::get<0>(_cur); } // \} @@ -600,7 +588,7 @@ private: //check what is the entry type of _cell_iterator if (Cell_handle(_cell_iterator) == Cell_handle()) { - //where did the segment get out from previous cell + //where did the segment std::get out from previous cell cell = _cell_iterator.previous(); _cell_iterator.exit(lt, li, lj); } diff --git a/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h index 16a024c0a0b..36dbc7d2018 100644 --- a/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h @@ -21,7 +21,6 @@ #ifndef CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_IMPL_H #define CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_IMPL_H -#include namespace CGAL { @@ -91,10 +90,9 @@ Triangulation_segment_cell_iterator_3( const Tr* tr, const Point& s, Vertex_hand _s_vertex = Vertex_handle(); _t_vertex = t; - using CGAL::cpp11::get; - get<0>(_cur) = _tr->locate( s, get<1>(_cur), get<2>(_cur), get<3>(_cur), hint ); + std::get<0>(_cur) = _tr->locate( s, std::get<1>(_cur), std::get<2>(_cur), std::get<3>(_cur), hint ); - CGAL_triangulation_postcondition( get<0>(_cur) != Cell_handle() ); + CGAL_triangulation_postcondition( std::get<0>(_cur) != Cell_handle() ); jump_to_intersecting_cell(); } @@ -113,10 +111,9 @@ Triangulation_segment_cell_iterator_3( const Tr* tr, const Point& s, const Point _s_vertex = Vertex_handle(); _t_vertex = Vertex_handle(); - using CGAL::cpp11::get; - get<0>(_cur) = _tr->locate( s, get<1>(_cur), get<2>(_cur), get<3>(_cur), hint ); + std::get<0>(_cur) = _tr->locate( s, std::get<1>(_cur), std::get<2>(_cur), std::get<3>(_cur), hint ); - CGAL_triangulation_postcondition( get<0>(_cur) != Cell_handle() ); + CGAL_triangulation_postcondition( std::get<0>(_cur) != Cell_handle() ); jump_to_intersecting_cell(); } @@ -139,16 +136,14 @@ Triangulation_segment_cell_iterator_3::end() const { sci._target = _target; sci._s_vertex = _s_vertex; sci._t_vertex = _t_vertex; - using CGAL::cpp11::get; - get<0>(sci._cur) = Cell_handle(); + std::get<0>(sci._cur) = Cell_handle(); return sci; } template < class Tr, class Inc > inline Triangulation_segment_cell_iterator_3& Triangulation_segment_cell_iterator_3::operator++() { - using CGAL::cpp11::get; - CGAL_triangulation_precondition( get<0>(_cur) != Cell_handle() ); + CGAL_triangulation_precondition( std::get<0>(_cur) != Cell_handle() ); increment(); return *this; } @@ -166,8 +161,7 @@ inline typename Triangulation_segment_cell_iterator_3::Cell_handle Triangulation_segment_cell_iterator_3::complete() { while( has_next() ) increment(); - using CGAL::cpp11::get; - return get<0>(_prev); + return std::get<0>(_prev); } template < class Tr, class Inc > @@ -175,9 +169,8 @@ inline bool Triangulation_segment_cell_iterator_3:: operator==( const SCI& sci ) const { // To be equal, the iterators must traverse the same triangulations // and they must have the same current cell. - using CGAL::cpp11::get; return ( _tr == sci._tr && - get<0>(_cur) == get<0>(sci._cur) ); + std::get<0>(_cur) == std::get<0>(sci._cur) ); } template < class Tr, class Inc > @@ -190,8 +183,7 @@ template < class Tr, class Inc > inline bool Triangulation_segment_cell_iterator_3:: operator==( Nullptr_t CGAL_triangulation_assertion_code(n) ) const { CGAL_triangulation_assertion( n == NULL ); - using CGAL::cpp11::get; - return get<0>(_cur) == Cell_handle(); + return std::get<0>(_cur) == Cell_handle(); } template < class Tr, class Inc > @@ -205,7 +197,7 @@ void Triangulation_segment_cell_iterator_3:: jump_to_intersecting_cell() { //copy current simplex - Cell_handle ch = get<0>(_cur); + Cell_handle ch = std::get<0>(_cur); Locate_type lt; int li, lj; entry(lt, li, lj); @@ -223,25 +215,25 @@ jump_to_intersecting_cell() if (lt == Tr::VERTEX) { - get<0>(_cur) = new_ch; - //get<1>(_cur) is Locate_type and unchanged - get<2>(_cur) = new_ch->index(ch->vertex(li)); - //get<3>(_cur) is lj and unchanged - CGAL_assertion(get<0>(_cur)->vertex(get<2>(_cur)) == ch->vertex(li)); + std::get<0>(_cur) = new_ch; + //std::get<1>(_cur) is Locate_type and unchanged + std::get<2>(_cur) = new_ch->index(ch->vertex(li)); + //std::get<3>(_cur) is lj and unchanged + CGAL_assertion(std::get<0>(_cur)->vertex(std::get<2>(_cur)) == ch->vertex(li)); } else if (lt == Tr::EDGE) { - get<0>(_cur) = new_ch; - //get<1>(_cur) is Locate_type and unchanged - get<2>(_cur) = new_ch->index(ch->vertex(li)); - get<3>(_cur) = new_ch->index(ch->vertex(lj)); + std::get<0>(_cur) = new_ch; + //std::get<1>(_cur) is Locate_type and unchanged + std::get<2>(_cur) = new_ch->index(ch->vertex(li)); + std::get<3>(_cur) = new_ch->index(ch->vertex(lj)); } else { - get<0>(_cur) = new_ch; - //get<1>(_cur) is Locate_type and unchanged - get<2>(_cur) = new_ch->index(ch); - //get<3>(_cur) is lj and unchanged + std::get<0>(_cur) = new_ch; + //std::get<1>(_cur) is Locate_type and unchanged + std::get<2>(_cur) = new_ch->index(ch); + //std::get<3>(_cur) is lj and unchanged } } @@ -257,11 +249,10 @@ walk_to_next() { // Check if the target is in the current cell. int ti; - using CGAL::cpp11::get; - if( get<0>(_cur)->has_vertex( _t_vertex, ti ) ) { + if( std::get<0>(_cur)->has_vertex( _t_vertex, ti ) ) { // The target is inside the cell. - _prev = Simplex( get<0>(_cur), Tr::VERTEX, ti, -1 ); - get<0>(_cur) = Cell_handle(); + _prev = Simplex( std::get<0>(_cur), Tr::VERTEX, ti, -1 ); + std::get<0>(_cur) = Cell_handle(); return; } @@ -271,7 +262,7 @@ walk_to_next() { switch( _tr->dimension() ) { case 3: { // Infinite cells should be handled differently. - if( get<0>(_cur)->has_vertex( _tr->infinite_vertex(), inf ) ) + if( std::get<0>(_cur)->has_vertex( _tr->infinite_vertex(), inf ) ) walk_to_next_3_inf( inf ); else { @@ -281,14 +272,14 @@ walk_to_next() { _prev = p.first; _cur = p.second; - } while (get<0>(_cur) != Cell_handle()//end - && !get<0>(_cur)->has_vertex(_tr->infinite_vertex(), inf) + } while (std::get<0>(_cur) != Cell_handle()//end + && !std::get<0>(_cur)->has_vertex(_tr->infinite_vertex(), inf) && have_same_entry(backup, _cur)); } break; } case 2: { - if( get<0>(_cur)->has_vertex( _tr->infinite_vertex(), inf ) ) + if( std::get<0>(_cur)->has_vertex( _tr->infinite_vertex(), inf ) ) walk_to_next_2_inf( inf ); else walk_to_next_2(); @@ -298,7 +289,7 @@ walk_to_next() { #ifdef CGAL_TRIANGULATION_3_TRAVERSER_CHECK_INTERSECTION if(_tr->dimension() == 3) { - Cell_handle c = get<0>(_cur); + Cell_handle c = std::get<0>(_cur); if (c != Cell_handle() && !_tr->is_infinite(c)) //hard to say anything in this case { typename Tr::Segment seg(_source, _target); @@ -323,25 +314,24 @@ bool Triangulation_segment_cell_iterator_3:: have_same_entry(const Simplex& s1, const Simplex& s2) const { //type - using CGAL::cpp11::get; - if (get<1>(s1) != get<1>(s2)) + if (std::get<1>(s1) != std::get<1>(s2)) return false; - switch (get<1>(s1)) + switch (std::get<1>(s1)) { case Locate_type::VERTEX: - return get<0>(s1)->vertex(get<2>(s1)) == get<0>(s2)->vertex(get<2>(s2)); + return std::get<0>(s1)->vertex(std::get<2>(s1)) == std::get<0>(s2)->vertex(std::get<2>(s2)); case Locate_type::EDGE: { - Vertex_handle v1a = get<0>(s1)->vertex(get<2>(s1)); - Vertex_handle v1b = get<0>(s1)->vertex(get<3>(s1)); - Vertex_handle v2a = get<0>(s2)->vertex(get<2>(s2)); - Vertex_handle v2b = get<0>(s2)->vertex(get<3>(s2)); + Vertex_handle v1a = std::get<0>(s1)->vertex(std::get<2>(s1)); + Vertex_handle v1b = std::get<0>(s1)->vertex(std::get<3>(s1)); + Vertex_handle v2a = std::get<0>(s2)->vertex(std::get<2>(s2)); + Vertex_handle v2b = std::get<0>(s2)->vertex(std::get<3>(s2)); return (v1a == v2a && v1b == v2b) || (v1a == v2b && v1b == v2a); } case Locate_type::FACET: - return triangulation()->are_equal(Facet(get<0>(s1), get<2>(s1)), - Facet(get<0>(s2), get<2>(s2))); + return triangulation()->are_equal(Facet(std::get<0>(s1), std::get<2>(s1)), + Facet(std::get<0>(s2), std::get<2>(s2))); default: CGAL_assertion(false); }; @@ -354,19 +344,18 @@ std::pair::Simplex, Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& prev, const Simplex& cur) const { - using CGAL::cpp11::get; std::array vert - = {&(get<0>(cur)->vertex(0)->point()), - &(get<0>(cur)->vertex(1)->point()), - &(get<0>(cur)->vertex(2)->point()), - &(get<0>(cur)->vertex(3)->point()) }; + = {&(std::get<0>(cur)->vertex(0)->point()), + &(std::get<0>(cur)->vertex(1)->point()), + &(std::get<0>(cur)->vertex(2)->point()), + &(std::get<0>(cur)->vertex(3)->point()) }; int inside=0,outside=0,regular_case=0,degenerate=0; Cell_handle nnext; - if (get<1>(cur) == Tr::FACET) { + if (std::get<1>(cur) == Tr::FACET) { regular_case = 1; - int i = get<2>(cur); + int i = std::get<2>(cur); int j0 = Tr::vertex_triple_index(i, 0); int j1 = Tr::vertex_triple_index(i, 1); int j2 = Tr::vertex_triple_index(i, 2); @@ -375,7 +364,7 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre Orientation o1 = _tr->orientation(_source, *vert[i], *vert[j1], _target); if (o1 != POSITIVE) { if (_tr->orientation(*vert[i], *vert[j0], *vert[j1], _target) == POSITIVE) { - nnext = get<0>(cur)->neighbor(j2); + nnext = std::get<0>(cur)->neighbor(j2); outside = j2; if (o1 == ZERO) degenerate = 1; //EDGE i j1 } @@ -384,7 +373,7 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre } else { if (_tr->orientation(*vert[i], *vert[j1], *vert[j2], _target) == POSITIVE) { - nnext = get<0>(cur)->neighbor(j0); + nnext = std::get<0>(cur)->neighbor(j0); outside = j0; } else @@ -395,7 +384,7 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre Orientation o1 = _tr->orientation(_source, *vert[i], *vert[j1], _target); if (o1 == NEGATIVE) { if (_tr->orientation(*vert[i], *vert[j0], *vert[j1], _target) == POSITIVE) { - nnext = get<0>(cur)->neighbor(j2); //EDGE i j0 + nnext = std::get<0>(cur)->neighbor(j2); //EDGE i j0 degenerate = 2; outside = 44; } @@ -407,14 +396,14 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre inside = 55; else { - nnext = get<0>(cur)->neighbor(j2); //VERTEX i + nnext = std::get<0>(cur)->neighbor(j2); //VERTEX i degenerate = 3; outside = 5; } } else { if (_tr->orientation(*vert[i], *vert[j1], *vert[j2], _target) == POSITIVE) { - nnext = get<0>(cur)->neighbor(j0); + nnext = std::get<0>(cur)->neighbor(j0); outside = j0; } else @@ -425,7 +414,7 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre Orientation o2 = _tr->orientation(_source, *vert[i], *vert[j2], _target); if (o2 != NEGATIVE) { if (_tr->orientation(*vert[i], *vert[j2], *vert[j0], _target) == POSITIVE) { - nnext = get<0>(cur)->neighbor(j1); + nnext = std::get<0>(cur)->neighbor(j1); outside = j1; if (o2 == ZERO) degenerate = 4; // EDGE i j2 } @@ -434,7 +423,7 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre } else { if (_tr->orientation(*vert[i], *vert[j1], *vert[j2], _target) == POSITIVE) { - nnext = get<0>(cur)->neighbor(j0); + nnext = std::get<0>(cur)->neighbor(j0); outside = j0; } else @@ -444,14 +433,14 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre if ((!degenerate) && (!inside)) { - Simplex prev_after_walk(get<0>(cur), Tr::FACET, outside, -1); - Simplex cur_after_walk( nnext, Tr::FACET, nnext->index(get<0>(cur)), -1); + Simplex prev_after_walk(std::get<0>(cur), Tr::FACET, outside, -1); + Simplex cur_after_walk( nnext, Tr::FACET, nnext->index(std::get<0>(cur)), -1); return std::make_pair(prev_after_walk, cur_after_walk); } if ((!degenerate) && inside) { - Simplex prev_after_walk(get<0>(cur), Tr::CELL, -1, -1); + Simplex prev_after_walk(std::get<0>(cur), Tr::CELL, -1, -1); Simplex cur_after_walk(Cell_handle(), Tr::OUTSIDE_AFFINE_HULL, -1, -1); return std::make_pair(prev_after_walk, cur_after_walk); } @@ -467,19 +456,19 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre // We keep track of which orientations are calculated. bool calc[6] = { false, false, false, false, false, false }; - if( get<1>(cur) == Tr::VERTEX ) { + if( std::get<1>(cur) == Tr::VERTEX ) { // The three planes through the vertex are set to coplanar. for( int j = 0; j < 4; ++j ) { - if( get<2>(cur) != j ) { - int ij = edgeIndex( get<2>(cur), j ); + if( std::get<2>(cur) != j ) { + int ij = edgeIndex( std::get<2>(cur), j ); o[ij] = COPLANAR; calc[ij] = true; } } } - else if( get<1>(cur) == Tr::EDGE ) { + else if( std::get<1>(cur) == Tr::EDGE ) { // The plane through the edge is set to coplanar. - int ij = edgeIndex( get<2>(cur), get<3>(cur) ); + int ij = edgeIndex( std::get<2>(cur), std::get<3>(cur) ); o[ij] = COPLANAR; calc[ij] = true; } @@ -490,8 +479,8 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre for( int k = 0; k < 4; ++k, ++li ) { // Skip the previous cell. - Cell_handle next = get<0>(cur)->neighbor(li); - if( next == get<0>(prev) ) + Cell_handle next = std::get<0>(cur)->neighbor(li); + if( next == std::get<0>(prev) ) { op[li] = POSITIVE; pos += li; @@ -559,18 +548,18 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre Simplex prev_after_walk; Simplex cur_after_walk; - get<0>(prev_after_walk) = get<0>(cur); - get<0>(cur_after_walk) = next; + std::get<0>(prev_after_walk) = std::get<0>(cur); + std::get<0>(cur_after_walk) = next; switch( Or ) { case 3: - get<1>(prev_after_walk) = Tr::FACET; - get<2>(prev_after_walk) = li; - get<1>(cur_after_walk) = Tr::FACET; - get<2>(cur_after_walk) = get<0>(cur_after_walk)->index(get<0>(prev_after_walk)); + std::get<1>(prev_after_walk) = Tr::FACET; + std::get<2>(prev_after_walk) = li; + std::get<1>(cur_after_walk) = Tr::FACET; + std::get<2>(cur_after_walk) = std::get<0>(cur_after_walk)->index(std::get<0>(prev_after_walk)); if(regular_case) { - CGAL_triangulation_assertion( get<0>(cur_after_walk)==nnext ); + CGAL_triangulation_assertion( std::get<0>(cur_after_walk)==nnext ); CGAL_triangulation_assertion( li==outside ); CGAL_triangulation_assertion( ! inside ); } @@ -580,19 +569,19 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre if(regular_case) CGAL_triangulation_assertion(degenerate ); - get<1>(prev_after_walk) = Tr::EDGE; - get<1>(cur_after_walk) = Tr::EDGE; + std::get<1>(prev_after_walk) = Tr::EDGE; + std::get<1>(cur_after_walk) = Tr::EDGE; for( int j = 0; j < 4; ++j ) { if( li != j && o[ 5 - edgeIndex(li, j) ] == COPLANAR) { - Edge opp = opposite_edge( get<0>(prev), li, j ); - get<2>(prev_after_walk) = opp.second; - get<3>(prev_after_walk) = opp.third; - get<2>(cur_after_walk) - = get<0>(cur_after_walk)->index( - get<0>(prev_after_walk)->vertex( get<2>(prev_after_walk) ) ); - get<3>(cur_after_walk) - = get<0>(cur_after_walk)->index( - get<0>(prev_after_walk)->vertex( get<3>(prev_after_walk) ) ); + Edge opp = opposite_edge( std::get<0>(prev), li, j ); + std::get<2>(prev_after_walk) = opp.second; + std::get<3>(prev_after_walk) = opp.third; + std::get<2>(cur_after_walk) + = std::get<0>(cur_after_walk)->index( + std::get<0>(prev_after_walk)->vertex( std::get<2>(prev_after_walk) ) ); + std::get<3>(cur_after_walk) + = std::get<0>(cur_after_walk)->index( + std::get<0>(prev_after_walk)->vertex( std::get<3>(prev_after_walk) ) ); return std::make_pair(prev_after_walk, cur_after_walk); } @@ -603,14 +592,14 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre if(regular_case) CGAL_triangulation_assertion(degenerate ); - get<1>(prev_after_walk) = Tr::VERTEX; - get<1>(cur_after_walk) = Tr::VERTEX; + std::get<1>(prev_after_walk) = Tr::VERTEX; + std::get<1>(cur_after_walk) = Tr::VERTEX; for( int j = 0; j < 4; ++j ) { if( li != j && o[ 5 - edgeIndex(li, j) ] == NEGATIVE ) { - get<2>(prev_after_walk) = j; - get<2>(cur_after_walk) - = get<0>(cur_after_walk)->index( - get<0>(prev_after_walk)->vertex(j) ); + std::get<2>(prev_after_walk) = j; + std::get<2>(cur_after_walk) + = std::get<0>(cur_after_walk)->index( + std::get<0>(prev_after_walk)->vertex(j) ); return std::make_pair(prev_after_walk, cur_after_walk); } @@ -629,26 +618,26 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre switch( op[0] + op[1] + op[2] + op[3] ) { case 4: CGAL_triangulation_assertion( pos == 6 ); - prev_after_walk = Simplex( get<0>(cur), Tr::CELL, -1, -1 ); + prev_after_walk = Simplex( std::get<0>(cur), Tr::CELL, -1, -1 ); CGAL_triangulation_assertion( (! regular_case) || inside ); break; case 3: - prev_after_walk = Simplex( get<0>(cur), Tr::FACET, 6-pos, -1 ); + prev_after_walk = Simplex( std::get<0>(cur), Tr::FACET, 6-pos, -1 ); break; case 2: if( pos < 3 ) - prev_after_walk = Simplex( get<0>(cur), Tr::EDGE, 0, pos+1 ); + prev_after_walk = Simplex( std::get<0>(cur), Tr::EDGE, 0, pos+1 ); else if( pos < 5 ) - prev_after_walk = Simplex( get<0>(cur), Tr::EDGE, 1, pos-1 ); + prev_after_walk = Simplex( std::get<0>(cur), Tr::EDGE, 1, pos-1 ); else - prev_after_walk = Simplex( get<0>(cur), Tr::EDGE, 2, 3 ); + prev_after_walk = Simplex( std::get<0>(cur), Tr::EDGE, 2, 3 ); break; case 1: - prev_after_walk = Simplex( get<0>(cur), Tr::VERTEX, pos, -1 ); + prev_after_walk = Simplex( std::get<0>(cur), Tr::VERTEX, pos, -1 ); break; default: - prev_after_walk = Simplex( get<0>(cur), Tr::OUTSIDE_AFFINE_HULL, -1, -1 ); + prev_after_walk = Simplex( std::get<0>(cur), Tr::OUTSIDE_AFFINE_HULL, -1, -1 ); CGAL_triangulation_assertion( false ); } @@ -658,22 +647,22 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre template < class Tr, class Inc > void Triangulation_segment_cell_iterator_3:: -walk_to_next_3_inf( int inf ) { - using CGAL::cpp11::get; - CGAL_triangulation_precondition( _tr->is_infinite( get<0>(_cur)->vertex(inf) ) ); +walk_to_next_3_inf( int inf ) +{ + CGAL_triangulation_precondition( _tr->is_infinite( std::get<0>(_cur)->vertex(inf) ) ); // If this cell was reached by traversal from a finite one, it must be the final cell. - Cell_handle fin = get<0>(_cur)->neighbor(inf); - if( fin == get<0>(_prev) ) { + Cell_handle fin = std::get<0>(_cur)->neighbor(inf); + if( fin == std::get<0>(_prev) ) { _prev = _cur; - get<0>(_cur) = Cell_handle(); + std::get<0>(_cur) = Cell_handle(); return; } std::array < Point*, 4> vert; for( int i = 0; i != 4; ++i ) if( i != inf ) - vert[i] = &(get<0>(_cur)->vertex(i)->point()); + vert[i] = &(std::get<0>(_cur)->vertex(i)->point()); vert[inf] = &_target; Orientation o[4]; @@ -681,8 +670,8 @@ walk_to_next_3_inf( int inf ) { if( _tr->orientation( *vert[0], *vert[1], *vert[2], *vert[3] ) == POSITIVE ) { // The target lies in an infinite cell. // Note that we do not traverse to other infinite cells. - _prev = Simplex( get<0>(_cur), Tr::OUTSIDE_CONVEX_HULL, -1, -1 ); - get<0>(_cur) = Cell_handle(); + _prev = Simplex( std::get<0>(_cur), Tr::OUTSIDE_CONVEX_HULL, -1, -1 ); + std::get<0>(_cur) = Cell_handle(); return; } @@ -700,8 +689,8 @@ walk_to_next_3_inf( int inf ) { } // Skip the previous cell. - Cell_handle next = get<0>(_cur)->neighbor(li); - if( next == get<0>(_prev) ) { + Cell_handle next = std::get<0>(_cur)->neighbor(li); + if( next == std::get<0>(_prev) ) { o[li] = POSITIVE; continue; } @@ -718,45 +707,45 @@ walk_to_next_3_inf( int inf ) { // The target lies behind the plane through the source and two finite vertices. // Traverse to the incident infinite cell. CGAL_triangulation_assertion( _tr->is_infinite( next ) ); - _prev = Simplex( get<0>(_cur), Tr::FACET, li, -1 ); - _cur = Simplex( next, Tr::FACET, next->index( get<0>(_prev) ), -1 ); + _prev = Simplex( std::get<0>(_cur), Tr::FACET, li, -1 ); + _cur = Simplex( next, Tr::FACET, next->index( std::get<0>(_prev) ), -1 ); return; } // The line enters the convex hull here (or lies on the finite facet). - get<0>(_prev) = get<0>(_cur); - get<0>(_cur) = fin; + std::get<0>(_prev) = std::get<0>(_cur); + std::get<0>(_cur) = fin; // Check through which simplex the line traverses. switch( o[0]+o[1]+o[2]+o[3] ) { case 3: - get<1>(_prev) = Tr::FACET; - get<2>(_prev) = inf; - get<1>(_cur) = Tr::FACET; - get<2>(_cur) = get<0>(_cur)->index(get<0>(_prev)); + std::get<1>(_prev) = Tr::FACET; + std::get<2>(_prev) = inf; + std::get<1>(_cur) = Tr::FACET; + std::get<2>(_cur) = std::get<0>(_cur)->index(std::get<0>(_prev)); return; case 2: - get<1>(_prev) = Tr::EDGE; - get<1>(_cur) = Tr::EDGE; + std::get<1>(_prev) = Tr::EDGE; + std::get<1>(_cur) = Tr::EDGE; for( int i = 0; i < 4; ++i ) { if( o[i] == COPLANAR && i != inf ) { - Edge opp = opposite_edge( get<0>(_prev), inf, i ); - get<2>(_prev) = opp.second; - get<3>(_prev) = opp.third; - get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); - get<3>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<3>(_prev) ) ); + Edge opp = opposite_edge( std::get<0>(_prev), inf, i ); + std::get<2>(_prev) = opp.second; + std::get<3>(_prev) = opp.third; + std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ); + std::get<3>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<3>(_prev) ) ); return; } } CGAL_triangulation_assertion( false ); return; case 1: - get<1>(_prev) = Tr::VERTEX; - get<1>(_cur) = Tr::VERTEX; + std::get<1>(_prev) = Tr::VERTEX; + std::get<1>(_cur) = Tr::VERTEX; for( int i = 0; i < 4; ++i ) { if( o[i] == POSITIVE ) { - get<2>(_prev) = i; - get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex(i) ); + std::get<2>(_prev) = i; + std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex(i) ); return; } } @@ -772,54 +761,53 @@ template < class Tr, class Inc > void Triangulation_segment_cell_iterator_3:: walk_to_next_2() { - using CGAL::cpp11::get; std::array vert - = { &(get<0>(_cur)->vertex(0)->point()), - &(get<0>(_cur)->vertex(1)->point()), - &(get<0>(_cur)->vertex(2)->point()) }; + = { &(std::get<0>(_cur)->vertex(0)->point()), + &(std::get<0>(_cur)->vertex(1)->point()), + &(std::get<0>(_cur)->vertex(2)->point()) }; - switch( get<1>(_cur) ) { + switch( std::get<1>(_cur) ) { case Tr::VERTEX: { // First we try the incident edges. - Orientation ocw = CGAL::coplanar_orientation( *vert[get<2>(_cur)], *vert[_tr->cw(get<2>(_cur))], *vert[_tr->ccw(get<2>(_cur))], _target ); - if( get<0>(_cur)->neighbor( _tr->ccw(get<2>(_cur)) ) != get<0>(_prev) && ocw == NEGATIVE) { - Cell_handle tmp = get<0>(_cur)->neighbor( _tr->ccw(get<2>(_cur)) ); + Orientation ocw = CGAL::coplanar_orientation( *vert[std::get<2>(_cur)], *vert[_tr->cw(std::get<2>(_cur))], *vert[_tr->ccw(std::get<2>(_cur))], _target ); + if( std::get<0>(_cur)->neighbor( _tr->ccw(std::get<2>(_cur)) ) != std::get<0>(_prev) && ocw == NEGATIVE) { + Cell_handle tmp = std::get<0>(_cur)->neighbor( _tr->ccw(std::get<2>(_cur)) ); _prev = _cur; - get<0>(_cur) = tmp; - get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex(get<2>(_cur)) ); + std::get<0>(_cur) = tmp; + std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex(std::get<2>(_cur)) ); return; } - Orientation occw = CGAL::coplanar_orientation( *vert[get<2>(_cur)], *vert[_tr->ccw(get<2>(_cur))], *vert[_tr->cw(get<2>(_cur))], _target ); - if( get<0>(_cur)->neighbor( _tr->cw(get<2>(_cur)) ) != get<0>(_prev) && occw == NEGATIVE) { - Cell_handle tmp = get<0>(_cur)->neighbor( _tr->cw(get<2>(_cur)) ); + Orientation occw = CGAL::coplanar_orientation( *vert[std::get<2>(_cur)], *vert[_tr->ccw(std::get<2>(_cur))], *vert[_tr->cw(std::get<2>(_cur))], _target ); + if( std::get<0>(_cur)->neighbor( _tr->cw(std::get<2>(_cur)) ) != std::get<0>(_prev) && occw == NEGATIVE) { + Cell_handle tmp = std::get<0>(_cur)->neighbor( _tr->cw(std::get<2>(_cur)) ); _prev = _cur; - get<0>(_cur) = tmp; - get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex(get<2>(_cur)) ); + std::get<0>(_cur) = tmp; + std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex(std::get<2>(_cur)) ); return; } // Then we try the opposite edge. - Orientation op = CGAL::coplanar_orientation( *vert[_tr->ccw(get<2>(_cur))], *vert[_tr->cw(get<2>(_cur))], *vert[get<2>(_cur)], _target ); + Orientation op = CGAL::coplanar_orientation( *vert[_tr->ccw(std::get<2>(_cur))], *vert[_tr->cw(std::get<2>(_cur))], *vert[std::get<2>(_cur)], _target ); if( op == NEGATIVE) { - Cell_handle tmp = get<0>(_cur)->neighbor(get<2>(_cur)); - get<0>(_prev) = get<0>(_cur); - get<0>(_cur) = tmp; + Cell_handle tmp = std::get<0>(_cur)->neighbor(std::get<2>(_cur)); + std::get<0>(_prev) = std::get<0>(_cur); + std::get<0>(_cur) = tmp; switch( ocw+occw ) { case 2: - get<1>(_prev) = Tr::EDGE; - get<2>(_prev) = _tr->ccw( get<2>(_cur) ); - get<3>(_prev) = _tr->cw( get<2>(_cur) ); - get<1>(_cur) = Tr::EDGE; - get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); - get<3>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<3>(_prev) ) ); + std::get<1>(_prev) = Tr::EDGE; + std::get<2>(_prev) = _tr->ccw( std::get<2>(_cur) ); + std::get<3>(_prev) = _tr->cw( std::get<2>(_cur) ); + std::get<1>(_cur) = Tr::EDGE; + std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ); + std::get<3>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<3>(_prev) ) ); return; case 1: - get<1>(_prev) = Tr::VERTEX; - get<1>(_cur) = Tr::VERTEX; - if( ocw == COLLINEAR ) get<2>(_prev) = _tr->cw( get<2>(_cur) ); - else get<2>(_cur) = _tr->ccw( get<2>(_cur) ); - get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); + std::get<1>(_prev) = Tr::VERTEX; + std::get<1>(_cur) = Tr::VERTEX; + if( ocw == COLLINEAR ) std::get<2>(_prev) = _tr->cw( std::get<2>(_cur) ); + else std::get<2>(_cur) = _tr->ccw( std::get<2>(_cur) ); + std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ); return; default: // The current vertex is the target. @@ -831,49 +819,49 @@ walk_to_next_2() // The target lies in this cell. switch( ocw+occw+op ) { case 3: - _prev = Simplex( get<0>(_cur), Tr::FACET, 3, -1 ); + _prev = Simplex( std::get<0>(_cur), Tr::FACET, 3, -1 ); break; case 2: if( ocw == 0 ) - _prev = Simplex( get<0>(_cur), Tr::EDGE, _tr->ccw(get<2>(_cur)), -1 ); + _prev = Simplex( std::get<0>(_cur), Tr::EDGE, _tr->ccw(std::get<2>(_cur)), -1 ); else if( occw == 0 ) - _prev = Simplex( get<0>(_cur), Tr::EDGE, _tr->cw(get<2>(_cur)), -1 ); + _prev = Simplex( std::get<0>(_cur), Tr::EDGE, _tr->cw(std::get<2>(_cur)), -1 ); else - _prev = Simplex( get<0>(_cur), Tr::EDGE, get<2>(_cur), -1 ); + _prev = Simplex( std::get<0>(_cur), Tr::EDGE, std::get<2>(_cur), -1 ); break; case 1: if( ocw == 1 ) - _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr->ccw(get<2>(_cur)), -1 ); + _prev = Simplex( std::get<0>(_cur), Tr::VERTEX, _tr->ccw(std::get<2>(_cur)), -1 ); else if( occw == 1 ) - _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr->cw(get<2>(_cur)), -1 ); + _prev = Simplex( std::get<0>(_cur), Tr::VERTEX, _tr->cw(std::get<2>(_cur)), -1 ); else - _prev = Simplex( get<0>(_cur), Tr::VERTEX, get<2>(_cur), -1 ); + _prev = Simplex( std::get<0>(_cur), Tr::VERTEX, std::get<2>(_cur), -1 ); break; case 0: CGAL_triangulation_assertion(false); - _prev = Simplex( get<0>(_cur), Tr::OUTSIDE_AFFINE_HULL, -1, -1 ); + _prev = Simplex( std::get<0>(_cur), Tr::OUTSIDE_AFFINE_HULL, -1, -1 ); break; } - get<0>(_cur) = Cell_handle(); + std::get<0>(_cur) = Cell_handle(); return; } case Tr::EDGE: { - int lk = 3 - get<2>(_cur) - get<3>(_cur); + int lk = 3 - std::get<2>(_cur) - std::get<3>(_cur); - if( get<0>(_cur)->neighbor(lk) != get<0>(_prev) ) { + if( std::get<0>(_cur)->neighbor(lk) != std::get<0>(_prev) ) { // Check the edge itself - switch( CGAL::coplanar_orientation( *vert[get<2>(_cur)], *vert[get<3>(_cur)], *vert[lk], _target ) ) { + switch( CGAL::coplanar_orientation( *vert[std::get<2>(_cur)], *vert[std::get<3>(_cur)], *vert[lk], _target ) ) { //_prev = _cur; //code not reached case COLLINEAR: // The target lies in this cell. - get<0>(_cur) = Cell_handle(); + std::get<0>(_cur) = Cell_handle(); return; case NEGATIVE: { // The target lies opposite of the edge. - Cell_handle tmp = get<0>(_cur)->neighbor(lk); - get<0>(_cur) = tmp; - get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex(get<2>(_cur)) ); - get<3>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex(get<3>(_cur)) ); + Cell_handle tmp = std::get<0>(_cur)->neighbor(lk); + std::get<0>(_cur) = tmp; + std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex(std::get<2>(_cur)) ); + std::get<3>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex(std::get<3>(_cur)) ); return; } default: @@ -881,30 +869,30 @@ walk_to_next_2() } } - Orientation o = CGAL::coplanar_orientation( _source, *vert[lk], *vert[get<2>(_cur)], _target ); + Orientation o = CGAL::coplanar_orientation( _source, *vert[lk], *vert[std::get<2>(_cur)], _target ); Orientation op; switch( o ) { case POSITIVE: { // The ray passes through the edge ik. - op = CGAL::coplanar_orientation( *vert[lk], *vert[get<2>(_cur)], _source, _target ); + op = CGAL::coplanar_orientation( *vert[lk], *vert[std::get<2>(_cur)], _source, _target ); if( op == NEGATIVE ) { - Cell_handle tmp = get<0>(_cur)->neighbor(get<3>(_cur)); - get<0>(_prev) = get<0>(_cur); - get<0>(_cur) = tmp; + Cell_handle tmp = std::get<0>(_cur)->neighbor(std::get<3>(_cur)); + std::get<0>(_prev) = std::get<0>(_cur); + std::get<0>(_cur) = tmp; - if( CGAL::collinear( _source, *vert[get<2>(_cur)], _target ) ) { - get<1>(_prev) = Tr::VERTEX; - get<2>(_prev) = get<2>(_cur); - get<1>(_cur) = Tr::VERTEX; - get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); + if( CGAL::collinear( _source, *vert[std::get<2>(_cur)], _target ) ) { + std::get<1>(_prev) = Tr::VERTEX; + std::get<2>(_prev) = std::get<2>(_cur); + std::get<1>(_cur) = Tr::VERTEX; + std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ); } else { - get<1>(_prev) = Tr::EDGE; - get<2>(_prev) = get<2>(_cur); - get<3>(_prev) = lk; - get<1>(_cur) = Tr::EDGE; - get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); - get<3>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<3>(_prev) ) ); + std::get<1>(_prev) = Tr::EDGE; + std::get<2>(_prev) = std::get<2>(_cur); + std::get<3>(_prev) = lk; + std::get<1>(_cur) = Tr::EDGE; + std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ); + std::get<3>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<3>(_prev) ) ); } return; } @@ -912,31 +900,31 @@ walk_to_next_2() } default: { // The ray passes through the edge jk. - op = CGAL::coplanar_orientation( *vert[lk], *vert[get<3>(_cur)], _source, _target ); + op = CGAL::coplanar_orientation( *vert[lk], *vert[std::get<3>(_cur)], _source, _target ); if( op == NEGATIVE ) { - Cell_handle tmp = get<0>(_cur)->neighbor(get<2>(_cur)); - get<0>(_prev) = get<0>(_cur); - get<0>(_cur) = tmp; + Cell_handle tmp = std::get<0>(_cur)->neighbor(std::get<2>(_cur)); + std::get<0>(_prev) = std::get<0>(_cur); + std::get<0>(_cur) = tmp; - if( CGAL::collinear( _source, *vert[get<3>(_cur)], _target ) ) { - get<1>(_prev) = Tr::VERTEX; - get<2>(_prev) = get<3>(_cur); - get<1>(_cur) = Tr::VERTEX; - get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); + if( CGAL::collinear( _source, *vert[std::get<3>(_cur)], _target ) ) { + std::get<1>(_prev) = Tr::VERTEX; + std::get<2>(_prev) = std::get<3>(_cur); + std::get<1>(_cur) = Tr::VERTEX; + std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ); } else if( o == COLLINEAR ) { - get<1>(_prev) = Tr::VERTEX; - get<2>(_prev) = lk; - get<1>(_cur) = Tr::VERTEX; - get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); + std::get<1>(_prev) = Tr::VERTEX; + std::get<2>(_prev) = lk; + std::get<1>(_cur) = Tr::VERTEX; + std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ); } else { - get<1>(_prev) = Tr::EDGE; - get<2>(_prev) = lk; - get<3>(_prev) = get<3>(_cur); - get<1>(_cur) = Tr::EDGE; - get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); - get<3>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); + std::get<1>(_prev) = Tr::EDGE; + std::get<2>(_prev) = lk; + std::get<3>(_prev) = std::get<3>(_cur); + std::get<1>(_cur) = Tr::EDGE; + std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ); + std::get<3>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ); } return; } @@ -946,22 +934,22 @@ walk_to_next_2() // The target lies in this cell. if( op == POSITIVE ) - _prev = Simplex( get<0>(_cur), Tr::FACET, 3, -1 ); + _prev = Simplex( std::get<0>(_cur), Tr::FACET, 3, -1 ); else { CGAL_triangulation_assertion( op == ZERO ); switch( o ) { case POSITIVE: - _prev = Simplex( get<0>(_cur), Tr::EDGE, get<2>(_cur), lk ); + _prev = Simplex( std::get<0>(_cur), Tr::EDGE, std::get<2>(_cur), lk ); break; case NEGATIVE: - _prev = Simplex( get<0>(_cur), Tr::EDGE, get<3>(_cur), lk ); + _prev = Simplex( std::get<0>(_cur), Tr::EDGE, std::get<3>(_cur), lk ); break; case ZERO: - _prev = Simplex( get<0>(_cur), Tr::VERTEX, lk, -1 ); + _prev = Simplex( std::get<0>(_cur), Tr::VERTEX, lk, -1 ); break; } } - get<0>(_cur) = Cell_handle(); + std::get<0>(_cur) = Cell_handle(); return; } case Tr::FACET: { @@ -971,8 +959,8 @@ walk_to_next_2() bool calc[3] = { false, false, false }; for( int j = 0; j != 3; ++j, li = _tr->ccw(li) ) { - Cell_handle next = get<0>(_cur)->neighbor(li); - if( next == get<0>(_prev) ) + Cell_handle next = std::get<0>(_cur)->neighbor(li); + if( next == std::get<0>(_prev) ) continue; // The target should lie on the other side of the edge. @@ -988,8 +976,8 @@ walk_to_next_2() if( o[_tr->ccw(li)] == NEGATIVE ) continue; else if( op == COLLINEAR && o[_tr->ccw(li)] == COLLINEAR ) { - _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr->ccw(li), -1 ); - get<0>(_cur) = Cell_handle(); + _prev = Simplex( std::get<0>(_cur), Tr::VERTEX, _tr->ccw(li), -1 ); + std::get<0>(_cur) = Cell_handle(); return; } @@ -1000,29 +988,29 @@ walk_to_next_2() if( o[_tr->cw(li)] == POSITIVE ) continue; else if( op == COLLINEAR && o[_tr->cw(li)] == COLLINEAR ) { - _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr->cw(li), -1 ); - get<0>(_cur) = Cell_handle(); + _prev = Simplex( std::get<0>(_cur), Tr::VERTEX, _tr->cw(li), -1 ); + std::get<0>(_cur) = Cell_handle(); return; } - get<0>(_prev) = get<0>(_cur); - get<0>(_cur) = next; + std::get<0>(_prev) = std::get<0>(_cur); + std::get<0>(_cur) = next; switch( o[_tr->ccw(li)] + o[_tr->cw(li)] ) { case 2: - get<1>(_prev) = Tr::EDGE; - get<2>(_prev) = _tr->ccw(li); - get<3>(_prev) = _tr->cw(li); - get<1>(_cur) = Tr::EDGE; - get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( _tr->ccw(li) ) ); - get<3>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( _tr->cw(li) ) ); + std::get<1>(_prev) = Tr::EDGE; + std::get<2>(_prev) = _tr->ccw(li); + std::get<3>(_prev) = _tr->cw(li); + std::get<1>(_cur) = Tr::EDGE; + std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( _tr->ccw(li) ) ); + std::get<3>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( _tr->cw(li) ) ); return; case 1: - get<1>(_prev) = Tr::VERTEX; - get<1>(_cur) = Tr::VERTEX; - if( o[_tr->ccw(li)] == COLLINEAR ) get<2>(_prev) = _tr->ccw(li); - else get<2>(_prev) = _tr->cw(li); - get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); + std::get<1>(_prev) = Tr::VERTEX; + std::get<1>(_cur) = Tr::VERTEX; + if( o[_tr->ccw(li)] == COLLINEAR ) std::get<2>(_prev) = _tr->ccw(li); + else std::get<2>(_prev) = _tr->cw(li); + std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ); return; default: CGAL_triangulation_assertion( false ); @@ -1031,8 +1019,8 @@ walk_to_next_2() } // The target lies in this cell. - _prev = Simplex( get<0>(_cur), Tr::FACET, 3, -1 ); - get<0>(_cur) = Cell_handle(); + _prev = Simplex( std::get<0>(_cur), Tr::FACET, 3, -1 ); + std::get<0>(_cur) = Cell_handle(); return; } default: @@ -1042,77 +1030,77 @@ walk_to_next_2() template < class Tr, class Inc > void Triangulation_segment_cell_iterator_3:: -walk_to_next_2_inf( int inf ) { - using CGAL::cpp11::get; - CGAL_triangulation_precondition( _tr->is_infinite( get<0>(_cur)->vertex(3) ) ); - CGAL_triangulation_precondition( _tr->is_infinite( get<0>(_cur)->vertex(inf) ) ); - +walk_to_next_2_inf( int inf ) +{ + CGAL_triangulation_precondition( _tr->is_infinite( std::get<0>(_cur)->vertex(3) ) ); + CGAL_triangulation_precondition( _tr->is_infinite( std::get<0>(_cur)->vertex(inf) ) ); + // If this cell was reached by traversal from a finite one, it must be the final cell. - Cell_handle fin = get<0>(_cur)->neighbor(inf); - if (fin == get<0>(_prev)) { + Cell_handle fin = std::get<0>(_cur)->neighbor(inf); + if (fin == std::get<0>(_prev)) { _prev = _cur; - get<0>(_cur) = Cell_handle(); + std::get<0>(_cur) = Cell_handle(); return; } // Check the neighboring cells. Orientation occw = CGAL::coplanar_orientation( _source, - get<0>(_cur)->vertex( _tr->ccw(inf))->point(), - get<0>(_cur)->vertex(_tr->cw(inf))->point(), + std::get<0>(_cur)->vertex( _tr->ccw(inf))->point(), + std::get<0>(_cur)->vertex(_tr->cw(inf))->point(), _target ); if( occw == NEGATIVE ) { - Cell_handle tmp = get<0>(_cur)->neighbor(_tr->cw(inf)); - _prev = Simplex( get<0>(_cur), Tr::EDGE, _tr->ccw(inf), inf ); - _cur = Simplex( tmp, Tr::EDGE, tmp->index( get<0>(_prev)->vertex( get<2>(_prev) ) ), tmp->index( get<0>(_prev)->vertex( get<3>(_prev) ) ) ); + Cell_handle tmp = std::get<0>(_cur)->neighbor(_tr->cw(inf)); + _prev = Simplex( std::get<0>(_cur), Tr::EDGE, _tr->ccw(inf), inf ); + _cur = Simplex( tmp, Tr::EDGE, tmp->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ), tmp->index( std::get<0>(_prev)->vertex( std::get<3>(_prev) ) ) ); return; } Orientation ocw = CGAL::coplanar_orientation( _source, - get<0>(_cur)->vertex( _tr->cw(inf))->point(), - get<0>(_cur)->vertex(_tr->ccw(inf))->point(), + std::get<0>(_cur)->vertex( _tr->cw(inf))->point(), + std::get<0>(_cur)->vertex(_tr->ccw(inf))->point(), _target ); if( ocw == NEGATIVE ) { - Cell_handle tmp = get<0>(_cur)->neighbor(_tr->ccw(inf)); - _prev = Simplex( get<0>(_cur), Tr::EDGE, _tr->cw(inf), inf ); - _cur = Simplex( tmp, Tr::EDGE, tmp->index( get<0>(_prev)->vertex( get<2>(_prev) ) ), tmp->index( get<0>(_prev)->vertex( get<3>(_prev) ) ) ); + Cell_handle tmp = std::get<0>(_cur)->neighbor(_tr->ccw(inf)); + _prev = Simplex( std::get<0>(_cur), Tr::EDGE, _tr->cw(inf), inf ); + _cur = Simplex( tmp, Tr::EDGE, tmp->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ), tmp->index( std::get<0>(_prev)->vertex( std::get<3>(_prev) ) ) ); return; } Orientation op = CGAL::coplanar_orientation( - get<0>(_cur)->vertex( _tr->ccw(inf) )->point(), - get<0>(_cur)->vertex( _tr->cw(inf) )->point(), + std::get<0>(_cur)->vertex( _tr->ccw(inf) )->point(), + std::get<0>(_cur)->vertex( _tr->cw(inf) )->point(), _source, _target ); switch( op ) { case NEGATIVE: if( occw == COLLINEAR ) { - _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr->ccw(inf), -1 ); - _cur = Simplex( fin, Tr::VERTEX, fin->index( get<0>(_prev)->vertex( get<2>(_prev) ) ), -1 ); + _prev = Simplex( std::get<0>(_cur), Tr::VERTEX, _tr->ccw(inf), -1 ); + _cur = Simplex( fin, Tr::VERTEX, fin->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ), -1 ); return; } if( ocw == COLLINEAR ) { - _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr->cw(inf), -1 ); - _cur = Simplex( fin, Tr::VERTEX, fin->index( get<0>(_prev)->vertex( get<2>(_prev) ) ), -1 ); + _prev = Simplex( std::get<0>(_cur), Tr::VERTEX, _tr->cw(inf), -1 ); + _cur = Simplex( fin, Tr::VERTEX, fin->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ), -1 ); return; } - _prev = Simplex( get<0>(_cur), Tr::EDGE, _tr->ccw(inf), _tr->cw(inf) ); - _cur = Simplex( fin, Tr::EDGE, fin->index( get<0>(_prev)->vertex( get<2>(_prev) ) ), fin->index( get<0>(_prev)->vertex( get<3>(_prev) ) ) ); + _prev = Simplex( std::get<0>(_cur), Tr::EDGE, _tr->ccw(inf), _tr->cw(inf) ); + _cur = Simplex( fin, Tr::EDGE, fin->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ), fin->index( std::get<0>(_prev)->vertex( std::get<3>(_prev) ) ) ); return; case COLLINEAR: if( occw == COLLINEAR ) { - _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr->ccw(inf), -1 ); - get<0>(_cur) = Cell_handle(); + _prev = Simplex( std::get<0>(_cur), Tr::VERTEX, _tr->ccw(inf), -1 ); + std::get<0>(_cur) = Cell_handle(); return; } if( ocw == COLLINEAR ) { - _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr->cw(inf), -1 ); - get<0>(_cur) = Cell_handle(); + _prev = Simplex( std::get<0>(_cur), Tr::VERTEX, _tr->cw(inf), -1 ); + std::get<0>(_cur) = Cell_handle(); return; } - _prev = Simplex( get<0>(_cur), Tr::EDGE, _tr->ccw(inf), _tr->cw(inf) ); - get<0>(_cur) = Cell_handle(); + _prev = Simplex( std::get<0>(_cur), Tr::EDGE, _tr->ccw(inf), _tr->cw(inf) ); + std::get<0>(_cur) = Cell_handle(); return; case POSITIVE: - // The target lies in this infinite cell. - _prev = Simplex( get<0>(_cur), Tr::OUTSIDE_CONVEX_HULL, -1, -1 ); - get<0>(_cur) = Cell_handle(); + // The tarstd::std::get lies in this infinite cell. + _prev = Simplex( std::get<0>(_cur), Tr::OUTSIDE_CONVEX_HULL, -1, -1 ); + std::get<0>(_cur) = Cell_handle(); return; } } From a69d3f1188cc6351c76325782d37d0ff48825679 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 6 Apr 2020 13:23:39 +0200 Subject: [PATCH 107/138] replace all the std::get(tuple) by private accessors the code gets easier to read and write --- .../CGAL/Triangulation_segment_traverser_3.h | 46 +- .../Triangulation_segment_traverser_3_impl.h | 396 +++++++++--------- 2 files changed, 229 insertions(+), 213 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 656a25c601c..74bec003c40 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -242,17 +242,6 @@ public: */ const Point& target() const { return _target; } - // gives the current cell. - /* By invariance, this cell is intersected by the segment - * between `source()` and `target()`. - * \return the current cell. - * \sa `handle()`. - */ - const Cell cell() const - { - return *std::get<0>(_cur); - } - // gives a handle to the current cell. /* By invariance, this cell is intersected by the segment * between `source()` and `target()`. @@ -274,7 +263,7 @@ public: */ Cell_handle previous() const { - return std::get<0>(_prev); + return prev_cell(); } // provides a dereference operator. @@ -313,7 +302,7 @@ public: */ bool has_next() const { - return std::get<0>(_cur) != Cell_handle(); + return this->cell() != Cell_handle(); } // gives the simplex through which the current cell was entered. @@ -322,14 +311,14 @@ public: */ void entry( Locate_type& lt, int& li, int& lj ) const { - lt = std::get<1>(_cur); li = std::get<2>(_cur); lj = std::get<3>(_cur); + lt = this->lt(); li = this->li(); lj = this->lj(); } // gives the simplex through which the previous cell was exited. /* \pre the current cell is not the initial cell. */ void exit( Locate_type& lt, int& li, int& lj ) const { - lt = std::get<1>(_prev); li = std::get<2>(_prev); lj = std::get<3>(_prev); + lt = prev_lt(); li = prev_li(); lj = prev_lj(); } // gives the past-the-end iterator associated with this iterator. @@ -464,6 +453,33 @@ private: Edge opposite_edge(Cell_handle c, int li, int lj) const; Edge opposite_edge(const Edge& e) const; + // ref-accessors to the simplex, for use in internal code + // access _cur + Cell_handle& cell() { return std::get<0>(_cur); } + Cell_handle const& cell() const { return std::get<0>(_cur); } + + Locate_type& lt() { return std::get<1>(_cur); } + Locate_type const& lt() const { return std::get<1>(_cur); } + + int& li() { return std::get<2>(_cur); } + int const& li() const { return std::get<2>(_cur); } + + int& lj() { return std::get<3>(_cur); } + int const& lj() const { return std::get<3>(_cur); } + + // access _prev + Cell_handle& prev_cell() { return std::get<0>(_prev); } + Cell_handle const& prev_cell() const { return std::get<0>(_prev); } + + Locate_type& prev_lt() { return std::get<1>(_prev); } + Locate_type const& prev_lt() const { return std::get<1>(_prev); } + + int& prev_li() { return std::get<2>(_prev); } + int const& prev_li() const { return std::get<2>(_prev); } + + int& prev_lj() { return std::get<3>(_prev); } + int const& prev_lj() const { return std::get<3>(_prev); } + }; // class Triangulation_segment_cell_iterator_3 // compares a handle to a cell to a traverser. diff --git a/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h index 36dbc7d2018..7168ffe5aa5 100644 --- a/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h @@ -90,9 +90,9 @@ Triangulation_segment_cell_iterator_3( const Tr* tr, const Point& s, Vertex_hand _s_vertex = Vertex_handle(); _t_vertex = t; - std::get<0>(_cur) = _tr->locate( s, std::get<1>(_cur), std::get<2>(_cur), std::get<3>(_cur), hint ); + cell() = _tr->locate( s, lt(), li(), lj(), hint ); - CGAL_triangulation_postcondition( std::get<0>(_cur) != Cell_handle() ); + CGAL_triangulation_postcondition( cell() != Cell_handle() ); jump_to_intersecting_cell(); } @@ -111,9 +111,9 @@ Triangulation_segment_cell_iterator_3( const Tr* tr, const Point& s, const Point _s_vertex = Vertex_handle(); _t_vertex = Vertex_handle(); - std::get<0>(_cur) = _tr->locate( s, std::get<1>(_cur), std::get<2>(_cur), std::get<3>(_cur), hint ); + cell() = _tr->locate( s, lt(), li(), lj(), hint ); - CGAL_triangulation_postcondition( std::get<0>(_cur) != Cell_handle() ); + CGAL_triangulation_postcondition( cell() != Cell_handle() ); jump_to_intersecting_cell(); } @@ -143,7 +143,7 @@ Triangulation_segment_cell_iterator_3::end() const { template < class Tr, class Inc > inline Triangulation_segment_cell_iterator_3& Triangulation_segment_cell_iterator_3::operator++() { - CGAL_triangulation_precondition( std::get<0>(_cur) != Cell_handle() ); + CGAL_triangulation_precondition( cell() != Cell_handle() ); increment(); return *this; } @@ -161,7 +161,7 @@ inline typename Triangulation_segment_cell_iterator_3::Cell_handle Triangulation_segment_cell_iterator_3::complete() { while( has_next() ) increment(); - return std::get<0>(_prev); + return prev_cell(); } template < class Tr, class Inc > @@ -170,7 +170,7 @@ operator==( const SCI& sci ) const { // To be equal, the iterators must traverse the same triangulations // and they must have the same current cell. return ( _tr == sci._tr && - std::get<0>(_cur) == std::get<0>(sci._cur) ); + cell() == sci.cell() ); } template < class Tr, class Inc > @@ -183,7 +183,7 @@ template < class Tr, class Inc > inline bool Triangulation_segment_cell_iterator_3:: operator==( Nullptr_t CGAL_triangulation_assertion_code(n) ) const { CGAL_triangulation_assertion( n == NULL ); - return std::get<0>(_cur) == Cell_handle(); + return cell() == Cell_handle(); } template < class Tr, class Inc > @@ -197,10 +197,10 @@ void Triangulation_segment_cell_iterator_3:: jump_to_intersecting_cell() { //copy current simplex - Cell_handle ch = std::get<0>(_cur); + Cell_handle ch = cell(); Locate_type lt; - int li, lj; - entry(lt, li, lj); + int li, clj; + entry(lt, li, clj); if (lt == Tr::FACET || lt == Tr::EDGE || lt == Tr::VERTEX) { @@ -215,25 +215,25 @@ jump_to_intersecting_cell() if (lt == Tr::VERTEX) { - std::get<0>(_cur) = new_ch; - //std::get<1>(_cur) is Locate_type and unchanged - std::get<2>(_cur) = new_ch->index(ch->vertex(li)); - //std::get<3>(_cur) is lj and unchanged - CGAL_assertion(std::get<0>(_cur)->vertex(std::get<2>(_cur)) == ch->vertex(li)); + cell() = new_ch; + //lt() is Locate_type and unchanged + this->li() = new_ch->index(ch->vertex(li)); + //lj() is lj and unchanged + CGAL_assertion(cell()->vertex(this->li()) == ch->vertex(li)); } else if (lt == Tr::EDGE) { - std::get<0>(_cur) = new_ch; - //std::get<1>(_cur) is Locate_type and unchanged - std::get<2>(_cur) = new_ch->index(ch->vertex(li)); - std::get<3>(_cur) = new_ch->index(ch->vertex(lj)); + cell() = new_ch; + //lt() is Locate_type and unchanged + this->li() = new_ch->index(ch->vertex(li)); + this->lj() = new_ch->index(ch->vertex(clj)); } else { - std::get<0>(_cur) = new_ch; - //std::get<1>(_cur) is Locate_type and unchanged - std::get<2>(_cur) = new_ch->index(ch); - //std::get<3>(_cur) is lj and unchanged + cell() = new_ch; + //lt() is Locate_type and unchanged + this->li() = new_ch->index(ch); + //lj() is lj and unchanged } } @@ -249,10 +249,10 @@ walk_to_next() { // Check if the target is in the current cell. int ti; - if( std::get<0>(_cur)->has_vertex( _t_vertex, ti ) ) { + if( cell()->has_vertex( _t_vertex, ti ) ) { // The target is inside the cell. - _prev = Simplex( std::get<0>(_cur), Tr::VERTEX, ti, -1 ); - std::get<0>(_cur) = Cell_handle(); + _prev = Simplex( cell(), Tr::VERTEX, ti, -1 ); + cell() = Cell_handle(); return; } @@ -262,7 +262,7 @@ walk_to_next() { switch( _tr->dimension() ) { case 3: { // Infinite cells should be handled differently. - if( std::get<0>(_cur)->has_vertex( _tr->infinite_vertex(), inf ) ) + if( cell()->has_vertex( _tr->infinite_vertex(), inf ) ) walk_to_next_3_inf( inf ); else { @@ -272,14 +272,14 @@ walk_to_next() { _prev = p.first; _cur = p.second; - } while (std::get<0>(_cur) != Cell_handle()//end - && !std::get<0>(_cur)->has_vertex(_tr->infinite_vertex(), inf) + } while (cell() != Cell_handle()//end + && !cell()->has_vertex(_tr->infinite_vertex(), inf) && have_same_entry(backup, _cur)); } break; } case 2: { - if( std::get<0>(_cur)->has_vertex( _tr->infinite_vertex(), inf ) ) + if( cell()->has_vertex( _tr->infinite_vertex(), inf ) ) walk_to_next_2_inf( inf ); else walk_to_next_2(); @@ -289,7 +289,7 @@ walk_to_next() { #ifdef CGAL_TRIANGULATION_3_TRAVERSER_CHECK_INTERSECTION if(_tr->dimension() == 3) { - Cell_handle c = std::get<0>(_cur); + Cell_handle c = cell(); if (c != Cell_handle() && !_tr->is_infinite(c)) //hard to say anything in this case { typename Tr::Segment seg(_source, _target); @@ -649,20 +649,20 @@ template < class Tr, class Inc > void Triangulation_segment_cell_iterator_3:: walk_to_next_3_inf( int inf ) { - CGAL_triangulation_precondition( _tr->is_infinite( std::get<0>(_cur)->vertex(inf) ) ); + CGAL_triangulation_precondition( _tr->is_infinite( cell()->vertex(inf) ) ); // If this cell was reached by traversal from a finite one, it must be the final cell. - Cell_handle fin = std::get<0>(_cur)->neighbor(inf); - if( fin == std::get<0>(_prev) ) { + Cell_handle fin = cell()->neighbor(inf); + if( fin == prev_cell() ) { _prev = _cur; - std::get<0>(_cur) = Cell_handle(); + cell() = Cell_handle(); return; } std::array < Point*, 4> vert; for( int i = 0; i != 4; ++i ) if( i != inf ) - vert[i] = &(std::get<0>(_cur)->vertex(i)->point()); + vert[i] = &(cell()->vertex(i)->point()); vert[inf] = &_target; Orientation o[4]; @@ -670,8 +670,8 @@ walk_to_next_3_inf( int inf ) if( _tr->orientation( *vert[0], *vert[1], *vert[2], *vert[3] ) == POSITIVE ) { // The target lies in an infinite cell. // Note that we do not traverse to other infinite cells. - _prev = Simplex( std::get<0>(_cur), Tr::OUTSIDE_CONVEX_HULL, -1, -1 ); - std::get<0>(_cur) = Cell_handle(); + _prev = Simplex( cell(), Tr::OUTSIDE_CONVEX_HULL, -1, -1 ); + cell() = Cell_handle(); return; } @@ -689,8 +689,8 @@ walk_to_next_3_inf( int inf ) } // Skip the previous cell. - Cell_handle next = std::get<0>(_cur)->neighbor(li); - if( next == std::get<0>(_prev) ) { + Cell_handle next = cell()->neighbor(li); + if( next == prev_cell() ) { o[li] = POSITIVE; continue; } @@ -707,45 +707,45 @@ walk_to_next_3_inf( int inf ) // The target lies behind the plane through the source and two finite vertices. // Traverse to the incident infinite cell. CGAL_triangulation_assertion( _tr->is_infinite( next ) ); - _prev = Simplex( std::get<0>(_cur), Tr::FACET, li, -1 ); - _cur = Simplex( next, Tr::FACET, next->index( std::get<0>(_prev) ), -1 ); + _prev = Simplex( cell(), Tr::FACET, li, -1 ); + _cur = Simplex( next, Tr::FACET, next->index( prev_cell() ), -1 ); return; } // The line enters the convex hull here (or lies on the finite facet). - std::get<0>(_prev) = std::get<0>(_cur); - std::get<0>(_cur) = fin; + prev_cell() = cell(); + cell() = fin; // Check through which simplex the line traverses. switch( o[0]+o[1]+o[2]+o[3] ) { case 3: - std::get<1>(_prev) = Tr::FACET; - std::get<2>(_prev) = inf; - std::get<1>(_cur) = Tr::FACET; - std::get<2>(_cur) = std::get<0>(_cur)->index(std::get<0>(_prev)); + prev_lt() = Tr::FACET; + prev_li() = inf; + lt() = Tr::FACET; + this->li() = cell()->index(prev_cell()); return; case 2: - std::get<1>(_prev) = Tr::EDGE; - std::get<1>(_cur) = Tr::EDGE; + prev_lt() = Tr::EDGE; + lt() = Tr::EDGE; for( int i = 0; i < 4; ++i ) { if( o[i] == COPLANAR && i != inf ) { - Edge opp = opposite_edge( std::get<0>(_prev), inf, i ); - std::get<2>(_prev) = opp.second; - std::get<3>(_prev) = opp.third; - std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ); - std::get<3>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<3>(_prev) ) ); + Edge opp = opposite_edge( prev_cell(), inf, i ); + prev_li() = opp.second; + prev_lj() = opp.third; + this->li() = cell()->index( prev_cell()->vertex( prev_li() ) ); + this->lj() = cell()->index( prev_cell()->vertex( prev_lj() ) ); return; } } CGAL_triangulation_assertion( false ); return; case 1: - std::get<1>(_prev) = Tr::VERTEX; - std::get<1>(_cur) = Tr::VERTEX; + prev_lt() = Tr::VERTEX; + lt() = Tr::VERTEX; for( int i = 0; i < 4; ++i ) { if( o[i] == POSITIVE ) { - std::get<2>(_prev) = i; - std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex(i) ); + prev_li() = i; + this->li() = cell()->index( prev_cell()->vertex(i) ); return; } } @@ -762,52 +762,52 @@ void Triangulation_segment_cell_iterator_3:: walk_to_next_2() { std::array vert - = { &(std::get<0>(_cur)->vertex(0)->point()), - &(std::get<0>(_cur)->vertex(1)->point()), - &(std::get<0>(_cur)->vertex(2)->point()) }; + = { &(cell()->vertex(0)->point()), + &(cell()->vertex(1)->point()), + &(cell()->vertex(2)->point()) }; - switch( std::get<1>(_cur) ) { + switch( lt() ) { case Tr::VERTEX: { // First we try the incident edges. - Orientation ocw = CGAL::coplanar_orientation( *vert[std::get<2>(_cur)], *vert[_tr->cw(std::get<2>(_cur))], *vert[_tr->ccw(std::get<2>(_cur))], _target ); - if( std::get<0>(_cur)->neighbor( _tr->ccw(std::get<2>(_cur)) ) != std::get<0>(_prev) && ocw == NEGATIVE) { - Cell_handle tmp = std::get<0>(_cur)->neighbor( _tr->ccw(std::get<2>(_cur)) ); + Orientation ocw = CGAL::coplanar_orientation( *vert[li()], *vert[_tr->cw(li())], *vert[_tr->ccw(li())], _target ); + if( cell()->neighbor( _tr->ccw(li()) ) != prev_cell() && ocw == NEGATIVE) { + Cell_handle tmp = cell()->neighbor( _tr->ccw(li()) ); _prev = _cur; - std::get<0>(_cur) = tmp; - std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex(std::get<2>(_cur)) ); + cell() = tmp; + li() = cell()->index( prev_cell()->vertex(li()) ); return; } - Orientation occw = CGAL::coplanar_orientation( *vert[std::get<2>(_cur)], *vert[_tr->ccw(std::get<2>(_cur))], *vert[_tr->cw(std::get<2>(_cur))], _target ); - if( std::get<0>(_cur)->neighbor( _tr->cw(std::get<2>(_cur)) ) != std::get<0>(_prev) && occw == NEGATIVE) { - Cell_handle tmp = std::get<0>(_cur)->neighbor( _tr->cw(std::get<2>(_cur)) ); + Orientation occw = CGAL::coplanar_orientation( *vert[li()], *vert[_tr->ccw(li())], *vert[_tr->cw(li())], _target ); + if( cell()->neighbor( _tr->cw(li()) ) != prev_cell() && occw == NEGATIVE) { + Cell_handle tmp = cell()->neighbor( _tr->cw(li()) ); _prev = _cur; - std::get<0>(_cur) = tmp; - std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex(std::get<2>(_cur)) ); + cell() = tmp; + li() = cell()->index( prev_cell()->vertex(li()) ); return; } // Then we try the opposite edge. - Orientation op = CGAL::coplanar_orientation( *vert[_tr->ccw(std::get<2>(_cur))], *vert[_tr->cw(std::get<2>(_cur))], *vert[std::get<2>(_cur)], _target ); + Orientation op = CGAL::coplanar_orientation( *vert[_tr->ccw(li())], *vert[_tr->cw(li())], *vert[li()], _target ); if( op == NEGATIVE) { - Cell_handle tmp = std::get<0>(_cur)->neighbor(std::get<2>(_cur)); - std::get<0>(_prev) = std::get<0>(_cur); - std::get<0>(_cur) = tmp; + Cell_handle tmp = cell()->neighbor(li()); + prev_cell() = cell(); + cell() = tmp; switch( ocw+occw ) { case 2: - std::get<1>(_prev) = Tr::EDGE; - std::get<2>(_prev) = _tr->ccw( std::get<2>(_cur) ); - std::get<3>(_prev) = _tr->cw( std::get<2>(_cur) ); - std::get<1>(_cur) = Tr::EDGE; - std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ); - std::get<3>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<3>(_prev) ) ); + prev_lt() = Tr::EDGE; + prev_li() = _tr->ccw( li() ); + prev_lj() = _tr->cw( li() ); + lt() = Tr::EDGE; + li() = cell()->index( prev_cell()->vertex( prev_li() ) ); + lj() = cell()->index( prev_cell()->vertex( prev_lj() ) ); return; case 1: - std::get<1>(_prev) = Tr::VERTEX; - std::get<1>(_cur) = Tr::VERTEX; - if( ocw == COLLINEAR ) std::get<2>(_prev) = _tr->cw( std::get<2>(_cur) ); - else std::get<2>(_cur) = _tr->ccw( std::get<2>(_cur) ); - std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ); + prev_lt() = Tr::VERTEX; + lt() = Tr::VERTEX; + if( ocw == COLLINEAR ) prev_li() = _tr->cw( li() ); + else li() = _tr->ccw( li() ); + li() = cell()->index( prev_cell()->vertex( prev_li() ) ); return; default: // The current vertex is the target. @@ -819,49 +819,49 @@ walk_to_next_2() // The target lies in this cell. switch( ocw+occw+op ) { case 3: - _prev = Simplex( std::get<0>(_cur), Tr::FACET, 3, -1 ); + _prev = Simplex( cell(), Tr::FACET, 3, -1 ); break; case 2: if( ocw == 0 ) - _prev = Simplex( std::get<0>(_cur), Tr::EDGE, _tr->ccw(std::get<2>(_cur)), -1 ); + _prev = Simplex( cell(), Tr::EDGE, _tr->ccw(li()), -1 ); else if( occw == 0 ) - _prev = Simplex( std::get<0>(_cur), Tr::EDGE, _tr->cw(std::get<2>(_cur)), -1 ); + _prev = Simplex( cell(), Tr::EDGE, _tr->cw(li()), -1 ); else - _prev = Simplex( std::get<0>(_cur), Tr::EDGE, std::get<2>(_cur), -1 ); + _prev = Simplex( cell(), Tr::EDGE, li(), -1 ); break; case 1: if( ocw == 1 ) - _prev = Simplex( std::get<0>(_cur), Tr::VERTEX, _tr->ccw(std::get<2>(_cur)), -1 ); + _prev = Simplex( cell(), Tr::VERTEX, _tr->ccw(li()), -1 ); else if( occw == 1 ) - _prev = Simplex( std::get<0>(_cur), Tr::VERTEX, _tr->cw(std::get<2>(_cur)), -1 ); + _prev = Simplex( cell(), Tr::VERTEX, _tr->cw(li()), -1 ); else - _prev = Simplex( std::get<0>(_cur), Tr::VERTEX, std::get<2>(_cur), -1 ); + _prev = Simplex( cell(), Tr::VERTEX, li(), -1 ); break; case 0: CGAL_triangulation_assertion(false); - _prev = Simplex( std::get<0>(_cur), Tr::OUTSIDE_AFFINE_HULL, -1, -1 ); + _prev = Simplex( cell(), Tr::OUTSIDE_AFFINE_HULL, -1, -1 ); break; } - std::get<0>(_cur) = Cell_handle(); + cell() = Cell_handle(); return; } case Tr::EDGE: { - int lk = 3 - std::get<2>(_cur) - std::get<3>(_cur); + int lk = 3 - li() - lj(); - if( std::get<0>(_cur)->neighbor(lk) != std::get<0>(_prev) ) { + if( cell()->neighbor(lk) != prev_cell() ) { // Check the edge itself - switch( CGAL::coplanar_orientation( *vert[std::get<2>(_cur)], *vert[std::get<3>(_cur)], *vert[lk], _target ) ) { + switch( CGAL::coplanar_orientation( *vert[li()], *vert[lj()], *vert[lk], _target ) ) { //_prev = _cur; //code not reached case COLLINEAR: // The target lies in this cell. - std::get<0>(_cur) = Cell_handle(); + cell() = Cell_handle(); return; case NEGATIVE: { // The target lies opposite of the edge. - Cell_handle tmp = std::get<0>(_cur)->neighbor(lk); - std::get<0>(_cur) = tmp; - std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex(std::get<2>(_cur)) ); - std::get<3>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex(std::get<3>(_cur)) ); + Cell_handle tmp = cell()->neighbor(lk); + cell() = tmp; + li() = cell()->index( prev_cell()->vertex(li()) ); + lj() = cell()->index( prev_cell()->vertex(lj()) ); return; } default: @@ -869,30 +869,30 @@ walk_to_next_2() } } - Orientation o = CGAL::coplanar_orientation( _source, *vert[lk], *vert[std::get<2>(_cur)], _target ); + Orientation o = CGAL::coplanar_orientation( _source, *vert[lk], *vert[li()], _target ); Orientation op; switch( o ) { case POSITIVE: { // The ray passes through the edge ik. - op = CGAL::coplanar_orientation( *vert[lk], *vert[std::get<2>(_cur)], _source, _target ); + op = CGAL::coplanar_orientation( *vert[lk], *vert[li()], _source, _target ); if( op == NEGATIVE ) { - Cell_handle tmp = std::get<0>(_cur)->neighbor(std::get<3>(_cur)); - std::get<0>(_prev) = std::get<0>(_cur); - std::get<0>(_cur) = tmp; + Cell_handle tmp = cell()->neighbor(lj()); + prev_cell() = cell(); + cell() = tmp; - if( CGAL::collinear( _source, *vert[std::get<2>(_cur)], _target ) ) { - std::get<1>(_prev) = Tr::VERTEX; - std::get<2>(_prev) = std::get<2>(_cur); - std::get<1>(_cur) = Tr::VERTEX; - std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ); + if( CGAL::collinear( _source, *vert[li()], _target ) ) { + prev_lt() = Tr::VERTEX; + prev_li() = li(); + lt() = Tr::VERTEX; + li() = cell()->index( prev_cell()->vertex( prev_li() ) ); } else { - std::get<1>(_prev) = Tr::EDGE; - std::get<2>(_prev) = std::get<2>(_cur); - std::get<3>(_prev) = lk; - std::get<1>(_cur) = Tr::EDGE; - std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ); - std::get<3>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<3>(_prev) ) ); + prev_lt() = Tr::EDGE; + prev_li() = li(); + prev_lj() = lk; + lt() = Tr::EDGE; + li() = cell()->index( prev_cell()->vertex( prev_li() ) ); + lj() = cell()->index( prev_cell()->vertex( prev_lj() ) ); } return; } @@ -900,31 +900,31 @@ walk_to_next_2() } default: { // The ray passes through the edge jk. - op = CGAL::coplanar_orientation( *vert[lk], *vert[std::get<3>(_cur)], _source, _target ); + op = CGAL::coplanar_orientation( *vert[lk], *vert[lj()], _source, _target ); if( op == NEGATIVE ) { - Cell_handle tmp = std::get<0>(_cur)->neighbor(std::get<2>(_cur)); - std::get<0>(_prev) = std::get<0>(_cur); - std::get<0>(_cur) = tmp; + Cell_handle tmp = cell()->neighbor(li()); + prev_cell() = cell(); + cell() = tmp; - if( CGAL::collinear( _source, *vert[std::get<3>(_cur)], _target ) ) { - std::get<1>(_prev) = Tr::VERTEX; - std::get<2>(_prev) = std::get<3>(_cur); - std::get<1>(_cur) = Tr::VERTEX; - std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ); + if( CGAL::collinear( _source, *vert[lj()], _target ) ) { + prev_lt() = Tr::VERTEX; + prev_li() = lj(); + lt() = Tr::VERTEX; + li() = cell()->index( prev_cell()->vertex( prev_li() ) ); } else if( o == COLLINEAR ) { - std::get<1>(_prev) = Tr::VERTEX; - std::get<2>(_prev) = lk; - std::get<1>(_cur) = Tr::VERTEX; - std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ); + prev_lt() = Tr::VERTEX; + prev_li() = lk; + lt() = Tr::VERTEX; + li() = cell()->index( prev_cell()->vertex( prev_li() ) ); } else { - std::get<1>(_prev) = Tr::EDGE; - std::get<2>(_prev) = lk; - std::get<3>(_prev) = std::get<3>(_cur); - std::get<1>(_cur) = Tr::EDGE; - std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ); - std::get<3>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ); + prev_lt() = Tr::EDGE; + prev_li() = lk; + prev_lj() = lj(); + lt() = Tr::EDGE; + li() = cell()->index( prev_cell()->vertex( prev_li() ) ); + lj() = cell()->index( prev_cell()->vertex( prev_li() ) ); } return; } @@ -934,22 +934,22 @@ walk_to_next_2() // The target lies in this cell. if( op == POSITIVE ) - _prev = Simplex( std::get<0>(_cur), Tr::FACET, 3, -1 ); + _prev = Simplex( cell(), Tr::FACET, 3, -1 ); else { CGAL_triangulation_assertion( op == ZERO ); switch( o ) { case POSITIVE: - _prev = Simplex( std::get<0>(_cur), Tr::EDGE, std::get<2>(_cur), lk ); + _prev = Simplex( cell(), Tr::EDGE, li(), lk ); break; case NEGATIVE: - _prev = Simplex( std::get<0>(_cur), Tr::EDGE, std::get<3>(_cur), lk ); + _prev = Simplex( cell(), Tr::EDGE, lj(), lk ); break; case ZERO: - _prev = Simplex( std::get<0>(_cur), Tr::VERTEX, lk, -1 ); + _prev = Simplex( cell(), Tr::VERTEX, lk, -1 ); break; } } - std::get<0>(_cur) = Cell_handle(); + cell() = Cell_handle(); return; } case Tr::FACET: { @@ -959,8 +959,8 @@ walk_to_next_2() bool calc[3] = { false, false, false }; for( int j = 0; j != 3; ++j, li = _tr->ccw(li) ) { - Cell_handle next = std::get<0>(_cur)->neighbor(li); - if( next == std::get<0>(_prev) ) + Cell_handle next = cell()->neighbor(li); + if( next == prev_cell() ) continue; // The target should lie on the other side of the edge. @@ -976,8 +976,8 @@ walk_to_next_2() if( o[_tr->ccw(li)] == NEGATIVE ) continue; else if( op == COLLINEAR && o[_tr->ccw(li)] == COLLINEAR ) { - _prev = Simplex( std::get<0>(_cur), Tr::VERTEX, _tr->ccw(li), -1 ); - std::get<0>(_cur) = Cell_handle(); + _prev = Simplex( cell(), Tr::VERTEX, _tr->ccw(li), -1 ); + cell() = Cell_handle(); return; } @@ -988,29 +988,29 @@ walk_to_next_2() if( o[_tr->cw(li)] == POSITIVE ) continue; else if( op == COLLINEAR && o[_tr->cw(li)] == COLLINEAR ) { - _prev = Simplex( std::get<0>(_cur), Tr::VERTEX, _tr->cw(li), -1 ); - std::get<0>(_cur) = Cell_handle(); + _prev = Simplex( cell(), Tr::VERTEX, _tr->cw(li), -1 ); + cell() = Cell_handle(); return; } - std::get<0>(_prev) = std::get<0>(_cur); - std::get<0>(_cur) = next; + prev_cell() = cell(); + cell() = next; switch( o[_tr->ccw(li)] + o[_tr->cw(li)] ) { case 2: - std::get<1>(_prev) = Tr::EDGE; - std::get<2>(_prev) = _tr->ccw(li); - std::get<3>(_prev) = _tr->cw(li); - std::get<1>(_cur) = Tr::EDGE; - std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( _tr->ccw(li) ) ); - std::get<3>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( _tr->cw(li) ) ); + prev_lt() = Tr::EDGE; + prev_li() = _tr->ccw(li); + prev_lj() = _tr->cw(li); + lt() = Tr::EDGE; + this->li() = cell()->index( prev_cell()->vertex( _tr->ccw(li) ) ); + this->lj() = cell()->index( prev_cell()->vertex( _tr->cw(li) ) ); return; case 1: - std::get<1>(_prev) = Tr::VERTEX; - std::get<1>(_cur) = Tr::VERTEX; - if( o[_tr->ccw(li)] == COLLINEAR ) std::get<2>(_prev) = _tr->ccw(li); - else std::get<2>(_prev) = _tr->cw(li); - std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ); + prev_lt() = Tr::VERTEX; + this->lt() = Tr::VERTEX; + if( o[_tr->ccw(li)] == COLLINEAR ) prev_li() = _tr->ccw(li); + else prev_li() = _tr->cw(li); + this->li() = cell()->index( prev_cell()->vertex( prev_li() ) ); return; default: CGAL_triangulation_assertion( false ); @@ -1019,8 +1019,8 @@ walk_to_next_2() } // The target lies in this cell. - _prev = Simplex( std::get<0>(_cur), Tr::FACET, 3, -1 ); - std::get<0>(_cur) = Cell_handle(); + _prev = Simplex( cell(), Tr::FACET, 3, -1 ); + cell() = Cell_handle(); return; } default: @@ -1032,75 +1032,75 @@ template < class Tr, class Inc > void Triangulation_segment_cell_iterator_3:: walk_to_next_2_inf( int inf ) { - CGAL_triangulation_precondition( _tr->is_infinite( std::get<0>(_cur)->vertex(3) ) ); - CGAL_triangulation_precondition( _tr->is_infinite( std::get<0>(_cur)->vertex(inf) ) ); + CGAL_triangulation_precondition( _tr->is_infinite( cell()->vertex(3) ) ); + CGAL_triangulation_precondition( _tr->is_infinite( cell()->vertex(inf) ) ); // If this cell was reached by traversal from a finite one, it must be the final cell. - Cell_handle fin = std::get<0>(_cur)->neighbor(inf); - if (fin == std::get<0>(_prev)) { + Cell_handle fin = cell()->neighbor(inf); + if (fin == prev_cell()) { _prev = _cur; - std::get<0>(_cur) = Cell_handle(); + cell() = Cell_handle(); return; } // Check the neighboring cells. Orientation occw = CGAL::coplanar_orientation( _source, - std::get<0>(_cur)->vertex( _tr->ccw(inf))->point(), - std::get<0>(_cur)->vertex(_tr->cw(inf))->point(), + cell()->vertex( _tr->ccw(inf))->point(), + cell()->vertex(_tr->cw(inf))->point(), _target ); if( occw == NEGATIVE ) { - Cell_handle tmp = std::get<0>(_cur)->neighbor(_tr->cw(inf)); - _prev = Simplex( std::get<0>(_cur), Tr::EDGE, _tr->ccw(inf), inf ); - _cur = Simplex( tmp, Tr::EDGE, tmp->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ), tmp->index( std::get<0>(_prev)->vertex( std::get<3>(_prev) ) ) ); + Cell_handle tmp = cell()->neighbor(_tr->cw(inf)); + _prev = Simplex( cell(), Tr::EDGE, _tr->ccw(inf), inf ); + _cur = Simplex( tmp, Tr::EDGE, tmp->index( prev_cell()->vertex( prev_li() ) ), tmp->index( prev_cell()->vertex( prev_lj() ) ) ); return; } Orientation ocw = CGAL::coplanar_orientation( _source, - std::get<0>(_cur)->vertex( _tr->cw(inf))->point(), - std::get<0>(_cur)->vertex(_tr->ccw(inf))->point(), + cell()->vertex( _tr->cw(inf))->point(), + cell()->vertex(_tr->ccw(inf))->point(), _target ); if( ocw == NEGATIVE ) { - Cell_handle tmp = std::get<0>(_cur)->neighbor(_tr->ccw(inf)); - _prev = Simplex( std::get<0>(_cur), Tr::EDGE, _tr->cw(inf), inf ); - _cur = Simplex( tmp, Tr::EDGE, tmp->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ), tmp->index( std::get<0>(_prev)->vertex( std::get<3>(_prev) ) ) ); + Cell_handle tmp = cell()->neighbor(_tr->ccw(inf)); + _prev = Simplex( cell(), Tr::EDGE, _tr->cw(inf), inf ); + _cur = Simplex( tmp, Tr::EDGE, tmp->index( prev_cell()->vertex( prev_li() ) ), tmp->index( prev_cell()->vertex( prev_lj() ) ) ); return; } Orientation op = CGAL::coplanar_orientation( - std::get<0>(_cur)->vertex( _tr->ccw(inf) )->point(), - std::get<0>(_cur)->vertex( _tr->cw(inf) )->point(), + cell()->vertex( _tr->ccw(inf) )->point(), + cell()->vertex( _tr->cw(inf) )->point(), _source, _target ); switch( op ) { case NEGATIVE: if( occw == COLLINEAR ) { - _prev = Simplex( std::get<0>(_cur), Tr::VERTEX, _tr->ccw(inf), -1 ); - _cur = Simplex( fin, Tr::VERTEX, fin->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ), -1 ); + _prev = Simplex( cell(), Tr::VERTEX, _tr->ccw(inf), -1 ); + _cur = Simplex( fin, Tr::VERTEX, fin->index( prev_cell()->vertex( prev_li() ) ), -1 ); return; } if( ocw == COLLINEAR ) { - _prev = Simplex( std::get<0>(_cur), Tr::VERTEX, _tr->cw(inf), -1 ); - _cur = Simplex( fin, Tr::VERTEX, fin->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ), -1 ); + _prev = Simplex( cell(), Tr::VERTEX, _tr->cw(inf), -1 ); + _cur = Simplex( fin, Tr::VERTEX, fin->index( prev_cell()->vertex( prev_li() ) ), -1 ); return; } - _prev = Simplex( std::get<0>(_cur), Tr::EDGE, _tr->ccw(inf), _tr->cw(inf) ); - _cur = Simplex( fin, Tr::EDGE, fin->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ), fin->index( std::get<0>(_prev)->vertex( std::get<3>(_prev) ) ) ); + _prev = Simplex( cell(), Tr::EDGE, _tr->ccw(inf), _tr->cw(inf) ); + _cur = Simplex( fin, Tr::EDGE, fin->index( prev_cell()->vertex( prev_li() ) ), fin->index( prev_cell()->vertex( prev_lj() ) ) ); return; case COLLINEAR: if( occw == COLLINEAR ) { - _prev = Simplex( std::get<0>(_cur), Tr::VERTEX, _tr->ccw(inf), -1 ); - std::get<0>(_cur) = Cell_handle(); + _prev = Simplex( cell(), Tr::VERTEX, _tr->ccw(inf), -1 ); + cell() = Cell_handle(); return; } if( ocw == COLLINEAR ) { - _prev = Simplex( std::get<0>(_cur), Tr::VERTEX, _tr->cw(inf), -1 ); - std::get<0>(_cur) = Cell_handle(); + _prev = Simplex( cell(), Tr::VERTEX, _tr->cw(inf), -1 ); + cell() = Cell_handle(); return; } - _prev = Simplex( std::get<0>(_cur), Tr::EDGE, _tr->ccw(inf), _tr->cw(inf) ); - std::get<0>(_cur) = Cell_handle(); + _prev = Simplex( cell(), Tr::EDGE, _tr->ccw(inf), _tr->cw(inf) ); + cell() = Cell_handle(); return; case POSITIVE: // The tarstd::std::get lies in this infinite cell. - _prev = Simplex( std::get<0>(_cur), Tr::OUTSIDE_CONVEX_HULL, -1, -1 ); - std::get<0>(_cur) = Cell_handle(); + _prev = Simplex( cell(), Tr::OUTSIDE_CONVEX_HULL, -1, -1 ); + cell() = Cell_handle(); return; } } From 163f3c59fbd6bf6c57867dcf40e438f64f1148e9 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 7 Apr 2020 07:05:19 +0200 Subject: [PATCH 108/138] add range iterators --- .../Triangulation_3/CGAL/Triangulation_3.h | 23 +++- .../examples/Triangulation_3/CMakeLists.txt | 2 +- .../segment_cell_traverser_3.cpp | 115 ++++++++++++++++++ .../segment_simplex_traverser_3.cpp | 108 ++++++++-------- .../Triangulation_3/segment_traverser_3.cpp | 101 --------------- .../include/CGAL/Triangulation_3.h | 33 +++++ .../test_segment_cell_traverser_3.cpp | 21 +++- 7 files changed, 250 insertions(+), 153 deletions(-) create mode 100644 Triangulation_3/examples/Triangulation_3/segment_cell_traverser_3.cpp delete mode 100644 Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h index 3a98e391179..4bc5c0ca5be 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h @@ -297,6 +297,17 @@ that has as value type `Vertex_handle`. range type for iterating over the points of the finite vertices. */ typedef Iterator_range Points; + +/*! + range type for iterating over the cells intersected by a line segment. +*/ + typedef Iterator_range Segment_traverser_cell_handles; + +/*! + range type for iterating over the simplices intersected by a line segment. +*/ + typedef Iterator_range Segment_traverser_simplices; + /// @} /// \name Creation @@ -1295,7 +1306,17 @@ Finite_vertex_handles finite_vertex_handles() const; returns a range of iterators over the points of finite vertices. */ Points points() const; - + +/*! + returns a range of iterators over the cells intersected by a line segment +*/ +Segment_traverser_cell_handles segment_traverser_cell_handles() const; + +/*! + returns a range of iterators over the simplices intersected by a line segment +*/ +Segment_traverser_simplices segment_traverser_simplices() const; + /// @} diff --git a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt index b8d7e6b4316..275ccbd62ec 100644 --- a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt @@ -31,7 +31,7 @@ if ( CGAL_FOUND ) create_single_source_cgal_program( "info_insert_with_transform_iterator.cpp" ) create_single_source_cgal_program( "info_insert_with_zip_iterator.cpp" ) create_single_source_cgal_program( "regular_3.cpp" ) - create_single_source_cgal_program( "segment_traverser_3.cpp" ) + create_single_source_cgal_program( "segment_cell_traverser_3.cpp" ) create_single_source_cgal_program( "segment_simplex_traverser_3.cpp" ) create_single_source_cgal_program( "regular_with_info_3.cpp" ) create_single_source_cgal_program( "simple_triangulation_3.cpp" ) diff --git a/Triangulation_3/examples/Triangulation_3/segment_cell_traverser_3.cpp b/Triangulation_3/examples/Triangulation_3/segment_cell_traverser_3.cpp new file mode 100644 index 00000000000..a2254c6b135 --- /dev/null +++ b/Triangulation_3/examples/Triangulation_3/segment_cell_traverser_3.cpp @@ -0,0 +1,115 @@ + +#include +#include + +#include +#include +#include +#include + +#include +#include + + +// Define the kernel. +typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; +typedef Kernel::Point_3 Point_3; + +// Define the structure. +typedef CGAL::Delaunay_triangulation_3< Kernel > DT; +typedef DT::Cell_handle Cell_handle; +typedef DT::Segment_cell_iterator Segment_cell_iterator; + +int main(int argc, char* argv[]) +{ + const char* fname = (argc>1) ? argv[1] : "data/blobby.xyz"; + + std::vector points; + std::ifstream stream(fname); + if (!stream || + !CGAL::read_xyz_points(stream, std::back_inserter(points))) + { + std::cerr << "Error: cannot read file " << fname << std::endl; + return EXIT_FAILURE; + } + + //bbox + double xmin = points[0].x(); + double xmax = points[0].x(); + double ymin = points[0].y(); + double ymax = points[0].y(); + double zmin = points[0].z(); + double zmax = points[0].z(); + + for(const Point_3& p : points) + { + xmin = (std::min)(xmin, p.x()); + ymin = (std::min)(ymin, p.y()); + zmin = (std::min)(zmin, p.z()); + xmax = (std::max)(xmax, p.x()); + ymax = (std::max)(ymax, p.y()); + zmax = (std::max)(zmax, p.z()); + } + + // Construct the Delaunay triangulation. + DT dt( points.begin(), points.end() ); + assert( dt.is_valid() ); + + CGAL::Random rng; + std::cout << "Random seed is " << CGAL::get_default_random().get_seed() << std::endl; + + //////////////////////////////////////////////////////////// + // Construct a traverser and use begin/end iterators + //////////////////////////////////////////////////////////// + Point_3 p1(rng.get_double(xmin, xmax), + rng.get_double(ymin, ymax), + rng.get_double(zmin, zmax)); + Point_3 p2(rng.get_double(xmin, xmax), + rng.get_double(ymin, ymax), + rng.get_double(zmin, zmax)); + + Segment_cell_iterator ct = dt.segment_traverser_cells_begin(p1, p2); + Segment_cell_iterator ctend = dt.segment_traverser_cells_end(); + + // Count the number of finite cells traversed. + unsigned int inf = 0, fin = 0; + for( ; ct != ctend; ++ct ) + { + if( dt.is_infinite(ct) ) + ++inf; + else + ++fin; + } + + std::cout << "While traversing from " << p1 << " to " << p2 << std::endl; + std::cout << inf << " infinite and " + << fin << " finite cells were visited." << std::endl; + std::cout << std::endl << std::endl; + + //////////////////////////////////////////////////////////// + // Construct a traverser and use range-iterator + //////////////////////////////////////////////////////////// + Point_3 p3(rng.get_double(xmin, xmax), + rng.get_double(ymin, ymax), + rng.get_double(zmin, zmax)); + Point_3 p4(rng.get_double(xmin, xmax), + rng.get_double(ymin, ymax), + rng.get_double(zmin, zmax)); + + // Count the number of finite cells traversed. + inf = 0, fin = 0; + for (const Cell_handle ch : dt.segment_traverser_cell_handles(p3, p4)) + { + if (dt.is_infinite(ch)) + ++inf; + else + ++fin; + } + + std::cout << "While traversing from " << p3 << " to " << p4 << std::endl; + std::cout << inf << " infinite and " + << fin << " finite cells were visited." << std::endl; + std::cout << std::endl << std::endl; + + return 0; +} diff --git a/Triangulation_3/examples/Triangulation_3/segment_simplex_traverser_3.cpp b/Triangulation_3/examples/Triangulation_3/segment_simplex_traverser_3.cpp index fef102e449b..366fb26b1a9 100644 --- a/Triangulation_3/examples/Triangulation_3/segment_simplex_traverser_3.cpp +++ b/Triangulation_3/examples/Triangulation_3/segment_simplex_traverser_3.cpp @@ -16,17 +16,13 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; typedef Kernel::Point_3 Point_3; // Define the structure. -typedef CGAL::Delaunay_triangulation_3< Kernel > DT; -typedef DT::Segment_simplex_iterator Segment_simplex_iterator; +typedef CGAL::Delaunay_triangulation_3 DT; +typedef DT::Segment_simplex_iterator Segment_simplex_iterator; +typedef CGAL::Triangulation_simplex_3 Simplex; int main(int argc, char* argv[]) { const char* fname = (argc>1) ? argv[1] : "data/blobby.xyz"; - int nb_seg = (argc > 2) ? atoi(argv[2]) : 100; - - // Reads a .xyz point set file in points. - // As the point is the second element of the tuple (that is with index 1) - // we use a property map that accesses the 1st element of the tuple. std::vector points; std::ifstream stream(fname); @@ -37,58 +33,72 @@ int main(int argc, char* argv[]) return EXIT_FAILURE; } - // Construct the Delaunay triangulation. - DT dt( points.begin(), points.end() ); - assert( dt.is_valid() ); + // Construct the Delaunay triangulation. + DT dt( points.begin(), points.end() ); + assert( dt.is_valid() ); - CGAL::Random rng; - std::cout << "Random seed is " << CGAL::get_default_random().get_seed() << std::endl; + CGAL::Random rng; + std::cout << "Random seed is " << CGAL::get_default_random().get_seed() << std::endl; - unsigned int nb_cells = 0, nb_facets = 0, nb_edges = 0, nb_vertex = 0; + unsigned int nb_cells = 0, nb_facets = 0, nb_edges = 0, nb_vertex = 0; - for (int i = 0; i < nb_seg; ++i) - { - // Construct a traverser. - Point_3 p1(rng.get_double(-0.48, 0.31), - rng.get_double(-0.22, 0.22), - rng.get_double(-0.19, 0.19)); - Point_3 p2(rng.get_double(-0.48, 0.31), - rng.get_double(-0.22, 0.22), - rng.get_double(-0.19, 0.19)); + //////////////////////////////////////////////////////////// + // Construct a traverser and use begin/end iterators + //////////////////////////////////////////////////////////// + Point_3 p1(rng.get_double(-0.48, 0.31), + rng.get_double(-0.22, 0.22), + rng.get_double(-0.19, 0.19)); + Point_3 p2(rng.get_double(-0.48, 0.31), + rng.get_double(-0.22, 0.22), + rng.get_double(-0.19, 0.19)); + + Segment_simplex_iterator st = dt.segment_traverser_simplices_begin(p1, p2); + Segment_simplex_iterator stend = dt.segment_traverser_simplices_end(); + + for (; st != stend; ++st) + { + if (st->dimension() == 3) ++nb_cells; + else if (st->dimension() == 2) ++nb_facets; + else if (st->dimension() == 1) ++nb_edges; + else if (st->dimension() == 0) ++nb_vertex; + } #ifdef CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE - std::cout << "Traverser " << (i + 1) - << "\n\t(" << p1 - << ")\n\t(" << p2 << ")" << std::endl; + std::cout << "While traversing from " << p1 << " to " << p2 << std::endl; + std::cout << "\tcells : " << nb_cells << std::endl; + std::cout << "\tfacets : " << nb_facets << std::endl; + std::cout << "\tedges : " << nb_edges << std::endl; + std::cout << "\tvertices : " << nb_vertex << std::endl; + std::cout << std::endl << std::endl; #endif - Segment_simplex_iterator st = dt.segment_traverser_simplices_begin(p1, p2); - Segment_simplex_iterator stend = dt.segment_traverser_simplices_end(); + //////////////////////////////////////////////////////////// + // Construct a traverser and use range-iterator + //////////////////////////////////////////////////////////// + Point_3 p3(rng.get_double(-0.48, 0.31), + rng.get_double(-0.22, 0.22), + rng.get_double(-0.19, 0.19)); + Point_3 p4(rng.get_double(-0.48, 0.31), + rng.get_double(-0.22, 0.22), + rng.get_double(-0.19, 0.19)); - for (; st != stend; ++st) - { - if (st->dimension() == 3) ++nb_cells; - else if (st->dimension() == 2) ++nb_facets; - else if (st->dimension() == 1) ++nb_edges; - else if (st->dimension() == 0) ++nb_vertex; - } + nb_cells = 0, nb_facets = 0, nb_edges = 0, nb_vertex = 0; + for (const Simplex& s : dt.segment_traverser_simplices(p3, p4)) + { + if (s.dimension() == 3) ++nb_cells; + else if (s.dimension() == 2) ++nb_facets; + else if (s.dimension() == 1) ++nb_edges; + else if (s.dimension() == 0) ++nb_vertex; + } #ifdef CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE - std::cout << "While traversing from " << st.source() - << " to " << st.target() << std::endl; - std::cout << "\tfacets : " << nb_facets << std::endl; - std::cout << "\tedges : " << nb_edges << std::endl; - std::cout << "\tvertices : " << nb_vertex << std::endl; - std::cout << std::endl << std::endl; + std::cout << "While traversing from " << p3 << " to " << p4 << std::endl; + std::cout << "\tcells : " << nb_cells << std::endl; + std::cout << "\tfacets : " << nb_facets << std::endl; + std::cout << "\tedges : " << nb_edges << std::endl; + std::cout << "\tvertices : " << nb_vertex << std::endl; + std::cout << std::endl << std::endl; #endif - } - std::cout << "Traversing simplices of triangulation with " - << nb_seg << " segments :" << std::endl; - std::cout << "\tnb cells : " << nb_cells << std::endl; - std::cout << "\tnb facets : " << nb_facets << std::endl; - std::cout << "\tnb edges : " << nb_edges << std::endl; - std::cout << "\tnb vertices : " << nb_vertex << std::endl; - - return 0; + return 0; } diff --git a/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp b/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp deleted file mode 100644 index 21d44a5604f..00000000000 --- a/Triangulation_3/examples/Triangulation_3/segment_traverser_3.cpp +++ /dev/null @@ -1,101 +0,0 @@ - -#include -#include - -#include -#include -#include -#include - -#include -#include - - -// Define the kernel. -typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; -typedef Kernel::Point_3 Point_3; - -// Define the structure. -typedef CGAL::Delaunay_triangulation_3< Kernel > DT; -typedef DT::Cell_handle Cell_handle; -typedef DT::Segment_cell_iterator Segment_cell_iterator; - -int main(int argc, char* argv[]) -{ - const char* fname = (argc>1) ? argv[1] : "data/blobby.xyz"; - unsigned int nb_seg = (argc > 2) ? static_cast(atoi(argv[2])) - : 100; - - // Reads a .xyz point set file in points. - // As the point is the second element of the tuple (that is with index 1) - // we use a property map that accesses the 1st element of the tuple. - - std::vector points; - std::ifstream stream(fname); - if (!stream || - !CGAL::read_xyz_points(stream, std::back_inserter(points))) - { - std::cerr << "Error: cannot read file " << fname << std::endl; - return EXIT_FAILURE; - } - - //bbox - double xmin = points[0].x(); - double xmax = points[0].x(); - double ymin = points[0].y(); - double ymax = points[0].y(); - double zmin = points[0].z(); - double zmax = points[0].z(); - - for(const Point_3& p : points) - { - xmin = (std::min)(xmin, p.x()); - ymin = (std::min)(ymin, p.y()); - zmin = (std::min)(zmin, p.z()); - xmax = (std::max)(xmax, p.x()); - ymax = (std::max)(ymax, p.y()); - zmax = (std::max)(zmax, p.z()); - } - - // Construct the Delaunay triangulation. - DT dt( points.begin(), points.end() ); - assert( dt.is_valid() ); - - CGAL::Random rng; - std::cout << "Random seed is " << CGAL::get_default_random().get_seed() << std::endl; - - for (unsigned int i = 0; i < nb_seg; ++i) - { - // Construct a traverser. - Point_3 p1(rng.get_double(xmin, xmax), - rng.get_double(ymin, ymax), - rng.get_double(zmin, zmax)); - Point_3 p2(rng.get_double(xmin, xmax), - rng.get_double(ymin, ymax), - rng.get_double(zmin, zmax)); - - std::cout << "Traverser " << (i + 1) - << "\n\t(" << p1 - << ")\n\t(" << p2 << ")" << std::endl; - - Segment_cell_iterator ct = dt.segment_traverser_cells_begin(p1, p2); - Segment_cell_iterator ctend = dt.segment_traverser_cells_end(); - - // Count the number of finite cells traversed. - unsigned int inf = 0, fin = 0; - for( ; ct != ctend; ++ct ) - { - if( dt.is_infinite(ct) ) - ++inf; - else - ++fin; - } - - std::cout << "While traversing from " << p1 << " to " << p2 << std::endl; - std::cout << inf << " infinite and " - << fin << " finite cells were visited." << std::endl; - std::cout << std::endl << std::endl; - } - - return 0; -} diff --git a/Triangulation_3/include/CGAL/Triangulation_3.h b/Triangulation_3/include/CGAL/Triangulation_3.h index 24c9f8ca0b7..21df723f9ba 100644 --- a/Triangulation_3/include/CGAL/Triangulation_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_3.h @@ -529,6 +529,9 @@ public: typedef Triangulation_segment_cell_iterator_3 Segment_cell_iterator; typedef Triangulation_segment_simplex_iterator_3 Segment_simplex_iterator; + typedef Iterator_range > Segment_traverser_cell_handles; + typedef Iterator_range > Segment_traverser_simplices; + private: // Auxiliary iterators for convenience // do not use default template argument to please VC++ @@ -2192,6 +2195,7 @@ public: return _tds.incident_edges_threadsafe(v, edges, Finite_filter(this)); } + //// Segment Cell Iterator Segment_cell_iterator segment_traverser_cells_begin(Vertex_handle vs, Vertex_handle vt) const { @@ -2210,6 +2214,21 @@ public: Segment_cell_iterator it(this); return it.end(); } + Segment_traverser_cell_handles segment_traverser_cell_handles(Vertex_handle vs, + Vertex_handle vt) const + { + return make_prevent_deref_range(segment_traverser_cells_begin(vs, vt), + segment_traverser_cells_end()); + } + Segment_traverser_cell_handles segment_traverser_cell_handles(const Point& ps, + const Point& pt, + Cell_handle hint = Cell_handle()) const + { + return make_prevent_deref_range(segment_traverser_cells_begin(ps, pt, hint), + segment_traverser_cells_end()); + } + + //// Segment Simplex Iterator Segment_simplex_iterator segment_traverser_simplices_begin(Vertex_handle vs, Vertex_handle vt) const { @@ -2228,6 +2247,20 @@ public: Segment_simplex_iterator it(this); return it.end(); } + Segment_traverser_simplices segment_traverser_simplices(Vertex_handle vs, + Vertex_handle vt) const + { + return Segment_traverser_simplices(segment_traverser_simplices_begin(vs, vt), + segment_traverser_simplices_end()); + } + Segment_traverser_simplices segment_traverser_simplices(const Point& ps, + const Point& pt, + Cell_handle hint = Cell_handle()) const + { + return Segment_traverser_simplices(segment_traverser_simplices_begin(ps, pt, hint), + segment_traverser_simplices_end()); + } + size_type degree(Vertex_handle v) const { diff --git a/Triangulation_3/test/Triangulation_3/test_segment_cell_traverser_3.cpp b/Triangulation_3/test/Triangulation_3/test_segment_cell_traverser_3.cpp index e4bb0dbc401..8caa8a077b2 100644 --- a/Triangulation_3/test/Triangulation_3/test_segment_cell_traverser_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_segment_cell_traverser_3.cpp @@ -48,7 +48,6 @@ int main(int argc, char* argv[]) Segment_cell_iterator ct = dt.segment_traverser_cells_begin(points[0], points[1]); Segment_cell_iterator ctend = dt.segment_traverser_cells_end(); - unsigned int nb_cells = 0, nb_facets = 0, nb_edges = 0, nb_vertex = 0; // Count the number of finite cells traversed. unsigned int inf = 0, fin = 0; while(ct != ctend) @@ -71,5 +70,25 @@ int main(int argc, char* argv[]) std::cout << inf << " infinite and " << fin << " finite cells were visited." << std::endl; + inf = 0; + fin = 0; + for (Cell_handle ch : dt.segment_traverser_cell_handles(vertices[2], vertices[3])) + { + std::cerr << "Cell ( "; + for (int i = 0; i < 4; ++i) + std::cerr << ch->vertex(i)->point() << " "; + std::cerr << " )\n"; + + if (dt.is_infinite(ch)) + ++inf; + else + ++fin; + } + + std::cout << "While traversing from " << vertices[2]->point() + << " to " << vertices[3]->point() << std::endl; + std::cout << inf << " infinite and " + << fin << " finite cells were visited." << std::endl; + return 0; } From 1c6ef8dc8ecc45a91e23dabe34fa0736e3b36c18 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 7 Apr 2020 08:07:17 +0200 Subject: [PATCH 109/138] fix examples in doc --- Triangulation_3/doc/Triangulation_3/Triangulation_3.txt | 3 ++- Triangulation_3/doc/Triangulation_3/examples.txt | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt b/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt index 8b1dd478d10..3bc71ce6793 100644 --- a/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt +++ b/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt @@ -524,7 +524,8 @@ The package provides iterators that can be used to traverse the triangulation al All cells (resp. simplices) visited by this traversal iterator are guaranteed to intersect the segment. \cgalModifEnd -\cgalExample{Triangulation_3/segment_traverser_3.cpp} +\cgalExample{Triangulation_3/segment_cell_traverser_3.cpp} +\cgalExample{Triangulation_3/segment_simplex_traverser_3.cpp} \subsection Triangulation_3FindingtheCellsinConflict Finding the Cells in Conflict with a Point in a Delaunay Triangulation diff --git a/Triangulation_3/doc/Triangulation_3/examples.txt b/Triangulation_3/doc/Triangulation_3/examples.txt index e41b24348b3..4166c79a440 100644 --- a/Triangulation_3/doc/Triangulation_3/examples.txt +++ b/Triangulation_3/doc/Triangulation_3/examples.txt @@ -8,7 +8,8 @@ \example Triangulation_3/info_insert_with_transform_iterator.cpp \example Triangulation_3/simplex.cpp \example Triangulation_3/fast_location_3.cpp -\example Triangulation_3/segment_traverser_3.cpp +\example Triangulation_3/segment_cell_traverser_3.cpp +\example Triangulation_3/segment_simplex_traverser_3.cpp \example Triangulation_3/find_conflicts_3.cpp \example Triangulation_3/regular_3.cpp \example Triangulation_3/regular_with_info_3.cpp From e2df1a83aa573a4303d760d5f13b153bbcf8d39e Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 10 Apr 2020 16:36:16 +0200 Subject: [PATCH 110/138] temporarily disable a test --- .../test/Triangulation_3/test_simplex_iterator_3.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp index 96fe5916243..4766765176c 100644 --- a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp @@ -428,7 +428,9 @@ int main(int argc, char* argv[]) // - along 2 successive facets (vertex/facet/edge/facet/edge) // - along 2 successive edges (vertex/edge/vertex/edge/vertex) // - along a facet and an edge successively - test_triangulation_on_a_grid(); + + //temporatily disable +// test_triangulation_on_a_grid(); return 0; } From 2876ad9af18e312758a3c66f9f04d89ad57d5fcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Fri, 10 Apr 2020 18:15:32 +0200 Subject: [PATCH 111/138] remove trailing whitespaces --- .../CGAL/internal/boost/array_binary_tree.hpp | 2 +- .../segment_traverser_benchmark.cpp | 2 +- .../Triangulation_3/CGAL/Triangulation_3.h | 1600 ++++++++--------- .../Triangulation_3/PackageDescription.txt | 2 +- .../doc/Triangulation_3/Triangulation_3.txt | 356 ++-- .../examples/Triangulation_3/CMakeLists.txt | 4 +- .../CGAL/Triangulation_segment_traverser_3.h | 230 +-- .../Triangulation_segment_traverser_3_impl.h | 10 +- .../test_segment_cell_traverser_3.cpp | 6 +- .../test_segment_simplex_traverser_3.cpp | 4 +- .../test_simplex_iterator_3.cpp | 2 +- 11 files changed, 1109 insertions(+), 1109 deletions(-) diff --git a/STL_Extension/include/CGAL/internal/boost/array_binary_tree.hpp b/STL_Extension/include/CGAL/internal/boost/array_binary_tree.hpp index e57dda3d31a..dba4dc93fb8 100644 --- a/STL_Extension/include/CGAL/internal/boost/array_binary_tree.hpp +++ b/STL_Extension/include/CGAL/internal/boost/array_binary_tree.hpp @@ -13,7 +13,7 @@ // SPDX-License-Identifier: BSL-1.0 // // NOTE: this file have been taken from boost 1.46.1 for using -// with Modificable_priority_queue (to enhance the +// with Modificable_priority_queue (to enhance the // non-documented mutable_queue). // original file is // diff --git a/Triangulation_3/benchmark/Triangulation_3/segment_traverser_benchmark.cpp b/Triangulation_3/benchmark/Triangulation_3/segment_traverser_benchmark.cpp index 580d9d7e649..2839ea5e00b 100644 --- a/Triangulation_3/benchmark/Triangulation_3/segment_traverser_benchmark.cpp +++ b/Triangulation_3/benchmark/Triangulation_3/segment_traverser_benchmark.cpp @@ -14,7 +14,7 @@ // // $URL$ // $Id$ -// +// // #include diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h index 4bc5c0ca5be..281a73b5e69 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h @@ -4,8 +4,8 @@ namespace CGAL { /*! \ingroup PkgTriangulation3TriangulationClasses -The class `Triangulation_3` represents a 3-dimensional tetrahedralization -of points. +The class `Triangulation_3` represents a 3-dimensional tetrahedralization +of points. \tparam Traits is the geometric traits class and must be a model of `TriangulationTraits_3`. @@ -20,7 +20,7 @@ respectively. \tparam SLDS is an optional parameter to specify the type of the spatial lock data structure. It must be a model of the `SurjectiveLockDataStructure` concept, with `Object` being a `Point` (as defined below). - It is only used if the triangulation data structure used is concurrency-safe (i.e.\ when + It is only used if the triangulation data structure used is concurrency-safe (i.e.\ when `TriangulationDataStructure_3::Concurrency_tag` is `Parallel_tag`). The default value is `Spatial_lock_grid_3` if the triangulation data structure is concurrency-safe, and `void` otherwise. @@ -29,8 +29,8 @@ respectively. \cgalHeading{Traversal of the Triangulation} -The triangulation class provides several iterators and circulators -that allow one to traverse it (completely or partially). +The triangulation class provides several iterators and circulators +that allow one to traverse it (completely or partially). \sa `CGAL::Delaunay_triangulation_3` \sa `CGAL::Regular_triangulation_3` @@ -41,15 +41,15 @@ class Triangulation_3 : public Triangulation_utils_3 { public: /*! - The enum `Locate_type` is defined by `Triangulation_3` to specify + The enum `Locate_type` is defined by `Triangulation_3` to specify which case occurs when locating a point in the triangulation. */ enum Locate_type {VERTEX=0, EDGE, FACET, CELL, OUTSIDE_CONVEX_HULL, OUTSIDE_AFFINE_HULL}; public: -/// \name Types -/// The class `Triangulation_3` defines the following types: +/// \name Types +/// The class `Triangulation_3` defines the following types: /// @{ /*! @@ -59,32 +59,32 @@ typedef Traits Geom_traits; /*! -*/ +*/ typedef TDS Triangulation_data_structure; /*! -*/ +*/ typedef SLDS Lock_data_structure; /*! -*/ +*/ typedef Triangulation_data_structure::Vertex::Point Point; /*! -*/ +*/ typedef Geom_traits::Segment_3 Segment; /*! -*/ +*/ typedef Geom_traits::Triangle_3 Triangle; /*! -*/ +*/ typedef Geom_traits::Tetrahedron_3 Tetrahedron; /// @} @@ -97,32 +97,32 @@ Only vertices (0-faces) and cells (3-faces) are stored. Edges (1-faces) and face /*! -*/ +*/ typedef Triangulation_data_structure::Vertex Vertex; /*! -*/ +*/ typedef Triangulation_data_structure::Cell Cell; /*! -*/ +*/ typedef Triangulation_data_structure::Facet Facet; /*! -*/ +*/ typedef Triangulation_data_structure::Edge Edge; -/*! +/*! Concurrency tag (from the TDS). -*/ +*/ typedef Triangulation_data_structure::Concurrency_tag Concurrency_tag; /// @} -/*! \name +/*! \name The vertices and faces of the triangulations are accessed through `handles`, `iterators` and `circulators`. A handle is a model of the @@ -134,90 +134,90 @@ visited through iterators and circulators which are bidirectional and non-mutable. Iterators and circulators are convertible to the corresponding handles, thus the user can pass them directly as arguments to the functions. The handles are also model of the concepts -`LessThanComparable` and `Hashable`, that is they can be used as keys -in containers such as `std::map` and `boost::unordered_map`. +`LessThanComparable` and `Hashable`, that is they can be used as keys +in containers such as `std::map` and `boost::unordered_map`. */ /// @{ /*! -handle to a vertex -*/ +handle to a vertex +*/ typedef Triangulation_data_structure::Vertex_handle Vertex_handle; /*! -handle to a cell -*/ +handle to a cell +*/ typedef Triangulation_data_structure::Cell_handle Cell_handle; /*! -Reference to a simplex (vertex, edge, facet or cell) of the triangulation -*/ -typedef Triangulation_simplex_3 Simplex; +Reference to a simplex (vertex, edge, facet or cell) of the triangulation +*/ +typedef Triangulation_simplex_3 Simplex; /*! -Size type (an unsigned integral type) -*/ +Size type (an unsigned integral type) +*/ typedef Triangulation_data_structure::size_type size_type; /*! -Difference type (a signed integral type) -*/ +Difference type (a signed integral type) +*/ typedef Triangulation_data_structure::difference_type difference_type; /*! -iterator over cells -*/ +iterator over cells +*/ typedef Triangulation_data_structure::Cell_iterator All_cells_iterator; /*! -iterator over facets -*/ +iterator over facets +*/ typedef Triangulation_data_structure::Facet_iterator All_facets_iterator; /*! -iterator over edges -*/ +iterator over edges +*/ typedef Triangulation_data_structure::Edge_iterator All_edges_iterator; /*! -iterator over vertices -*/ +iterator over vertices +*/ typedef Triangulation_data_structure::Vertex_iterator All_vertices_iterator; /*! -iterator over finite cells -*/ -typedef unspecified_type Finite_cells_iterator; +iterator over finite cells +*/ +typedef unspecified_type Finite_cells_iterator; /*! -iterator over finite facets -*/ -typedef unspecified_type Finite_facets_iterator; +iterator over finite facets +*/ +typedef unspecified_type Finite_facets_iterator; /*! -iterator over finite edges -*/ -typedef unspecified_type Finite_edges_iterator; +iterator over finite edges +*/ +typedef unspecified_type Finite_edges_iterator; /*! -iterator over finite vertices -*/ -typedef unspecified_type Finite_vertices_iterator; +iterator over finite vertices +*/ +typedef unspecified_type Finite_vertices_iterator; /*! -iterator over the points corresponding to the -finite vertices of the triangulation. -*/ -typedef unspecified_type Point_iterator; +iterator over the points corresponding to the +finite vertices of the triangulation. +*/ +typedef unspecified_type Point_iterator; /*! -circulator over all cells incident to a given edge -*/ +circulator over all cells incident to a given edge +*/ typedef Triangulation_data_structure::Cell_circulator Cell_circulator; /*! -circulator over all facets incident to a given edge -*/ +circulator over all facets incident to a given edge +*/ typedef Triangulation_data_structure::Facet_circulator Facet_circulator; /*! @@ -246,51 +246,51 @@ In order to write \cpp 11 `for`-loops we provide the following range types. */ /// @{ - + /*! range type for iterating over all cell handles (including infinite cells), with a nested type `iterator` that has as value type `Cell_handle`. -*/ +*/ typedef Iterator_range All_cell_handles; - - + + /*! range type for iterating over facets. */ typedef Iterator_range All_facets; - + /*! range type for iterating over edges. */ typedef Iterator_range All_edges; - + /*! range type for iterating over all vertex handles, with a nested type `iterator` that has as value type `Vertex_handle`. -*/ +*/ typedef Iterator_range All_vertex_handles; /*! range type for iterating over finite cell handles, with a nested type `iterator` that has as value type `Cell_handle`. -*/ +*/ typedef Iterator_range Finite_cell_handles; - - + + /*! range type for iterating over finite facets. */ typedef Iterator_range Finite_facets; - + /*! range type for iterating over finite edges. */ typedef Iterator_range Finite_edges; - + /*! range type for iterating over finite vertex handles, with a nested type `iterator` that has as value type `Vertex_handle`. -*/ +*/ typedef Iterator_range Finite_vertex_handles; /*! @@ -310,95 +310,95 @@ that has as value type `Vertex_handle`. /// @} -/// \name Creation +/// \name Creation /// @{ /*! -Introduces a triangulation `t` having only one vertex which is the +Introduces a triangulation `t` having only one vertex which is the infinite vertex. `lock_ds` is an optional pointer to the lock data structure for parallel operations. It must be provided if concurrency is enabled. -*/ +*/ Triangulation_3(const Geom_traits & traits = Geom_traits(), Lock_data_structure *lock_ds = nullptr); -/*! +/*! Same as the previous one, but with parameters in reverse order. -*/ +*/ Triangulation_3(Lock_data_structure *lock_ds = nullptr, const Geom_traits & traits = Geom_traits()); /*! -Copy constructor. All vertices and faces are duplicated. +Copy constructor. All vertices and faces are duplicated. The pointer to the lock data structure is not copied. Thus, the copy won't be concurrency-safe as long as the user has not call `Triangulation_3::set_lock_data_structure`. -*/ -Triangulation_3 (const Triangulation_3 & tr); +*/ +Triangulation_3 (const Triangulation_3 & tr); /*! -Equivalent to constructing an empty triangulation with the optional -traits class argument and calling `insert(first,last)`. -*/ -template < class InputIterator> -Triangulation_3 (InputIterator first, InputIterator last, +Equivalent to constructing an empty triangulation with the optional +traits class argument and calling `insert(first,last)`. +*/ +template < class InputIterator> +Triangulation_3 (InputIterator first, InputIterator last, const Geom_traits & traits = Geom_traits(), Lock_data_structure *lock_ds = nullptr); -/// @} +/// @} -/// \name Assignment +/// \name Assignment /// @{ /*! -The triangulation `tr` is duplicated, and modifying the copy after the -duplication does not modify the original. The previous triangulation held -by `t` is deleted. -*/ -Triangulation_3 & operator=(const Triangulation_3 & tr); +The triangulation `tr` is duplicated, and modifying the copy after the +duplication does not modify the original. The previous triangulation held +by `t` is deleted. +*/ +Triangulation_3 & operator=(const Triangulation_3 & tr); /*! -The triangulations `tr` and `t` are swapped. -`t.swap(tr)` should be preferred to `t = tr` or to -`t(tr)` if `tr` is deleted after that. Indeed, there is no -copy of cells and vertices, thus this method runs in constant time. -*/ -void swap(Triangulation_3 & tr); +The triangulations `tr` and `t` are swapped. +`t.swap(tr)` should be preferred to `t = tr` or to +`t(tr)` if `tr` is deleted after that. Indeed, there is no +copy of cells and vertices, thus this method runs in constant time. +*/ +void swap(Triangulation_3 & tr); /*! -Deletes all finite vertices and all cells of `t`. -*/ -void clear(); +Deletes all finite vertices and all cells of `t`. +*/ +void clear(); /*! -Equality operator. Returns `true` iff there exist a bijection between the -vertices of `t1` and those of `t2` and a bijection between the cells of -`t1` and those of `t2`, which preserve the geometry of the -triangulation, that is, the points of each corresponding pair of vertices are -equal, and the tetrahedra corresponding to each pair of cells are equal (up to -a permutation of their vertices). -*/ -template < class GT, class Tds1, class Tds2 > -bool operator==(const Triangulation_3 & t1, const Triangulation_3 & t2); +Equality operator. Returns `true` iff there exist a bijection between the +vertices of `t1` and those of `t2` and a bijection between the cells of +`t1` and those of `t2`, which preserve the geometry of the +triangulation, that is, the points of each corresponding pair of vertices are +equal, and the tetrahedra corresponding to each pair of cells are equal (up to +a permutation of their vertices). +*/ +template < class GT, class Tds1, class Tds2 > +bool operator==(const Triangulation_3 & t1, const Triangulation_3 & t2); /*! -The opposite of `operator==`. -*/ -template < class GT, class Tds1, class Tds2 > -bool operator!=(const Triangulation_3 & t1, const Triangulation_3 & t2); +The opposite of `operator==`. +*/ +template < class GT, class Tds1, class Tds2 > +bool operator!=(const Triangulation_3 & t1, const Triangulation_3 & t2); -/// @} +/// @} -/// \name Access Functions +/// \name Access Functions /// @{ /*! -Returns a const reference to the geometric traits object. -*/ +Returns a const reference to the geometric traits object. +*/ const Geom_traits & geom_traits() const; /*! -Returns a const reference to the triangulation data structure. -*/ +Returns a const reference to the triangulation data structure. +*/ const Triangulation_data_structure & tds() const; @@ -412,24 +412,24 @@ The responsibility of keeping a valid triangulation belongs to the user when usi Triangulation_data_structure & tds(); /*! -Returns the dimension of the affine hull. -*/ -int dimension() const; +Returns the dimension of the affine hull. +*/ +int dimension() const; /*! -Returns the number of finite vertices. -*/ -size_type number_of_vertices() const; +Returns the number of finite vertices. +*/ +size_type number_of_vertices() const; /*! -Returns the number of cells or 0 if `t.dimension() < 3`. -*/ -size_type number_of_cells() const; +Returns the number of cells or 0 if `t.dimension() < 3`. +*/ +size_type number_of_cells() const; /*! -Returns the infinite vertex. -*/ -Vertex_handle infinite_vertex(); +Returns the infinite vertex. +*/ +Vertex_handle infinite_vertex(); /*! \cgalAdvancedFunction @@ -437,299 +437,299 @@ Vertex_handle infinite_vertex(); This method is meant to be used only if you have done a low-level operation on the underlying tds that invalidated the infinite vertex. Sets the infinite vertex. \cgalAdvancedEnd -*/ +*/ void set_infinite_vertex(Vertex_handle v); /*! -Returns a cell incident to the infinite vertex. -*/ -Cell_handle infinite_cell() const; +Returns a cell incident to the infinite vertex. +*/ +Cell_handle infinite_cell() const; -/// @} +/// @} -/// \name Non-Constant-Time Access Functions +/// \name Non-Constant-Time Access Functions /// As previously said, the triangulation is a collection of cells that are either infinite or represent a finite tetrahedra, where an infinite cell is a cell incident to the infinite vertex. Similarly we call an edge (resp. facet) `infinite` if it is incident to the infinite vertex. /// @{ /*! -The number of facets. Returns 0 if `t.dimension() < 2`. -*/ -size_type number_of_facets() const; +The number of facets. Returns 0 if `t.dimension() < 2`. +*/ +size_type number_of_facets() const; /*! -The number of edges. Returns 0 if `t.dimension() < 1`. -*/ -size_type number_of_edges() const; +The number of edges. Returns 0 if `t.dimension() < 1`. +*/ +size_type number_of_edges() const; /*! -The number of finite cells. Returns 0 if `t.dimension() < 3`. -*/ -size_type number_of_finite_cells() const; +The number of finite cells. Returns 0 if `t.dimension() < 3`. +*/ +size_type number_of_finite_cells() const; /*! -The number of finite facets. Returns 0 if `t.dimension() < 2`. -*/ -size_type number_of_finite_facets() const; +The number of finite facets. Returns 0 if `t.dimension() < 2`. +*/ +size_type number_of_finite_facets() const; /*! -The number of finite edges. Returns 0 if `t.dimension() < 1`. -*/ -size_type number_of_finite_edges() const; +The number of finite edges. Returns 0 if `t.dimension() < 1`. +*/ +size_type number_of_finite_edges() const; -/// @} +/// @} -/// \name Geometric Access Functions +/// \name Geometric Access Functions /// @{ /*! -Returns the tetrahedron formed by the four vertices of `c`. -\pre `t.dimension() == 3` and the cell is finite. -*/ -Tetrahedron tetrahedron(Cell_handle c) const; +Returns the tetrahedron formed by the four vertices of `c`. +\pre `t.dimension() == 3` and the cell is finite. +*/ +Tetrahedron tetrahedron(Cell_handle c) const; /*! -Returns the triangle formed by the three vertices of facet -`(c,i)`. The triangle is oriented so that its normal points to the -inside of cell `c`. -\pre `t.dimension()` \f$ \geq2\f$ and \f$ i \in\{0,1,2,3\}\f$ in dimension 3, \f$ i = 3\f$ in dimension 2, and the facet is finite. -*/ -Triangle triangle(Cell_handle c, int i) const; +Returns the triangle formed by the three vertices of facet +`(c,i)`. The triangle is oriented so that its normal points to the +inside of cell `c`. +\pre `t.dimension()` \f$ \geq2\f$ and \f$ i \in\{0,1,2,3\}\f$ in dimension 3, \f$ i = 3\f$ in dimension 2, and the facet is finite. +*/ +Triangle triangle(Cell_handle c, int i) const; /*! -Same as the previous method for facet `f`. -\pre `t.dimension()` \f$ \geq2\f$ and the facet is finite. -*/ -Triangle triangle(const Facet & f) const; +Same as the previous method for facet `f`. +\pre `t.dimension()` \f$ \geq2\f$ and the facet is finite. +*/ +Triangle triangle(const Facet & f) const; /*! -Returns the line segment formed by the vertices of `e`. -\pre `t.dimension()` \f$ \geq1\f$ and `e` is finite. -*/ -Segment segment(const Edge & e) const; +Returns the line segment formed by the vertices of `e`. +\pre `t.dimension()` \f$ \geq1\f$ and `e` is finite. +*/ +Segment segment(const Edge & e) const; /*! -Same as the previous method for edge `(c,i,j)`. -\pre As above and \f$ i\neq j\f$. Moreover \f$ i,j \in\{0,1,2,3\}\f$ in dimension 3, \f$ i,j \in\{0,1,2\}\f$ in dimension 2, \f$ i,j \in\{0,1\}\f$ in dimension 1, and the edge is finite. -*/ -Segment segment(Cell_handle c, int i, int j) const; +Same as the previous method for edge `(c,i,j)`. +\pre As above and \f$ i\neq j\f$. Moreover \f$ i,j \in\{0,1,2,3\}\f$ in dimension 3, \f$ i,j \in\{0,1,2\}\f$ in dimension 2, \f$ i,j \in\{0,1\}\f$ in dimension 1, and the edge is finite. +*/ +Segment segment(Cell_handle c, int i, int j) const; /*! -Returns the point given by vertex `i` of cell `c`. -\pre `t.dimension()` \f$ \geq0\f$ and \f$ i \in\{0,1,2,3\}\f$ in dimension 3, \f$ i \in\{0,1,2\}\f$ in dimension 2, \f$ i \in\{0,1\}\f$ in dimension 1, \f$ i = 0\f$ in dimension 0, and the vertex is finite. -*/ -const Point & point(Cell_handle c, int i) const; +Returns the point given by vertex `i` of cell `c`. +\pre `t.dimension()` \f$ \geq0\f$ and \f$ i \in\{0,1,2,3\}\f$ in dimension 3, \f$ i \in\{0,1,2\}\f$ in dimension 2, \f$ i \in\{0,1\}\f$ in dimension 1, \f$ i = 0\f$ in dimension 0, and the vertex is finite. +*/ +const Point & point(Cell_handle c, int i) const; /*! -Same as the previous method for vertex `v`. -\pre `t.dimension()` \f$ \geq0\f$ and the vertex is finite. -*/ -const Point & point(Vertex_handle v) const; +Same as the previous method for vertex `v`. +\pre `t.dimension()` \f$ \geq0\f$ and the vertex is finite. +*/ +const Point & point(Vertex_handle v) const; -/// @} +/// @} -/// \name Tests for Finite and Infinite Vertices and Faces +/// \name Tests for Finite and Infinite Vertices and Faces /// @{ /*! -`true`, iff vertex `v` is the infinite vertex. -*/ -bool is_infinite(Vertex_handle v) const; +`true`, iff vertex `v` is the infinite vertex. +*/ +bool is_infinite(Vertex_handle v) const; /*! -`true`, iff `c` is incident to the infinite vertex. -\pre `t.dimension() == 3`. -*/ -bool is_infinite(Cell_handle c) const; +`true`, iff `c` is incident to the infinite vertex. +\pre `t.dimension() == 3`. +*/ +bool is_infinite(Cell_handle c) const; /*! -`true`, iff the facet `i` of cell `c` is incident to the -infinite vertex. -\pre `t.dimension()` \f$ \geq2\f$ and \f$ i\in\{0,1,2,3\}\f$ in dimension 3, \f$ i=3\f$ in dimension 2. -*/ -bool is_infinite(Cell_handle c, int i) const; +`true`, iff the facet `i` of cell `c` is incident to the +infinite vertex. +\pre `t.dimension()` \f$ \geq2\f$ and \f$ i\in\{0,1,2,3\}\f$ in dimension 3, \f$ i=3\f$ in dimension 2. +*/ +bool is_infinite(Cell_handle c, int i) const; /*! -`true` iff facet `f` is incident to the infinite vertex. -\pre `t.dimension()` \f$ \geq2\f$. -*/ -bool is_infinite(const Facet & f) const; +`true` iff facet `f` is incident to the infinite vertex. +\pre `t.dimension()` \f$ \geq2\f$. +*/ +bool is_infinite(const Facet & f) const; /*! -`true`, iff the edge `(i,j)` of cell `c` is incident to -the infinite vertex. -\pre `t.dimension()` \f$ \geq1\f$ and \f$ i\neq j\f$. Moreover \f$ i,j \in\{0,1,2,3\}\f$ in dimension 3, \f$ i,j \in\{0,1,2\}\f$ in dimension 2, \f$ i,j \in\{0,1\}\f$ in dimension 1. -*/ -bool is_infinite(Cell_handle c, int i, int j) const; +`true`, iff the edge `(i,j)` of cell `c` is incident to +the infinite vertex. +\pre `t.dimension()` \f$ \geq1\f$ and \f$ i\neq j\f$. Moreover \f$ i,j \in\{0,1,2,3\}\f$ in dimension 3, \f$ i,j \in\{0,1,2\}\f$ in dimension 2, \f$ i,j \in\{0,1\}\f$ in dimension 1. +*/ +bool is_infinite(Cell_handle c, int i, int j) const; /*! -`true` iff edge `e` is incident to the infinite vertex. -\pre `t.dimension()` \f$ \geq1\f$. -*/ -bool is_infinite(const Edge & e) const; +`true` iff edge `e` is incident to the infinite vertex. +\pre `t.dimension()` \f$ \geq1\f$. +*/ +bool is_infinite(const Edge & e) const; -/// @} +/// @} -/// \name Queries +/// \name Queries /// @{ /*! -Tests whether `p` is a vertex of `t` by locating `p` in -the triangulation. If `p` is found, the associated vertex `v` -is given. -*/ -bool is_vertex(const Point & p, Vertex_handle & v) const; +Tests whether `p` is a vertex of `t` by locating `p` in +the triangulation. If `p` is found, the associated vertex `v` +is given. +*/ +bool is_vertex(const Point & p, Vertex_handle & v) const; /*! -Tests whether `v` is a vertex of `t`. -*/ -bool is_vertex(Vertex_handle v) const; +Tests whether `v` is a vertex of `t`. +*/ +bool is_vertex(Vertex_handle v) const; /*! -Tests whether `(u,v)` is an edge of `t`. If the edge is found, -it gives a cell `c` having this edge and the indices `i` -and `j` of the vertices `u` and `v` in `c`, in this order. -\pre `u` and `v` are vertices of `t`. -*/ -bool is_edge(Vertex_handle u, Vertex_handle v, -Cell_handle & c, int & i, int & j) const; +Tests whether `(u,v)` is an edge of `t`. If the edge is found, +it gives a cell `c` having this edge and the indices `i` +and `j` of the vertices `u` and `v` in `c`, in this order. +\pre `u` and `v` are vertices of `t`. +*/ +bool is_edge(Vertex_handle u, Vertex_handle v, +Cell_handle & c, int & i, int & j) const; /*! -Tests whether `(u,v,w)` is a facet of `t`. If the facet is found, -it computes a cell `c` having this facet and the indices `i`, -`j` and `k` of the vertices `u`, `v` and `w` in `c`, -in this order. -\pre `u`, `v` and `w` are vertices of `t`. -*/ -bool is_facet(Vertex_handle u, Vertex_handle v, Vertex_handle w, -Cell_handle & c, int & i, int & j, int & k) const; +Tests whether `(u,v,w)` is a facet of `t`. If the facet is found, +it computes a cell `c` having this facet and the indices `i`, +`j` and `k` of the vertices `u`, `v` and `w` in `c`, +in this order. +\pre `u`, `v` and `w` are vertices of `t`. +*/ +bool is_facet(Vertex_handle u, Vertex_handle v, Vertex_handle w, +Cell_handle & c, int & i, int & j, int & k) const; /*! -Tests whether `c` is a cell of `t`. -*/ -bool is_cell(Cell_handle c) const; +Tests whether `c` is a cell of `t`. +*/ +bool is_cell(Cell_handle c) const; /*! -Tests whether `(u,v,w,x)` is a cell of `t`. -If the cell `c` is found, the method -computes the indices `i`, `j`, `k` and `l` of the -vertices `u`, `v`, `w` and `x` in `c`, in this -order. -\pre `u`, `v`, `w` and `x` are vertices of `t`. -*/ -bool is_cell(Vertex_handle u, Vertex_handle v, -Vertex_handle w, Vertex_handle x, -Cell_handle & c, -int & i, int & j, int & k, int & l) const; +Tests whether `(u,v,w,x)` is a cell of `t`. +If the cell `c` is found, the method +computes the indices `i`, `j`, `k` and `l` of the +vertices `u`, `v`, `w` and `x` in `c`, in this +order. +\pre `u`, `v`, `w` and `x` are vertices of `t`. +*/ +bool is_cell(Vertex_handle u, Vertex_handle v, +Vertex_handle w, Vertex_handle x, +Cell_handle & c, +int & i, int & j, int & k, int & l) const; /*! -Tests whether `(u,v,w,x)` is a cell of `t` and computes -this cell `c`. -\pre `u`, `v`, `w` and `x` are vertices of `t`. -*/ -bool is_cell(Vertex_handle u, Vertex_handle v, -Vertex_handle w, Vertex_handle x, -Cell_handle & c) const; +Tests whether `(u,v,w,x)` is a cell of `t` and computes +this cell `c`. +\pre `u`, `v`, `w` and `x` are vertices of `t`. +*/ +bool is_cell(Vertex_handle u, Vertex_handle v, +Vertex_handle w, Vertex_handle x, +Cell_handle & c) const; /// @} /*! \name -There is a method `has_vertex()` in the cell class. The analogous methods for facets are defined here. +There is a method `has_vertex()` in the cell class. The analogous methods for facets are defined here. */ /// @{ /*! -If `v` is a vertex of `f`, then `j` is the index of -`v` in the cell `f.first`, and the method returns `true`. +If `v` is a vertex of `f`, then `j` is the index of +`v` in the cell `f.first`, and the method returns `true`. \pre `t.dimension() == 3` -*/ -bool has_vertex(const Facet & f, Vertex_handle v, int & j) const; +*/ +bool has_vertex(const Facet & f, Vertex_handle v, int & j) const; /*! -Same for facet `(c,i)`. Computes the index `j` of `v` in -`c`. -*/ -bool has_vertex(Cell_handle c, int i, -Vertex_handle v, int & j) const; +Same for facet `(c,i)`. Computes the index `j` of `v` in +`c`. +*/ +bool has_vertex(Cell_handle c, int i, +Vertex_handle v, int & j) const; /*! -*/ -bool has_vertex(const Facet & f, Vertex_handle v) const; +*/ +bool has_vertex(const Facet & f, Vertex_handle v) const; /*! -Same as the first two methods, but these two methods do not return the -index of the vertex. -*/ -bool has_vertex(Cell_handle c, int i, Vertex_handle v) const; +Same as the first two methods, but these two methods do not return the +index of the vertex. +*/ +bool has_vertex(Cell_handle c, int i, Vertex_handle v) const; /// @} /*! \name -The following three methods test whether two facets have the same vertices. +The following three methods test whether two facets have the same vertices. */ /// @{ /*! -*/ -bool are_equal(Cell_handle c, int i, Cell_handle n, int j) const; +*/ +bool are_equal(Cell_handle c, int i, Cell_handle n, int j) const; /*! -*/ -bool are_equal(const Facet & f, const Facet & g) const; +*/ +bool are_equal(const Facet & f, const Facet & g) const; /*! -For these three methods: \pre `t.dimension() == 3`. -*/ -bool are_equal(const Facet & f, Cell_handle n, int j) const; +For these three methods: \pre `t.dimension() == 3`. +*/ +bool are_equal(const Facet & f, Cell_handle n, int j) const; -/// @} +/// @} -/// \name Point Location +/// \name Point Location /// The class `Triangulation_3` provides two functions to locate a given point with respect to a triangulation. It provides also functions to test if a given point is inside a finite face or not. Note that the class `Delaunay_triangulation_3` also provides a `nearest_vertex()` function. /// @{ /*! -If the point `query` lies inside the convex hull of the points, the cell -that contains the query in its interior is returned. If `query` lies on a -facet, an edge or on a vertex, one of the cells having `query` on -its boundary is returned. +If the point `query` lies inside the convex hull of the points, the cell +that contains the query in its interior is returned. If `query` lies on a +facet, an edge or on a vertex, one of the cells having `query` on +its boundary is returned. -If the point `query` lies outside the convex hull of the points, -an infinite cell with vertices \f$ \{ p, q, r, \infty\}\f$ is returned such that -the tetrahedron \f$ ( p, q, r, query )\f$ is positively oriented -(the rest of the triangulation lies on the other side of facet -\f$ ( p, q, r )\f$). +If the point `query` lies outside the convex hull of the points, +an infinite cell with vertices \f$ \{ p, q, r, \infty\}\f$ is returned such that +the tetrahedron \f$ ( p, q, r, query )\f$ is positively oriented +(the rest of the triangulation lies on the other side of facet +\f$ ( p, q, r )\f$). -Note that locate works even in degenerate dimensions: in dimension 2 -(resp. 1, 0) the `Cell_handle` returned is the one that represents -the facet (resp. edge, vertex) containing the query point. +Note that locate works even in degenerate dimensions: in dimension 2 +(resp. 1, 0) the `Cell_handle` returned is the one that represents +the facet (resp. edge, vertex) containing the query point. -The optional argument `start` is used as a starting place for the search. +The optional argument `start` is used as a starting place for the search. The optional argument `could_lock_zone` is used by the concurrency-safe version of the triangulation. When the pointer is not null, the locate will try to lock all the cells along the walk. If it succeeds, `*could_lock_zone` is `true`, otherwise it is false. In any case, the locked cells are not unlocked by `locate`, leaving this choice to the user. -*/ -Cell_handle +*/ +Cell_handle locate(const Point & query, Cell_handle start = Cell_handle(), - bool *could_lock_zone = nullptr) const; + bool *could_lock_zone = nullptr) const; /*! -Same as above but uses `hint` as the starting place for the search. -*/ -Cell_handle +Same as above but uses `hint` as the starting place for the search. +*/ +Cell_handle locate(const Point & query, Vertex_handle hint, - bool *could_lock_zone = nullptr) const; + bool *could_lock_zone = nullptr) const; /*! -Same as `locate()` but uses inexact predicates. +Same as `locate()` but uses inexact predicates. This function returns a handle on a cell that is a good approximation of the exact -location of `query`, while being faster. Note that it may return a handle on a cell +location of `query`, while being faster. Note that it may return a handle on a cell whose interior does not contain `query`. When the triangulation has dimension smaller than 3, `start` is returned. @@ -740,136 +740,136 @@ Cell_handle inexact_locate(const Point & query, Cell_handle start = Cell_handle()) const; /*! -If `query` lies inside the affine hull of the points, the \f$ k\f$-face -(finite or infinite) that contains `query` in its interior is -returned, by means of the cell returned together with `lt`, which -is set to the locate type of the query (`VERTEX, EDGE, FACET, CELL`, or `OUTSIDE_CONVEX_HULL` if the cell is infinite and `query` -lies strictly in it) and two indices `li` and `lj` that -specify the \f$ k\f$-face of the cell containing `query`. +If `query` lies inside the affine hull of the points, the \f$ k\f$-face +(finite or infinite) that contains `query` in its interior is +returned, by means of the cell returned together with `lt`, which +is set to the locate type of the query (`VERTEX, EDGE, FACET, CELL`, or `OUTSIDE_CONVEX_HULL` if the cell is infinite and `query` +lies strictly in it) and two indices `li` and `lj` that +specify the \f$ k\f$-face of the cell containing `query`. -If the \f$ k\f$-face is a cell, `li` and `lj` have no -meaning; if it is a facet (resp. vertex), `li` gives the index of -the facet (resp. vertex) and `lj` has no meaning; if it is and -edge, `li` and `lj` give the indices of its vertices. +If the \f$ k\f$-face is a cell, `li` and `lj` have no +meaning; if it is a facet (resp. vertex), `li` gives the index of +the facet (resp. vertex) and `lj` has no meaning; if it is and +edge, `li` and `lj` give the indices of its vertices. -If the point `query` lies outside the affine hull of the points, -which can happen in case of degenerate dimensions, `lt` is set to -`OUTSIDE_AFFINE_HULL`, and the cell returned has no meaning. -As a particular case, if there is no finite vertex yet in the -triangulation, `lt` is set to `OUTSIDE_AFFINE_HULL` and -locate returns the default constructed handle. +If the point `query` lies outside the affine hull of the points, +which can happen in case of degenerate dimensions, `lt` is set to +`OUTSIDE_AFFINE_HULL`, and the cell returned has no meaning. +As a particular case, if there is no finite vertex yet in the +triangulation, `lt` is set to `OUTSIDE_AFFINE_HULL` and +locate returns the default constructed handle. -The optional argument `start` is used as a starting place for the search. +The optional argument `start` is used as a starting place for the search. The optional argument `could_lock_zone` is used by the concurrency-safe version of the triangulation. When the pointer is not null, the locate will try to lock all the cells along the walk. If it succeeds, `*could_lock_zone` is `true`, otherwise it is false. In any case, the locked cells are not unlocked by `locate`, leaving this choice to the user. -*/ -Cell_handle -locate(const Point & query, Locate_type & lt, +*/ +Cell_handle +locate(const Point & query, Locate_type & lt, int & li, int & lj, Cell_handle start = Cell_handle(), -bool *could_lock_zone = nullptr ) const; +bool *could_lock_zone = nullptr ) const; /*! -Same as above but uses `hint` as the starting place for the search. -*/ -Cell_handle -locate(const Point & query, Locate_type & lt, +Same as above but uses `hint` as the starting place for the search. +*/ +Cell_handle +locate(const Point & query, Locate_type & lt, int & li, int & lj, Vertex_handle hint, -bool *could_lock_zone = nullptr) const; +bool *could_lock_zone = nullptr) const; /*! -Returns a value indicating on which side of the oriented boundary -of `c` the point `p` lies. More precisely, it returns: +Returns a value indicating on which side of the oriented boundary +of `c` the point `p` lies. More precisely, it returns: -- `ON_BOUNDED_SIDE` if `p` is inside the cell. For an infinite -cell this means that `p` lies strictly in the half space limited by -its finite facet and not containing any other point of the triangulation. +- `ON_BOUNDED_SIDE` if `p` is inside the cell. For an infinite +cell this means that `p` lies strictly in the half space limited by +its finite facet and not containing any other point of the triangulation. -- `ON_BOUNDARY` if p on the boundary of the cell. For an infinite -cell this means that `p` lies on the finite facet. Then -`lt` together with `li` and `lj` give the precise location -on the boundary. (See the descriptions of the locate methods.) +- `ON_BOUNDARY` if p on the boundary of the cell. For an infinite +cell this means that `p` lies on the finite facet. Then +`lt` together with `li` and `lj` give the precise location +on the boundary. (See the descriptions of the locate methods.) -- `ON_UNBOUNDED_SIDE` if `p` lies outside the cell. For an -infinite cell this means that `p` does not satisfy either of the -two previous conditions. -\pre `t.dimension() == 3` -*/ -Bounded_side -side_of_cell(const Point & p, -Cell_handle c, -Locate_type & lt, int & li, int & lj) const; +- `ON_UNBOUNDED_SIDE` if `p` lies outside the cell. For an +infinite cell this means that `p` does not satisfy either of the +two previous conditions. +\pre `t.dimension() == 3` +*/ +Bounded_side +side_of_cell(const Point & p, +Cell_handle c, +Locate_type & lt, int & li, int & lj) const; /*! -Returns a value indicating on which side of the oriented boundary -of `f` the point `p` lies: +Returns a value indicating on which side of the oriented boundary +of `f` the point `p` lies: -- `ON_BOUNDED_SIDE` if `p` is inside the facet. For an -infinite facet this means that `p` lies strictly in the half plane -limited by its finite edge and not containing any other point of the -triangulation . +- `ON_BOUNDED_SIDE` if `p` is inside the facet. For an +infinite facet this means that `p` lies strictly in the half plane +limited by its finite edge and not containing any other point of the +triangulation . -- `ON_BOUNDARY` if `p` is on the boundary of the facet. -For an infinite facet this means that `p` lies on the finite -edge. `lt`, `li` and `lj` give the precise location of -`p` on the boundary of the facet. `li` and `lj` refer to -indices in the degenerate cell `c` representing `f`. +- `ON_BOUNDARY` if `p` is on the boundary of the facet. +For an infinite facet this means that `p` lies on the finite +edge. `lt`, `li` and `lj` give the precise location of +`p` on the boundary of the facet. `li` and `lj` refer to +indices in the degenerate cell `c` representing `f`. -- `ON_UNBOUNDED_SIDE` if `p` lies outside the facet. For -an infinite facet this means that `p` does not satisfy either of -the two previous conditions. +- `ON_UNBOUNDED_SIDE` if `p` lies outside the facet. For +an infinite facet this means that `p` does not satisfy either of +the two previous conditions. -\pre `t.dimension() == 2` and `p` lies in the plane containing the triangulation. `f.second` \f$ =3\f$ (in dimension 2 there is only one facet per cell). -*/ -Bounded_side -side_of_facet(const Point & p, -const Facet & f, -Locate_type & lt, int & li, int & lj) const; +\pre `t.dimension() == 2` and `p` lies in the plane containing the triangulation. `f.second` \f$ =3\f$ (in dimension 2 there is only one facet per cell). +*/ +Bounded_side +side_of_facet(const Point & p, +const Facet & f, +Locate_type & lt, int & li, int & lj) const; /*! -Same as the previous method for the facet `(c,3)`. -*/ -Bounded_side -side_of_facet(const Point & p, -Cell_handle c, -Locate_type & lt, int & li, int & lj) const; +Same as the previous method for the facet `(c,3)`. +*/ +Bounded_side +side_of_facet(const Point & p, +Cell_handle c, +Locate_type & lt, int & li, int & lj) const; /*! -Returns a value indicating on which side of the oriented boundary -of `e` the point `p` lies: +Returns a value indicating on which side of the oriented boundary +of `e` the point `p` lies: -- `ON_BOUNDED_SIDE` if `p` is inside the edge. For an -infinite edge this means that `p` lies in the half line defined by -the vertex and not containing any other point of the triangulation. +- `ON_BOUNDED_SIDE` if `p` is inside the edge. For an +infinite edge this means that `p` lies in the half line defined by +the vertex and not containing any other point of the triangulation. -- `ON_BOUNDARY` if `p` equals one of the vertices, -`li` give the index of the vertex in the cell storing `e` +- `ON_BOUNDARY` if `p` equals one of the vertices, +`li` give the index of the vertex in the cell storing `e` -- `ON_UNBOUNDED_SIDE` if `p` lies outside the edge. For -an infinite edge this means that `p` lies on the other half line, -which contains the other points of the triangulation. -\pre `t.dimension() == 1` and `p` is collinear with the points of the triangulation. `e.second == 0` and `e.third` \f$ =1\f$ (in dimension 1 there is only one edge per cell). -*/ -Bounded_side -side_of_edge(const Point & p, -const Edge & e, -Locate_type & lt, int & li) const; +- `ON_UNBOUNDED_SIDE` if `p` lies outside the edge. For +an infinite edge this means that `p` lies on the other half line, +which contains the other points of the triangulation. +\pre `t.dimension() == 1` and `p` is collinear with the points of the triangulation. `e.second == 0` and `e.third` \f$ =1\f$ (in dimension 1 there is only one edge per cell). +*/ +Bounded_side +side_of_edge(const Point & p, +const Edge & e, +Locate_type & lt, int & li) const; /*! -Same as the previous method for edge \f$ (c,0,1)\f$. -*/ -Bounded_side -side_of_edge(const Point & p, -Cell_handle c, -Locate_type & lt, int & li) const; +Same as the previous method for edge \f$ (c,0,1)\f$. +*/ +Bounded_side +side_of_edge(const Point & p, +Cell_handle c, +Locate_type & lt, int & li) const; -/// @} +/// @} -/*! \name Flips +/*! \name Flips Two kinds of flips exist for a three-dimensional triangulation. They are reciprocal. To be flipped, an edge must be incident to three @@ -880,7 +880,7 @@ facets is shaded. On the right, the facet shared by the two new tetrahedra is shaded. Flips are possible only under the following conditions: - the edge or facet to be flipped is not on the boundary of the convex hull of the triangulation - the five points involved are -in convex position. +in convex position. \cgalFigureBegin{Triangulation3figflips, flips.png} Flips @@ -895,131 +895,131 @@ triangulation. Flips for a 2d triangulation are not implemented yet. /*! -*/ -bool flip(Edge e); +*/ +bool flip(Edge e); /*! -Before flipping, these methods check that edge `e=(c,i,j)` is -flippable (which is quite expensive). They return `false` or -`true` according to this test. -*/ -bool flip(Cell_handle c, int i, int j); +Before flipping, these methods check that edge `e=(c,i,j)` is +flippable (which is quite expensive). They return `false` or +`true` according to this test. +*/ +bool flip(Cell_handle c, int i, int j); /*! -*/ -void flip_flippable(Edge e); +*/ +void flip_flippable(Edge e); /*! -Should be preferred to the previous methods when the edge is -known to be flippable. -\pre The edge is flippable. -*/ -void flip_flippable(Cell_handle c, int i, int j); +Should be preferred to the previous methods when the edge is +known to be flippable. +\pre The edge is flippable. +*/ +void flip_flippable(Cell_handle c, int i, int j); /*! -*/ -bool flip(Facet f); +*/ +bool flip(Facet f); /*! -Before flipping, these methods check that facet `f=(c,i)` is -flippable (which is quite expensive). They return `false` or -`true` according to this test. -*/ -bool flip(Cell_handle c, int i); +Before flipping, these methods check that facet `f=(c,i)` is +flippable (which is quite expensive). They return `false` or +`true` according to this test. +*/ +bool flip(Cell_handle c, int i); /*! -*/ -void flip_flippable(Facet f); +*/ +void flip_flippable(Facet f); /*! -Should be preferred to the previous methods when the facet is -known to be flippable. -\pre The facet is flippable. -*/ -void flip_flippable(Cell_handle c, int i); +Should be preferred to the previous methods when the facet is +known to be flippable. +\pre The facet is flippable. +*/ +void flip_flippable(Cell_handle c, int i); -/// @} +/// @} -/// \name Insertions +/// \name Insertions /// The following operations are guaranteed to lead to a valid triangulation when they are applied on a valid triangulation. /// @{ /*! Inserts the point `p` in the triangulation and returns the corresponding -vertex. +vertex. -If point `p` coincides with an already existing vertex, this -vertex is returned and the triangulation remains unchanged. +If point `p` coincides with an already existing vertex, this +vertex is returned and the triangulation remains unchanged. -If point `p` lies in the convex hull of the points, it is added -naturally: if it lies inside a cell, the cell is split into four -cells, if it lies on a facet, the two incident cells are split into -three cells, if it lies on an edge, all the cells incident to this -edge are split into two cells. +If point `p` lies in the convex hull of the points, it is added +naturally: if it lies inside a cell, the cell is split into four +cells, if it lies on a facet, the two incident cells are split into +three cells, if it lies on an edge, all the cells incident to this +edge are split into two cells. -If point `p` is strictly outside the convex hull but in the affine -hull, `p` is linked to all visible points on the convex hull to -form the new triangulation. See -Figure \ref Triangulation3figinsert_outside_convex_hull. +If point `p` is strictly outside the convex hull but in the affine +hull, `p` is linked to all visible points on the convex hull to +form the new triangulation. See +Figure \ref Triangulation3figinsert_outside_convex_hull. -If point `p` is outside the affine hull of the points, `p` is -linked to all the points, and the dimension of the triangulation is -incremented. All the points now belong to the boundary of the convex -hull, so, the infinite vertex is linked to all the points to -triangulate the new infinite face. See -Figure \ref Triangulation3figinsert_outside_affine_hull. -The optional argument `start` is used as a starting place for the search. -*/ -Vertex_handle insert(const Point & p, -Cell_handle start = Cell_handle() ); +If point `p` is outside the affine hull of the points, `p` is +linked to all the points, and the dimension of the triangulation is +incremented. All the points now belong to the boundary of the convex +hull, so, the infinite vertex is linked to all the points to +triangulate the new infinite face. See +Figure \ref Triangulation3figinsert_outside_affine_hull. +The optional argument `start` is used as a starting place for the search. +*/ +Vertex_handle insert(const Point & p, +Cell_handle start = Cell_handle() ); /*! -Same as above but uses `hint` as the starting place for the search. -*/ -Vertex_handle insert(const Point & p, Vertex_handle hint); +Same as above but uses `hint` as the starting place for the search. +*/ +Vertex_handle insert(const Point & p, Vertex_handle hint); /*! Inserts the point `p` in the triangulation and returns the corresponding -vertex. Similar to the above `insert()` function, but takes as additional -parameter the return values of a previous location query. See description of -locate() above. -*/ -Vertex_handle insert(const Point & p, Locate_type lt, -Cell_handle loc, int li, int lj); +vertex. Similar to the above `insert()` function, but takes as additional +parameter the return values of a previous location query. See description of +locate() above. +*/ +Vertex_handle insert(const Point & p, Locate_type lt, +Cell_handle loc, int li, int lj); /*! Inserts the points in the range `[first,last)` in the given order, -and returns the number of inserted points. +and returns the number of inserted points. -*/ -template < class PointInputIterator > -std::ptrdiff_t -insert(PointInputIterator first, PointInputIterator last); +*/ +template < class PointInputIterator > +std::ptrdiff_t +insert(PointInputIterator first, PointInputIterator last); /*! Inserts the points in the iterator range `[first,last)` in the given order, -and returns the number of inserted points. +and returns the number of inserted points. -Given a pair `(p,i)`, the vertex `v` storing `p` also stores `i`, that is -`v.point() == p` and `v.info() == i`. If several pairs have the same point, -only one vertex is created, and one of the objects of type `Vertex::Info` will be stored in the vertex. -\pre `Vertex` must be model of the concept `TriangulationVertexBaseWithInfo_3`. +Given a pair `(p,i)`, the vertex `v` storing `p` also stores `i`, that is +`v.point() == p` and `v.info() == i`. If several pairs have the same point, +only one vertex is created, and one of the objects of type `Vertex::Info` will be stored in the vertex. +\pre `Vertex` must be model of the concept `TriangulationVertexBaseWithInfo_3`. -\tparam PointWithInfoInputIterator must be an input iterator with the value type `std::pair`. +\tparam PointWithInfoInputIterator must be an input iterator with the value type `std::pair`. -*/ -template < class PointWithInfoInputIterator > -std::ptrdiff_t -insert(PointWithInfoInputIterator first, PointWithInfoInputIterator last); +*/ +template < class PointWithInfoInputIterator > +std::ptrdiff_t +insert(PointWithInfoInputIterator first, PointWithInfoInputIterator last); -/// @} +/// @} -/*! \name +/*! \name We also provide some other methods that can be used instead of `Triangulatation_3::insert()` when the place where the new point must be inserted is already known. They are also guaranteed to lead to a @@ -1029,210 +1029,210 @@ valid triangulation when they are applied on a valid triangulation. /// @{ /*! Inserts the point `p` in the cell `c`. The cell `c` is split into 4 -tetrahedra. -\pre `t.dimension() == 3` and `p` lies strictly inside cell `c`. -*/ -Vertex_handle insert_in_cell(const Point & p, Cell_handle c); +tetrahedra. +\pre `t.dimension() == 3` and `p` lies strictly inside cell `c`. +*/ +Vertex_handle insert_in_cell(const Point & p, Cell_handle c); /*! Inserts the point `p` in the facet `f`. In dimension 3, the 2 -neighboring cells are split into 3 tetrahedra; in dimension 2, the facet -is split into 3 triangles. -\pre `t.dimension()` \f$ \geq2\f$ and `p` lies strictly inside face `f`. -*/ -Vertex_handle insert_in_facet(const Point & p, const Facet & f); +neighboring cells are split into 3 tetrahedra; in dimension 2, the facet +is split into 3 triangles. +\pre `t.dimension()` \f$ \geq2\f$ and `p` lies strictly inside face `f`. +*/ +Vertex_handle insert_in_facet(const Point & p, const Facet & f); /*! As above, insertion in the facet `(c,i)`. -\pre As above and \f$ i \in\{0,1,2,3\}\f$ in dimension 3, \f$ i = 3\f$ in dimension 2. -*/ -Vertex_handle insert_in_facet(const Point & p, -Cell_handle c, int i); +\pre As above and \f$ i \in\{0,1,2,3\}\f$ in dimension 3, \f$ i = 3\f$ in dimension 2. +*/ +Vertex_handle insert_in_facet(const Point & p, +Cell_handle c, int i); /*! Inserts `p` in the edge `e`. In dimension 3, -all the cells having this edge are split into 2 tetrahedra; in -dimension 2, the 2 neighboring facets are split into 2 triangles; in -dimension 1, the edge is split into 2 edges. -\pre `t.dimension()` \f$ \geq1\f$ and `p` lies on edge `e`. -*/ -Vertex_handle insert_in_edge(const Point & p, const Edge & e); +all the cells having this edge are split into 2 tetrahedra; in +dimension 2, the 2 neighboring facets are split into 2 triangles; in +dimension 1, the edge is split into 2 edges. +\pre `t.dimension()` \f$ \geq1\f$ and `p` lies on edge `e`. +*/ +Vertex_handle insert_in_edge(const Point & p, const Edge & e); /*! As above, inserts `p` in the edge \f$ (i, j)\f$ of `c`. -\pre As above and \f$ i\neq j\f$. Moreover \f$ i,j \in\{0,1,2,3\}\f$ in dimension 3, \f$ i,j \in\{0,1,2\}\f$ in dimension 2, \f$ i,j \in\{0,1\}\f$ in dimension 1. -*/ +\pre As above and \f$ i\neq j\f$. Moreover \f$ i,j \in\{0,1,2,3\}\f$ in dimension 3, \f$ i,j \in\{0,1,2\}\f$ in dimension 2, \f$ i,j \in\{0,1\}\f$ in dimension 1. +*/ Vertex_handle insert_in_edge(const Point& p, Cell_handle c, int i, int j); /*! -The cell `c` must be an infinite cell containing `p`. +The cell `c` must be an infinite cell containing `p`. -Links `p` to all points in the triangulation that are visible from -`p`. Updates consequently the infinite faces. See -Figure \ref Triangulation3figinsert_outside_convex_hull. -\pre `t.dimension() > 0`, `c`, and the \f$ k\f$-face represented by `c` is infinite and contains `t`. +Links `p` to all points in the triangulation that are visible from +`p`. Updates consequently the infinite faces. See +Figure \ref Triangulation3figinsert_outside_convex_hull. +\pre `t.dimension() > 0`, `c`, and the \f$ k\f$-face represented by `c` is infinite and contains `t`. \anchor Triangulation3figinsert_outside_convex_hull \image html insert_outside_convex_hull.png "insert_outside_convex_hull() (2-dimensional case)" \image latex insert_outside_convex_hull.png "insert_outside_convex_hull() (2-dimensional case)" -*/ -Vertex_handle insert_outside_convex_hull(const Point & p, -Cell_handle c); +*/ +Vertex_handle insert_outside_convex_hull(const Point & p, +Cell_handle c); /*! -`p` is linked to all the points, and the infinite vertex is linked -to all the points (including `p`) to triangulate the new infinite -face, so that all the points now belong to the boundary of the convex -hull. See Figure \ref Triangulation3figinsert_outside_affine_hull. +`p` is linked to all the points, and the infinite vertex is linked +to all the points (including `p`) to triangulate the new infinite +face, so that all the points now belong to the boundary of the convex +hull. See Figure \ref Triangulation3figinsert_outside_affine_hull. -This method can be used to insert the first point in an empty -triangulation. -\pre `t.dimension() < 3` and `p` lies outside the affine hull of the points. +This method can be used to insert the first point in an empty +triangulation. +\pre `t.dimension() < 3` and `p` lies outside the affine hull of the points. \anchor Triangulation3figinsert_outside_affine_hull \image html insert_outside_affine_hull.png "insert_outside_affine_hull() (2-dimensional case)" \image latex insert_outside_affine_hull.png "insert_outside_affine_hull() (2-dimensional case)" -*/ -Vertex_handle insert_outside_affine_hull(const Point & p); +*/ +Vertex_handle insert_outside_affine_hull(const Point & p); /*! -Creates a new vertex by starring a hole. It takes an iterator range -`[cell_begin,cell_end)` of `Cell_handle`s which specifies -a hole: a set of connected cells (resp. facets in dimension 2) which is -star-shaped wrt `p`. -(`begin`, `i`) is a facet (resp. an edge) on the boundary of the hole, -that is, `begin` belongs to the set of cells (resp. facets) previously -described, and `begin->neighbor(i)` does not. Then this function deletes -all the cells (resp. facets) describing the hole, creates a new vertex -`v`, and for each facet (resp. edge) on the boundary of the hole, creates -a new cell (resp. facet) with `v` as vertex. Then `v->set_point(p)` -is called and `v` is returned. +Creates a new vertex by starring a hole. It takes an iterator range +`[cell_begin,cell_end)` of `Cell_handle`s which specifies +a hole: a set of connected cells (resp. facets in dimension 2) which is +star-shaped wrt `p`. +(`begin`, `i`) is a facet (resp. an edge) on the boundary of the hole, +that is, `begin` belongs to the set of cells (resp. facets) previously +described, and `begin->neighbor(i)` does not. Then this function deletes +all the cells (resp. facets) describing the hole, creates a new vertex +`v`, and for each facet (resp. edge) on the boundary of the hole, creates +a new cell (resp. facet) with `v` as vertex. Then `v->set_point(p)` +is called and `v` is returned. -This operation is equivalent to calling -`tds().insert_in_hole(cell_begin, cell_end, begin, i); v->set_point(p)`. -\pre `t.dimension()` \f$ \geq2\f$, the set of cells (resp. facets in dimension 2) is connected, its boundary is connected, and `p` lies inside the hole, which is star-shaped wrt `p`. -*/ -template +This operation is equivalent to calling +`tds().insert_in_hole(cell_begin, cell_end, begin, i); v->set_point(p)`. +\pre `t.dimension()` \f$ \geq2\f$, the set of cells (resp. facets in dimension 2) is connected, its boundary is connected, and `p` lies inside the hole, which is star-shaped wrt `p`. +*/ +template Vertex_handle insert_in_hole(const Point& p, CellIt cell_begin, CellIt cell_end, Cell_handle begin, int i); /*! -Same as above, except that `newv` will be used as the new vertex, which -must have been allocated previously with e.g.\ `create_vertex`. -*/ -template +Same as above, except that `newv` will be used as the new vertex, which +must have been allocated previously with e.g.\ `create_vertex`. +*/ +template Vertex_handle insert_in_hole(const Point& p, CellIt cell_begin, CellIt cell_end, Cell_handle begin, int i, Vertex_handle newv); -/// @} +/// @} -/*! \name Cell, Face, Edge and Vertex Iterators +/*! \name Cell, Face, Edge and Vertex Iterators The following iterators allow the user to visit cells, facets, edges and vertices of the triangulation. These iterators are non-mutable, bidirectional and their value types are respectively `Cell`, `Facet`, `Edge` and `Vertex`. They are all invalidated by any change in the triangulation. */ /// @{ /*! -Starts at an arbitrary finite vertex. Then `++` and `--` will +Starts at an arbitrary finite vertex. Then `++` and `--` will iterate over finite vertices. -*/ -Finite_vertices_iterator finite_vertices_begin() const; +*/ +Finite_vertices_iterator finite_vertices_begin() const; /*! -Past-the-end iterator -*/ -Finite_vertices_iterator finite_vertices_end() const; +Past-the-end iterator +*/ +Finite_vertices_iterator finite_vertices_end() const; /*! -Starts at an arbitrary finite edge. Then `++` and `--` will +Starts at an arbitrary finite edge. Then `++` and `--` will iterate over finite edges. -*/ -Finite_edges_iterator finite_edges_begin() const; +*/ +Finite_edges_iterator finite_edges_begin() const; /*! -Past-the-end iterator -*/ -Finite_edges_iterator finite_edges_end() const; +Past-the-end iterator +*/ +Finite_edges_iterator finite_edges_end() const; /*! -Starts at an arbitrary finite facet. Then `++` and `--` will -iterate over finite facets. Returns `finite_facets_end()` when -`t.dimension() < 2`. -*/ -Finite_facets_iterator finite_facets_begin() const; +Starts at an arbitrary finite facet. Then `++` and `--` will +iterate over finite facets. Returns `finite_facets_end()` when +`t.dimension() < 2`. +*/ +Finite_facets_iterator finite_facets_begin() const; /*! -Past-the-end iterator -*/ -Finite_facets_iterator finite_facets_end() const; +Past-the-end iterator +*/ +Finite_facets_iterator finite_facets_end() const; /*! -Starts at an arbitrary finite cell. Then `++` and `--` will -iterate over finite cells. Returns `finite_cells_end()` when -`t.dimension() < 3`. -*/ -Finite_cells_iterator finite_cells_begin() const; +Starts at an arbitrary finite cell. Then `++` and `--` will +iterate over finite cells. Returns `finite_cells_end()` when +`t.dimension() < 3`. +*/ +Finite_cells_iterator finite_cells_begin() const; /*! -Past-the-end iterator -*/ -Finite_cells_iterator finite_cells_end() const; +Past-the-end iterator +*/ +Finite_cells_iterator finite_cells_end() const; /*! -Starts at an arbitrary vertex. Iterates over all vertices (even the infinite one). -*/ -All_vertices_iterator all_vertices_begin() const; +Starts at an arbitrary vertex. Iterates over all vertices (even the infinite one). +*/ +All_vertices_iterator all_vertices_begin() const; /*! -Past-the-end iterator -*/ -All_vertices_iterator all_vertices_end() const; +Past-the-end iterator +*/ +All_vertices_iterator all_vertices_end() const; /*! -Starts at an arbitrary edge. Iterates over all edges (even infinite -ones). Returns `edges_end()` when `t.dimension() < 1`. -*/ -All_edges_iterator all_edges_begin() const; +Starts at an arbitrary edge. Iterates over all edges (even infinite +ones). Returns `edges_end()` when `t.dimension() < 1`. +*/ +All_edges_iterator all_edges_begin() const; /*! -Past-the-end iterator -*/ -All_edges_iterator all_edges_end() const; +Past-the-end iterator +*/ +All_edges_iterator all_edges_end() const; /*! -Starts at an arbitrary facet. Iterates over all facets (even infinite -ones). Returns `facets_end()` when -`t.dimension() < 2`. -*/ -All_facets_iterator all_facets_begin() const; +Starts at an arbitrary facet. Iterates over all facets (even infinite +ones). Returns `facets_end()` when +`t.dimension() < 2`. +*/ +All_facets_iterator all_facets_begin() const; /*! -Past-the-end iterator -*/ -All_facets_iterator all_facets_end() const; +Past-the-end iterator +*/ +All_facets_iterator all_facets_end() const; /*! -Starts at an arbitrary cell. Iterates over all cells (even infinite -ones). Returns `cells_end()` when -`t.dimension() < 3`. -*/ -All_cells_iterator all_cells_begin() const; +Starts at an arbitrary cell. Iterates over all cells (even infinite +ones). Returns `cells_end()` when +`t.dimension() < 3`. +*/ +All_cells_iterator all_cells_begin() const; /*! -Past-the-end iterator -*/ -All_cells_iterator all_cells_end() const; +Past-the-end iterator +*/ +All_cells_iterator all_cells_end() const; /*! -Iterates over the points of the triangulation. -*/ -Point_iterator points_begin() const; +Iterates over the points of the triangulation. +*/ +Point_iterator points_begin() const; /*! -Past-the-end iterator -*/ -Point_iterator points_end() const; +Past-the-end iterator +*/ +Point_iterator points_end() const; -/// @} +/// @} /*! \name Ranges @@ -1245,59 +1245,59 @@ Note that vertex and cell ranges are special. See Section \ref Triangulation3sec /*! returns a range of iterators over all cells (even the infinite cells). - Returns an empty range when `t.number_of_cells() == 0`. - \note While the value type of `All_cells_iterator` is `Cell`, the value type of + Returns an empty range when `t.number_of_cells() == 0`. + \note While the value type of `All_cells_iterator` is `Cell`, the value type of `All_cell_handles::iterator` is `Cell_handle`. */ All_cell_handles all_cell_handles() const; - - + + /*! returns a range of iterators starting at an arbitrary facet. - Returns an empty range when `t.dimension() < 2`. + Returns an empty range when `t.dimension() < 2`. */ All_facets all_facets() const; - + /*! returns a range of iterators starting at an arbitrary edge. - Returns an empty range when `t.dimension() < 2`. + Returns an empty range when `t.dimension() < 2`. */ All_edges all_edges() const; - + /*! returns a range of iterators over all vertices (even the infinite one). - \note While the value type of `All_vertices_iterator` is `Vertex`, the value type of + \note While the value type of `All_vertices_iterator` is `Vertex`, the value type of `All_vertex_handles::iterator` is `Vertex_handle`. */ All_vertex_handles all_vertex_handles() const; - + /*! returns a range of iterators over finite cells. - Returns an empty range when `t.number_of_cells() == 0`. - \note While the value type of `Finite_cells_iterator` is `Cell`, the value type of + Returns an empty range when `t.number_of_cells() == 0`. + \note While the value type of `Finite_cells_iterator` is `Cell`, the value type of `Finite_cell_handles::iterator` is `Cell_handle`. */ Finite_cell_handles finite_cell_handles() const; - - + + /*! returns a range of iterators starting at an arbitrary facet. - Returns an empty range when `t.dimension() < 2`. + Returns an empty range when `t.dimension() < 2`. */ Finite_facets finite_facets() const; - + /*! returns a range of iterators starting at an arbitrary edge. - Returns an empty range when `t.dimension() < 2`. + Returns an empty range when `t.dimension() < 2`. */ Finite_edges finite_edges() const; - + /*! returns a range of iterators over finite vertices. - \note While the value type of `Finite_vertices_iterator` is `Vertex`, the value type of + \note While the value type of `Finite_vertices_iterator` is `Vertex`, the value type of `Finite_vertex_handles::iterator` is `Vertex_handle`. */ Finite_vertex_handles finite_vertex_handles() const; @@ -1317,8 +1317,8 @@ Segment_traverser_cell_handles segment_traverser_cell_handles() const; */ Segment_traverser_simplices segment_traverser_simplices() const; - -/// @} + +/// @} /*!\name Segment Cell Iterator @@ -1366,7 +1366,7 @@ The remaining incident cells visited make a facet-connected sequence connecting `Segment_cell_iterator` implements the concept `ForwardIterator` and is non-mutable. It is invalidated by any modification of one of the cells traversed. -Its `value_type` is `Cell_handle`. +Its `value_type` is `Cell_handle`. \cgalModifEnd */ /// @{ @@ -1454,7 +1454,7 @@ the source of `[s,t]` and the vertex of `c` opposite of `f`. It is invalidated by any modification of one of the cells traversed. Its `value_type` is `Triangulation_simplex_3`. -\cgalModifEnd +\cgalModifEnd */ /// @{ /*! @@ -1502,33 +1502,33 @@ Segment_simplex_iterator segment_traverser_simplices_end() const; /// @} -/*!\name Cell and Facet Circulators -The following circulators respectively visit all cells or all facets incident to a given edge. They are non-mutable and bidirectional. They are invalidated by any modification of one of the cells traversed. +/*!\name Cell and Facet Circulators +The following circulators respectively visit all cells or all facets incident to a given edge. They are non-mutable and bidirectional. They are invalidated by any modification of one of the cells traversed. */ /// @{ /*! -Starts at an arbitrary cell incident to `e`. -\pre `t.dimension() == 3`. -*/ -Cell_circulator incident_cells(Edge e) const; +Starts at an arbitrary cell incident to `e`. +\pre `t.dimension() == 3`. +*/ +Cell_circulator incident_cells(Edge e) const; /*! -As above for edge `(i,j)` of `c`. -*/ -Cell_circulator incident_cells(Cell_handle c, int i, int j) const; +As above for edge `(i,j)` of `c`. +*/ +Cell_circulator incident_cells(Cell_handle c, int i, int j) const; /*! -Starts at cell `start`. -\pre `t.dimension() == 3` and `start` is incident to `e`. -*/ -Cell_circulator incident_cells(Edge e, Cell_handle start) const; +Starts at cell `start`. +\pre `t.dimension() == 3` and `start` is incident to `e`. +*/ +Cell_circulator incident_cells(Edge e, Cell_handle start) const; /*! -As above for edge `(i,j)` of `c`. -*/ -Cell_circulator incident_cells(Cell_handle c, int i, int j, -Cell_handle start) const; +As above for edge `(i,j)` of `c`. +*/ +Cell_circulator incident_cells(Cell_handle c, int i, int j, +Cell_handle start) const; /// @} /*! @@ -1538,169 +1538,169 @@ The following circulators on facets are defined only in dimension 3, though face /// @{ /*! -Starts at an arbitrary facet incident to `e`. -\pre `t.dimension() == 3` -*/ -Facet_circulator incident_facets(Edge e) const; +Starts at an arbitrary facet incident to `e`. +\pre `t.dimension() == 3` +*/ +Facet_circulator incident_facets(Edge e) const; /*! -As above for edge `(i,j)` of `c`. -*/ -Facet_circulator incident_facets(Cell_handle c, int i, int j) const; +As above for edge `(i,j)` of `c`. +*/ +Facet_circulator incident_facets(Cell_handle c, int i, int j) const; /*! -Starts at facet `start`. -\pre `start` is incident to `e`. -*/ -Facet_circulator incident_facets(Edge e, Facet start) const; +Starts at facet `start`. +\pre `start` is incident to `e`. +*/ +Facet_circulator incident_facets(Edge e, Facet start) const; /*! -Starts at facet of index `f` in `start`. -*/ -Facet_circulator incident_facets(Edge e, Cell_handle start, int f) -const; +Starts at facet of index `f` in `start`. +*/ +Facet_circulator incident_facets(Edge e, Cell_handle start, int f) +const; /*! -As above for edge `(i,j)` of `c`. -*/ -Facet_circulator incident_facets(Cell_handle c, int i, int j, -Facet start) const; +As above for edge `(i,j)` of `c`. +*/ +Facet_circulator incident_facets(Cell_handle c, int i, int j, +Facet start) const; /*! -As above for edge `(i,j)` of `c` and facet `(start,f)`. -*/ -Facet_circulator incident_facets(Cell_handle c, int i, int j, -Cell_handle start, int f) const; +As above for edge `(i,j)` of `c` and facet `(start,f)`. +*/ +Facet_circulator incident_facets(Cell_handle c, int i, int j, +Cell_handle start, int f) const; -/// @} +/// @} /// \name Traversal of the Incident Cells, Facets and Edges, and the Adjacent Vertices of a Given Vertex /// @{ /*! -Copies the `Cell_handle`s of all cells incident to `v` to the output -iterator `cells`. -Returns the resulting output iterator. -\pre `t.dimension() == 3`, `v != Vertex_handle()`, `t.is_vertex(v)`. -*/ -template -OutputIterator -incident_cells(Vertex_handle v, OutputIterator cells) const; +Copies the `Cell_handle`s of all cells incident to `v` to the output +iterator `cells`. +Returns the resulting output iterator. +\pre `t.dimension() == 3`, `v != Vertex_handle()`, `t.is_vertex(v)`. +*/ +template +OutputIterator +incident_cells(Vertex_handle v, OutputIterator cells) const; -/*! +/*! Try to lock and copy the `Cell_handle`s of all cells incident to `v` into -`cells`. +`cells`. Returns `true` in case of success. Otherwise, `cells` is emptied and the function -returns false. In any case, the locked cells are not unlocked by +returns false. In any case, the locked cells are not unlocked by `try_lock_and_get_incident_cells()`, leaving this choice to the user. -\pre `t.dimension() == 3`, `v != Vertex_handle()`, `t.is_vertex(v)`. +\pre `t.dimension() == 3`, `v != Vertex_handle()`, `t.is_vertex(v)`. */ bool try_lock_and_get_incident_cells(Vertex_handle v, std::vector& cells) const; /*! -Copies the `Cell_handle`s of all finite cells incident to `v` to the output -iterator `cells`. -Returns the resulting output iterator. -\pre `t.dimension() == 3`, `v != Vertex_handle()`, `t.is_vertex(v)`. -*/ -template -OutputIterator -finite_incident_cells(Vertex_handle v, OutputIterator cells) const; +Copies the `Cell_handle`s of all finite cells incident to `v` to the output +iterator `cells`. +Returns the resulting output iterator. +\pre `t.dimension() == 3`, `v != Vertex_handle()`, `t.is_vertex(v)`. +*/ +template +OutputIterator +finite_incident_cells(Vertex_handle v, OutputIterator cells) const; /*! -Copies all `Facet`s incident to `v` to the output iterator -`facets`. -Returns the resulting output iterator. -\pre `t.dimension() > 1`, `v != Vertex_handle()`, `t.is_vertex(v)`. -*/ -template -OutputIterator -incident_facets(Vertex_handle v, OutputIterator facets) const; +Copies all `Facet`s incident to `v` to the output iterator +`facets`. +Returns the resulting output iterator. +\pre `t.dimension() > 1`, `v != Vertex_handle()`, `t.is_vertex(v)`. +*/ +template +OutputIterator +incident_facets(Vertex_handle v, OutputIterator facets) const; /*! -Copies all finite `Facet`s incident to `v` to the output iterator -`facets`. -Returns the resulting output iterator. -\pre `t.dimension() > 1`, `v != Vertex_handle()`, `t.is_vertex(v)`. -*/ -template -OutputIterator -finite_incident_facets(Vertex_handle v, OutputIterator facets) const; +Copies all finite `Facet`s incident to `v` to the output iterator +`facets`. +Returns the resulting output iterator. +\pre `t.dimension() > 1`, `v != Vertex_handle()`, `t.is_vertex(v)`. +*/ +template +OutputIterator +finite_incident_facets(Vertex_handle v, OutputIterator facets) const; /*! -Copies all `Edge`s incident to `v` to the -output iterator `edges`. Returns the resulting output iterator. -\pre `t.dimension() > 0`, `v != Vertex_handle()`, `t.is_vertex(v)`. -*/ -template -OutputIterator -incident_edges(Vertex_handle v, OutputIterator edges) const; +Copies all `Edge`s incident to `v` to the +output iterator `edges`. Returns the resulting output iterator. +\pre `t.dimension() > 0`, `v != Vertex_handle()`, `t.is_vertex(v)`. +*/ +template +OutputIterator +incident_edges(Vertex_handle v, OutputIterator edges) const; /*! -Copies all finite `Edge`s incident to `v` to the -output iterator `edges`. Returns the resulting output iterator. -\pre `t.dimension() > 0`, `v != Vertex_handle()`, `t.is_vertex(v)`. -*/ -template -OutputIterator -finite_incident_edges(Vertex_handle v, OutputIterator edges) const; +Copies all finite `Edge`s incident to `v` to the +output iterator `edges`. Returns the resulting output iterator. +\pre `t.dimension() > 0`, `v != Vertex_handle()`, `t.is_vertex(v)`. +*/ +template +OutputIterator +finite_incident_edges(Vertex_handle v, OutputIterator edges) const; /*! -Copies the `Vertex_handle`s of all vertices adjacent to `v` to the -output iterator `vertices`. If `t.dimension() < 0`, then do -nothing. Returns the resulting output iterator. -\pre `v != Vertex_handle()`, `t.is_vertex(v)`. -*/ -template -OutputIterator -adjacent_vertices(Vertex_handle v, OutputIterator vertices) const; +Copies the `Vertex_handle`s of all vertices adjacent to `v` to the +output iterator `vertices`. If `t.dimension() < 0`, then do +nothing. Returns the resulting output iterator. +\pre `v != Vertex_handle()`, `t.is_vertex(v)`. +*/ +template +OutputIterator +adjacent_vertices(Vertex_handle v, OutputIterator vertices) const; /*! -Copies the `Vertex_handle`s of all finite vertices adjacent to `v` to the -output iterator `vertices`. If `t.dimension() < 0`, then do -nothing. Returns the resulting output iterator. -\pre `v != Vertex_handle()`, `t.is_vertex(v)`. -*/ -template -OutputIterator -finite_adjacent_vertices(Vertex_handle v, OutputIterator vertices) const; +Copies the `Vertex_handle`s of all finite vertices adjacent to `v` to the +output iterator `vertices`. If `t.dimension() < 0`, then do +nothing. Returns the resulting output iterator. +\pre `v != Vertex_handle()`, `t.is_vertex(v)`. +*/ +template +OutputIterator +finite_adjacent_vertices(Vertex_handle v, OutputIterator vertices) const; /*! -Returns the degree of a vertex, that is, the number of incident vertices. -The infinite vertex is counted. -\pre `v != Vertex_handle()`, `t.is_vertex(v)`. -*/ -size_type degree(Vertex_handle v) const; +Returns the degree of a vertex, that is, the number of incident vertices. +The infinite vertex is counted. +\pre `v != Vertex_handle()`, `t.is_vertex(v)`. +*/ +size_type degree(Vertex_handle v) const; -/// @} +/// @} -/// \name Traversal Between Adjacent Cells +/// \name Traversal Between Adjacent Cells /// @{ /*! -Returns the index of `c` in its \f$ i^{th}\f$ neighbor. -\pre \f$ i \in\{0, 1, 2, 3\}\f$. -*/ -int mirror_index(Cell_handle c, int i) const; +Returns the index of `c` in its \f$ i^{th}\f$ neighbor. +\pre \f$ i \in\{0, 1, 2, 3\}\f$. +*/ +int mirror_index(Cell_handle c, int i) const; /*! -Returns the vertex of the \f$ i^{th}\f$ neighbor of `c` that is opposite to -`c`. -\pre \f$ i \in\{0, 1, 2, 3\}\f$. -*/ -Vertex_handle mirror_vertex(Cell_handle c, int i) const; +Returns the vertex of the \f$ i^{th}\f$ neighbor of `c` that is opposite to +`c`. +\pre \f$ i \in\{0, 1, 2, 3\}\f$. +*/ +Vertex_handle mirror_vertex(Cell_handle c, int i) const; /*! -Returns the same facet seen from the other adjacent cell. -*/ -Facet mirror_facet(Facet f) const; +Returns the same facet seen from the other adjacent cell. +*/ +Facet mirror_facet(Facet f) const; -/// @} +/// @} -/// \name Checking +/// \name Checking /// The responsibility of keeping a valid triangulation belongs to the /// user when using advanced operations allowing a direct manipulation /// of cells and vertices. We provide the user with the following @@ -1710,82 +1710,82 @@ Facet mirror_facet(Facet f) const; /*! \cgalDebugFunction \cgalDebugBegin -Checks the combinatorial validity of the triangulation. Checks also the -validity of its geometric embedding (see -Section \ref Triangulation3secintro). -When `verbose` is set to `true`, -messages describing the first invalidity encountered are printed. +Checks the combinatorial validity of the triangulation. Checks also the +validity of its geometric embedding (see +Section \ref Triangulation3secintro). +When `verbose` is set to `true`, +messages describing the first invalidity encountered are printed. \cgalDebugEnd -*/ -bool -is_valid(bool verbose = false) const; +*/ +bool +is_valid(bool verbose = false) const; /*! \cgalDebugFunction \cgalDebugBegin -Checks the combinatorial validity of the cell by calling the +Checks the combinatorial validity of the cell by calling the `is_valid` method of the cell class. Also checks the -geometric validity of `c`, if `c` is finite. (See -Section \ref Triangulation3secintro.) +geometric validity of `c`, if `c` is finite. (See +Section \ref Triangulation3secintro.) -When `verbose` is set to `true`, messages are printed to give -a precise indication of the kind of invalidity encountered. +When `verbose` is set to `true`, messages are printed to give +a precise indication of the kind of invalidity encountered. \cgalDebugEnd -*/ -bool -is_valid(Cell_handle c, bool verbose = false) const; +*/ +bool +is_valid(Cell_handle c, bool verbose = false) const; /// @} /*! \name I/O -\cgal provides an interface to Geomview for a 3D-triangulation, -see Chapter \ref Chapter_Geomview on `Geomview_stream`. +\cgal provides an interface to Geomview for a 3D-triangulation, +see Chapter \ref Chapter_Geomview on `Geomview_stream`. \code #include \endcode -The information in the `iostream` is: the dimension, the number of -finite vertices, the non-combinatorial information about vertices -(point, etc; note that the infinite vertex is numbered 0), the number -of cells, the indices of the vertices of each cell, plus the -non-combinatorial information about each cell, then the indices of the -neighbors of each cell, where the index corresponds to the preceding -list of cells. When dimension \f$ <\f$ 3, the same information is stored -for faces of maximal dimension instead of cells. +The information in the `iostream` is: the dimension, the number of +finite vertices, the non-combinatorial information about vertices +(point, etc; note that the infinite vertex is numbered 0), the number +of cells, the indices of the vertices of each cell, plus the +non-combinatorial information about each cell, then the indices of the +neighbors of each cell, where the index corresponds to the preceding +list of cells. When dimension \f$ <\f$ 3, the same information is stored +for faces of maximal dimension instead of cells. */ /// @{ /*! -Reads the underlying combinatorial triangulation from `is` by -calling the corresponding input operator of the triangulation data -structure class (note that the infinite vertex is numbered 0), and the -non-combinatorial information by calling the corresponding input -operators of the vertex and the cell classes (such as point -coordinates), which are provided by overloading the stream operators -of the vertex and cell types. Assigns the resulting triangulation to -`t`. -*/ -istream& operator>> (istream& is, Triangulation_3 &t); +Reads the underlying combinatorial triangulation from `is` by +calling the corresponding input operator of the triangulation data +structure class (note that the infinite vertex is numbered 0), and the +non-combinatorial information by calling the corresponding input +operators of the vertex and the cell classes (such as point +coordinates), which are provided by overloading the stream operators +of the vertex and cell types. Assigns the resulting triangulation to +`t`. +*/ +istream& operator>> (istream& is, Triangulation_3 &t); /*! -Writes the triangulation `t` into `os`. -*/ -ostream& operator<< (ostream& os, const Triangulation_3 &t); +Writes the triangulation `t` into `os`. +*/ +ostream& operator<< (ostream& os, const Triangulation_3 &t); /// @} -/// \name Concurrency +/// \name Concurrency /// @{ -/*! +/*! Set the pointer to the lock data structure. -*/ +*/ void set_lock_data_structure(Lock_data_structure *lock_ds) const; -/// @} +/// @} }; /* end Triangulation_3 */ } /* end namespace CGAL */ diff --git a/Triangulation_3/doc/Triangulation_3/PackageDescription.txt b/Triangulation_3/doc/Triangulation_3/PackageDescription.txt index aad2132ba3e..61103aec56d 100644 --- a/Triangulation_3/doc/Triangulation_3/PackageDescription.txt +++ b/Triangulation_3/doc/Triangulation_3/PackageDescription.txt @@ -31,7 +31,7 @@ \cgalPkgSummaryEnd \cgalPkgShortInfoBegin \cgalPkgSince{2.1} -\cgalPkgDependsOn{\ref PkgTDS3} +\cgalPkgDependsOn{\ref PkgTDS3} \cgalPkgBib{cgal:pt-t3} \cgalPkgLicense{\ref licensesGPL "GPL" } \cgalPkgDemo{3D Triangulations,triangulation_3.zip} diff --git a/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt b/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt index 3bc71ce6793..16fc4ac1d13 100644 --- a/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt +++ b/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt @@ -1,7 +1,7 @@ namespace CGAL { /*! -\mainpage User Manual +\mainpage User Manual \anchor Chapter_3D_Triangulations \anchor chapterTriangulation3 \cgalAutoToc @@ -20,7 +20,7 @@ partition of \f$ \mathbb{R}^3\f$. Its cells (\f$ 3\f$-faces) are such that two c either do not intersect or share a common facet (\f$ 2\f$-face), edge (\f$ 1\f$-face) or vertex (\f$ 0\f$-face). -\section Triangulation3secintro Representation +\section Triangulation3secintro Representation In order to deal only with tetrahedra, which is convenient for many applications, the @@ -53,9 +53,9 @@ Orientation of a cell (3-dimensional case). \cgalFigureEnd As in the underlying combinatorial triangulation (see -Chapter \ref chapterTDS3 "3D Triangulation Data Structure"), +Chapter \ref chapterTDS3 "3D Triangulation Data Structure"), edges (\f$ 1\f$-faces) and facets (\f$ 2\f$-faces) -are not explicitly +are not explicitly represented: a facet is given by a cell and an index (the facet `i` of a cell `c` is the facet of `c` that is opposite to the vertex with index `i`) and an edge is given by a cell and two @@ -73,9 +73,9 @@ obtained by linking the additional infinite vertex to each facet of the convex hull of the points.
  • dimension 2: when a triangulation only contains -coplanar points (which is the case when there are only three points), +coplanar points (which is the case when there are only three points), it consists of triangular faces. -
  • dimension 1: the triangulation contains only collinear +
  • dimension 1: the triangulation contains only collinear points (which is the case when there are only two points), it consists of edges.
  • dimension 0: the triangulation contains only one @@ -100,7 +100,7 @@ dimension 2, each cell has only one facet of index 3, and 3 edges A triangulation of \f$ \mathbb{R}^3\f$ is said to be *locally valid* iff (a)-(b) Its underlying combinatorial graph, the triangulation -data structure, is *locally valid* +data structure, is *locally valid* (see Section \ref TDS3secintro "Introduction" of Chapter \ref chapterTDS3 "3D Triangulation Data Structure") (c) Any cell has its vertices ordered according to positive @@ -120,7 +120,7 @@ When all the points are collinear, this condition becomes: The method `Triangulation_3::is_valid()` checks the local validity of a given triangulation. This does not always -ensure global validity \cgalCite{mnssssu-cgpvg-96}, \cgalCite{dlpt-ccpps-98} but it is +ensure global validity \cgalCite{mnssssu-cgpvg-96}, \cgalCite{dlpt-ccpps-98} but it is sufficient for practical cases. \section Triangulation_3Delaunay Delaunay Triangulation @@ -138,18 +138,18 @@ computes a unique triangulation even in these cases. This implementation is fully dynamic: it supports insertions of points, vertex removals and displacements of points. -\section Triangulation3secclassRegulartriangulation Regular Triangulation +\section Triangulation3secclassRegulartriangulation Regular Triangulation The class `Regular_triangulation_3` implements incremental regular triangulations, also known as weighted Delaunay triangulations. -Let\f$ {p}^{(w)}=(p,w_p), p\in\mathbb{R}^3, w_p\in\mathbb{R}\f$ and -\f$ {z}^{(w)}=(z,w_z), z\in\mathbb{R}^3, w_z\in\mathbb{R}\f$ be two weighted points. +Let\f$ {p}^{(w)}=(p,w_p), p\in\mathbb{R}^3, w_p\in\mathbb{R}\f$ and +\f$ {z}^{(w)}=(z,w_z), z\in\mathbb{R}^3, w_z\in\mathbb{R}\f$ be two weighted points. A weighted point \f$ {p}^{(w)}=(p,w_p)\f$ can also be seen as a sphere of center \f$ p\f$ and -radius \f$ \sqrt{w_p}\f$. +radius \f$ \sqrt{w_p}\f$. The power product between \f$ {p}^{(w)}\f$ and \f$ {z}^{(w)}\f$ is -defined as +defined as \f[ \Pi({p}^{(w)},{z}^{(w)}) = {\|{p-z}\|^2-w_p-w_z} \f] where \f$ \|{p-z}\|\f$ is the Euclidean distance between \f$ p\f$ and \f$ z\f$. @@ -169,7 +169,7 @@ called the power circle. The two weighted points on the line defined by these two points. -Let \f$ {S}^{(w)}\f$ be a set of weighted points in \f$ \mathbb{R}^3\f$. +Let \f$ {S}^{(w)}\f$ be a set of weighted points in \f$ \mathbb{R}^3\f$. A sphere \f$ {z}^{(w)}\f$ is said to be regular if \f$ \forall {p}^{(w)}\in{S}^{(w)}, \Pi{({p}^{(w)},{z}^{(w)})}\geq 0\f$. @@ -178,9 +178,9 @@ A triangulation of \f$ {S}^{(w)}\f$ is regular if the power spheres of all simplices are regular. The regular triangulation of -\f$ {S}^{(w)}\f$ is in fact the projection onto \f$ \mathbb{R}^3\f$ of the convex hull +\f$ {S}^{(w)}\f$ is in fact the projection onto \f$ \mathbb{R}^3\f$ of the convex hull of the four-dimensional points \f$ (p,\|p-O\|^2-w_p),\f$ for -\f$ {p}^{(w)}=(p,w_p)\in{S}^{(w)}\f$. +\f$ {p}^{(w)}=(p,w_p)\in{S}^{(w)}\f$. Note that all points of \f$ {S}^{(w)}\f$ do not necessarily appear as vertices of the regular triangulation. To know more about regular triangulations, see for @@ -192,7 +192,7 @@ Delaunay triangulation. The implementation of 3D regular triangulation supports insertions of weighted points, and vertex removals. Displacements are not supported in the current implementation. -\section Triangulation3secdesign Software Design +\section Triangulation3secdesign Software Design The main classes `Triangulation_3`, `Delaunay_triangulation_3` and `Regular_triangulation_3` are connected to each other by the @@ -225,17 +225,17 @@ Chapter \ref chapterTDS3 "3D Triangulation Data Structure". triangulation class, described in Section \ref Triangulation3seclocpol.
-Optionally, the main Delaunay and regular triangulations algorithms (insert, remove) +Optionally, the main Delaunay and regular triangulations algorithms (insert, remove) support multi-core shared-memory architectures to take advantage of available parallelism. -For this purpose, a model of the concept `SurjectiveLockDataStructure` can be -given as fourth template parameter; it defaults to +For this purpose, a model of the concept `SurjectiveLockDataStructure` can be +given as fourth template parameter; it defaults to `Spatial_lock_grid_3`. This data structure allows to lock points with coordinates (x, y, z) in a 3D domain. When a thread owns the lock on a point, no other thread can lock this point. Locking a facet (resp. a cell) -boils down to locking all its 3 (resp. 4) incident vertices. +boils down to locking all its 3 (resp. 4) incident vertices. See Section \ref Triangulation_3ParallelAlgorithms for more details. -\subsection Triangulation3secTraits The Geometric Traits Parameter +\subsection Triangulation3secTraits The Geometric Traits Parameter The first template parameter of the triangulation class `Triangulation_3` @@ -252,7 +252,7 @@ class of `Delaunay_triangulation_3` must define predicates to test for the In addition to the requirements described before, the geometric traits class of `Regular_triangulation_3` must define predicates to test for the -power distances and orientation tests for power spheres. +power distances and orientation tests for power spheres. It is described by the concept `RegularTriangulationTraits_3`, which refines `TriangulationTraits_3`. @@ -262,7 +262,7 @@ All kernels provided by \cgal can all be used as models for the geometric traits parameter. -\subsection Triangulation3sectds The Triangulation Data Structure Parameter +\subsection Triangulation3sectds The Triangulation Data Structure Parameter The second template parameter of the main classes (`Triangulation_3`, `Delaunay_triangulation_3` and `Regular_triangulation_3`) is a @@ -288,17 +288,17 @@ all the triangulation classes, so it need not be specified by the user unless he wants to use a different triangulation data structure or a different vertex or cell base class. -\subsection Triangulation3seclocpol The Location Policy Parameter +\subsection Triangulation3seclocpol The Location Policy Parameter The Delaunay triangulation class supports an optional feature which maintains -an additional data structure for fast point location queries. +an additional data structure for fast point location queries. The fast location policy should be used when the user inserts points in a random order or needs to do many unrelated queries. If the user is able to give a good hint to help the point location of its queries (and its newly inserted points), then it should prefer the default policy. In such a case where good hints are provided, the default policy save some memory (few percents), and is faster. -Notice that if points are not inserted one by one, but as a range, then a good hint is +Notice that if points are not inserted one by one, but as a range, then a good hint is automatically computed using spatial sort. Reading Section \ref Triangulation3seccomplexity on complexity and @@ -395,28 +395,28 @@ Section \ref TDS3secdesign "Software Design" provides more detailed information. \subsection Triangulation_3ParallelAlgorithms Parallel Algorithms -Parallel algorithms of `Delaunay_triangulation_3` and -`Regular_triangulation_3` are enabled +Parallel algorithms of `Delaunay_triangulation_3` and +`Regular_triangulation_3` are enabled if the `TriangulationDataStructure_3::Concurrency_tag` type is `Parallel_tag` and a -reference to a lock data structure instance is provided via the constructor or +reference to a lock data structure instance is provided via the constructor or by using `Triangulation_3::set_lock_data_structure`. This data structure -must be a model of the concept `SurjectiveLockDataStructure` and can be -optionally given as a template parameter of the triangulation; +must be a model of the concept `SurjectiveLockDataStructure` and can be +optionally given as a template parameter of the triangulation; it defaults to `Spatial_lock_grid_3`. -Note that the parallel Delaunay -triangulation must use the default compact location policy (and not the fast -one). If those conditions are fulfilled, the insertion/removal of a -range of points will be performed in parallel, and the individual +Note that the parallel Delaunay +triangulation must use the default compact location policy (and not the fast +one). If those conditions are fulfilled, the insertion/removal of a +range of points will be performed in parallel, and the individual insert/remove operations will be optionally thread-safe. -Parallel algorithms require the program to be linked against +Parallel algorithms require the program to be linked against the Intel TBB library. To control the number of threads used, the user may use the tbb::task_scheduler_init class. -See the TBB documentation +See the TBB documentation for more details. -\section Triangulation3secexamples Examples +\section Triangulation3secexamples Examples \subsection Triangulation_3BasicExample Basic Example @@ -431,7 +431,7 @@ cell. It uses the default parameter of the `Triangulation_3` class. The following two examples show how the user can plug his own vertex base in a triangulation. Changing the cell base is similar. -\subsubsection Triangulation3secexamplescolor Adding a Color +\subsubsection Triangulation3secexamplescolor Adding a Color When the user doesn't need to add a type in a vertex which depends on the `TriangulationDataStructure_3` (e.g. a `Vertex_handle` or @@ -457,10 +457,10 @@ The most efficient method to insert (weighted) points in a Delaunay (or regular) triangulation is to provide an iterator range over (weighted) points to the insert function. However, an iterator range of (weighted) points does not allow to set different information to each vertex. -To solve this problem, in the case the vertex type of the triangulation +To solve this problem, in the case the vertex type of the triangulation is a model of the concept `TriangulationVertexBaseWithInfo_3` -(such as `Triangulation_vertex_base_with_info_3`), we provide three examples -doing the same operation: set an unsigned integer as the information +(such as `Triangulation_vertex_base_with_info_3`), we provide three examples +doing the same operation: set an unsigned integer as the information of each vertex. The value of this unsigned integer is the initial order of the corresponding point given in the range. @@ -505,7 +505,7 @@ Note that you only need the iterator type if you combine the pre \cpp 11 `for`-l \cgalExample{Triangulation_3/for_loop.cpp} -\subsection Triangulation3secsimplex The Simplex Class +\subsection Triangulation3secsimplex The Simplex Class The triangulation defines a `Triangulation_3::Simplex` class that represents a simplex (vertex, edge, facet or cell). This example demonstrates how @@ -513,7 +513,7 @@ simplices can be stored in a set. \cgalExample{Triangulation_3/simplex.cpp} -\subsection Triangulation3exfastlocation Fast Point Location for Delaunay Triangulations +\subsection Triangulation3exfastlocation Fast Point Location for Delaunay Triangulations \cgalExample{Triangulation_3/fast_location_3.cpp} @@ -545,7 +545,7 @@ be hidden and do not result in vertices in the triangulation. \subsubsection Triangulation_3RegularTriangulationInfo Regular Triangulation with Custom Vertex This example shows that one must use the class `Regular_triangulation_vertex_base_3` as vertex base class, -if one has to specifiy the template parameter. +if one has to specifiy the template parameter. \cgalExample{Triangulation_3/regular_with_info_3.cpp} @@ -578,7 +578,7 @@ Result of the run of the draw_triangulation_3 program. A window shows the 3D tri \cgalFigureEnd -\section Triangulation3seccomplexity Complexity and Performance +\section Triangulation3seccomplexity Complexity and Performance In 3D, the worst case complexity of a triangulation is quadratic in the number of points. For Delaunay triangulations, this bound is reached in cases such as @@ -594,7 +594,7 @@ as points distributed on surfaces under some conditions. There are several algorithms provided in this package. We will focus here on the following ones and give practical numbers on their efficiency :
    -
  • construction of a triangulation from a range of points, +
  • construction of a triangulation from a range of points,
  • location of a point (using the `locate` function),
  • removal of a vertex (using the `remove` function).
@@ -632,170 +632,170 @@ Xeon 3GHz processor and 32GB of RAM (a recent desktop machine as of 2009). -Delaunay +Delaunay -Delaunay +Delaunay -Regular +Regular -Regular +Regular -%Fast location +%Fast location -No hidden points +No hidden points
-Construction from \f$ 10^2\f$ points +Construction from \f$ 10^2\f$ points -0.00054 +0.00054 -0.000576 +0.000576 -0.000948 +0.000948 -0.000955 +0.000955 -Construction from \f$ 10^3\f$ points +Construction from \f$ 10^3\f$ points -0.00724 +0.00724 -0.00748 +0.00748 -0.0114 +0.0114 0.0111 -Construction from \f$ 10^4\f$ points +Construction from \f$ 10^4\f$ points -0.0785 +0.0785 -0.0838 +0.0838 -0.122 +0.122 -0.117 +0.117 -Construction from \f$ 10^5\f$ points +Construction from \f$ 10^5\f$ points -0.827 +0.827 -0.878 +0.878 -1.25 +1.25 -1.19 +1.19 -Construction from \f$ 10^6\f$ points +Construction from \f$ 10^6\f$ points -8.5 +8.5 -9.07 +9.07 -12.6 +12.6 -12.2 +12.2 -Construction from \f$ 10^7\f$ points +Construction from \f$ 10^7\f$ points -87.4 +87.4 -92.5 +92.5 -129 +129 -125 +125
-Point location in \f$ 10^2\f$ points +Point location in \f$ 10^2\f$ points -9.93e-07 +9.93e-07 -1.06e-06 +1.06e-06 -7.19e-06 +7.19e-06 -6.99e-06 +6.99e-06 -Point location in \f$ 10^3\f$ points +Point location in \f$ 10^3\f$ points -2.25e-06 +2.25e-06 -1.93e-06 +1.93e-06 -1.73e-05 +1.73e-05 -1.76e-05 +1.76e-05 -Point location in \f$ 10^4\f$ points +Point location in \f$ 10^4\f$ points -4.79e-06 +4.79e-06 -3.09e-06 +3.09e-06 -3.96e-05 +3.96e-05 -3.76e-05 +3.76e-05 -Point location in \f$ 10^5\f$ points +Point location in \f$ 10^5\f$ points -2.98e-05 +2.98e-05 -6.12e-06 +6.12e-06 -1.06e-04 +1.06e-04 -1.06e-04 +1.06e-04 -Point location in \f$ 10^6\f$ points +Point location in \f$ 10^6\f$ points -1e-04 +1e-04 -9.65e-06 +9.65e-06 -2.7e-04 +2.7e-04 -2.67e-04 +2.67e-04 -Point location in \f$ 10^7\f$ points +Point location in \f$ 10^7\f$ points -2.59e-04 +2.59e-04 -1.33e-05 +1.33e-05 -6.25e-04 +6.25e-04 -6.25e-04 +6.25e-04
-Vertex removal +Vertex removal -1e-04 +1e-04 -1.03e-04 +1.03e-04 -1.42e-04 +1.42e-04 -1.38e-04 +1.38e-04
@@ -809,16 +809,16 @@ in \cgalCite{msri52:liu-snoeyink-05}. \subsection Triangulation_3ParallelPerformance Parallel Performance Figure \cgalFigureRef{Triangulation3figparallelspeedup} shows insertion -and removal speed-ups obtained using the parallel version of the -triangulation algorithms of \cgal 4.5. The machine used is a PC running -Windows 7 64-bits with two 6-core +and removal speed-ups obtained using the parallel version of the +triangulation algorithms of \cgal 4.5. The machine used is a PC running +Windows 7 64-bits with two 6-core Intel Xeon CPU X5660 clocked at 2.80 GHz -with 32GB of RAM. The program has been compiled with +with 32GB of RAM. The program has been compiled with Microsoft Visual C++ 2012 in Release mode. \cgalFigureBegin{Triangulation3figparallelspeedup,DT3_parallel_benchmark.png} Speed-up obtained for the insertion of 1M points randomly generated inside -a cube (red), and the removal of 100K of them (blue), compared +a cube (red), and the removal of 100K of them (blue), compared to the sequential version of the algorithm. \cgalFigureEnd @@ -856,48 +856,48 @@ points, as measured empirically using `Memory_sizer` for large triangulations -Delaunay +Delaunay -Delaunay +Delaunay -Regular +Regular -Regular +Regular -%Fast location +%Fast location -No hidden points +No hidden points
-32bit +32bit -274 +274 -291 +291 -336 +336 -282 +282
-64bit +64bit -519 +519 -553 +553 -635 +635 -527 +527
@@ -960,15 +960,15 @@ also be found in \cgalCite{cgal:dp-eegpd-03}. -Random +Random -Ellipsoid +Ellipsoid -Buddha +Buddha -Molecule +Molecule -Dryer +Dryer @@ -981,76 +981,76 @@ also be found in \cgalCite{cgal:dp-eegpd-03}. -%Handle +%Handle -Number of points +Number of points -100000 +100000 -100000 +100000 -542548 +542548 -525296 +525296 -49787 +49787
-`Simple_cartesian` +`Simple_cartesian` -0.69 +0.69 -0.627 +0.627 -4.21 +4.21 -3.8 +3.8 -\f$ \infty \f$-loop +\f$ \infty \f$-loop
-`Exact_predicates_inexact_constructions_kernel` +`Exact_predicates_inexact_constructions_kernel` -0.824 +0.824 -0.749 +0.749 -4.99 +4.99 -4.64 +4.64 -1.68 +1.68
-`Exact_predicates_exact_constructions_kernel` +`Exact_predicates_exact_constructions_kernel` -4.59 +4.59 -3.85 +3.85 -30.1 +30.1 -26.4 +26.4 -4.57 +4.57
-`Simple_cartesian` +`Simple_cartesian` -492 +492 -534 +534 -1120 +1120 -1030 +1030 -75.2 +75.2
@@ -1058,7 +1058,7 @@ Number of points Running times (seconds) for various kernels and data sets. \cgalFigureCaptionEnd - + \cgalFigureBegin{Triangulation3figdatasets,api1_01.png,b35-1.png,HD.png} Data sets used in the benchmark of \cgalFigureRef{Triangulation3figkernelsanddatasets}. \cgalFigureEnd @@ -1105,7 +1105,7 @@ in \cgalCite{cgal:dt-pvrdr-06}, which allowed to release this functionality in \cgal 3.2. In 2006, Nico Kruithof wrote the `Triangulation_simplex_3` class -that can store simplices of any dimension and improved the internal +that can store simplices of any dimension and improved the internal organization of the code. As of March 2007, Christophe Delage made the iterator range insert methods and @@ -1141,6 +1141,6 @@ The authors wish to thank Lutz Kettner for inspiring discussions about the design of \cgal. Jean-Daniel Boissonnat is also acknowledged \cgalCite{bdty-tcgal-00}. -*/ +*/ } /* namespace CGAL */ diff --git a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt index 275ccbd62ec..770a6f6db74 100644 --- a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt @@ -58,8 +58,8 @@ if ( CGAL_FOUND ) endif() else() - + message(STATUS "This program requires the CGAL library, and will not be compiled.") - + endif() diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 74bec003c40..21f28bfd86e 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -59,46 +59,46 @@ struct Incrementer { Incrementer() {} void increment( SCI& sci ) { sci.walk_to_next(); } }; // struct Incrementer - + } // namespace internal // provides an iterator over the cells intersected by a line segment. /* - * The `Triangulation_segment_traverser_3` iterates over the cells - * of a `Triangulation_3` by following a straight line segment \f$ st \f$. + * The `Triangulation_segment_traverser_3` iterates over the cells + * of a `Triangulation_3` by following a straight line segment \f$ st \f$. * - * This class is closely related to `Triangulation_3::locate(...)`. - * However, unlike this `locate(...)` method, all the cells traversed - * by the `Triangulation_segment_traverser_3` intersect the interior of the line - * segment \f$ st \f$. + * This class is closely related to `Triangulation_3::locate(...)`. + * However, unlike this `locate(...)` method, all the cells traversed + * by the `Triangulation_segment_traverser_3` intersect the interior of the line + * segment \f$ st \f$. * - * Traversal starts from a cell containing \f$ s \f$ and it ends in a cell containing - * \f$ t \f$. - * If \f$ st \f$ is coplanar with a facet or collinear with an edge, at most one of the - * incident cells is traversed. - * If \f$ st \f$ intersects an edge or vertex, at most two incident cells are traversed: - * the cells intersected by \f$ st \f$ strictly in their interior. + * Traversal starts from a cell containing \f$ s \f$ and it ends in a cell containing + * \f$ t \f$. + * If \f$ st \f$ is coplanar with a facet or collinear with an edge, at most one of the + * incident cells is traversed. + * If \f$ st \f$ intersects an edge or vertex, at most two incident cells are traversed: + * the cells intersected by \f$ st \f$ strictly in their interior. * - * If \f$ s \f$ lies on the convex hull, traversal starts in an incident cell inside - * the convex hull. Similarly, if \f$ t \f$ lies on the convex hull, traversal ends in - * an adjacent cell inside the convex hull. + * If \f$ s \f$ lies on the convex hull, traversal starts in an incident cell inside + * the convex hull. Similarly, if \f$ t \f$ lies on the convex hull, traversal ends in + * an adjacent cell inside the convex hull. * - * Both \f$ s \f$ and \f$ t \f$ may lie outside the convex hull of the triangulation, - * but they must lie within the affine hull of the triangulation. In either case, the - * finite facet of any infinite cells traversed must intersect \f$ st \f$. + * Both \f$ s \f$ and \f$ t \f$ may lie outside the convex hull of the triangulation, + * but they must lie within the affine hull of the triangulation. In either case, the + * finite facet of any infinite cells traversed must intersect \f$ st \f$. * - * The traverser may be applied to any triangulation of dimension > 0. - * However, for triangulations of dimension 1, the functionality is somewhat trivial. + * The traverser may be applied to any triangulation of dimension > 0. + * However, for triangulations of dimension 1, the functionality is somewhat trivial. * - * The traverser becomes invalid whenever the triangulation is changed. + * The traverser becomes invalid whenever the triangulation is changed. * - * \tparam Tr_ is the triangulation type to traverse. + * \tparam Tr_ is the triangulation type to traverse. * * \cgalModels{ForwardIterator} * - * \sa `Triangulation_3` - * \sa `Forward_circulator_base` + * \sa `Triangulation_3` + * \sa `Forward_circulator_base` */ template < class Tr_, class Inc = internal::Incrementer > class Triangulation_segment_cell_iterator_3 @@ -136,7 +136,7 @@ public: typedef std::ptrdiff_t difference_type; //< defines the signed integral type that can hold the distance between two iterators. typedef std::forward_iterator_tag iterator_category; //< defines the iterator category. // \} - + // describes the iterator type when applied to another type of triangulation or incrementer. template < class Tr2, class Inc2 > struct Rebind { typedef Triangulation_segment_cell_iterator_3 Other; }; @@ -172,44 +172,44 @@ public: // \{ // constructs an iterator. /* \param tr the triangulation to iterate though. This triangulation must have dimension > 0. - * \param s the source vertex. This vertex must be initialized and cannot be the infinite vertex. - * \param t the target vertex. This vertex must be initialized and cannot be the infinite vertex. - * It cannot equal `s`. + * \param s the source vertex. This vertex must be initialized and cannot be the infinite vertex. + * \param t the target vertex. This vertex must be initialized and cannot be the infinite vertex. + * It cannot equal `s`. */ - Triangulation_segment_cell_iterator_3( const Tr* tr, Vertex_handle s, Vertex_handle t ); + Triangulation_segment_cell_iterator_3( const Tr* tr, Vertex_handle s, Vertex_handle t ); // constructs an iterator. /* \param tr the triangulation to iterate though. This triangulation must have dimension > 0. - * \param s the source vertex. This vertex must be initialized and cannot be the infinite vertex. - * \param t the target point. This point must be initialized and it cannot be be at the same location as `s`. - * If `tr` has dimension < 3, `t` must lie inside the affine hull of `tr`. + * \param s the source vertex. This vertex must be initialized and cannot be the infinite vertex. + * \param t the target point. This point must be initialized and it cannot be be at the same location as `s`. + * If `tr` has dimension < 3, `t` must lie inside the affine hull of `tr`. */ - Triangulation_segment_cell_iterator_3( const Tr* tr, Vertex_handle s, const Point& t ); + Triangulation_segment_cell_iterator_3( const Tr* tr, Vertex_handle s, const Point& t ); // constructs an iterator. /* \param tr the triangulation to iterate though. This triangulation must have dimension > 0. - * \param s the source point. This point must be initialized and it cannot be be at the same location as `t`. - * \param t the target vertex. This vertex must be initialized and cannot be the infinite vertex. - * If `tr` has dimension < 3, `s` must lie inside the affine hull of `tr`. - * \param hint the starting point to search for `s`. + * \param s the source point. This point must be initialized and it cannot be be at the same location as `t`. + * \param t the target vertex. This vertex must be initialized and cannot be the infinite vertex. + * If `tr` has dimension < 3, `s` must lie inside the affine hull of `tr`. + * \param hint the starting point to search for `s`. */ - Triangulation_segment_cell_iterator_3( const Tr* tr, const Point& s, Vertex_handle t, Cell_handle hint = Cell_handle() ); + Triangulation_segment_cell_iterator_3( const Tr* tr, const Point& s, Vertex_handle t, Cell_handle hint = Cell_handle() ); // constructs an iterator. /* \param tr the triangulation to iterate though. This triangulation must have dimension > 0. - * \param s the source point. This point must be initialized. If `tr` has dimension < 3, `s` must lie inside - * the affine hull of `tr`. - * \param t the target point. This point must be initialized and it cannot be be at the same location as `s`. - * If `tr` has dimension < 3, `t` must lie inside the affine hull of `tr`. - * \param hint the starting point to search for `s`. + * \param s the source point. This point must be initialized. If `tr` has dimension < 3, `s` must lie inside + * the affine hull of `tr`. + * \param t the target point. This point must be initialized and it cannot be be at the same location as `s`. + * If `tr` has dimension < 3, `t` must lie inside the affine hull of `tr`. + * \param hint the starting point to search for `s`. */ Triangulation_segment_cell_iterator_3( const Tr* tr, const Point& s, const Point& t, Cell_handle hint = Cell_handle() ); - + // constructs an iterator. /* \param tr the triangulation to iterate though. This triangulation must have dimension > 0. - * \param S the segment to be traversed. If `tr` has dimension < 3, `S` must lie inside - * the affine hull of `tr`. `S` must not be degenerate, i.e. its source and target must not be equal. - * \param hint the starting point to search for `S`. + * \param S the segment to be traversed. If `tr` has dimension < 3, `S` must lie inside + * the affine hull of `tr`. `S` must not be degenerate, i.e. its source and target must not be equal. + * \param hint the starting point to search for `S`. */ Triangulation_segment_cell_iterator_3( const Tr* tr, const Segment& S, Cell_handle hint = Cell_handle() ); // \} @@ -224,7 +224,7 @@ public: virtual #endif ~Triangulation_segment_cell_iterator_3() {} - + public: // \name Accessors @@ -239,15 +239,15 @@ public: // gives the target point of the segment follwoed. /* \return the target point. - */ + */ const Point& target() const { return _target; } // gives a handle to the current cell. /* By invariance, this cell is intersected by the segment - * between `source()` and `target()`. - * \return a handle to the current cell. - * \sa `cell()`. - */ + * between `source()` and `target()`. + * \return a handle to the current cell. + * \sa `cell()`. + */ Cell_handle handle() { return std::get<0>(_cur); @@ -255,20 +255,20 @@ public: // gives the previous cell. /* This cell is uninitialized until the iterator leaves the initial - * cell. - * By invariance, once initialized, this cell must be intersected by the segment - * between `source()` and `target()`. - * \return the previous cell. - * \sa `handle()`. - */ + * cell. + * By invariance, once initialized, this cell must be intersected by the segment + * between `source()` and `target()`. + * \return the previous cell. + * \sa `handle()`. + */ Cell_handle previous() const { return prev_cell(); } // provides a dereference operator. - /* \return a pointer to the current cell. - */ + /* \return a pointer to the current cell. + */ Cell* operator->() { return &*std::get<0>(_cur); @@ -276,46 +276,46 @@ public: // provides an indirection operator. /* \return the current cell. - */ + */ Cell& operator*() { return *std::get<0>(_cur); } // provides a conversion operator. - /* \return a handle to the current cell. - */ + /* \return a handle to the current cell. + */ operator const Cell_handle() const { return std::get<0>(_cur); } // provides a conversion operator. - /* \return the simplex through wich the current cell was entered. - */ + /* \return the simplex through wich the current cell was entered. + */ operator const Simplex() const { return _cur; } // checks whether the iterator has reached the final cell, which contains the `target()`. /* If the `target()` lies on a facet, edge, or vertex, the final cell is the cell containing - * the interior of the segment between `source()` and `target()`. - * \return true iff the current cell contains the `target()`. - */ + * the interior of the segment between `source()` and `target()`. + * \return true iff the current cell contains the `target()`. + */ bool has_next() const { return this->cell() != Cell_handle(); } // gives the simplex through which the current cell was entered. - /* For the first cell, containing the `source()` \f$ s \f$, + /* For the first cell, containing the `source()` \f$ s \f$, * this indicates the location of \f$ s \f$ in this cell. - */ + */ void entry( Locate_type& lt, int& li, int& lj ) const { lt = this->lt(); li = this->li(); lj = this->lj(); } // gives the simplex through which the previous cell was exited. - /* \pre the current cell is not the initial cell. - */ + /* \pre the current cell is not the initial cell. + */ void exit( Locate_type& lt, int& li, int& lj ) const { lt = prev_lt(); li = prev_li(); lj = prev_lj(); @@ -329,63 +329,63 @@ public: // \name Mutators // \{ // provides the increment postfix operator. - /* After incrementing the iterator, the current cell intersects the segment - * between `source()` and `target()` closer to the `target()` than the previous cell. - * \sa `operator++(int)`. + /* After incrementing the iterator, the current cell intersects the segment + * between `source()` and `target()` closer to the `target()` than the previous cell. + * \sa `operator++(int)`. * \pre The current cell does not contain the `target()`. */ SCI& operator++(); - + // provides the increment prefix operator. - /* After incrementing the iterator, the current cell intersects the segment - * between `source()` and `target()` closer to the `target()` than the previous cell. - * than the previous cell. - * \sa `operator++()`. + /* After incrementing the iterator, the current cell intersects the segment + * between `source()` and `target()` closer to the `target()` than the previous cell. + * than the previous cell. + * \sa `operator++()`. * \pre The current cell does not contain the `target()`. */ SCI operator++( int ); // iterates to the final cell, which contains the `target()`. - /* \return the final cell. + /* \return the final cell. */ Cell_handle complete(); // \} - + public: // \name Comparison // \{ // compares this iterator with `sci`. /* \param sci the other iterator. - * \return true iff the other iterator iterates the same triangulation along the same line segment - * and has the same current cell. - * \sa `operator!=( const SCI& t )`. + * \return true iff the other iterator iterates the same triangulation along the same line segment + * and has the same current cell. + * \sa `operator!=( const SCI& t )`. */ bool operator==( const SCI& sci ) const; - + // compares this iterator with `sci`. /* \param sci the other iterator. - * \return `false` iff the other iterator iterates the same triangulation along the same line segment - * and has the same current cell. - * \sa `operator==( const SCI& t ) const`. + * \return `false` iff the other iterator iterates the same triangulation along the same line segment + * and has the same current cell. + * \sa `operator==( const SCI& t ) const`. */ bool operator!=( const SCI& sci ) const; // compares the current cell with `ch`. /* \param ch a handle to the other cell. - * \return true iff the current cell is the same as the one pointed to by `ch`. - * \sa `operator!=( const Cell_handle& ch ) const`. - * \sa `operator==( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_cell_iterator_3 t )`. + * \return true iff the current cell is the same as the one pointed to by `ch`. + * \sa `operator!=( const Cell_handle& ch ) const`. + * \sa `operator==( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_cell_iterator_3 t )`. */ bool operator==( const Cell_handle& ch ) const { return ch == std::get<0>(_cur); } - + // compares the current cell with `ch`. /* \param ch a handle to the other cell. - * \return `false` iff the current cell is the same as the one pointed to by `ch`. - * \sa `operator==( const Cell_handle& ch )`. - * \sa `operator!=( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_cell_iterator_3 t )`. + * \return `false` iff the current cell is the same as the one pointed to by `ch`. + * \sa `operator==( const Cell_handle& ch )`. + * \sa `operator!=( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_cell_iterator_3 t )`. */ bool operator!=( const Cell_handle& ch ) const { @@ -393,21 +393,21 @@ public: } // \} - bool operator==( Nullptr_t CGAL_triangulation_assertion_code(n) ) const; - bool operator!=( Nullptr_t n ) const; + bool operator==( Nullptr_t CGAL_triangulation_assertion_code(n) ) const; + bool operator!=( Nullptr_t n ) const; protected: // \internal \name Protected Member Functions // \{ // walks to the next cell. /* \sa `complete()`. - */ + */ void walk_to_next(); - + // increments the iterator. /* This method may perform more actions based on the superclass. * \sa `complete()`. - */ + */ void increment() { typedef typename Incrementer::SCI Expected; #ifdef CGAL_TST_ASSUME_CORRECT_TYPES @@ -429,7 +429,7 @@ private: std::pair walk_to_next_3(const Simplex& prev, const Simplex& cur) const; void walk_to_next_3_inf( int inf ); - + // walk_to_next(), if the triangulation is 2D. void walk_to_next_2(); void walk_to_next_2_inf( int inf ); @@ -481,23 +481,23 @@ private: int const& prev_lj() const { return std::get<3>(_prev); } }; // class Triangulation_segment_cell_iterator_3 - + // compares a handle to a cell to a traverser. /* \param ch the handle to a cell. - * \param t the traverser. - * \return true iff the cell currently traversed by `t` is the same as the one pointed to by `ch`. - * \sa `operator!=( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_cell_iterator_3 t )`. - * \sa `Triangulation_segment_cell_iterator_3::operator==( const Cell_handle& ch )`. + * \param t the traverser. + * \return true iff the cell currently traversed by `t` is the same as the one pointed to by `ch`. + * \sa `operator!=( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_cell_iterator_3 t )`. + * \sa `Triangulation_segment_cell_iterator_3::operator==( const Cell_handle& ch )`. */ template < class Tr, class Inc > inline bool operator==( typename Tr::Cell_handle ch, Triangulation_segment_cell_iterator_3 tci ) { return tci == ch; } // compares a handle to a cell to a traverser. /* \param ch the handle to a cell. - * \param t the traverser. - * \return `false` iff the cell currently traversed by `t` is the same as the one pointed to by `ch`. - * \sa `operator==( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_cell_iterator_3 t )`. - * \sa `Triangulation_segment_cell_iterator_3::operator!=( const Cell_handle& ch )`. + * \param t the traverser. + * \return `false` iff the cell currently traversed by `t` is the same as the one pointed to by `ch`. + * \sa `operator==( typename TriangulationTraits_3::Cell_handle ch, Triangulation_segment_cell_iterator_3 t )`. + * \sa `Triangulation_segment_cell_iterator_3::operator!=( const Cell_handle& ch )`. */ template < class Tr, class Inc > inline bool operator!=( typename Tr::Cell_handle ch, Triangulation_segment_cell_iterator_3 tci ) { return tci != ch; } @@ -622,7 +622,7 @@ private: case Locate_type::EDGE: _curr_simplex = Edge(cell, li, lj); break; - case Locate_type::FACET: + case Locate_type::FACET: _curr_simplex = Facet(cell, li); break; //the 3 cases below correspond to the case when _cell_iterator @@ -885,7 +885,7 @@ public: } // provides a dereference operator. - /* \return a pointer to the current cell. + /* \return a pointer to the current cell. */ const Simplex_3* operator->() { return &_curr_simplex; } diff --git a/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h index 7168ffe5aa5..d10f242eb83 100644 --- a/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h @@ -37,7 +37,7 @@ Triangulation_segment_cell_iterator_3( const Tr* tr, Vertex_handle s, Vertex_han _target = t->point(); _s_vertex = s; _t_vertex = t; - + Cell_handle c = s->cell(); // If a vertex of an infinite cell, we start inside the convex hull. int inf; @@ -246,7 +246,7 @@ template < class Tr, class Inc > void Triangulation_segment_cell_iterator_3:: walk_to_next() { CGAL_triangulation_precondition( has_next() ); - + // Check if the target is in the current cell. int ti; if( cell()->has_vertex( _t_vertex, ti ) ) { @@ -620,7 +620,7 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre CGAL_triangulation_assertion( pos == 6 ); prev_after_walk = Simplex( std::get<0>(cur), Tr::CELL, -1, -1 ); CGAL_triangulation_assertion( (! regular_case) || inside ); - break; + break; case 3: prev_after_walk = Simplex( std::get<0>(cur), Tr::FACET, 6-pos, -1 ); @@ -687,7 +687,7 @@ walk_to_next_3_inf( int inf ) o[li] = COPLANAR; continue; } - + // Skip the previous cell. Cell_handle next = cell()->neighbor(li); if( next == prev_cell() ) { @@ -954,7 +954,7 @@ walk_to_next_2() } case Tr::FACET: { int li = 0; - + Orientation o[3]; bool calc[3] = { false, false, false }; diff --git a/Triangulation_3/test/Triangulation_3/test_segment_cell_traverser_3.cpp b/Triangulation_3/test/Triangulation_3/test_segment_cell_traverser_3.cpp index 8caa8a077b2..96126c5708c 100644 --- a/Triangulation_3/test/Triangulation_3/test_segment_cell_traverser_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_segment_cell_traverser_3.cpp @@ -19,7 +19,7 @@ typedef DT::Segment_cell_iterator Segment_cell_iterator; int main(int argc, char* argv[]) { const std::vector points = { { -2, 0, 0 }, - { 2, 0, 0 }, + { 2, 0, 0 }, { 0, 1, -1 }, { 0, -1, -1 }, { 0, 0, 1 }, @@ -35,10 +35,10 @@ int main(int argc, char* argv[]) std::vector vertices; vertices.reserve(points.size()); - + DT dt; for(auto p: points) vertices.push_back(dt.insert(p)); - + Cell_handle c; assert( dt.is_valid() ); assert( dt.is_cell(vertices[0], vertices[2], vertices[3], vertices[4], c)); diff --git a/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp b/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp index c5cf3bf0b2d..3bb4a766245 100644 --- a/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp @@ -28,7 +28,7 @@ bool test(const DT& dt, const Big_tuple& tuple); int main(int, char* []) { const std::vector points = { { -2, 0, 0 }, - { 2, 0, 0 }, + { 2, 0, 0 }, { 0, 1, -1 }, { 0, -1, -1 }, { 0, 0, 1 }, @@ -83,7 +83,7 @@ bool test(const DT& dt, const Big_tuple& tuple) << p2 << " )\n#\n"; Segment_simplex_iterator st = dt.segment_traverser_simplices_begin(p1, p2); Segment_simplex_iterator stend = dt.segment_traverser_simplices_end(); - + unsigned int nb_cells = 0, nb_facets = 0, nb_edges = 0, nb_vertex = 0; unsigned int nb_collinear = 0; diff --git a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp index 4766765176c..18a856b26a4 100644 --- a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp @@ -14,7 +14,7 @@ // // $URL$ // $Id$ -// +// // // Author(s) : Jane Tournois From a49881536d9e9a8baed283d89a4b406b8ea2ab3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Fri, 10 Apr 2020 18:30:50 +0200 Subject: [PATCH 112/138] fix compilation errors and warnings --- .../CGAL/Triangulation_segment_traverser_3.h | 17 ++----- .../Triangulation_segment_traverser_3_impl.h | 46 ++++++++----------- .../test_segment_cell_traverser_3.cpp | 2 +- .../test_segment_simplex_traverser_3.cpp | 7 +-- 4 files changed, 29 insertions(+), 43 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 21f28bfd86e..46d137787d9 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -1,23 +1,16 @@ -//A class that follows a straight line through a Delaunay triangulation structure. -//Copyright (C) 2012 Utrecht University +// Copyright (C) 2012 Utrecht University +// All rights reserved. // // This file is part of CGAL (www.cgal.org). -// You can redistribute it and/or modify it under the terms of the GNU -// General Public License as published by the Free Software Foundation, -// either version 3 of the License, or (at your option) any later version. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. // // $URL$ // $Id$ -// SPDX-License-Identifier: GPL-3.0+ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// // // Author(s): Thijs van Lankveld, Jane Tournois + #ifndef CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_H #define CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_H diff --git a/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h index d10f242eb83..b0068beedb1 100644 --- a/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h @@ -1,20 +1,12 @@ -//A class that follows a straight line through a Delaunay triangulation structure. -//Copyright (C) 2012 Utrecht University +// Copyright (C) 2012 Utrecht University +// All rights reserved. // // This file is part of CGAL (www.cgal.org). -// You can redistribute it and/or modify it under the terms of the GNU -// General Public License as published by the Free Software Foundation, -// either version 3 of the License, or (at your option) any later version. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. // // $URL$ // $Id$ -// SPDX-License-Identifier: GPL-3.0+ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// // // Author(s): Thijs van Lankveld, Jane Tournois @@ -769,7 +761,7 @@ walk_to_next_2() switch( lt() ) { case Tr::VERTEX: { // First we try the incident edges. - Orientation ocw = CGAL::coplanar_orientation( *vert[li()], *vert[_tr->cw(li())], *vert[_tr->ccw(li())], _target ); + Orientation ocw = typename Gt::Coplanar_orientation_3()( *vert[li()], *vert[_tr->cw(li())], *vert[_tr->ccw(li())], _target ); if( cell()->neighbor( _tr->ccw(li()) ) != prev_cell() && ocw == NEGATIVE) { Cell_handle tmp = cell()->neighbor( _tr->ccw(li()) ); _prev = _cur; @@ -777,7 +769,7 @@ walk_to_next_2() li() = cell()->index( prev_cell()->vertex(li()) ); return; } - Orientation occw = CGAL::coplanar_orientation( *vert[li()], *vert[_tr->ccw(li())], *vert[_tr->cw(li())], _target ); + Orientation occw = typename Gt::Coplanar_orientation_3()( *vert[li()], *vert[_tr->ccw(li())], *vert[_tr->cw(li())], _target ); if( cell()->neighbor( _tr->cw(li()) ) != prev_cell() && occw == NEGATIVE) { Cell_handle tmp = cell()->neighbor( _tr->cw(li()) ); _prev = _cur; @@ -787,7 +779,7 @@ walk_to_next_2() } // Then we try the opposite edge. - Orientation op = CGAL::coplanar_orientation( *vert[_tr->ccw(li())], *vert[_tr->cw(li())], *vert[li()], _target ); + Orientation op = typename Gt::Coplanar_orientation_3()( *vert[_tr->ccw(li())], *vert[_tr->cw(li())], *vert[li()], _target ); if( op == NEGATIVE) { Cell_handle tmp = cell()->neighbor(li()); prev_cell() = cell(); @@ -850,7 +842,7 @@ walk_to_next_2() if( cell()->neighbor(lk) != prev_cell() ) { // Check the edge itself - switch( CGAL::coplanar_orientation( *vert[li()], *vert[lj()], *vert[lk], _target ) ) { + switch( typename Gt::Coplanar_orientation_3()( *vert[li()], *vert[lj()], *vert[lk], _target ) ) { //_prev = _cur; //code not reached case COLLINEAR: // The target lies in this cell. @@ -869,18 +861,18 @@ walk_to_next_2() } } - Orientation o = CGAL::coplanar_orientation( _source, *vert[lk], *vert[li()], _target ); + Orientation o = typename Gt::Coplanar_orientation_3()( _source, *vert[lk], *vert[li()], _target ); Orientation op; switch( o ) { case POSITIVE: { // The ray passes through the edge ik. - op = CGAL::coplanar_orientation( *vert[lk], *vert[li()], _source, _target ); + op = typename Gt::Coplanar_orientation_3()( *vert[lk], *vert[li()], _source, _target ); if( op == NEGATIVE ) { Cell_handle tmp = cell()->neighbor(lj()); prev_cell() = cell(); cell() = tmp; - if( CGAL::collinear( _source, *vert[li()], _target ) ) { + if( typename Gt::Collinear_3()( _source, *vert[li()], _target ) ) { prev_lt() = Tr::VERTEX; prev_li() = li(); lt() = Tr::VERTEX; @@ -900,13 +892,13 @@ walk_to_next_2() } default: { // The ray passes through the edge jk. - op = CGAL::coplanar_orientation( *vert[lk], *vert[lj()], _source, _target ); + op = typename Gt::Coplanar_orientation_3()( *vert[lk], *vert[lj()], _source, _target ); if( op == NEGATIVE ) { Cell_handle tmp = cell()->neighbor(li()); prev_cell() = cell(); cell() = tmp; - if( CGAL::collinear( _source, *vert[lj()], _target ) ) { + if( typename Gt::Collinear_3()( _source, *vert[lj()], _target ) ) { prev_lt() = Tr::VERTEX; prev_li() = lj(); lt() = Tr::VERTEX; @@ -964,13 +956,13 @@ walk_to_next_2() continue; // The target should lie on the other side of the edge. - Orientation op = CGAL::coplanar_orientation( *vert[_tr->ccw(li)], *vert[_tr->cw(li)], *vert[li], _target ); + Orientation op = typename Gt::Coplanar_orientation_3()( *vert[_tr->ccw(li)], *vert[_tr->cw(li)], *vert[li], _target ); if( op == POSITIVE ) continue; // The target should lie inside the wedge. if( !calc[_tr->ccw(li)] ) { - o[_tr->ccw(li)] = CGAL::coplanar_orientation( _source, *vert[_tr->ccw(li)], *vert[_tr->cw(li)], _target ); + o[_tr->ccw(li)] = typename Gt::Coplanar_orientation_3()( _source, *vert[_tr->ccw(li)], *vert[_tr->cw(li)], _target ); calc[_tr->ccw(li)] = true; } if( o[_tr->ccw(li)] == NEGATIVE ) @@ -982,7 +974,7 @@ walk_to_next_2() } if( !calc[_tr->cw(li)] ) { - o[_tr->cw(li)] = CGAL::coplanar_orientation( _source, *vert[_tr->cw(li)], *vert[li], _target ); + o[_tr->cw(li)] = typename Gt::Coplanar_orientation_3()( _source, *vert[_tr->cw(li)], *vert[li], _target ); calc[_tr->cw(li)] = true; } if( o[_tr->cw(li)] == POSITIVE ) @@ -1044,7 +1036,7 @@ walk_to_next_2_inf( int inf ) } // Check the neighboring cells. - Orientation occw = CGAL::coplanar_orientation( _source, + Orientation occw = typename Gt::Coplanar_orientation_3()( _source, cell()->vertex( _tr->ccw(inf))->point(), cell()->vertex(_tr->cw(inf))->point(), _target ); @@ -1054,7 +1046,7 @@ walk_to_next_2_inf( int inf ) _cur = Simplex( tmp, Tr::EDGE, tmp->index( prev_cell()->vertex( prev_li() ) ), tmp->index( prev_cell()->vertex( prev_lj() ) ) ); return; } - Orientation ocw = CGAL::coplanar_orientation( _source, + Orientation ocw = typename Gt::Coplanar_orientation_3()( _source, cell()->vertex( _tr->cw(inf))->point(), cell()->vertex(_tr->ccw(inf))->point(), _target ); @@ -1064,7 +1056,7 @@ walk_to_next_2_inf( int inf ) _cur = Simplex( tmp, Tr::EDGE, tmp->index( prev_cell()->vertex( prev_li() ) ), tmp->index( prev_cell()->vertex( prev_lj() ) ) ); return; } - Orientation op = CGAL::coplanar_orientation( + Orientation op = typename Gt::Coplanar_orientation_3()( cell()->vertex( _tr->ccw(inf) )->point(), cell()->vertex( _tr->cw(inf) )->point(), _source, _target ); diff --git a/Triangulation_3/test/Triangulation_3/test_segment_cell_traverser_3.cpp b/Triangulation_3/test/Triangulation_3/test_segment_cell_traverser_3.cpp index 96126c5708c..92c667aec72 100644 --- a/Triangulation_3/test/Triangulation_3/test_segment_cell_traverser_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_segment_cell_traverser_3.cpp @@ -16,7 +16,7 @@ typedef CGAL::Delaunay_triangulation_3< Kernel > DT; typedef DT::Cell_handle Cell_handle; typedef DT::Segment_cell_iterator Segment_cell_iterator; -int main(int argc, char* argv[]) +int main() { const std::vector points = { { -2, 0, 0 }, { 2, 0, 0 }, diff --git a/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp b/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp index 3bb4a766245..6ddc394f634 100644 --- a/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp @@ -77,16 +77,17 @@ bool test(const DT& dt, const Big_tuple& tuple) using std::get; const auto& p1 = get<0>(tuple); const auto& p2 = get<1>(tuple); +#ifdef CGAL_T3_TEST_SIMPLEX_TRAVERSER const auto& expected_results = get<2>(tuple); + unsigned int nb_cells = 0, nb_collinear = 0; +#endif + unsigned int nb_facets = 0, nb_edges = 0, nb_vertex = 0; std::cout << "\n#\n# Query segment: ( " << p1 << " , " << p2 << " )\n#\n"; Segment_simplex_iterator st = dt.segment_traverser_simplices_begin(p1, p2); Segment_simplex_iterator stend = dt.segment_traverser_simplices_end(); - unsigned int nb_cells = 0, nb_facets = 0, nb_edges = 0, nb_vertex = 0; - unsigned int nb_collinear = 0; - // Count the number of finite cells traversed. unsigned int inf = 0, fin = 0; for (; st != stend; ++st) From 2105aebb13ea92b0959275ebd518afdb46af8dcc Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 14 Apr 2020 15:11:50 +0200 Subject: [PATCH 113/138] add missing data --- .../test/Triangulation_3/data/blobby.xyz | 3288 +++++++++++++++++ 1 file changed, 3288 insertions(+) create mode 100644 Triangulation_3/test/Triangulation_3/data/blobby.xyz diff --git a/Triangulation_3/test/Triangulation_3/data/blobby.xyz b/Triangulation_3/test/Triangulation_3/data/blobby.xyz new file mode 100644 index 00000000000..79361121744 --- /dev/null +++ b/Triangulation_3/test/Triangulation_3/data/blobby.xyz @@ -0,0 +1,3288 @@ +0.092818821121200379 0.13662366613073784 0.11656471345703165 0 0 0 +0.076732984887419697 0.067323553856659224 0.029614529021827957 0 0 0 +-0.1090787838162971 0.10551983779004775 0.0071798521552504935 0 0 0 +-0.19017371055567872 0.064482799747027919 -0.025606212415708235 0 0 0 +0.077037077176859536 -0.0091049015008085599 0.057926846304230367 0 0 0 +-0.4751930092034885 0.010120850653908192 -0.055383754711487793 0 0 0 +0.061096696989897115 0.18971410578073139 -0.074216193202611053 0 0 0 +0.15813144726204448 0.0044570450138603224 -0.072325068392053243 0 0 0 +0.18047481433744766 0.0024795202240301129 0.022834356483752843 0 0 0 +0.0054709822961990229 -0.078060243231391546 -0.0021910989979146978 0 0 0 +0.073917650546617752 0.17745731952323435 0.10593594042180618 0 0 0 +0.023899231104743623 0.036552265552605046 -0.00060410184601694672 0 0 0 +-0.12062962633249352 0.021789626337054169 -0.093962736861220086 0 0 0 +-0.12735801671208119 0.081041522007081201 0.044450676795479843 0 0 0 +0.14527265444662646 0.15718773160348598 -0.023408421305891131 0 0 0 +-0.037808983531461615 -0.10990814383375459 -0.043411585236268119 0 0 0 +-0.036927650665578016 -0.02078558128123778 -0.040643593913508108 0 0 0 +-0.099040925895106102 0.13656844165697551 0.075222241964295972 0 0 0 +-0.14840794353207576 0.063877221312375276 0.0038798831721018057 0 0 0 +-0.11914788541866006 -0.063763862318915315 -0.10426757898470154 0 0 0 +0.20670465409602728 0.1562798424285371 0.0083928142622816393 0 0 0 +-0.17485731364776386 0.0091516551637710053 0.04095390886589978 0 0 0 +-0.067425944281036543 0.01638843155129624 -0.11843841263933526 0 0 0 +-0.035222607901843783 0.076335277411892999 -0.076777647780575317 0 0 0 +-0.094386643034904294 0.18258999531286069 -0.02409404881944599 0 0 0 +-0.03807958171492215 0.1824739440718377 -0.059334819384248005 0 0 0 +-0.118049084801646 -0.032766969953392178 -0.021283548122287721 0 0 0 +-0.23762281791643708 0.019804422140817152 0.0050083500379407841 0 0 0 +-0.014641109178469114 0.085474737628151165 -0.066357979276380957 0 0 0 +0.031518715638674311 -0.11907216380048731 -0.12732433956627642 0 0 0 +-0.10615637762651314 -0.0953622236567922 -0.12075074479965679 0 0 0 +-0.11636176767613043 0.042538447126362011 0.030594150237796353 0 0 0 +-0.093269521201250649 0.20371104167478343 0.036199827153661296 0 0 0 +-0.17825219907672613 -0.18630718420538772 0.02374822700102161 0 0 0 +-0.031764849269441342 -0.091252504984997679 0.10362536145503634 0 0 0 +0.01489489636494773 0.023318988208249652 -0.15178915478929272 0 0 0 +-0.42880569610386388 -0.03666748985762755 0.0043157472496600791 0 0 0 +-0.0053804417944327554 0.087519769015865834 -0.063325576514956544 0 0 0 +-0.27516054198599194 -0.051347934472712242 0.0160804523320347 0 0 0 +-0.042380522938622212 0.076683164267289883 -0.14282269104408427 0 0 0 +-0.20228381934855139 -0.0013196133103766661 -0.0016830996565753709 0 0 0 +0.09582001749888519 -0.076599680745615628 0.10674189820027771 0 0 0 +-0.33461192896884173 -0.056221297558355615 0.068857123705223205 0 0 0 +-0.029724681406135267 -0.15359253017353128 -0.14773454254007898 0 0 0 +-0.057178746969283156 -0.11313232167761215 0.12088940030908676 0 0 0 +-0.014144841569722677 -0.16193451632200229 -0.031078574778581031 0 0 0 +-0.10976760502734456 -0.10602949144352648 -0.094903084054041645 0 0 0 +-0.27308019374195958 -0.011690723948377196 0.073454419716617064 0 0 0 +-0.43599778774321313 -0.044772375859316926 -0.082610050827588419 0 0 0 +0.084346387794746513 -0.059768461319172766 0.144151905690975 0 0 0 +-0.025124808186991199 0.026963256033730232 0.10613168121456915 0 0 0 +-0.1568936564433715 0.13431044858185343 0.11060034862295307 0 0 0 +0.040437895135148338 -0.062026513293660712 0.11373850790302406 0 0 0 +0.14793975513820296 0.16859262377768103 0.065628728421847332 0 0 0 +-0.12562561928845012 0.012381078049700706 -0.12181399208568129 0 0 0 +0.073276971798625301 -0.065738702582740699 -0.12855506640263134 0 0 0 +0.14057596118776589 0.18493687973925421 -0.011459546990861186 0 0 0 +-0.097927504508087904 0.052702291538541168 -0.052960724826170119 0 0 0 +-0.12575101915636339 0.14217310119639431 -0.074543224504603531 0 0 0 +0.30743148607450527 0.13724651171765706 -0.018062072978262317 0 0 0 +-0.35022277024926385 -0.034235952478327808 -0.077905276106042323 0 0 0 +-0.03739091922401222 0.14929341554659231 -0.08347320329696592 0 0 0 +-0.10476585317573051 -0.15346478258935176 -0.0022274946574424304 0 0 0 +-0.09184670778381876 0.18651697388312499 0.046891041651219129 0 0 0 +-0.037775173496827519 0.03684563172811639 0.17853289391301294 0 0 0 +-0.31224533395711801 0.082246813142088204 -0.048855581283905547 0 0 0 +0.059822070739364686 0.20932668048435216 0.043632612253913655 0 0 0 +-0.082040458066393651 0.097069193448952873 -0.092859438644486939 0 0 0 +-0.13693621809168255 0.017960347464676479 -0.11423160689055686 0 0 0 +-0.10790408700855686 -0.0079847145949397402 0.046972486253949342 0 0 0 +-0.0085415524897515249 0.016361870721640054 -0.092594819659190711 0 0 0 +0.20599533984779145 0.0431126426938227 0.11401107102339622 0 0 0 +-0.076835748129556902 0.20732713996829233 0.10258882215324369 0 0 0 +0.15511630656446557 0.080659964847302978 0.015053284373283377 0 0 0 +-0.0032722914508777068 -0.10772159590356518 -0.10746471752255829 0 0 0 +-0.24027657137816077 0.028463762570156259 0.057499204451957692 0 0 0 +0.0021977860850770359 0.01469602616904303 -0.050111459133471814 0 0 0 +-0.028735730618415445 0.06878782807338002 -0.10003934896567557 0 0 0 +-0.13034406514216218 -0.05148557672199236 0.15384096382660603 0 0 0 +0.10700484533140658 -0.028739702254939825 -0.051144962276800071 0 0 0 +-0.0035745248251827788 -0.04844541334776209 -0.1338624958383357 0 0 0 +0.06606936904488131 0.12661353342827364 -0.08748575932144885 0 0 0 +0.10661446559499715 -0.003054907711571575 -0.11254836862046551 0 0 0 +-0.079160682971840757 0.0082037266282890819 0.065248478487768186 0 0 0 +-0.14710560890248281 -0.07133841500378868 -0.099865440853348003 0 0 0 +-0.041919899715813835 -0.19245985693780893 -0.0085115524050025371 0 0 0 +-0.039017455228662623 0.082371012414290568 -0.10771074029251654 0 0 0 +0.035495826212209647 -0.048071117515983086 0.14147394208232408 0 0 0 +-0.269338232720783 0.062618493459993485 0.053077323586484398 0 0 0 +0.21690678660377388 0.14102406880801355 0.026935514313866371 0 0 0 +0.03938348324993618 -0.047449303203414672 0.086546981416980723 0 0 0 +0.083674454784239571 -0.03802251538880963 -0.12711575297361985 0 0 0 +0.03892418080541532 -0.041856903941807827 0.19013943602400504 0 0 0 +-0.10805949065104364 -0.18808729631203089 0.010196053098883467 0 0 0 +-0.0048904534566518998 -0.068157382123389759 0.10203646315371431 0 0 0 +0.10518283036115811 0.036251687952920775 0.025911915674515534 0 0 0 +-0.26564186557073849 -0.069748848770994715 -0.02996346589613938 0 0 0 +0.21675739618706974 0.076054277747231502 0.054217822402097299 0 0 0 +-0.079024232025397989 -0.21737281363009245 0.059253834864929328 0 0 0 +-0.03461441425324191 0.0049846214119964039 0.13551447649973028 0 0 0 +-0.322037068717964 -0.072602460719276701 0.011688326562076329 0 0 0 +0.10831096808161583 0.062177576876792096 -0.081898734870143236 0 0 0 +-0.17426864295398586 0.14149260833707172 0.0055629803550373835 0 0 0 +-0.2644940699367877 0.024408234741798596 0.0013989873180421941 0 0 0 +0.20380027775805903 0.072504164734532583 -0.091077642642232115 0 0 0 +-0.2930076782025467 0.064158520399994645 0.074988043968761825 0 0 0 +-0.34910801334565977 0.014900128963470455 -0.0072978206304083471 0 0 0 +-0.051594148319223931 0.0067507139703151531 -0.16487840465431519 0 0 0 +-0.23273778129587652 0.12903579811977595 -0.014629370869716163 0 0 0 +-0.1477856555352593 -0.0071842610759595416 0.082971497250366039 0 0 0 +-0.0082395141144726014 -0.03638387527530268 0.17941430937214334 0 0 0 +-0.092238452891316325 0.14429927749078625 -0.038921546836602039 0 0 0 +-0.11634647007811122 -0.064414644624676581 -0.0027426380211715562 0 0 0 +-0.037591710779357301 0.15297302813187985 0.10825421884882122 0 0 0 +-0.32333868343836164 0.10390202063706749 -0.0095535907643330142 0 0 0 +-0.10981843401768016 0.06230836495332559 0.12965513508801116 0 0 0 +0.011809081369168084 -0.11816827100105491 -0.084511542016917837 0 0 0 +-0.09173225809377622 -0.041863294415910746 0.019251147238435684 0 0 0 +-0.16305483433596796 -0.13055807879903775 0.10114274248126617 0 0 0 +0.19324035982786442 0.12131775522822374 0.054370240898547223 0 0 0 +-0.18967814698411389 0.08365099629817252 -0.067838361505673739 0 0 0 +-0.14254226701252165 0.096213980868290139 -0.013495427037617663 0 0 0 +-0.048448055950063296 -0.078750032980796442 0.003557160411949728 0 0 0 +0.18849448070999691 0.001702548490039979 0.065677982319215317 0 0 0 +0.0060598147333552621 -0.006170933897351405 -0.045881778515715149 0 0 0 +-0.052852561307705492 -0.0750597236281354 -0.13038676103342789 0 0 0 +-0.21802572604998716 -0.069356770685222474 -0.058442852276633483 0 0 0 +-0.12344705691282643 0.02459037792502855 -0.0071712260957746687 0 0 0 +0.24794158980723463 0.096333124004750026 0.062972339823931439 0 0 0 +-0.16130684341463264 0.13664903205289597 -0.034303699253275532 0 0 0 +-0.074205317458331144 -0.17358730371874853 -0.0095352160187014423 0 0 0 +-0.12724506352619269 0.082820656384251512 0.10149884497734998 0 0 0 +0.19764474463378306 0.11509156430737205 0.12695799977693942 0 0 0 +0.22111524235913288 0.054955614215222159 0.058262301251987475 0 0 0 +-0.24721707157052125 0.034485543348980574 0.11827194805334881 0 0 0 +-0.032256349983389998 -0.07046525203821577 -0.16375752400771482 0 0 0 +-0.36553991163020494 -0.040384884779749441 0.058714632428318286 0 0 0 +-0.10128413158160871 0.018507051592500878 0.14827269190035572 0 0 0 +-0.1280111432758137 0.16572563546214952 -0.024241524067495496 0 0 0 +-0.030252890686753686 0.028100447721963295 -0.161886335369193 0 0 0 +0.25581176183918025 0.14225653739549216 -0.015865086436515213 0 0 0 +0.063953804959282212 0.19497613657177565 0.07727133500883307 0 0 0 +-0.24325866503148111 0.088278371215640528 -0.027787319041148284 0 0 0 +0.0076202116787829066 -0.1341607405408542 0.013362210939379865 0 0 0 +-0.044029570749448632 -0.0889732295342954 0.10054423443000113 0 0 0 +-0.29243351112819516 0.034850605045274374 -0.0080600805608350701 0 0 0 +-0.18959683465764626 0.05244262201149108 -0.014745300143577167 0 0 0 +-0.25082727636018076 -0.063579674149703724 0.064463853458533976 0 0 0 +-0.18303168113723867 -0.099591493691196686 -0.062578504616850522 0 0 0 +-0.17947552433346636 -0.090670401267411188 -0.026158213128118307 0 0 0 +-0.010119738561452873 0.062086289927677729 0.042868779387340877 0 0 0 +0.039197322668032719 0.028559628248880586 0.033951788410232858 0 0 0 +-0.13722103495413207 -0.13778776434545548 -0.042402019014047443 0 0 0 +-0.19609533667952989 0.11501707502903369 0.04624648442307347 0 0 0 +-0.12972773633070062 0.065908494664949802 0.12058473373461978 0 0 0 +0.0267003785105841 0.19887454637945767 0.11788256216900936 0 0 0 +-0.28248054240514298 -0.036825451317221869 0.062522996168124484 0 0 0 +-0.018172535873190565 0.1514015416484214 -0.0051154256564667488 0 0 0 +0.10837542886433654 0.19546956590193648 0.045264224320368834 0 0 0 +-0.071847682488660858 0.060172525950244637 -0.028698652031663802 0 0 0 +0.21121232074078627 0.066923949288651807 0.052942032699465263 0 0 0 +-0.023047460509368733 -0.0049240244704480407 0.088761762761892765 0 0 0 +0.058682848638177354 0.023449809482607498 0.0010895648069381703 0 0 0 +-0.28350851605030014 -0.036502602903509068 0.036651578201884416 0 0 0 +0.015818648321307249 -0.05606583900053988 -0.12793050976394676 0 0 0 +-0.063068958598861968 0.10321722384044901 -0.11545453346360661 0 0 0 +0.0050337899447441825 -0.17061796651066097 0.074756424340999689 0 0 0 +-0.0052253144005663388 -0.0027588484428748561 0.15511699170663393 0 0 0 +0.21659209332076595 0.17249615504585669 -0.028429683477867396 0 0 0 +0.035163377814385999 0.056175573005757262 -0.06428828509376569 0 0 0 +0.13151149116690269 0.089863355506131892 0.096718466846964307 0 0 0 +-0.31565589602290423 -0.080547369832162763 0.025384001695495567 0 0 0 +-0.33957446976628392 -0.12600532680792365 -0.023285033905077718 0 0 0 +-0.087835416450756654 0.17128929890115463 -0.048377469214469199 0 0 0 +-0.15058784936029235 -0.10065513442153391 0.056499707397276527 0 0 0 +-0.19174382495257541 0.11031838261762211 0.047900160849925127 0 0 0 +-0.2977987283157511 -0.10097974403337484 -0.028015337419258907 0 0 0 +0.079210125917228813 -0.0048077232819344062 0.16351903721331293 0 0 0 +-0.047458299468692899 -0.17270719641085436 -0.029429971363184981 0 0 0 +-0.2193542132233875 0.0034785854031061658 0.057032493709837068 0 0 0 +0.041226259947891808 0.19431016572591286 0.07713104518111516 0 0 0 +0.22740184997414464 0.16240951527987046 -0.045073230674088943 0 0 0 +-0.21163921053277329 -0.012956983209122919 0.15217934382160145 0 0 0 +-0.26616551731597871 0.02903801510936721 0.018231514818931455 0 0 0 +-0.10053109409243338 -0.1028880881982539 0.049844919942756194 0 0 0 +0.16323586761253878 0.15295643564507644 0.024563115596454604 0 0 0 +-0.031413034747405977 0.047772895451477226 -0.098796572358011259 0 0 0 +0.041616069425521374 0.11392155432085693 0.16296766563823309 0 0 0 +0.24930829641185231 0.072974657580741176 -0.0198353701501498 0 0 0 +0.12650558916159665 0.051582755738389219 0.051807392713637573 0 0 0 +-0.027054497764839369 -0.14041216887615671 0.01876022519781767 0 0 0 +0.074008074920601186 -0.0025406674149367203 -0.14786565204933891 0 0 0 +-0.44194686942761996 -0.0074228369195796784 -0.10139470291340491 0 0 0 +0.10714095200631296 0.099687983692103077 -0.077919028205270871 0 0 0 +-0.0047656793995667912 0.17105391990093233 0.080320820640208651 0 0 0 +-0.0047801939782407543 0.18820367759258627 0.096446930321291563 0 0 0 +0.11673725277226649 0.15981497208510709 -0.041764299686291723 0 0 0 +-0.21197309610365195 -0.085116626282300822 0.040359821669276791 0 0 0 +0.13291749272062209 0.00045779242395141417 0.12922656001845931 0 0 0 +-0.070510151668565835 0.0062593459037789123 0.10022209643898158 0 0 0 +-0.15927499891092073 -0.13733771514785759 0.074796644019372277 0 0 0 +0.051579879111873395 -0.089025886852425545 0.038812910719876637 0 0 0 +-0.062090632990635997 -0.093465234647106848 0.00048249369352171279 0 0 0 +-0.10328672585349535 0.17664467297880909 0.052439332851594772 0 0 0 +0.099051618074721126 0.068915290370449411 0.16640410395743374 0 0 0 +-0.080622002272547733 -0.035236691256111508 -0.11555658941466966 0 0 0 +0.016204922118920273 0.22454601317432565 0.055366337567132912 0 0 0 +-0.17483431245449699 -0.017579569286879621 0.11889761835235915 0 0 0 +-0.079993752067135659 0.17733978573162851 0.03250017348072351 0 0 0 +-0.014207506547458504 0.089444122670916337 0.030819877806035345 0 0 0 +0.050223525972990235 -0.017031604926805971 0.12465823644014776 0 0 0 +0.098261567049468812 -0.022062105523460551 0.097469369075708995 0 0 0 +-0.014080022532977188 0.092659406282174395 0.10119863025957113 0 0 0 +0.24135913616973897 0.15003978809622531 0.0035711716660065673 0 0 0 +-0.051243111147957432 -0.056153097661390455 0.06504898217768737 0 0 0 +-0.23612123585169442 -0.1740211954281321 0.044240068201111621 0 0 0 +0.1293091714099282 0.16564327722853606 -0.065782883339132181 0 0 0 +0.032369041391971998 0.14895420360397454 0.0099394038671203888 0 0 0 +-0.19774122860495469 0.081448533330976458 -0.073668228696702504 0 0 0 +-0.38907834459766749 0.016226504558035149 -0.083790422544196247 0 0 0 +-0.18288796496545201 0.10389548473507582 -0.012401411984453437 0 0 0 +0.18750470155432114 0.15440845086906241 0.10491108517856382 0 0 0 +-0.18549320183808221 -0.01221079442551129 -0.031742134218919554 0 0 0 +0.20300912891852202 0.18996608776255325 -0.0090253869997207192 0 0 0 +0.13527931979144919 0.10226648334215255 0.067302509582757936 0 0 0 +-0.017937692423954155 -0.0053727284065303582 -0.022714244281977408 0 0 0 +-0.081800967140367775 -0.13401957568113831 0.11334487028298854 0 0 0 +0.032590822173887812 0.031588969989081839 0.023616496893917205 0 0 0 +0.013021897841182073 0.21500355514404967 -0.0011562881994214846 0 0 0 +-0.17083368371353258 -0.18836325333425916 0.042331035903305281 0 0 0 +-0.36189042096116586 0.0038928981065693979 0.069459052006170169 0 0 0 +0.023163757132503682 0.02427324125054478 0.044387417584566852 0 0 0 +0.077961390322276836 0.051109710300755229 0.1149930515507632 0 0 0 +-0.19499043743018296 0.072039430104507141 -0.0012500161098321083 0 0 0 +-0.16059204765307489 -0.1221052498269193 0.1072941057167556 0 0 0 +-0.09629267575415551 0.10318277070995091 -0.1111252588656554 0 0 0 +-0.14671199921127415 0.0061834899459737303 -0.11562531760927941 0 0 0 +-0.057842559555228823 0.094298044039706708 0.015122441398590342 0 0 0 +0.1290439651762833 0.14154611594786493 -0.032252804377246175 0 0 0 +-0.016538227116661197 0.062963870774046971 -0.052239352510414089 0 0 0 +0.11952057326132431 0.074309745141140637 -0.00017514825447742521 0 0 0 +-0.087259065084988263 -0.095383628543053295 -0.030222321099839633 0 0 0 +-0.27259917158033004 0.023938327248196556 -0.025494818165700872 0 0 0 +-0.16800354002808687 0.074253119505010068 0.12773219326741295 0 0 0 +0.31153206164189612 0.11021003327185475 -0.018944358165451786 0 0 0 +0.18114183911665332 0.042692161620410618 0.14313880876268073 0 0 0 +0.10942317828282239 -0.034730521457672608 0.12533638837649672 0 0 0 +-0.10362528837776047 0.0051326562937428211 -0.11918829050107253 0 0 0 +-0.10165908296483805 -0.028361537484453997 0.16947783504524969 0 0 0 +-0.077984982448183027 0.11933793828925487 -0.032086798816411743 0 0 0 +-0.0030373059093277144 0.11644256047939272 0.13834751958284572 0 0 0 +0.061692453782006551 0.19870355359580782 0.09171021049741887 0 0 0 +0.19270878605823488 0.15245243548509524 -0.05660396795576253 0 0 0 +-0.24792703732713128 -0.069834374077053757 0.011926476297459576 0 0 0 +-0.1978589003137895 -0.10154818930929435 0.084248419363064236 0 0 0 +0.16315415508458148 0.17082330960754721 0.093658076663574202 0 0 0 +0.077623026576088716 -0.014297027740150708 -0.062278190952421625 0 0 0 +-0.40325250409968666 -0.023960073547695776 0.0020506768731949898 0 0 0 +0.090739415372461052 0.092937777107504171 0.077981315279323143 0 0 0 +0.0052727638966077461 -0.043893150328474129 -0.10093408639385039 0 0 0 +-0.1029826966742054 0.038480703396772009 0.12118471002051004 0 0 0 +0.083029616434927955 -0.010847433670256312 0.087292242758467781 0 0 0 +0.027030045904854749 -0.017508680366139867 -0.0018928084490434371 0 0 0 +0.1237080088018952 0.087106273835600323 0.15607492467086062 0 0 0 +-0.042832605884315034 -0.1152783905367302 0.0090722575173881048 0 0 0 +-0.46001748737689807 -0.011724214341968325 -0.04049914999725715 0 0 0 +-0.24068673217857028 0.11599133179522164 -0.032530674231085938 0 0 0 +0.13851815724974731 0.096083401188421957 -0.033447969639061492 0 0 0 +0.087941692920445902 0.062772617679448806 0.022262553075181796 0 0 0 +-0.053440696509971797 0.1404023575157905 0.0044921000682436873 0 0 0 +-0.051506098700822345 -0.10418201752434905 -0.091695812673784322 0 0 0 +-0.029501506532344568 -0.13508718515783502 0.13386859569515894 0 0 0 +0.22134574556841741 0.15643513435469242 -0.060087355810666931 0 0 0 +-0.3193981552111963 -0.056601033335562823 0.064276661247924888 0 0 0 +-0.00021469387231398684 0.13336808828532742 0.056950446702079854 0 0 0 +-0.058198180337324767 0.10639184975492255 0.021963468539777209 0 0 0 +-0.20950071365472867 0.068333162022219007 0.036753718990881923 0 0 0 +-0.21534044887942033 0.00089619582475766735 0.087810405572971789 0 0 0 +-0.025065848190751916 -0.14762430519589037 -0.058024485234084988 0 0 0 +-0.054809557929409225 0.04507737432721487 0.18196057498958193 0 0 0 +0.16612350199923615 0.003898005002856253 -0.053388079306183389 0 0 0 +-0.14747505194112892 -0.052633213516672162 0.12444209611542664 0 0 0 +0.040961594118524791 -0.080665015211294405 0.11028445522370514 0 0 0 +-0.055478355083484254 0.023280442107275118 -0.05489392201222526 0 0 0 +0.032607903106023961 -0.073779658998577413 -0.083550084472770333 0 0 0 +-0.14561237816231098 -0.079177719695534582 -0.036111707949589011 0 0 0 +-0.24737122321344682 0.020103978532587635 -0.038953652147106832 0 0 0 +-0.062845425848951586 -0.036950594264354569 -0.16481600588941153 0 0 0 +0.078054027708463758 0.16658404745636413 0.04463864517108676 0 0 0 +-0.083480797210251978 -0.13351210774067651 -0.11773319573112204 0 0 0 +0.03907949941925698 0.0720109840667853 0.033265885034160225 0 0 0 +0.099115737231241063 0.10193455093279247 0.15541264986620376 0 0 0 +-0.02159806033518169 0.17033914461218286 -0.021866911952506757 0 0 0 +0.029469149275794526 0.045174775458861616 -0.054188820943992577 0 0 0 +0.087825284926230041 0.18922911490916833 -0.004541460458515223 0 0 0 +-0.14075200816274624 -0.19926452530292749 0.073363383971908142 0 0 0 +0.18612775825664168 0.067356952581419105 0.034587717601879037 0 0 0 +-0.2105124336019904 0.048888668974319482 0.099931454484723042 0 0 0 +-0.3221069720897824 0.017496368888328756 0.094723705352275617 0 0 0 +-0.095462889520372296 -0.17628324506321363 0.030419938416801851 0 0 0 +-0.25234874114539241 0.053202128477165933 0.023519552196354598 0 0 0 +-0.089858340504833045 0.075239709584223546 -0.099975060746730307 0 0 0 +0.062160540252425622 0.058320170665806637 -0.13585490860316252 0 0 0 +0.1395675445088907 0.097810034384326505 0.13434297860829855 0 0 0 +-0.02512671736350286 -0.09599452141394002 -0.17072232468298357 0 0 0 +0.022323978710251324 0.18041490748582595 0.11746904499744112 0 0 0 +4.1768771277206351e-05 0.035906956175916827 0.081676963562164445 0 0 0 +0.008151871988677839 0.00051642320867439917 -0.18063261694658267 0 0 0 +0.082086257628814774 0.0006386785876247858 -0.094163903383328112 0 0 0 +0.11217054261424336 0.0031960110906716355 -0.075987647330705538 0 0 0 +-0.014655865238495214 0.036034064005893651 0.035230235192418552 0 0 0 +0.13438447908604984 0.10116385058909655 -0.023976226564364517 0 0 0 +0.024344448270772034 0.10880815447314129 -0.096779663521401577 0 0 0 +0.02515361675868738 0.17181103205384124 0.045004023033817758 0 0 0 +0.03633715026627754 0.17350104826363688 -0.0097162237852211064 0 0 0 +-0.081947437484445995 0.070089252825681125 -0.15893914312371238 0 0 0 +0.02839055033114507 0.020796144389499893 0.10602035528044776 0 0 0 +-0.05969378621098359 0.10178625389532325 -0.020973561262560531 0 0 0 +-0.031652116402220043 -0.14967139934648621 -0.13712731536995246 0 0 0 +0.018597792581222017 -0.021629810093980767 -0.087333912599261848 0 0 0 +0.051801432017020421 -0.016043922960439716 -0.17568310353383701 0 0 0 +-0.2416360641525267 0.076666919608014139 0.0044163921435242393 0 0 0 +-0.092325258446163516 0.1288671621674774 -0.025995718409771107 0 0 0 +0.095716350196853706 0.14345115296689748 -0.015669703930871554 0 0 0 +0.24311517080090234 0.082298506224054824 0.087453313239105518 0 0 0 +-0.11971726179019321 -0.11414244001876983 0.059419006897698606 0 0 0 +-0.11866793688538951 -0.08251438676094916 -0.044010461599266165 0 0 0 +0.072625025432487 0.061724643752063602 -0.036380297053192734 0 0 0 +-0.1119533498670976 0.025038999187819155 0.057986615464447527 0 0 0 +-0.15529258217202502 0.016926694650368751 -0.023256976682098113 0 0 0 +0.049988612233407281 0.20412898900456727 0.11302044241030232 0 0 0 +-0.14004719060716919 0.013639173858342207 0.13040939686183259 0 0 0 +-0.47291761129403953 -0.013405782026729096 -0.030633966081978742 0 0 0 +0.12432053475444199 0.019004661492558639 -0.079496863788451069 0 0 0 +-0.15698116641330534 -0.0040365776590327862 -0.06634106571101675 0 0 0 +-0.1168935126367654 -0.055236326033715172 -0.12420038943356229 0 0 0 +0.016805278771778009 -0.061184122355311205 -0.18098957116354908 0 0 0 +-0.041853398245610351 0.12117800288239028 0.12651302054091215 0 0 0 +-0.15704842369368771 0.14976115361591613 0.060304794016607571 0 0 0 +-0.054726236281581242 0.10372753222960046 -0.13258980188492731 0 0 0 +-0.46034893583785513 -0.02272568526925009 -0.047317088411040126 0 0 0 +-0.055335559110590293 0.007427071665797369 -0.17378473538295738 0 0 0 +-0.10251420320000504 0.20502322723413213 0.048758636094447222 0 0 0 +0.098296805565340872 0.010956937646677711 -0.046550111157303203 0 0 0 +0.03931856255672167 0.03293031501810717 0.18510374453445247 0 0 0 +0.25007769681349395 0.055882550160003819 0.057181773759634708 0 0 0 +-0.19100282525211809 -0.1964532388672908 0.055622953754798948 0 0 0 +-0.12638652740692258 0.060531925168597123 0.13606440360223224 0 0 0 +-0.31921062094429276 0.086777611090672169 0.041643483478278842 0 0 0 +-0.060346749519717469 -0.056730428602729005 -0.17707586395630892 0 0 0 +-0.13797381546784659 -0.037434828868060377 0.14144125237396873 0 0 0 +-0.15021163086129824 -0.10664711533394038 0.046734001622212112 0 0 0 +0.090626631865957707 0.070343061330382206 0.074382003348505615 0 0 0 +0.13317650055499047 -0.015096921179706707 -0.10456980122419446 0 0 0 +0.020168699067186047 0.024277137818408651 -0.10315968615335551 0 0 0 +0.001566551563173979 -0.026808754441070393 -0.022281221996762329 0 0 0 +-0.33685048642274462 0.038859285817306466 0.038204268526724067 0 0 0 +-0.21216890724782367 -0.06147134714749225 -0.035673751512382168 0 0 0 +-0.04082302641475577 -0.088639830637815886 0.045217016001118826 0 0 0 +-0.39397319163434907 0.0083942043930534116 -0.085559602384467609 0 0 0 +-0.20403455612826632 0.12816343811319392 0.0045234604014377233 0 0 0 +-0.21640406350936975 0.048158902833158157 -0.013738515751658464 0 0 0 +0.0027862115184519864 0.0087277861988362682 -0.13019441988419647 0 0 0 +-0.44422339462795063 0.023155703745240785 -0.090189494912437621 0 0 0 +-0.34074654920337488 -0.0027774165214980162 -0.044606524572993161 0 0 0 +-0.15882713829879186 0.094807124537715226 0.086902174272191685 0 0 0 +-0.029037181729185457 -0.057933379612386704 0.1159401208039941 0 0 0 +0.23886521917720088 0.03323685687466521 -0.0059899193054777644 0 0 0 +-0.023356206699984672 -0.086158910745126216 -0.0039109285931419602 0 0 0 +-0.3074515568807884 -0.095766974744296185 -0.0067702604831238189 0 0 0 +-0.067069627397765896 -0.045230567947785849 -0.13799817862367583 0 0 0 +-0.092342807602705468 0.098877720751468057 -0.077975936452122405 0 0 0 +-0.061620647169237541 -0.040271665420235608 0.087442107763038929 0 0 0 +0.057019357294833706 -0.0062047464169287248 0.17385743765936282 0 0 0 +0.033220623301786822 0.10538028977146885 -0.065001798483662304 0 0 0 +-0.36694474961415402 -0.012722285299749114 -0.047391618072367747 0 0 0 +-0.11108204849181236 0.028750272645305386 0.055569982767798926 0 0 0 +0.016040985001609609 0.025573586752284327 0.041027205685383178 0 0 0 +0.21890624124017771 0.067301754023377791 0.068104330908590943 0 0 0 +-0.34179849752530922 0.022348786931123577 -0.075430576020172793 0 0 0 +-0.017900312697845533 -0.15203027397032687 -0.046824053033341195 0 0 0 +-0.090802348173984804 -0.071631858283924404 0.029858650085438976 0 0 0 +0.17535347933305651 0.027160721619256756 -0.030701491879867399 0 0 0 +0.024638025729004254 0.014762614151000025 0.13470495664185703 0 0 0 +0.080356230047999355 0.17497444759847131 0.079839667771283068 0 0 0 +-0.21673504110058539 0.0080327826775680178 0.073464874646143069 0 0 0 +-0.25742116238244117 -0.033042865720280007 0.085122734982361531 0 0 0 +-0.12878883831626275 0.12667280182540414 -0.010516555898996527 0 0 0 +-0.41541436208178756 0.042620523713917002 -0.032482743025803479 0 0 0 +0.24139960753738404 0.050239117060968619 -0.044568246328140604 0 0 0 +0.036146423079273571 -0.089462425606399332 -0.010311868138505598 0 0 0 +0.018095370788094589 -0.16067907869528561 0.049891520102108372 0 0 0 +-0.19097555599877147 -0.085041635823904088 0.032257277276393964 0 0 0 +-0.31101088619778633 0.011189579218555706 0.10146499649790722 0 0 0 +-0.31738762871148302 0.00076851420786788749 -0.02580232077764022 0 0 0 +-0.37520357246672503 0.031601729090977471 -0.070527054978163445 0 0 0 +-0.052110954313769497 -0.085777824351915638 -0.1424500143343741 0 0 0 +0.021669101312239591 0.13465629580575644 0.016087533422127376 0 0 0 +-0.37216689760343641 0.038131445792497609 0.05197262972075492 0 0 0 +0.079002653377808152 0.10984454964192208 0.012221905004760253 0 0 0 +-0.052092512167501326 0.12508171620315123 -0.1002942245833776 0 0 0 +0.076935968292283274 0.001572358402704338 0.042054879515844384 0 0 0 +0.14068420378671492 0.018868450604957981 0.068485079103099172 0 0 0 +-0.33644189544007652 -0.076110656017121414 0.035352319764732854 0 0 0 +-0.16912320705251771 -0.0035013944613444814 0.085144686844315393 0 0 0 +-0.02603144142070557 -0.10395672509407021 -0.049853534176794806 0 0 0 +-0.15174613374999962 -0.018584760642540665 0.014549255707174552 0 0 0 +0.036200773011327236 0.20290795910229209 -0.017403524174005258 0 0 0 +-0.062274266899111697 -0.015066066050832633 -0.1238581266592564 0 0 0 +-0.07026758988578341 0.0081263114436357087 0.025357196249741587 0 0 0 +-0.19663413675027902 0.13182250595714101 0.040966749653486539 0 0 0 +0.050989468920968839 0.20123078616694035 0.048246108412330041 0 0 0 +0.0062243160629644745 -0.015848433609271434 -0.046754565567064088 0 0 0 +0.090363264140572774 -0.069556995545403566 -0.04067565485581523 0 0 0 +-0.037124915988533791 0.17786196630531592 -0.030037137524790591 0 0 0 +-0.14092213838866219 -0.13664038692216485 0.10002447398909878 0 0 0 +-0.058780939083884043 -0.0047190306892502254 -0.046454955296363204 0 0 0 +-0.15823955597167139 0.043945183516410191 -0.035628541247155504 0 0 0 +-0.0021787229298265154 0.066039989962232259 0.046476844847970183 0 0 0 +-0.16719965314170115 0.099422973598918385 0.12424924371089649 0 0 0 +-0.079608443817026031 0.061419357415805564 0.16326747955710488 0 0 0 +-0.15498843357472686 -0.099059686176798778 0.0053260025712521808 0 0 0 +0.08684771701770827 -0.033822192358005793 0.14565465042010137 0 0 0 +-0.10397604287602014 0.023719427005456734 0.043766186518657019 0 0 0 +0.03450906727400832 0.21049012586882104 0.01266877963534091 0 0 0 +-0.14213838510517268 -0.037556309131356436 -0.018757013914868226 0 0 0 +-0.088060753697468963 -0.16738288692963682 0.089071002045335274 0 0 0 +0.078124389857060661 -0.049940794782642767 -0.12842938986271527 0 0 0 +0.012631106566130146 0.073117688586546103 -0.0066094118434744942 0 0 0 +-0.14308716307026803 -0.13986682071882348 0.020395709178494287 0 0 0 +0.0019163163280044304 -0.07297826544571856 0.16363323408541361 0 0 0 +0.050080613227423687 0.054444819852757731 -0.068683495288847013 0 0 0 +-0.099093001972236694 0.10121851626851175 -0.03836701899333439 0 0 0 +-0.1301486398390867 -0.11194511521806942 0.013722650566017264 0 0 0 +-0.11240659335932002 0.11825132959057716 -0.048299464539366316 0 0 0 +0.079198532544896005 0.12864695799986786 -0.020846111294224395 0 0 0 +0.05173037149981824 -0.065855391864530294 0.18035224063306302 0 0 0 +0.22150635636513111 0.17474561863608845 0.0094556184232523766 0 0 0 +-0.029786376679411641 -0.1066183463135143 0.087003153134204897 0 0 0 +-0.21357949165656237 0.075068585936891807 0.035106134187622456 0 0 0 +0.053824294850472298 0.010115058169003099 0.17686870500792704 0 0 0 +-0.09146168182881087 0.02976322565230588 0.10045464055889611 0 0 0 +-0.15145235071139879 0.13575629907694226 0.092131772421482044 0 0 0 +-0.3316098184387456 0.052608072900264979 -0.0012707458971193963 0 0 0 +-0.089166231141602659 0.085833590902927304 0.012001690974056733 0 0 0 +-0.19888704855109801 -0.1878561028078343 0.01135532838723996 0 0 0 +-0.045297226918512068 0.087647690085450147 0.037559162729439793 0 0 0 +-0.25212051708170213 0.093666145727348937 -0.036115632028929895 0 0 0 +0.017766508709569473 -0.066418771580808805 -0.084700509697997944 0 0 0 +-0.29436373695336515 -0.049141764700700086 -0.026345725383801838 0 0 0 +-0.015914846596231269 0.18511938145898749 0.092849753076269276 0 0 0 +0.19027559274498834 0.14291682670143713 0.075743406222398418 0 0 0 +-0.37742458038618093 -0.056633434626334828 -0.026524694440920371 0 0 0 +-0.25735210438430778 -0.065475367159161274 0.088822068424583872 0 0 0 +0.0779743297925381 0.096302278299774502 0.051700023902954056 0 0 0 +0.0060481582508724596 0.05148304468070436 0.17409840932350282 0 0 0 +0.060558627031780776 0.19601019075848908 -0.014557542284857949 0 0 0 +0.085712619372666776 0.098639759174688701 0.1698888791074897 0 0 0 +-0.22448103427596161 0.043706067940419535 0.080165689743188689 0 0 0 +-0.093567432097143077 -0.15975988641076444 0.058313162614726438 0 0 0 +-0.072721275480408243 -0.069349726321069061 -0.1689780296467375 0 0 0 +-0.1138088615886611 -0.094574227460775068 0.15159682762816315 0 0 0 +-0.19041825558437037 0.0095136483101947167 0.11541404374261435 0 0 0 +-0.18351435701153945 0.070981075324528853 -0.044684561363988101 0 0 0 +-0.070833093863865382 0.079983741228195349 0.12241086006378757 0 0 0 +-0.0191642079554592 -0.13565361907395629 0.14672148614654876 0 0 0 +0.18531571617842652 -0.0035934601671649413 -0.057337190664399879 0 0 0 +-0.16140469853638906 0.05531207339141192 0.13620007263995706 0 0 0 +0.0087988587284227315 0.20733859964308793 -0.024706774186271707 0 0 0 +0.12498832441354862 0.089739438094167512 -0.050755076275621536 0 0 0 +-0.096235495312982255 0.060002217255956503 0.12331923263736441 0 0 0 +0.2188759056649357 0.094167596080238447 -0.058274351886474535 0 0 0 +-0.14828472455443353 0.068842801100395146 -0.065736361891561651 0 0 0 +-0.046522909925105105 0.057163886159145749 -0.062348648764176756 0 0 0 +-0.0037862487968593483 -0.13087623646725577 0.013356858166945623 0 0 0 +-0.020028717998382684 0.098949714624310847 0.13794651498558605 0 0 0 +-0.0641705753646023 0.087170762215800113 0.11436437925123141 0 0 0 +0.047770393253511234 0.019990914667399579 0.034466046452059418 0 0 0 +-0.43496257343654288 0.0060003707467070622 -0.05913027568116877 0 0 0 +-0.26302705447266816 0.11659752920866429 -0.03506503988949769 0 0 0 +-0.0024556071865442508 -0.11452350092461847 0.051664076752068938 0 0 0 +-0.050598080067050244 -0.076482880947197796 -0.06726619943870138 0 0 0 +-0.20069192476973174 -0.10053072225489655 0.07009331544117306 0 0 0 +-0.0086224049057253005 -0.01670751705625656 -0.037716411910820286 0 0 0 +-0.042058128327797206 0.022420174247588021 0.070972714282180632 0 0 0 +-0.26728570471571761 -0.10014995670259512 -0.016716700018600095 0 0 0 +0.070719518757120181 0.02873282344045347 -0.042302553683062072 0 0 0 +-0.13248276722267038 -0.0067316669973987164 -0.06133692929206136 0 0 0 +-0.12969699942025359 0.039816461553223881 0.085306095748485994 0 0 0 +-0.38738605764232115 -0.027765484469423091 0.032169098546589725 0 0 0 +0.055487100296078673 0.076001448014594131 0.08669208584388996 0 0 0 +-0.33697284680002371 0.078362234404759923 -0.019955692618144671 0 0 0 +-0.010318698788734648 -0.010099977372291985 -0.035818317580407488 0 0 0 +-0.045504699080027688 0.13791700603481566 0.04782527995583602 0 0 0 +-0.065140783949412917 -0.19634872012209753 0.072110165986510461 0 0 0 +0.1819342225721175 0.031221119033001787 -0.095772580433122811 0 0 0 +-0.13447378701747864 0.11177494508682984 -0.031278573990115882 0 0 0 +-0.15250014661221067 -0.014321768900671994 0.063414653440919261 0 0 0 +0.11804901159897913 0.036419627607625404 -0.13214150283099618 0 0 0 +0.06831451867516386 -0.065363259177135785 -0.10618303019117331 0 0 0 +-0.069007231819806669 0.044405455287941709 0.12457298601139008 0 0 0 +-0.46943475485093428 0.0089226212315950404 -0.09540900867162691 0 0 0 +0.10030124401406376 0.036280402143391788 -0.016243378600666769 0 0 0 +-0.082165882120232625 -0.15690459101151721 0.11686152686051002 0 0 0 +0.17548854374572626 0.024063731065975008 0.005250072248621368 0 0 0 +-0.00026848715017085967 -0.099680547390538277 -0.042756797889840797 0 0 0 +0.095131519396689235 0.065104509754173923 0.11041625420361847 0 0 0 +-0.1974709580652067 0.027385262921986619 0.066701654101117974 0 0 0 +-0.14682155503040883 -0.032524724572191022 0.096826897338495116 0 0 0 +-0.14153995387874546 0.14677574009364935 0.00011934779246711158 0 0 0 +-0.27494083250187107 -0.029153144532865854 0.070924118296497057 0 0 0 +-0.072201493861188681 -0.15668204993125101 0.13991734531403796 0 0 0 +-0.0028212938486016914 -0.075553747306442376 0.0025879070598809062 0 0 0 +-0.31049000676428207 -0.083332341102043656 -0.014094485885713243 0 0 0 +0.084252018091629688 -0.0083197106280410715 -0.15554211545943047 0 0 0 +-0.15440884847510844 0.0076366255429875796 0.093246356682473303 0 0 0 +0.075037583616231529 0.1900007707076678 -0.021505509406031104 0 0 0 +-0.099263070977528178 -0.11394296050329089 0.014390037366738551 0 0 0 +0.15288799411753656 0.037761249999118951 0.036335273979115762 0 0 0 +0.0098509842878439779 0.039188121833459932 -0.039927972941401407 0 0 0 +-0.12559187085234563 -0.075242481934924166 -0.13710422868459951 0 0 0 +-0.11087588388190606 -0.0046448264838424569 0.096640226593439488 0 0 0 +0.12887674897651186 0.15625337583786619 -0.0417339713313859 0 0 0 +0.26782304731745737 0.1515128079049643 -0.05434153813680262 0 0 0 +0.21820560180326914 0.092474303566446037 0.04345821386371973 0 0 0 +-0.08977161317633936 -0.087159632602728437 -0.034229501889327996 0 0 0 +0.13449574794895475 0.13236338290297939 0.062256212423191876 0 0 0 +0.08877137371870919 0.089487293121736922 -0.12107127105556241 0 0 0 +0.029238680833778286 -0.054657067262588094 -0.043153610899086564 0 0 0 +0.02410427900511064 -0.063176385694087955 0.16845486610015201 0 0 0 +0.20588360616162643 0.18362004712703123 -0.012385075391300016 0 0 0 +-0.095943470666762454 0.049424213707024212 0.10789591929156797 0 0 0 +-0.30790126280346886 -0.11012928246657552 0.013948128075836702 0 0 0 +-0.14079203851515198 -0.042910690701151749 0.14437346524760639 0 0 0 +0.16920130540712036 0.010275732854656855 -0.10859892440794594 0 0 0 +-0.0656478672018182 0.20589022804096202 0.0024263555834265482 0 0 0 +-0.18206419989345829 0.1637032811869979 0.049432980905281837 0 0 0 +0.10460844183442414 -0.018595396582932688 -0.15479239056587266 0 0 0 +0.10846170950901463 0.12745024775283409 -0.025328592620288026 0 0 0 +0.21161297685029218 0.046912283619493678 -0.071567065580911471 0 0 0 +-0.022486381799883715 0.18253894198509679 0.034190217349671759 0 0 0 +-0.28048819125070473 0.11436056299296438 0.018521593352771842 0 0 0 +0.14490639676997902 0.16415652851307067 0.067211791469790533 0 0 0 +-0.1195775608599815 0.1392086329311556 -0.038092481209704182 0 0 0 +0.19271950722562142 0.077292781056643445 0.031752179503798023 0 0 0 +0.050986726841640129 0.046193064962585906 0.086846959071209678 0 0 0 +-0.030390963601840237 -0.0061148769078254728 0.17410692838873851 0 0 0 +-0.0011802221025922766 0.010592667557860702 0.18616876914735789 0 0 0 +-0.019661835644622372 0.073285682000308272 0.14163482822145426 0 0 0 +0.13267534474391257 -0.0079290169986351577 -0.10972265779970819 0 0 0 +-0.25590460998548664 0.013990863899335709 0.064197265564850531 0 0 0 +-0.054765387248843944 0.044041018353284778 -0.1388599278327762 0 0 0 +-0.27652116998724641 0.028068297877938464 -0.045607125449027397 0 0 0 +0.089364321542289071 0.094754532330156738 0.082795327102520994 0 0 0 +0.0056580982221685616 -0.081614610705919105 0.086135681912732326 0 0 0 +0.049495802456228921 -0.112301315451229 -0.060496960041353937 0 0 0 +0.018204838177438287 0.17449280606611861 0.011010188734442927 0 0 0 +-0.028807734008815644 -0.072194310174556464 -0.10768859257931356 0 0 0 +-0.42195330372728879 -0.018455929738388888 0.040741987047136774 0 0 0 +-0.32500701461218534 0.08906122817426454 0.0094073363564903811 0 0 0 +0.1801842911081481 0.1606348431186555 -0.0095676729332497268 0 0 0 +-0.40725807735084091 0.041719818762342875 -0.064253259464777085 0 0 0 +-0.047914229866100999 0.03518908342306315 0.13803938579152522 0 0 0 +-0.091555038746288064 0.15523511160732434 -0.10194176873125928 0 0 0 +-0.02578782566062876 0.097015268188111015 0.04612015219916496 0 0 0 +-0.30658114660570401 -0.058293856153685153 0.043683153757219206 0 0 0 +-0.29515815996259687 0.09987083880803127 0.0027346406721575067 0 0 0 +-0.23879571287271106 -0.18509035500588361 0.0008653988507446031 0 0 0 +-0.065052110787613804 -0.18570633442600351 -0.041992731486896973 0 0 0 +0.19371802921554065 0.012914178779992735 0.080853646865583023 0 0 0 +-0.33940997788430194 -0.039040236245929283 0.003406166524491272 0 0 0 +-0.25443572049002861 0.037364596396429473 0.11166748880063135 0 0 0 +0.20882321421317523 0.089806075337412306 0.080221007046717668 0 0 0 +-0.0065218489428470194 0.13599833263460592 0.11357452582902924 0 0 0 +-0.11296683198579127 0.0073522574771391069 0.13984312771522209 0 0 0 +0.10805239181485954 0.012671911124122304 -0.10427134842509403 0 0 0 +0.11631187789086245 -0.020679297268505675 -0.038475912473505347 0 0 0 +-0.057617419197068143 -0.079360974470432388 0.10536129039422606 0 0 0 +0.010001752924409135 0.078863352351046634 0.038731657513011719 0 0 0 +-0.3126866246892675 0.094280041394995517 -0.0055802385907010033 0 0 0 +-0.072441903474486924 -0.051687564065378638 -0.042368813223727514 0 0 0 +-0.14349229395393753 0.039492032066352656 -0.054750541818872567 0 0 0 +-0.068139907139777245 0.19413964135285605 0.05706046182513938 0 0 0 +-0.007909492245228078 -0.019408800466112819 0.14971886068001064 0 0 0 +-0.33781108979389773 0.084569405542397391 -0.019950009961663268 0 0 0 +0.084597832992465649 -0.049121880703154486 0.11241616166667359 0 0 0 +-0.022345021488424432 0.13266484913345938 0.16533413368279484 0 0 0 +-0.18600060064123713 0.030640802000905354 -0.0095502126551568478 0 0 0 +-0.28259086121465316 -0.14187737884316595 0.002545023061955809 0 0 0 +-0.10178036404518181 0.078859836165996233 0.15240672897827998 0 0 0 +-0.21420110811603493 0.023294218347673756 -0.0055998476633047634 0 0 0 +-0.1530596086437232 -0.13179030450694962 -0.042702573083564177 0 0 0 +0.074055833809990423 0.056567386794011576 0.038457669041084136 0 0 0 +-0.25888507146672579 0.11169204583576881 0.047968450560505971 0 0 0 +0.19722311894877115 0.16118300773657296 0.0026862520474647267 0 0 0 +-0.1384836861481914 0.1843744297762378 0.074374610010260273 0 0 0 +-0.33746783633375776 0.088651696385870671 0.024405816412619324 0 0 0 +-0.18687998389476446 -0.048734517350982415 -0.02488866356187408 0 0 0 +0.034514709774898289 0.086648611198885339 0.17016610441579669 0 0 0 +-0.023681550104222293 0.085031551598839461 0.18165147772150023 0 0 0 +-0.035998054029105719 0.034516896016861309 0.071306318389222939 0 0 0 +0.017233571836282435 -0.09984238378586574 -0.019248928392242626 0 0 0 +-0.11336895021008797 -0.012480067333525524 0.0027341054691704947 0 0 0 +-0.37047881559801987 0.036213216172236939 -0.023405654883791677 0 0 0 +-0.063566543962655153 0.053922415461480133 -0.071279438065120937 0 0 0 +0.21538685120045903 0.10526867590157779 0.039573886014621695 0 0 0 +-0.23397202498645991 0.12507163948546535 -0.019957840855732545 0 0 0 +-0.098758083586748702 -0.21177358268458771 0.073017775761241105 0 0 0 +-0.050318710328559446 0.15790493183267162 -0.0049027458655233613 0 0 0 +-0.1410213777767611 -0.19059909082393023 0.0641345174235953 0 0 0 +0.14378834264446977 0.16346311677393643 -0.083400944210641551 0 0 0 +0.021906959310374174 -0.059966515469998594 -0.15953638677416415 0 0 0 +0.035863058128177638 0.053655045110072019 0.13129527123200893 0 0 0 +0.095386280711567906 -0.041555851291965706 -0.070212632598155633 0 0 0 +-0.2771556423999556 0.088933424689232377 -0.043613832003322889 0 0 0 +0.015788315391400742 -0.045809341602318004 0.035228548272701915 0 0 0 +0.14353160828711925 0.037381824782204309 0.10686111461922757 0 0 0 +-0.39704075948288664 0.020522477588794635 -0.036360091701714781 0 0 0 +-0.079433059198746936 0.095934200313411655 -0.10877971905860398 0 0 0 +0.30598598323550535 0.094941317854311758 -0.013019324903228324 0 0 0 +-0.16981011379638222 -0.044098063149816374 -0.032389020870263685 0 0 0 +-0.11645495831536834 0.16752285665657929 -0.035496612875469014 0 0 0 +-0.075260553554543308 0.0033716766287372191 0.11475958182485027 0 0 0 +-0.27068795891601827 -0.15837464036460269 -0.023815713377992154 0 0 0 +-0.20624362527013762 -0.00036515658336552792 -0.020960063677135377 0 0 0 +-0.39835249034462267 0.061755994920687729 -0.053155211242733508 0 0 0 +0.18574266805776857 0.12959216388539174 0.036646403830445845 0 0 0 +-0.44033935338611951 -0.021359359841188419 -0.019505944450610768 0 0 0 +-0.13579167395312108 -0.14395460034065369 -0.005070087855876898 0 0 0 +-0.17092293091316246 -0.12080369742362901 -0.02254580311129567 0 0 0 +-0.1173984520335985 -0.027556376299797569 0.077193384912182555 0 0 0 +-0.42078618731773693 -0.0024536664120392015 0.029321262846471741 0 0 0 +-0.36740585088690048 -0.09121503042412224 -0.0091999873673166144 0 0 0 +0.12191561629998487 0.069551946252309704 -0.04226016553223319 0 0 0 +-0.22944385925803101 -0.13139720028713486 0.067253722758132045 0 0 0 +-0.13773192106545207 0.043482268341340113 0.11300360254441297 0 0 0 +-0.073801664183561266 0.03534917189939224 -0.017533791058791326 0 0 0 +-0.19509360551959137 -0.052814066054162112 0.10666159974504727 0 0 0 +-0.095924243989528646 0.014447755918166133 0.090552562166737877 0 0 0 +0.19555712096096939 0.12967286179942727 -0.013237824724989022 0 0 0 +0.21671036778821834 0.065008413404115006 -0.0052282818293054589 0 0 0 +-0.21501951713919643 0.037922445140987138 0.0060469958080975328 0 0 0 +-0.047613881482381881 -0.036672068587237511 0.05364856116130437 0 0 0 +-0.06456113233849875 -0.18551578705289776 0.0045278547094175503 0 0 0 +0.13319461883659706 0.075104312792948436 -0.01838684168781432 0 0 0 +-0.10953245849822651 0.1400612798554427 -0.088378294119224418 0 0 0 +0.02040879917621613 -0.13112473010736381 0.09136067542279605 0 0 0 +-0.18819947239217583 0.14336192985156176 -0.00029739433445688523 0 0 0 +0.0010708489225362272 -0.062607399614900361 -0.098870353514849199 0 0 0 +-0.31578016255345431 0.074617986297947803 0.041197646209575223 0 0 0 +-0.12886456974036997 0.094164976664805278 -0.088870594729867289 0 0 0 +-0.1158672818898806 -0.0058513335159397772 0.073055619606166605 0 0 0 +-0.024358955558328954 -0.034529407966695735 0.13465375741250815 0 0 0 +0.18062291987684781 0.087313201229433535 0.049515135770456853 0 0 0 +0.27778446713202393 0.1620938159640925 -0.037193290810995261 0 0 0 +0.25263934346777611 0.14429121748738644 0.072425200424877018 0 0 0 +-0.073603017617503708 0.068125606439876807 -0.097454816798767066 0 0 0 +-0.14371900564146001 -0.17135129809816044 -0.0014938824739987033 0 0 0 +-0.31959212255643688 -0.05208735068597134 -0.053859593694676633 0 0 0 +-0.038824152240569287 0.17239492931066219 0.020569881829238967 0 0 0 +0.020325057675833758 -0.10199886305434956 0.083895884886893896 0 0 0 +-0.085962044934667692 0.079584816680138892 0.069170814102789829 0 0 0 +0.034300100875769235 0.11334648425844823 -0.064587800316277422 0 0 0 +-0.14313923574625287 0.013559857616339321 0.10136680614927177 0 0 0 +0.0085463958322978262 0.05801746369341293 0.17469709020653365 0 0 0 +-0.14819186155890818 -0.037681380970891104 -0.026566836617431588 0 0 0 +-0.31714271371370883 0.0820812648016363 0.046145271282125255 0 0 0 +-0.07030518804103375 -0.0011232650993648063 -0.068836429310338565 0 0 0 +-0.20587503743070878 0.1063128188000298 0.089932003492509932 0 0 0 +-0.153560151114841 -0.099422481639674876 -0.031451609218487525 0 0 0 +-0.033330916302830471 0.022725707104464504 0.12684144823446494 0 0 0 +0.050164567866276488 0.14225076996959002 0.0091511083441437324 0 0 0 +-0.038504054158972623 -0.066593492801405502 -0.052510801784819455 0 0 0 +-0.10559219480462378 0.15123627067043771 -0.075663295756468074 0 0 0 +-0.10885233326119143 -0.1199433231167244 -0.067071785236484827 0 0 0 +0.084068820663532218 0.14383703548192278 0.12138517444837696 0 0 0 +0.077439172348945873 0.075415997742130869 -0.11893547661225497 0 0 0 +-0.0032010559636191926 -0.060880360548820373 -0.14338534253726945 0 0 0 +-0.10998382077891383 0.10464108581010623 0.06924287900863399 0 0 0 +-0.29969316350571351 0.04754283795541292 0.0129045177085651 0 0 0 +0.076217300137274402 0.21212789684186784 -0.027314428495963106 0 0 0 +0.057220087629554273 -0.094764793039139372 0.020587818462123625 0 0 0 +-0.058584583000573343 0.023968640074545966 0.13620852171853789 0 0 0 +-0.2421790147548728 0.0042254090147917089 0.067717060217742348 0 0 0 +0.020731590209479844 -0.098340051583278465 0.070094326070746865 0 0 0 +-0.18960491086731202 0.041150193785670641 -0.087784199311320671 0 0 0 +-0.33123412862897156 -0.045592662186939276 -0.010060916971426442 0 0 0 +0.080594948536022504 -0.05212457230084297 -0.11958053711313661 0 0 0 +-0.29184258509684358 0.022827574307297815 0.0075602311098207642 0 0 0 +-0.19447135266794824 -0.15655764461835803 0.0019638217636812616 0 0 0 +-0.3119334855436231 0.065027100352367362 0.070848230856935951 0 0 0 +0.0032817002648091176 -0.17210265460504034 0.032119007779618736 0 0 0 +-0.15698421610737689 0.016608181229981117 0.094651630050535757 0 0 0 +-0.12596830324562036 -0.15863414347417187 0.054892294191372121 0 0 0 +-0.20088604705605895 -0.15590374471561846 -0.006137867195499136 0 0 0 +-0.21852827746456027 0.11226900731744893 0.086248210986138801 0 0 0 +-0.11118033669280125 -0.033621480239434648 0.1460108336700178 0 0 0 +-0.14239101050048603 -0.010083817099744014 0.096419597098190341 0 0 0 +-0.028908314204171781 -0.12136604072524841 0.068344170905228679 0 0 0 +-0.066131442112326688 0.048478646929022373 -0.11449500732836546 0 0 0 +-0.087833552244950597 -0.043676593423776333 -0.048796377771798516 0 0 0 +-0.11972776868539398 0.16658983158826829 0.11106513890898598 0 0 0 +-0.24597422184733678 0.019272668813835825 0.081255195947879472 0 0 0 +-0.10709339291779563 0.15085726931477755 -0.045714068027987609 0 0 0 +-0.1329405780758034 -0.054755337534694942 -0.023956529312288394 0 0 0 +0.037148308046583478 0.20964303090584696 0.049435719109950121 0 0 0 +-0.25008870583363813 -0.087811970922645199 -0.011339869254040069 0 0 0 +-0.030428752977065765 -0.16949158274896817 -0.091919822877183546 0 0 0 +-0.089037390447850362 0.1648583960593431 0.082140671746840727 0 0 0 +0.16674195350358495 0.062765874880048422 -0.023394124907266806 0 0 0 +-0.020902820028285529 0.15337248384512631 0.077407539806467945 0 0 0 +0.040108234165264267 -0.021666097886179597 -0.0368648480805219 0 0 0 +0.022523147919047581 -0.0057130519408160052 -0.14087388887603486 0 0 0 +0.042325248005830207 0.21088072975701139 -0.027901201808686354 0 0 0 +-0.084628505926032105 -0.0099777331306762085 -0.00082488765098340244 0 0 0 +0.10966489166867915 0.089804535600899682 0.10933279506868124 0 0 0 +-0.36506293796579825 -0.032107350600961149 0.067863345507017309 0 0 0 +0.0023170230767922129 0.025303858498627319 -0.1133685303483461 0 0 0 +0.3074077358733513 0.11980102823480682 0.017637383254110822 0 0 0 +-0.11127161966714777 -0.058467023930280471 0.024146024650102016 0 0 0 +-0.18359449367527386 0.069969882873117895 0.11396763270146168 0 0 0 +-0.01143029413836083 -0.033712803384886608 0.1169615615524254 0 0 0 +-0.2654841294980399 -0.060486237477066468 0.1033180701025487 0 0 0 +-0.36031235808652362 -0.0044695644599776763 -0.018598352683056596 0 0 0 +0.040912577560998031 0.057149459455568818 0.079128856757342797 0 0 0 +0.080035855339877282 0.12735031908876493 0.065840897514414992 0 0 0 +0.061863396125959647 0.14269324385202398 0.10996576904133662 0 0 0 +-0.01774202828486221 0.10483189555311434 0.060490536927972932 0 0 0 +-0.11846344526131408 -0.090673350305113476 0.099028999774767562 0 0 0 +-0.091200242175192126 0.16656956035416476 -0.064931272727303202 0 0 0 +-0.29186104991741713 -0.016752096379907822 0.10962121285818519 0 0 0 +-0.11387185156477386 0.029378107543959253 -0.032348893084183344 0 0 0 +0.15153282382158323 0.11961799299390891 0.021328410746959042 0 0 0 +0.20438690020625244 0.12405837056368446 0.02240746109391889 0 0 0 +0.052769422676861188 -0.11369024388574252 0.014444148003803559 0 0 0 +-0.059846094432883024 -0.12324624705672359 0.10417515860884216 0 0 0 +-0.31832644812166228 0.02878064265758451 -0.054026678386611848 0 0 0 +0.075973414175058707 -0.012875389810547255 0.11768606674560392 0 0 0 +-0.086079091966389742 0.07475534240339976 0.10788210277491436 0 0 0 +-0.042954357456495118 0.0047018616201043861 -0.19280847691887104 0 0 0 +-0.019483908480901757 -0.055016192545344594 0.065182172722495185 0 0 0 +-0.060631235715213727 -0.081516414539923449 0.074851774196778881 0 0 0 +-0.16288378051001351 0.11050874493962942 -0.0022816125345062332 0 0 0 +-0.11332868480071662 -0.1067359625642323 -0.13957635690013179 0 0 0 +0.091600811099542712 0.19854825224575401 0.096104853373621096 0 0 0 +0.22903518411344842 0.062750598954705972 0.050811179833789355 0 0 0 +-0.089678971255291284 0.062689796389730157 -0.015657184673487201 0 0 0 +0.15046194887905612 0.14859728008660256 0.094862864626337334 0 0 0 +-0.11961830507510113 -0.1569855159558356 -0.024343288933479229 0 0 0 +0.076959888928632647 -0.056218748607981955 0.054534731443225876 0 0 0 +0.027501537300129331 -0.048013111492896943 -0.18178060767580895 0 0 0 +-0.037643644008364119 0.0071997316793827315 0.14905962184817714 0 0 0 +-0.058133683275715498 0.049340469303608414 -0.16404693312012916 0 0 0 +-0.11560015438676119 -0.081853787323070692 -0.080517444647795977 0 0 0 +0.14755207969061329 0.13799923490400379 0.077355117759888542 0 0 0 +-0.01406651129231562 -0.13288422700760699 0.089796517311164642 0 0 0 +0.011556113969748816 -0.15930775003382097 -0.0026031104353768653 0 0 0 +0.22264133761540511 0.14977356232012995 0.0093844490495654798 0 0 0 +0.02983328161421922 0.18393048897832537 0.072540086581990099 0 0 0 +0.24182092711927367 0.15374067448991258 -0.077148815414641511 0 0 0 +-0.11015243409380088 -0.094490186418734967 -0.11651008797246171 0 0 0 +0.043682078438841254 -0.095050713263912151 -0.15029273057910475 0 0 0 +-0.026566181657079191 -0.1696118023516559 0.036569234354177027 0 0 0 +-0.32983658837020402 -0.021594014486300772 0.051007011776280586 0 0 0 +0.12611843408931506 0.060902368981850807 0.10244365256634538 0 0 0 +0.15402227851082567 0.14708360515123325 0.034724832411668738 0 0 0 +0.1269941607331973 -0.034586959072498147 0.05396356051352294 0 0 0 +-0.0063740086928196771 0.14706162904821335 -0.0085738108253143597 0 0 0 +0.1192160388229298 0.18396020552891307 0.071247746984702071 0 0 0 +-0.039804210921535299 0.17290428181665107 0.011731024176443006 0 0 0 +0.006079108677695011 -0.1303669923361 0.11600519205665402 0 0 0 +0.17182579578824569 0.10527647760448605 -0.018022560035155621 0 0 0 +-0.091785928174573983 -0.025309239555785457 -0.11157543307927158 0 0 0 +-0.14431969107174553 -0.18484130278560801 0.048324106775639114 0 0 0 +-0.095573100626932028 -0.054732701544598222 -0.02520307591726817 0 0 0 +0.022390291227910197 -0.14486597785731639 -0.061727358664430687 0 0 0 +-0.02027690716585151 -0.10241631241676771 0.11951935139151801 0 0 0 +-0.06499545412289448 -0.050255376295547022 0.020500378397836361 0 0 0 +0.18068008482391246 0.13677800260208967 0.049371158555665984 0 0 0 +0.126480225683616 -0.01287820905546519 -0.12297916723048267 0 0 0 +0.12930999373140278 0.091199316490581717 0.14780720341854262 0 0 0 +0.067672751182608681 0.15208083660173277 0.010498202752747571 0 0 0 +-0.22373787635953868 0.12859314903850105 0.048000235825936322 0 0 0 +-0.030306984399156689 0.16411511561932646 0.088767983220335106 0 0 0 +0.052749104231824162 0.0013074954508445202 0.018294958000069944 0 0 0 +0.16166393171311116 0.026463784485353137 0.0050577676706658747 0 0 0 +-0.2509121678257501 0.13172955461903801 -0.025590981871599805 0 0 0 +0.011456042434642988 0.16530804773976654 -0.068706077773259017 0 0 0 +-0.12782537798263371 0.058766767932207753 0.026688011242618326 0 0 0 +0.0087526182616827763 -0.03258775738842648 -0.15721335779410089 0 0 0 +-0.20078976175204388 0.082939047322264869 0.083620737086955915 0 0 0 +-0.034362651615247652 -0.021652783630988576 0.19105033480023451 0 0 0 +-0.22231122456011365 -0.069071214137261278 0.019574843871244696 0 0 0 +0.098922238866216483 0.098505209891742995 -0.011795389928296679 0 0 0 +-0.044160158498429247 0.093523501958101996 0.10259336775863401 0 0 0 +0.24334598578188565 0.11146229247461165 -0.035092012783428661 0 0 0 +0.13921938546278506 0.21049086864336902 0.019069230944889132 0 0 0 +-0.15700659564677166 -0.031199024928166535 0.11365048121319429 0 0 0 +0.08973117933221858 0.15349685745945152 -0.0464949546188754 0 0 0 +-0.006392982173643591 -0.10113082326270641 -0.040928234836979771 0 0 0 +-0.08872551142404328 -0.13714642585692183 0.11872202499108389 0 0 0 +0.13025328564831512 0.12570344784242798 0.020407910804137119 0 0 0 +-0.020158294473344052 -0.11129527551634098 -0.15760567884820373 0 0 0 +0.11479329576567271 -0.0032246910235164961 0.0099377741248300178 0 0 0 +-0.29958312736921011 -0.096560577731581415 0.045213065560756716 0 0 0 +-0.10657749465127481 0.12375637124039884 -0.073229506119111554 0 0 0 +0.01231999620127483 -0.1538790224717809 0.035255965405532635 0 0 0 +0.19325416583449578 0.021934467802274954 0.10162995318712295 0 0 0 +-0.26788029831596188 -0.061853591823504334 -0.0055640003872746702 0 0 0 +0.015555348240933353 -0.037552314255096503 0.021150075839477589 0 0 0 +0.14902069293745085 -0.032422804038659214 0.062203049297762575 0 0 0 +-0.23862030028945536 0.033344168734875945 0.06873509779546319 0 0 0 +0.085507188654444122 -0.067103603931226302 0.13439099038177263 0 0 0 +0.028425762015755696 0.15943024528272914 0.079613159025739427 0 0 0 +-0.11214643518185946 0.06499850803003876 -0.13048964123050635 0 0 0 +0.099619644191369872 0.0065325018863477691 -0.0040735339535218629 0 0 0 +0.10377004465527367 0.03636841407358643 0.15553637996029293 0 0 0 +-0.03531800286146819 0.0058120493412706919 0.12156558148063859 0 0 0 +-0.015286137991945781 -0.01170052758718515 0.013620224632452244 0 0 0 +0.097095348920314517 0.12823985650639791 0.030135524903548427 0 0 0 +0.13270794094739941 -0.035764316487176345 -0.040754832967644095 0 0 0 +-0.1591474869314628 -0.026734124232613038 -0.014767268898861485 0 0 0 +-0.052573998018675516 -0.11439779554208696 0.0069880441669551707 0 0 0 +0.18826550574889406 0.074470432891744653 0.10953668568674194 0 0 0 +0.12889757910504002 0.14042789927932803 0.14019942829024698 0 0 0 +0.16322774605426232 0.089122833484051756 0.0413716449147081 0 0 0 +-0.058308091009338425 -0.17512019398322656 0.047991401913573956 0 0 0 +-0.099653121936509881 -0.084614034138432243 0.15707893744273202 0 0 0 +-0.10551528733987831 -0.069074418905301027 0.16105172730979181 0 0 0 +0.12907960880641117 0.12485198618756094 0.088819162586097594 0 0 0 +-0.02570528363100022 0.16050754316965626 -0.11652934284204802 0 0 0 +-0.03389484366087947 -0.00017384159088834616 -0.13201308474487392 0 0 0 +-0.19975865716322094 -0.015672779422719968 -0.061075592625188163 0 0 0 +-0.35838914806933841 0.074711062502706427 0.0060154717395463908 0 0 0 +-0.14544241837159033 0.077612226372088311 -0.081806846847628706 0 0 0 +-0.35143877775185278 0.020166013486476148 -0.0133469094153843 0 0 0 +-0.17167163609839281 0.039617163447791703 0.11445802974934735 0 0 0 +-0.16558648288425293 0.11821433886121957 -0.073286122352678784 0 0 0 +-0.15306517329616476 -0.0061980179675556746 -0.0057605323819560073 0 0 0 +-0.42366475802876991 0.0016136622790768607 -0.026373800428316913 0 0 0 +-0.21663586482263641 -0.16623551785934718 0.055117820153491121 0 0 0 +0.077117892180229519 -0.033773203292379622 -0.099073199902316084 0 0 0 +-0.25364148000895514 0.049312649526779995 0.11409217571746558 0 0 0 +-0.07571733763954841 -0.16561421779178737 -0.0161543500063899 0 0 0 +-0.12028864294822567 0.010111898592840396 -0.032213718965349719 0 0 0 +0.17005285066014147 0.074308666104758614 -0.088404345862540881 0 0 0 +-0.030740949441148024 0.06778669456275549 0.10297053623784611 0 0 0 +0.085759346959067007 -0.013074284401778602 0.14278157552729967 0 0 0 +0.031273598083772225 0.078819702566477912 -0.024906639550649562 0 0 0 +-0.38631905471534006 -0.10193899045681536 -0.055468973395635363 0 0 0 +0.058997351457020175 0.033235698806043212 -0.0023178814012347615 0 0 0 +-0.1777143346989784 0.0046543724536015629 -0.016334057914666356 0 0 0 +-0.25023174593321984 -0.10643429928860117 0.085255287107789429 0 0 0 +0.026383132478697224 0.22252609155007264 0.082283736721784823 0 0 0 +0.051967466129672235 -0.0015628394195637829 -0.14048916629347624 0 0 0 +-0.088432972448996783 0.014074372062749668 0.1457822581832828 0 0 0 +-0.37222093878703194 -0.034041344904210902 0.059197896592273841 0 0 0 +-0.21275370630396068 0.14069614969435146 -0.025025452757359484 0 0 0 +-0.33402515120165654 0.01025090045366342 0.030937214795557305 0 0 0 +0.061968459409391496 -0.0071124456146503812 0.10388423689360496 0 0 0 +-0.19948123174641519 0.04302027627996724 0.11974645975747381 0 0 0 +0.020187187317875221 0.068733699770360701 0.058624118706085721 0 0 0 +-0.27529694720591891 0.087596521100749725 0.006206739141265849 0 0 0 +-0.17796249363404004 0.042276255635556759 -0.071932286020079145 0 0 0 +-0.051912597978820585 0.069156611352876263 0.024562219878656338 0 0 0 +-0.031923771586215621 0.016833447102000465 -0.032330056092475551 0 0 0 +-0.014876701635592682 0.05438586737040757 -0.18872184790990687 0 0 0 +-0.14471260163853877 -0.17897291287558947 0.030496774853126601 0 0 0 +-0.37588332282191145 -0.01516012426865429 -0.083899969666308721 0 0 0 +-0.24318476833658295 -0.18542373955233582 0.016699539987022533 0 0 0 +0.15310912905965463 -0.024683737072018458 0.071199281690278532 0 0 0 +-0.15027182736299005 -0.11069221176334006 0.10671505469811984 0 0 0 +-0.19856722785183695 0.04421102633953794 -0.0086273777199066259 0 0 0 +-0.21682937414690856 -0.041634451317680093 -0.033660857533559657 0 0 0 +-0.17184893367223447 0.013188347831653874 0.068092672654138903 0 0 0 +-0.070450078363933188 0.17726562136361002 0.077167066774039089 0 0 0 +-0.14429656252446355 -0.14709917194344896 0.071797155406265495 0 0 0 +-0.42013954107047757 0.0054726343564754087 0.011823302787609874 0 0 0 +0.14160512334442926 0.017099757264823628 0.044226370494694439 0 0 0 +0.065858934107464739 0.075226229768269703 0.16689792608166718 0 0 0 +-0.051965621841915444 -0.010468017020522163 -0.096382489254780573 0 0 0 +0.26094865179495647 0.14893325984620304 0.0066680328791681731 0 0 0 +0.035073370269716186 -0.0072139514966467477 0.15343100000931273 0 0 0 +-0.022740813581524466 -0.029924963750333072 -0.078838414487767031 0 0 0 +0.049245380625491941 0.068785742607470612 0.048111197532426569 0 0 0 +-0.094786327172520168 0.11405985560049581 0.0334268465435342 0 0 0 +0.11978506185320431 0.20407175831131497 0.047011251063848375 0 0 0 +-0.025096566961754607 0.13044821990497313 -0.05950058045589271 0 0 0 +-0.031270630284184642 -0.10408883851342464 0.069504111159627319 0 0 0 +-0.1866030225454085 0.11476219262825882 0.0042462274818499679 0 0 0 +0.020616354854756491 0.042663385103701601 -0.17918628665926262 0 0 0 +-0.25181429869822924 0.072677484792761038 -0.033174694771116592 0 0 0 +-0.25943527331192751 -0.049052794959727225 0.06744116799741659 0 0 0 +-0.096530615379789408 0.086709476304278721 -0.029604074398556723 0 0 0 +-0.21979638787554112 0.086338772477097314 -0.043855110160744754 0 0 0 +-0.29179097724411873 -0.084781113219857235 0.037474324052407859 0 0 0 +0.090126172911864699 -0.019674772439486371 -0.13630234758236631 0 0 0 +-0.32520470243303107 0.07008135795468512 0.039961496242849143 0 0 0 +-0.16890684769701447 -0.088187655280201255 0.091547626114471342 0 0 0 +-0.15057966280234047 -0.1366545900223311 0.085771423465197921 0 0 0 +0.22455732586633176 0.15140381409304493 0.083770797571494221 0 0 0 +-0.14167171729045924 -0.071820460478701165 -0.038491171977608929 0 0 0 +-0.076684827953050871 -0.17602085716979579 0.023775523281564931 0 0 0 +-0.11739258808032615 0.082587009239564191 0.0027664743898874189 0 0 0 +-0.00061143979785965863 0.021958503455483336 0.0061673208750663289 0 0 0 +0.081764129441077749 -0.086075050470594328 0.081434993335115252 0 0 0 +-0.022000412104823674 -0.093317631122897871 -0.16138357815825519 0 0 0 +-0.045470200124415605 -0.06595737493847964 -0.079068135379437812 0 0 0 +-0.42510658082800923 0.036167272310913989 -0.045026668571140627 0 0 0 +-0.10800211218760353 -0.031769312576249265 -0.027791113171793058 0 0 0 +-0.11127832332552878 -0.17424814560783469 0.11057716280530908 0 0 0 +-0.17162394485401461 -0.071000898292009257 -0.062193543856895989 0 0 0 +0.085974854516498722 -0.046485843012252837 0.088218973926909722 0 0 0 +-0.10131416483277922 -0.027625149769496177 -0.14243306698234892 0 0 0 +-0.085965002419897407 0.10853118802287243 -0.06292457952897762 0 0 0 +0.13172296874446093 0.14677141816527439 0.088012805122565013 0 0 0 +0.07330904082451245 -0.080031631778199691 -0.048028142243401156 0 0 0 +0.16464149201697903 0.1670917267920044 -0.065563131554504855 0 0 0 +-0.062660331337305308 -0.16413046202082421 0.00030059874868951231 0 0 0 +0.10015893175968432 0.022957655163082291 -0.018195917165011621 0 0 0 +-0.17081578952964399 -0.086032304309387242 -0.024859325416032696 0 0 0 +0.13786326171229119 0.11388223910125439 0.090621924882266641 0 0 0 +-0.43244180477578198 0.040083620509453577 -0.0093498007636912961 0 0 0 +-0.0051467879904178448 0.1706245090411217 0.085000054873737046 0 0 0 +-0.073121218483010342 -0.12267844860293066 -0.0090564523493745219 0 0 0 +-0.23705574449851879 -0.05096876498613509 -0.048749117287429033 0 0 0 +-0.097013938605508332 0.05784925567177962 0.10464656365478972 0 0 0 +-0.040184652887808647 -0.086435529367867414 0.018099972023590455 0 0 0 +0.014506733419792639 -0.0030557792080063428 0.17563595134319457 0 0 0 +0.019399754796987356 0.20361605991490556 0.11831577102342386 0 0 0 +-0.12476621927814563 -0.18683877218578571 0.047026821516617662 0 0 0 +-0.063147012249743617 0.092560603988159407 -0.0042517086528250925 0 0 0 +-0.46218276034214767 -0.029892654556751275 -0.0147571759692747 0 0 0 +-0.043540721417607287 -0.17054581243154315 0.070371064442725367 0 0 0 +0.0098551884819637059 0.0018591944590709009 0.19802480105952078 0 0 0 +0.080596174082227467 0.055831023495518106 0.1047218332811212 0 0 0 +-0.12707854871826718 0.058212006156958152 0.12771421932068841 0 0 0 +-0.14837021802281031 -0.045960286326915983 -0.11881652992967004 0 0 0 +0.016013386215025072 -0.01857953894603534 0.015203945035156791 0 0 0 +-0.28485961101776924 0.074423110999440767 -0.02632174149552266 0 0 0 +-0.16383452244785851 0.12303585893923785 0.018774188556497928 0 0 0 +-0.016852146072140917 -0.14046808664899973 -0.14561504533403413 0 0 0 +0.21668259403157736 0.16754408034697316 0.061809276902365012 0 0 0 +0.26051532579047137 0.12198165667164046 0.016923776672434998 0 0 0 +-0.047237959638882943 0.14696131528938139 0.1403990770115843 0 0 0 +0.05811207023876247 -0.090224597750281937 0.12709170139140494 0 0 0 +-0.052928094709545903 -0.029709334028743234 -0.16026666614483437 0 0 0 +-0.058754958108987232 0.21737972347841644 0.010306069521429956 0 0 0 +0.189948771353946 0.10117453943182808 -0.043664407478930439 0 0 0 +-0.15773568831367191 0.13363821277108179 -0.073452029523786155 0 0 0 +0.29311412775276685 0.14892536947297674 -0.017792060936436066 0 0 0 +-0.019416105505570325 0.22512513208623136 0.062128483993364042 0 0 0 +-0.076969633100442636 0.12149041111578512 -0.039706036347910284 0 0 0 +-0.21042108600587356 0.063787005689180443 -0.050551761701566639 0 0 0 +0.17335258261083158 0.085960902845979181 0.092287928242432399 0 0 0 +-0.0056825221171766249 -0.15603821089691344 -0.00091596980594099708 0 0 0 +-0.25405615526356273 -0.00059145865586449076 -0.040328343760306001 0 0 0 +0.16895544640243282 0.024893238892491426 -0.017729555984883572 0 0 0 +0.075049525417056839 0.16619208931111867 -0.083155388142143377 0 0 0 +-0.086272160653327656 0.014564383944615233 0.15584174751515498 0 0 0 +-0.029636999489385696 -0.075773786984186631 0.11716395497586576 0 0 0 +-0.13691580970523415 -0.10368661538670214 0.019321988398844386 0 0 0 +-0.14602016345132846 -0.12712171588268364 -0.0099018484432729925 0 0 0 +0.25521253436672958 0.16675228246461599 -0.063140536440396217 0 0 0 +-0.038108508082085768 0.054878559066328658 -0.13162734763428058 0 0 0 +-0.094456455331596134 -0.021181205108833034 -0.081376325703531968 0 0 0 +0.29191610550919306 0.12247354241005748 -0.012126180089144956 0 0 0 +0.071566137261490803 0.10042362820415385 0.050897638785420918 0 0 0 +0.13035088114927523 -0.037413839918411823 -0.0078260017468193555 0 0 0 +-0.044920321388065398 0.063977736399948582 0.16379169333982327 0 0 0 +0.023895586588061402 0.05040283502331 -0.14101540022149633 0 0 0 +0.14084788997504621 0.046612043780900059 0.12748776311154617 0 0 0 +-0.33760788720408225 0.029684882213647013 -0.07729963888366706 0 0 0 +-0.24458934632183055 0.0098523770638331565 -0.032623067011464391 0 0 0 +-0.039720840523950807 -0.10433291984140362 -0.10150130484114028 0 0 0 +-0.10028210527779541 0.040659702355877458 0.06336119273297583 0 0 0 +0.0088862235828022773 -0.020098814033107842 0.15519751181721173 0 0 0 +0.058414324019942343 0.078967950128479847 -0.10430256618600431 0 0 0 +0.2661555339302471 0.14107287732031104 -0.0094972149358536206 0 0 0 +-0.35240108623076932 -0.066416015090487918 -0.07367734626850439 0 0 0 +0.0045658954501104909 -0.11239015839793069 -0.10485491683168895 0 0 0 +-0.19087966598348 -0.13138274317006721 0.069439685937628143 0 0 0 +-0.13079414027811498 -0.18596931581084944 0.063659576473626328 0 0 0 +-0.3764740852203593 -0.017016039644942638 0.0064397731677647563 0 0 0 +0.16308717178538906 0.023016979889424499 0.045478939293534498 0 0 0 +0.029908406122752862 0.1532977527581188 -0.083494603433884207 0 0 0 +0.02998165697785321 -0.067242915067264819 0.022906873982341508 0 0 0 +0.021398387867726798 -0.12785343534099544 -0.13953408124774555 0 0 0 +-0.04171269926805754 -0.060248633794251855 -0.051633265479909263 0 0 0 +-0.37761060454434719 -0.014229648793255445 -0.024506401279415002 0 0 0 +0.09548577858674806 -0.041498637733074384 -0.089973213871842705 0 0 0 +-0.095348778433289871 -0.092494390831444423 0.031909656531705993 0 0 0 +-0.31453610655722442 0.012604632199059218 -0.036450101223006376 0 0 0 +0.090856619234795211 -0.01130723617447682 0.013964078164439647 0 0 0 +-0.14066128411002693 -0.14872631704254077 0.0043106224443670293 0 0 0 +0.052108213856981556 -0.034290755875169304 0.14799114189944182 0 0 0 +0.013607446283111335 0.085769481834643502 0.15649308917908419 0 0 0 +-0.04005862796487758 -0.10839577603594774 0.15343219201013816 0 0 0 +-0.1799814591323049 0.10837803960527431 -0.024175488966792363 0 0 0 +-0.38485593469688206 -0.079525816232673824 -0.035368960929730908 0 0 0 +-0.12019321208761774 0.14655917954789988 -0.047126060114921542 0 0 0 +0.16910807546575318 0.11631137509986433 0.075794034791330317 0 0 0 +-0.24285066206913211 0.03305278479074919 0.12599809029304468 0 0 0 +0.13605518501545527 0.022532730293152836 0.16045046119027209 0 0 0 +0.066710622964419819 0.052681222485755075 0.13361162289114251 0 0 0 +0.1674170752772362 0.14417921016973162 0.018998027970182241 0 0 0 +-0.03188818124070536 0.10493867903246867 -0.071567187918326808 0 0 0 +0.051756944651990155 0.088193289261171592 -0.064029951912541877 0 0 0 +-0.38456766793887132 -0.037052782522276534 0.026239787187648939 0 0 0 +0.15684269567508008 0.0020421391020351842 -0.032774057743025942 0 0 0 +0.072573803420858451 -0.016259162661137999 -0.15028738801692518 0 0 0 +0.20730796332134865 0.0390949196911482 0.026745593923202721 0 0 0 +-0.19743334252632228 0.034040836430953347 -0.031476356648176912 0 0 0 +-0.24058786653860476 0.081686507330167579 -0.021867783536975743 0 0 0 +-0.14212986447912179 0.00031783382324779286 -0.026630403435472405 0 0 0 +-0.31929757766117578 -0.1486696757713058 -0.0055140310295140327 0 0 0 +-0.0079796873597754447 -0.077329855969645089 -0.034025018148289982 0 0 0 +-0.26920196468040347 0.043222335373490128 -0.050356792061494654 0 0 0 +-0.073392072130311292 -0.035292631089444276 0.044470372005505021 0 0 0 +0.056515437863837004 0.021081177482733499 -0.07822992934689578 0 0 0 +0.27083740272826046 0.078265068656397041 -0.041760141699297815 0 0 0 +0.10206299068065355 0.020321994428121937 0.12228692316563053 0 0 0 +-0.22228106433283307 -0.07435290253810678 0.016360253223498822 0 0 0 +0.016086409949166602 -0.10736828216769036 -0.032922372459652377 0 0 0 +0.12247398165092799 0.10171009401679038 -0.093176734932729974 0 0 0 +-0.21888750648444988 -0.042374245343598543 0.050458150438727811 0 0 0 +-0.22295647331435237 0.060013824928794979 0.011248603008243263 0 0 0 +-0.28993476715394995 0.011418996103699314 0.047989185917023114 0 0 0 +-0.074526986869289602 -0.1440515756834303 0.032235069415508771 0 0 0 +-0.12964156263316284 0.18427128692023037 0.064099517784345889 0 0 0 +-0.1095396405844507 0.10385060234741494 -0.1235140921272994 0 0 0 +-0.18700498582861858 -0.006107834471287682 0.0067187197393723808 0 0 0 +-0.12212279849737656 -0.001216292685374154 0.11563571783973928 0 0 0 +0.094653776317520533 0.21476836183746439 0.025195095090302627 0 0 0 +0.09458517822988094 0.041465370931798085 -0.0038029428974338808 0 0 0 +0.17903555033356883 0.17375019793559049 0.067025312120600117 0 0 0 +-0.17948917728853647 0.070150567065511371 -0.073792912614221218 0 0 0 +-0.29366406193024486 -0.042388846389298351 0.049771728196075643 0 0 0 +-0.033264432216261075 -0.01173585735442631 -0.10967426267758058 0 0 0 +0.13424666239061384 0.012886587532703747 0.13058402600378263 0 0 0 +-0.36089915588267851 -0.12338386210520567 -0.049171160207308828 0 0 0 +0.21793782052434513 0.13884046627447472 0.055129660521758744 0 0 0 +-0.25321527713750025 -0.055929358460933443 -0.010773088176933121 0 0 0 +-0.042160686856296425 0.0088273878107904269 0.16605086163215152 0 0 0 +-0.05354125554264294 -0.094022244878874645 0.13286100951978516 0 0 0 +0.059487712409219184 0.19372584160932432 0.0021584017433058378 0 0 0 +0.0064785981941897774 -0.068987982265417941 -0.1176663636736297 0 0 0 +-0.0015865316722356027 0.19860469454422219 0.016803589722366064 0 0 0 +0.26754303325078915 0.1274506157132359 -0.020084257360652558 0 0 0 +0.10561499733073404 0.15040911367824628 -0.053221831298210176 0 0 0 +0.090191570899207096 0.00070037342444806416 0.17084052868097696 0 0 0 +-0.28042947764858372 -0.024636733878828587 -0.057619324134959377 0 0 0 +-0.11323077374900697 0.19290532396782889 0.01593351674235613 0 0 0 +0.053600869803512474 0.12934339952238044 0.12390660724126876 0 0 0 +-0.27783927346250514 -0.11420606011522749 0.0090220269627482585 0 0 0 +-0.052768666755761973 0.13948730168018675 0.13339740877737991 0 0 0 +0.024918789559369825 -0.15161028336799753 -0.081894030727343636 0 0 0 +0.036780771161208314 0.078352684354494329 -0.0090319314016983898 0 0 0 +-0.28720001767231851 0.050463789227380429 -0.055612779078147379 0 0 0 +-0.37961883716016775 -0.116671329054249 -0.046998864660388801 0 0 0 +0.1017187826322577 0.08947624145891192 -0.084585475585012226 0 0 0 +-0.082569762515961209 -0.077734535949551042 -0.044531048513875793 0 0 0 +0.10005792415367204 0.055941187584291674 0.051300915071529812 0 0 0 +-0.12676544792730599 0.17551739780198689 0.018799321933814783 0 0 0 +0.04711282063640182 0.030041740620447288 0.11139905637802697 0 0 0 +0.12656885387470945 0.00014937435486725437 -0.089585883404593905 0 0 0 +-0.042947878273737194 -0.036484441551779406 0.00060887307024282133 0 0 0 +-0.26347592106814499 -0.077055800647304884 -0.0014366159400278633 0 0 0 +0.040218316028283352 0.085307530467377934 0.11680028872310369 0 0 0 +-0.060272929161647393 0.12424856068536405 0.067494895657110004 0 0 0 +0.14387290495470623 0.11605203219657018 0.025930730574944993 0 0 0 +-0.30215210349270144 0.042434033757488721 -0.060802283042377336 0 0 0 +-0.43228990506928416 0.017695823558984303 -0.013713986264496575 0 0 0 +-0.089203424560502231 0.041287712881731331 -0.056329784189508764 0 0 0 +0.28770646237604319 0.10837993273798191 0.049165578233273693 0 0 0 +-0.21740754285825187 -0.069996093316188085 0.054457464134153005 0 0 0 +-0.045114405505978561 0.08421253385646732 0.012047098204378492 0 0 0 +0.22374364292421839 0.12274812418563846 -0.0036839084066585537 0 0 0 +-0.0084012189464201525 0.14885207702975206 0.059156174521333066 0 0 0 +0.056451203068359657 0.12210937962517604 0.027959597661853769 0 0 0 +0.088456119246643483 0.11416150284097015 0.016786487174469511 0 0 0 +-0.37692307274546477 -0.10895333970757481 -0.039723382456791578 0 0 0 +-0.40486873765578962 -0.055749334369796344 -0.038264549434135653 0 0 0 +-0.13010768626454755 -0.049295124941835661 0.081476572276849318 0 0 0 +0.021501911943729468 0.083521928939839341 0.1688741377712665 0 0 0 +-0.19898344382549404 0.13611882167511991 0.077406793529670198 0 0 0 +0.088816892764633504 -0.039353537179530607 -0.12488876907486002 0 0 0 +0.08889555408689892 0.20989722707546499 0.030736685578983264 0 0 0 +0.14854467046015424 0.17146525550917718 0.037171669826320836 0 0 0 +-0.38091414502252829 0.050845223876477663 0.0094006788991470858 0 0 0 +-0.027548519861544496 -0.054905182447498202 -0.17442777406776835 0 0 0 +-0.35678057011453668 -0.010933610938750227 0.01506222113075667 0 0 0 +0.001985813073946574 -0.1411790319797136 -0.17369613524809571 0 0 0 +-0.29184210780271563 0.082484537407968184 0.045194081541381298 0 0 0 +-0.03606618956091584 0.035953581128088274 0.048477545740635591 0 0 0 +0.05241161987077908 0.053812833298440998 0.12151224440959749 0 0 0 +0.046966556628502409 0.026733163412225869 0.06178967191386317 0 0 0 +0.039456935150544103 -0.097266927412503867 0.0016348185830456219 0 0 0 +-0.34734790905458857 -0.033718595227253179 0.037317642310520177 0 0 0 +0.019743364243721528 0.11164438189878406 -0.11794227501497789 0 0 0 +-0.15617576412751111 0.10933779706103075 0.1159546873102654 0 0 0 +-0.069568420121767616 0.009603496615526258 -0.079945853612522585 0 0 0 +-0.030279257124841696 0.074261402897641049 -0.0010418447960801325 0 0 0 +-0.30952299298909725 0.03229197375766607 -0.05546417364772363 0 0 0 +0.043837567487878204 0.047139422705525957 0.074309986894960961 0 0 0 +-0.069034634473649825 0.057071151999067982 0.0017291613364298908 0 0 0 +-0.23167952762752542 0.07749616913403895 0.0094621147442124909 0 0 0 +-0.23070340369435033 0.096297618610308944 0.08139252053199289 0 0 0 +0.051955243167460419 0.11601169041456605 0.051582774907263457 0 0 0 +-0.13018249333280607 -0.069676942283392884 0.014193536002821278 0 0 0 +0.21133177918488383 0.093550457520598984 -0.031170431984690494 0 0 0 +-0.25657946760348049 -0.011691243333694062 0.053789025677198093 0 0 0 +0.21996583004720965 0.17382433274683634 0.0312088510104441 0 0 0 +-0.19112638925710695 -0.017009468403331479 0.10226690693141752 0 0 0 +-0.41331106630701109 -0.053026908871940365 -0.085484673409360917 0 0 0 +0.095824780992537273 0.010166395070441064 -0.049466492938215367 0 0 0 +-0.074653823532352726 0.031863371425513654 -0.0036687792225331139 0 0 0 +-0.20290715716570618 0.061757024267422966 -0.030943995082211684 0 0 0 +-0.2321871289878083 0.07135894624072403 0.06710308214548602 0 0 0 +0.024629196732400438 -0.091276737254998186 -0.011718965986261598 0 0 0 +0.0018218188929673973 0.15852015819762694 -0.10229125665306951 0 0 0 +-0.15643247354312573 -0.13320023709785705 0.0052424485299019108 0 0 0 +-0.0076697685296671092 -0.1426718749590167 -0.0037917220131647722 0 0 0 +-0.026944212966787229 0.12128204914757978 0.1050343901547757 0 0 0 +0.044486912733286144 0.21044832059821067 -0.016283577487247985 0 0 0 +-0.35432969462215669 0.053727995294436337 -0.026117158622193604 0 0 0 +-0.063072001112736809 0.21106478106551474 0.071930303810567614 0 0 0 +-0.15799256400752582 -0.11145071222784651 -0.028586040719296768 0 0 0 +0.095496357283915867 -0.029515023949968633 0.13930300004389465 0 0 0 +-0.21539503046729375 -0.10499590609576508 -0.030349713333826522 0 0 0 +-0.2173026386728627 -0.06737696188507511 -0.035289818460972983 0 0 0 +-0.14983691604665483 0.13886790224161744 -0.046947709984878544 0 0 0 +-0.10288135122104319 -0.14128079916071473 0.13110811967677763 0 0 0 +0.19877797542768288 0.12687059403468665 -0.050371680097968302 0 0 0 +-0.033922991165653837 -0.099965126209026672 -0.17097331242133862 0 0 0 +0.11700217255385353 -0.0075376859710011845 -0.12130333585042925 0 0 0 +-0.11359637349289381 -0.15322090837296098 -0.044520198725954641 0 0 0 +0.071619178886124846 -0.0041428916568965746 -0.037880295223806038 0 0 0 +0.22514991052312078 0.11590343873465619 -0.030336307455052614 0 0 0 +0.026154216092883098 0.15438294037573363 -0.0702967331665936 0 0 0 +-0.031386741245000183 0.037564535969500434 -0.13936511118587058 0 0 0 +-0.057701555230363799 0.00023130401527693412 0.17422910244001213 0 0 0 +0.10554382419781522 0.046276345667357999 0.14956617151899079 0 0 0 +-0.25526268037164823 -0.032942531186035379 0.1186063541294872 0 0 0 +0.094210759692827606 0.072219450554592501 0.087431756978110869 0 0 0 +-0.016202267980556961 0.16372150422242704 0.004182346744887544 0 0 0 +-0.17229047760079386 0.093168525332495089 0.013092882613336215 0 0 0 +-0.084337146014864584 0.025765238863313555 -0.17386266728679042 0 0 0 +0.20985520347781245 0.17221191548771547 0.010736056947667605 0 0 0 +-0.28428136899283857 -0.059636605129412379 0.076970947273647422 0 0 0 +-0.093893422852798891 -0.14429027939221917 0.0335709769121455 0 0 0 +-0.10332575097836327 -0.043950116081669932 0.022848603316231619 0 0 0 +-0.1709796484206012 0.096154715041313787 -0.0049630970102581273 0 0 0 +-0.19218332139136041 -0.10940015500871932 0.0087800324167287835 0 0 0 +-0.11632240016925155 -0.027532600874696417 0.020194402311794452 0 0 0 +-0.012737962520385671 0.1553521690636952 0.098802022100071912 0 0 0 +-0.052871702200484039 0.098998647360725334 -0.1168128441154547 0 0 0 +0.10235981396569865 0.069983324565118632 0.11249072270132929 0 0 0 +0.016447936631999893 0.076118174135259786 -0.018583626154248134 0 0 0 +-0.10020383395358223 -0.0053878141404660462 -0.042395299366971007 0 0 0 +0.040576966853386243 0.15191415011135345 -0.053359416150997846 0 0 0 +0.13436621720050917 0.025054174877149948 0.042384229845139676 0 0 0 +0.049852672970455536 0.12058217861107828 -0.089494837449630257 0 0 0 +0.079828660938602358 0.16343296308296451 0.13989769967015833 0 0 0 +-0.165527029721872 0.0028475103967930127 -0.054476037636262353 0 0 0 +0.11034123520948452 -0.049557271454943347 -0.1008938657872728 0 0 0 +-0.018629824461489974 0.097917280277247498 1.8193128432153483e-05 0 0 0 +0.078507942738030023 0.19219126960731714 -0.0086090896686194518 0 0 0 +-0.25287044970266292 -0.04023487966067113 -0.058719351914293116 0 0 0 +-0.3704711225841148 -0.041748691670928151 -0.017933885086973189 0 0 0 +-0.40399675000486202 -0.046200170807355084 -0.071032194705624135 0 0 0 +0.030484761267572102 0.20343623222638108 0.016571125799361153 0 0 0 +0.16113469868760549 0.13214391572707096 0.10894283054136203 0 0 0 +0.027511746028214656 0.10062366522890281 0.057529815909380083 0 0 0 +-0.18329754379202384 -0.010017847239858962 -0.043973512729574921 0 0 0 +0.038833286695405811 0.022401934720336442 0.073271065819209419 0 0 0 +-0.28161527163927447 -0.063052484345586995 0.088885547805716308 0 0 0 +-0.1059746245516674 0.049772945500596411 -0.050060352724620144 0 0 0 +-0.06617320440375718 -0.08093742499244308 -0.11380829622832592 0 0 0 +-0.052723707387275109 0.058895754973223857 -0.13055014218752364 0 0 0 +0.07112661361353928 0.0061147710920506915 0.074900157066600886 0 0 0 +-0.43673445891877638 0.022965208203576948 -0.041650356399789451 0 0 0 +-0.16097938903256553 -0.064633058465744381 -0.07695870269990758 0 0 0 +-0.027815550620961027 0.13500615268430577 -0.11163900305320927 0 0 0 +-0.095936990350289297 0.041967497663586872 0.0090150594849442156 0 0 0 +-0.029423537910108044 -0.15181980276228629 0.14920201554528531 0 0 0 +0.0018330207556276346 0.1302400447013024 0.15900372434917417 0 0 0 +-0.070676463919363497 0.11757228608401304 0.12766086182913791 0 0 0 +-0.21476349702246489 -0.1915666465557227 0.04208782912159198 0 0 0 +0.19959976027700815 0.04787634522672557 -0.054629556612527469 0 0 0 +-0.23982997448065091 -0.00791498481371955 0.14545020993341504 0 0 0 +-0.12350762716265168 0.013977045251393677 0.078359826685489159 0 0 0 +-0.30093317667329689 0.026505078723647602 0.083373627760257113 0 0 0 +0.15607063784484981 -0.0020032124151634079 0.029803795770550146 0 0 0 +0.04593259432139335 0.011146610310656002 -0.046978451947920025 0 0 0 +-0.33869694882903717 0.090529906992651954 -0.028756351294792731 0 0 0 +-0.17047211735066498 -0.053400071265741256 -0.061594690699022264 0 0 0 +0.13336326162808104 0.17447990453484746 0.023795848557125299 0 0 0 +0.027254774724373043 -0.063393058684081321 0.16212314651239243 0 0 0 +0.12407444371602955 -0.0036720486271856478 0.023249319984308903 0 0 0 +-0.12624135252149082 0.16380074443070308 -0.0039772532937964455 0 0 0 +-0.055161944977655142 -0.009726071561404509 0.17897120492451915 0 0 0 +-0.1257120987112052 0.061238030899055274 -0.14574615187303813 0 0 0 +0.084646431964868596 0.14331894530855771 -0.049953584833835718 0 0 0 +0.10541442496034076 -0.0069848661613878815 0.06980226266339376 0 0 0 +-0.0084220007030968991 -0.059242380964928787 -0.17272098185394097 0 0 0 +-0.35778598660490712 -0.097404943619212148 0.015088735491431332 0 0 0 +-0.00034038812829184639 -0.10006724571532524 -0.15994720676772389 0 0 0 +-0.21053344172381566 0.078571151740440159 -0.068796819648273749 0 0 0 +-0.031993129263084896 -0.042047128332209333 -0.18972969621036481 0 0 0 +-0.055319407069163884 0.058808397147259217 0.030568116130374384 0 0 0 +-0.16712618272374385 0.10919849277873661 0.003764502838661421 0 0 0 +0.25563116024114191 0.04663320278908123 0.0370169995046081 0 0 0 +-0.029147017953896459 0.11284838388730772 -0.012991196579747843 0 0 0 +-0.27036390567975588 -0.092861260845358951 0.077850122045974718 0 0 0 +-0.043275080593109638 0.089327948490853404 0.13460050703581142 0 0 0 +0.080210139876441044 0.061089327563051576 -0.097619913275651629 0 0 0 +-0.30528529040305874 -0.11458321781364736 -0.02063217601323547 0 0 0 +-0.10312510264904706 0.028820575356720446 -0.11243825677844789 0 0 0 +-0.065912041376663899 -0.16717120732078888 0.066843362411674573 0 0 0 +-0.42630754921966002 0.019061779099028536 -0.00042840675347671775 0 0 0 +-0.0741675458446448 0.12026529274080322 -0.10947652847181912 0 0 0 +-0.13656060537454678 -0.087071470318516253 0.094225214913954497 0 0 0 +-0.027207237554350894 0.096461031581025092 -0.054436444496246045 0 0 0 +-0.22828161291136645 0.017771553150877334 0.10799914273884517 0 0 0 +-0.16368701021944876 -0.12029431771684207 -0.018080363442882441 0 0 0 +0.068924332402884037 0.16232246887091639 0.012939419329369428 0 0 0 +-0.12636583823699277 -0.16637512563400997 -0.035432186353982903 0 0 0 +-0.1272630684362725 0.16268086765676781 0.0073369866755236823 0 0 0 +-0.016059964040089414 0.022997465779896337 -0.040516055951340585 0 0 0 +-0.090840616732863755 -0.063181615743594266 0.14229063232360825 0 0 0 +0.23659677056444101 0.15547531671449305 -0.026633592562116226 0 0 0 +0.08583935097811507 -0.01084657074100201 -0.16981945617925143 0 0 0 +0.078247719560894102 0.020733930167359749 0.057221365785805028 0 0 0 +0.017766659115795058 -0.030544620204316919 0.092934218243620331 0 0 0 +-0.082158647505200966 0.024699128643201645 -0.16822602378228074 0 0 0 +0.030753050828841444 -0.11706158061714192 -0.084784606739256987 0 0 0 +-0.095441358755808337 -0.10115601612781874 0.025166866706326146 0 0 0 +0.19543692522404249 0.080058910312305165 0.044080713228903723 0 0 0 +0.03748320640310171 0.073971884242885255 -0.043790235316257003 0 0 0 +0.21989922729844219 0.0761363044309602 0.066264820235004657 0 0 0 +0.062058271199224968 -0.044966962443841629 0.0041924110857611552 0 0 0 +-0.37726208308726084 0.044858515635300411 0.0053754784952495249 0 0 0 +-0.095530932843340577 0.072891859636589396 0.12360233422571001 0 0 0 +0.18168680999960746 0.090224945780893295 0.09635914385090863 0 0 0 +-0.087039068770904615 0.003168148692120315 0.18503200765624547 0 0 0 +-0.13572500204772225 -0.044312461981750095 -0.072398317501801063 0 0 0 +0.0032365001707803098 -0.087543844517559283 -0.18748669854814093 0 0 0 +-0.085820437473279942 -0.18415098358444917 0.070797233976270996 0 0 0 +0.23777717298322115 0.038803141442539602 0.012563193349486218 0 0 0 +0.055898488154313475 -0.092329678219448791 -0.057155040091918324 0 0 0 +-0.045033050476235847 -0.053333604937747137 0.041327920705642091 0 0 0 +-0.066356773690462612 -0.12123872642622191 -0.058552509298214678 0 0 0 +-0.0096729009384010634 -0.12685229069303627 -0.027830531066710601 0 0 0 +-0.069271711341964581 0.076716719557273161 0.086487654824894372 0 0 0 +0.011362902056781976 0.17937851081778855 -0.056892697807778142 0 0 0 +-0.36259297108620642 0.030485581824886587 0.022780109771838891 0 0 0 +-0.24775450400275181 0.060603151636247965 0.039860424003415745 0 0 0 +-0.11028473072959577 -0.19665165840836429 0.067778447424867189 0 0 0 +-0.19603162150355058 -0.17931396397767776 0.053344115870902792 0 0 0 +0.055526374460400485 -0.043143546880900885 -0.051486097096423628 0 0 0 +0.083004025080178401 0.13295716732861801 -0.086481459734241012 0 0 0 +-0.1593051478010486 -0.11701108822552023 0.071995383602713209 0 0 0 +-0.12866970109149117 0.11432094899294243 0.032052186489304052 0 0 0 +-0.40579782487620136 0.0089412396424035367 -0.0091664760119197775 0 0 0 +0.055027112709630732 -0.048813765698079964 -0.040009484003607654 0 0 0 +-0.17978146646831888 0.01315656701892845 0.1102150535235675 0 0 0 +-0.099842737326740816 -0.043804004317762824 -0.089967857015306588 0 0 0 +-0.43604022270570281 0.022800495805760823 -0.05586787542299182 0 0 0 +0.003108327991131199 -0.10567989929085413 -0.052943156133736485 0 0 0 +-0.17187438293467044 0.07595177378870871 -0.071763407107932498 0 0 0 +-0.0076230537920399244 0.071492527432274966 -0.14876462450552033 0 0 0 +-0.035793937664784059 -0.0032240478424415964 -0.1337719273520098 0 0 0 +0.0076965666462876503 0.033174387350546675 -0.17786909864358416 0 0 0 +0.026652017240482329 0.10656897792487635 -0.094629686106117439 0 0 0 +-0.22170941146104134 0.0014835741411889647 -0.020567978015813504 0 0 0 +-0.01538818597066921 -0.096889861168735686 -0.061934956533150731 0 0 0 +0.045113304023563339 -0.074922813016068679 0.05573751819606873 0 0 0 +-0.074697928835337546 0.035050983257986112 -0.13299506081685702 0 0 0 +-0.0094157796062389609 0.0080910641355067259 2.2330152154859118e-06 0 0 0 +0.014647975069053853 -0.15430025360184443 -0.11059998321644868 0 0 0 +-0.35736042201514823 0.022990154333891344 -0.017088130891596442 0 0 0 +-0.017475844788656159 0.038662772902249787 -0.13480042542848641 0 0 0 +0.26685493610589289 0.15749472345119897 -0.020389688776016712 0 0 0 +-0.08744518787638289 0.15532616831346319 0.038001846328929528 0 0 0 +-0.19188640703118875 -0.013077670794044649 -0.046899766898572448 0 0 0 +-0.19416723354724702 0.053747865798672634 0.056005198215722557 0 0 0 +-0.044091634480187269 0.15554473165183047 -0.10904124062390765 0 0 0 +-0.066262075209918003 0.036519255349480084 -0.13695978421142557 0 0 0 +-0.25134421386569739 -0.00059008619355085945 -0.045222102684980725 0 0 0 +-0.03573930543762871 -0.16348404961964863 -0.087933763206198806 0 0 0 +-0.12614637741442075 0.008117132780644104 0.13709420042310608 0 0 0 +-0.095323424402936396 0.0060534604932721559 -0.1753404665072863 0 0 0 +0.22055812069383912 0.068331508770565041 -0.077662151377648578 0 0 0 +-0.15523551850352441 -0.13325738725961281 0.02562210446370719 0 0 0 +-0.054302304619713748 0.12385366828080263 -0.065265403497846791 0 0 0 +0.13426925469057399 0.16862633820304179 -0.079530869134534152 0 0 0 +0.022595052298314322 -0.0011294925828590208 0.13366231067955167 0 0 0 +-0.065070680287897142 -0.09153330289255876 0.13134361010491521 0 0 0 +-0.073776584134397583 0.073948146085019206 0.11755926299356947 0 0 0 +-0.2547691514410847 0.040188629083191041 0.09073954274661325 0 0 0 +0.066247483649526206 -0.088677985218642286 0.04571825318359396 0 0 0 +-0.025150405588222235 -0.15422457883990651 0.14276176763319084 0 0 0 +-0.17757677082204731 0.011051163781236856 0.14091408133020858 0 0 0 +-0.039627052794671658 -0.015527296489860398 0.15766190511506886 0 0 0 +-0.10163488041129198 0.02374411590617706 -0.11139823280954826 0 0 0 +0.10311430487784784 0.18969256724645472 -0.047861556183177056 0 0 0 +-0.17997735470512888 -0.019150191770186203 0.051519693726064159 0 0 0 +-0.1413042612767732 0.025398550687804777 -0.14009185279610939 0 0 0 +-0.43463780369223098 -0.00078902640501829491 -0.094675510657394768 0 0 0 +0.0063951616632146324 0.083395340923538397 0.12443198016635656 0 0 0 +0.041277942625824349 -0.089566276968232827 -0.070978701696147672 0 0 0 +-0.41265374499678614 -0.014856195402144001 -0.058650092229516254 0 0 0 +0.077235885486295397 0.10293997938517341 0.15684097000680539 0 0 0 +-0.15720466364013735 -0.011189836030886524 0.16105824832100421 0 0 0 +-0.011772010658502141 0.081590487442194493 0.056851821396594421 0 0 0 +-0.078484963730243051 0.12527855531360488 -0.085581654492558445 0 0 0 +-0.28281659072684828 -0.0065611906005526022 0.085427428103490716 0 0 0 +-0.44329687149357055 0.038884691148494799 -0.030429521882472554 0 0 0 +0.14089536959257437 0.040538276708357024 0.034105624461316514 0 0 0 +-0.032133371353384621 -0.15799530403218559 -0.10142452038429398 0 0 0 +0.1144605798110459 0.087256769425761382 -0.061364778782768165 0 0 0 +0.043478055794981707 -0.076782079445003537 0.17061372216727819 0 0 0 +0.091795061873600259 -0.034394031308294742 -0.10008976794592477 0 0 0 +-0.22168856735002485 -0.012572980119316374 0.037700597033888561 0 0 0 +0.045988859098534951 0.15034990632227668 0.083714544637353144 0 0 0 +0.078846458402064112 -0.050372999400009416 -0.09574697125793713 0 0 0 +-0.32356764328326104 -0.027547243257042026 -0.029342008905139272 0 0 0 +0.031497059787525761 0.18626736415357931 0.066701394389366703 0 0 0 +0.045745070635832386 0.09445567095090307 0.067139636342423009 0 0 0 +-0.25295247438022406 -0.0084514443071205259 -0.02094116319620748 0 0 0 +0.21187049498279803 0.11954158873655274 -0.054456562410815618 0 0 0 +0.08617544049147513 -0.047612619364991338 0.13175286477360967 0 0 0 +-0.4081034419661248 -0.0079305843643047991 -0.087833478084581904 0 0 0 +0.14508957794815763 0.21297750370215995 0.02749853449006659 0 0 0 +-0.3258867969334871 0.013923773238063764 0.0020711114913010975 0 0 0 +0.08179869830913139 0.16377551515507371 0.10652542799150941 0 0 0 +0.011652003985040349 -0.16503363389201883 0.061609485237461986 0 0 0 +-0.075897775982588123 0.017052678680445521 0.10108764107821369 0 0 0 +-0.032926575240797895 0.02589868190907918 -0.13580710957426811 0 0 0 +-0.30882524792726851 -0.071562095304879836 0.038407711935629141 0 0 0 +-0.1855357021781523 -0.10455014155930702 0.10742716631286733 0 0 0 +-0.20111177316710821 -0.16296334324354306 0.040068970126335507 0 0 0 +-0.062200508517476327 0.010061524856668419 0.072914258072987653 0 0 0 +-0.27679990182194625 0.041229885055999282 -0.064270054034263835 0 0 0 +-0.15061497198646429 0.13992621804092448 -0.023158050452560641 0 0 0 +-0.26200959830405424 0.05646460397376396 -0.058988656292648517 0 0 0 +-0.031582964683624482 0.039763925032338554 0.10284687390271993 0 0 0 +-0.11672307781934743 0.12999541079018218 0.052576264805004908 0 0 0 +-0.061086080013394883 0.098830117427285258 -0.075857719983298322 0 0 0 +-0.0078016577837756174 -0.13113829730855861 0.15726732610955044 0 0 0 +0.1247779805512586 0.13278623066000034 -0.056736824903703298 0 0 0 +0.098727077718798462 0.095117903293381878 0.15834688789745002 0 0 0 +0.15738761478503699 0.1988138044272838 0.015970081706470823 0 0 0 +-0.23929513183199802 -0.034735489351456067 0.05541346012024348 0 0 0 +-0.29434143148336794 -0.05745666806404387 -0.013769846382293394 0 0 0 +0.26848548054982674 0.16273045792428448 -0.017877215203158547 0 0 0 +0.1241648839620268 0.097303119669544469 0.017343269998896876 0 0 0 +0.01778699040960513 -0.085293042091197341 -0.013999996475943355 0 0 0 +0.13526031758983853 0.17680265050186683 -0.015019290471914692 0 0 0 +0.10462381274603066 0.049021802959049121 -0.11329402797624469 0 0 0 +-0.18508910074578133 0.065959515651607403 -0.075506069158261635 0 0 0 +-0.083580763309837824 -0.014943582999060873 -0.15022513238122825 0 0 0 +-0.19926854260514026 -0.15657553760315898 -0.018843396568051063 0 0 0 +0.14155675451622568 0.19043239082914587 0.042711577293745695 0 0 0 +-0.067802957136528619 0.2069873561663772 0.081704914227213238 0 0 0 +-0.2157260809941916 0.064905727607186381 0.068209436012987984 0 0 0 +0.13942911107234884 0.1130558632217436 -0.083824483768218661 0 0 0 +0.071561923619743839 -0.0062020580356926813 -0.1279815779307536 0 0 0 +0.01185583654263983 -0.023101805696292804 0.15627583593660124 0 0 0 +0.055930400349588572 0.21550348268060804 0.014507466434193789 0 0 0 +0.047818101503618482 -0.024034253550818674 0.16667625773941305 0 0 0 +-0.14971934750590943 -0.086474651397550034 -0.086703678502043705 0 0 0 +-0.34038853250301215 -0.068887907102562512 -0.057533028176120937 0 0 0 +0.23723861288220388 0.16368738328435223 -0.025295944309874446 0 0 0 +0.033460833003292778 0.11752068102982594 -0.12473083314241375 0 0 0 +0.015793947688853283 -0.041635701483492299 -0.15875681730613206 0 0 0 +-0.010178811929218989 0.15784369641090185 0.06102635438669099 0 0 0 +0.17027111125614952 0.19700838658292541 0.005836847974677567 0 0 0 +-0.13008988542321609 -0.10569657530766727 0.090101984740881741 0 0 0 +0.024109088981088711 -0.016951416331650232 -0.014197400055093679 0 0 0 +-0.22599226728087762 -0.0014747221130491373 0.023818461857942397 0 0 0 +-0.031595576888078403 -0.078407882709451954 0.011475955677747729 0 0 0 +-0.20766509107802067 -0.13366650739498437 0.070732474229199788 0 0 0 +-0.24029109011379074 0.083859993736990268 -0.012992931023559057 0 0 0 +-0.029381594602139682 -0.084903497963232932 0.05588563557631801 0 0 0 +-0.17915381373085315 0.14617714690960476 0.02437461498811655 0 0 0 +0.020090770124983892 0.0032471310282638222 -0.16472059198748926 0 0 0 +-0.071172700539892553 -0.04497751528258298 0.10104084358248441 0 0 0 +-0.0082789273478673375 0.1375445532177384 -0.010721243845128459 0 0 0 +0.054863666113126042 -0.055371602027745465 0.073604620360106204 0 0 0 +0.22505360292270543 0.026782036820915511 -0.045007491113848969 0 0 0 +0.0056800099150626226 0.11659396847427544 0.025543814458395819 0 0 0 +0.022138487398261131 0.12523116531221612 -0.096992647392293893 0 0 0 +-0.069903329437533412 -0.035032939287724912 0.1495638376404084 0 0 0 +0.11398334123517145 0.045415856988593906 0.11408473188486976 0 0 0 +0.0090118040893482632 -0.12293413396269644 -0.0098710656392127227 0 0 0 +-0.19396731797589922 0.082068734015100619 0.093627188044147075 0 0 0 +-0.16056297730407215 0.063675321782588945 0.039626941096992219 0 0 0 +-0.018927382771933954 -0.11793801517476236 -0.11636159429791662 0 0 0 +-0.28776492531616943 -0.0074328470274373226 -0.068542438763821961 0 0 0 +-0.32185480925029841 0.028738109604991957 0.049585340367895553 0 0 0 +-0.16009952886281537 -0.14380619171565867 -0.0093621533154626402 0 0 0 +0.034038531978609898 -0.020059621966724756 -0.14590090072089154 0 0 0 +0.020930783604201808 -0.11128762866522 -0.033487722430333017 0 0 0 +-0.17627524906630165 0.000933029560532872 0.16259479326291473 0 0 0 +0.024463674681144687 0.14553558310422438 0.048530133564623074 0 0 0 +-0.29550372733559926 0.0075633662975872762 0.063752053535016256 0 0 0 +-0.19717881400097864 -0.10626428744711681 0.087741040072828042 0 0 0 +-0.29641228864107982 0.050895611105958916 0.022199545779098301 0 0 0 +-0.032194808895390059 -0.066247888457069193 -0.14696182136833247 0 0 0 +-0.1158449382514693 -0.15388181194574668 0.017011425211559045 0 0 0 +-0.05901639738470088 0.14236165969855058 -0.10906872403057338 0 0 0 +-0.17382960944893538 -0.021017244909463467 0.0020334527304470551 0 0 0 +0.039121160054218451 0.014802224509970263 -0.11403758216314669 0 0 0 +0.30067848651549539 0.14041774395776119 -0.045870752740131221 0 0 0 +-0.11168144753317355 -0.18165889808543401 0.054888375309979059 0 0 0 +-0.22236111559001731 0.085765643523606938 -0.017827792186844632 0 0 0 +-0.006477863813680651 -0.080934351516444236 0.13759116749142666 0 0 0 +0.012316805926510133 0.094376128106976376 -0.1097877151292935 0 0 0 +0.23297221634063164 0.15574660333828022 0.046502087567832778 0 0 0 +-0.14691979599326155 -0.097811726199388521 -0.030095748470843314 0 0 0 +-0.0011606394387642105 -0.056985350198354573 -0.084324370226818129 0 0 0 +0.034570841151543352 0.050119733829275703 0.09672616927746544 0 0 0 +0.099029115716172289 0.038568072788430385 0.06161806964832775 0 0 0 +0.0049726411222270062 -0.007129980919666129 0.046299582017231722 0 0 0 +-0.2192464770172583 -0.021662156768977203 -0.047018963453935914 0 0 0 +0.12777068464577429 0.20221654801398048 -0.0065160310817235223 0 0 0 +-0.058673099709665444 -0.025400939657178712 -0.11303093588812789 0 0 0 +-0.047581841555186577 -0.13497853617493016 0.044511919202629008 0 0 0 +-0.28239790589924207 0.044311577837628291 0.10358476975211081 0 0 0 +-0.078182487362965514 -0.040146256462148866 0.079359910365712855 0 0 0 +-0.25044643419241769 0.00081250518039938102 0.025478152124809555 0 0 0 +-0.13633196674897341 0.083925369248729176 0.031470181179882484 0 0 0 +-0.32032276085515277 0.012375948664565095 -0.0056346805969411384 0 0 0 +0.014299914656176693 0.032018107555835007 -0.10837470981381181 0 0 0 +-0.41943381389735035 -0.084077133006877275 -0.073590918318918896 0 0 0 +-0.090055390799792967 -0.18437128734553188 0.025908873204257332 0 0 0 +-0.35765709640558813 0.074463283793809787 -0.017221523042524223 0 0 0 +-0.13927869982307778 0.10894837308777261 0.082224048872323235 0 0 0 +0.096603705358242087 -0.042692465980593119 -0.14698101776100556 0 0 0 +0.019766935317863166 -0.034540170487179445 0.17875213277157256 0 0 0 +0.011800725887641306 -0.095896869478084623 -0.081926717279802067 0 0 0 +0.19990981099599264 0.17590430152492598 -0.059384749571758794 0 0 0 +-0.050066453012803158 0.11349118372265249 -0.080516168922882062 0 0 0 +-0.01288695689255609 -0.0080954025667999141 -0.051543729157512541 0 0 0 +0.22643496997736151 0.031577757049084165 0.028735349608475819 0 0 0 +-0.055432951676517295 0.07344730335940558 -0.08583921095186145 0 0 0 +-0.23848728298865496 0.095917249290104922 -0.0099224690736555432 0 0 0 +-0.11844105703010227 0.097515185872411814 -0.047629590520601256 0 0 0 +-0.30949053698839857 0.0067148952312478527 0.1098362072210475 0 0 0 +0.035577387956036211 -0.081440276936059819 -0.17166228332920372 0 0 0 +0.13579410134843078 0.13358003026407766 0.038072192384805997 0 0 0 +-0.0040148741957545808 0.05938157621875545 -0.11968008895282541 0 0 0 +-0.03446941282624616 0.060885599796949852 0.07473332893052001 0 0 0 +-0.078047474723293042 0.20025261270001438 -0.016337303476172488 0 0 0 +0.047586333445999773 -0.044395269992338976 0.030168411020075891 0 0 0 +-0.066192302593260588 0.054750479289725873 -0.13391904746883687 0 0 0 +-0.073641869283935568 0.20930327687488404 0.019361437852730978 0 0 0 +-0.018105950130152093 0.0011590277123041393 0.025658151860729339 0 0 0 +0.10884685828317647 0.017669327197361251 0.095484238078889921 0 0 0 +0.30625956762498235 0.10572022928188923 -0.040519937704534742 0 0 0 +-0.077884193649217504 0.1949204237687257 0.0018909238866949563 0 0 0 +0.041282657747624907 0.11290148027343766 0.17338212821201979 0 0 0 +0.069362546987605744 0.012472312524834633 0.1549829741311958 0 0 0 +0.2133893643158557 0.14334930739619489 -0.066414575275079796 0 0 0 +0.02153016790726453 -0.093876811635661889 0.13568617882576164 0 0 0 +-0.21706628133583816 0.14908171601904974 -0.00086845332264015584 0 0 0 +0.29160130149999391 0.12776567013450291 -0.0050086093133827614 0 0 0 +-0.18102039315877022 0.073958673436398614 0.014825682387923367 0 0 0 +-0.33579154950199186 0.057276141925034552 -0.01494158672086382 0 0 0 +-0.0014158667106181633 -0.039788181729899258 0.03573995245552064 0 0 0 +-0.0064643639101716888 -0.16058669450453064 -0.085509740512842769 0 0 0 +0.20180838084553826 0.17953775050071114 0.013446703395957132 0 0 0 +-0.040892521271172488 0.17192283225990784 0.084547817260467423 0 0 0 +-0.013229229688989042 -0.11569720829205123 0.13335619053609807 0 0 0 +-0.13692927106242397 0.1343971098960447 0.016369036641510681 0 0 0 +-0.29864062980879569 -0.059030537508754061 -0.060369282477158587 0 0 0 +-0.3341650471308944 -0.019807857162928211 0.081797414122445483 0 0 0 +-0.10334883757818031 0.066513308050385189 0.12488278797268679 0 0 0 +-0.13510420224114789 0.074719934032277668 -0.025609599064370159 0 0 0 +-0.02487782075770667 -0.00043978764854094021 0.12039926315859331 0 0 0 +-0.066706248224184417 0.062628742592186648 0.10504125812900669 0 0 0 +-0.27530505138056122 -0.027977397748118749 0.068112415945181609 0 0 0 +0.017591947168575095 -0.065938959998207647 0.043423463911607868 0 0 0 +0.15784097731736252 0.18205554696507842 -0.063372782792155635 0 0 0 +-0.11074180542361461 -0.022589837415922437 0.17373279198388894 0 0 0 +-0.020874435199115027 0.044056704218213449 0.16585120121543154 0 0 0 +-0.074682515976266017 -0.037935894768725636 -0.154092314613719 0 0 0 +-0.014337380433725233 -0.089033610379811862 -0.067390110718401147 0 0 0 +-0.31363599709906853 -0.10029448225303554 0.019405328396128019 0 0 0 +-0.36886451502644924 0.023100431081088252 -0.016248394620337059 0 0 0 +0.11075011226630532 0.15652773936452435 -0.086331058412836864 0 0 0 +0.068588988874170365 0.17504119193147216 0.13655980924414843 0 0 0 +-0.01065740945179483 -0.068673926563215915 0.1386370554880593 0 0 0 +-0.14138555697541688 -0.20254011993718102 0.079829123362797766 0 0 0 +0.093743641793152699 0.068478952088498968 -0.057769373295397025 0 0 0 +-0.10799152215328306 -0.015241055424178501 -0.065647120738346137 0 0 0 +8.4551784354236492e-05 -0.00105293004684337 -0.067974340563859315 0 0 0 +-0.23869724063194359 -0.12823165172874371 0.043755383883548438 0 0 0 +0.23222267485143849 0.037790717458934031 -0.058906513679779143 0 0 0 +0.12688878454435143 0.1036392602854781 -0.078109434418417042 0 0 0 +-0.39258876846123492 -0.029108355527472235 -0.035135210885916368 0 0 0 +-0.35065525276958942 0.046819644340939826 -0.0055764726774874263 0 0 0 +0.28062509125931417 0.092381323314108865 -0.048024810358832576 0 0 0 +-0.35131045894502899 -0.077937106932107841 0.0094549267249070257 0 0 0 +-0.017432050501559881 0.045320514978776649 -0.015874728444126435 0 0 0 +-0.14259160289984896 0.018086053061387497 0.063723059381937591 0 0 0 +-0.074096686372950249 -0.0075132343811802615 -0.096135464580375238 0 0 0 +0.042680949281710123 0.033467058941900274 0.16946045682047631 0 0 0 +-0.010753655453680566 0.032696851425261686 0.046574206495206327 0 0 0 +0.15178120836598324 -0.02586967901572168 -0.047014646558250772 0 0 0 +-0.089538220126836154 0.018642389270230653 0.10215627251000051 0 0 0 +-0.070389528898887832 0.15236470948454922 -0.092364378480461418 0 0 0 +-0.10860275075765796 0.018708410533198605 0.11925008841110438 0 0 0 +0.084711049200296318 0.021170005008510295 0.07741769826732578 0 0 0 +-0.14833773519085025 0.018951113401837638 0.050144108251476666 0 0 0 +-0.253918685862904 -0.012825739786946705 0.015322300079892381 0 0 0 +0.15691326907262199 0.10602315578828286 -0.089823714208748656 0 0 0 +0.033128762510558574 0.14305149763834568 0.081387712615877378 0 0 0 +-0.019905998233363531 -0.1278200912320111 -0.041076669292047618 0 0 0 +-0.13391172197571027 0.088929003595743294 -0.049980219675515775 0 0 0 +-0.18788409358933572 -0.15253976505046013 0.028303466416402717 0 0 0 +-0.19896681713527536 0.016702031479496504 0.099866135215694568 0 0 0 +-0.10146830740598267 -0.1460613734705048 0.022126696911334537 0 0 0 +-0.10118515408173673 0.090866269491040597 -0.068922142356454386 0 0 0 +-0.093277103866869604 -0.096850737853975993 0.13992850178088204 0 0 0 +-0.30966795284653315 0.063379611198137953 0.023121045027393372 0 0 0 +0.18621450372457965 0.1645716298254975 -0.034984124920524662 0 0 0 +0.038467791253323613 0.0086050784727562946 0.093288642730755239 0 0 0 +-0.11254864296966238 0.17334752588861063 0.028193144057497371 0 0 0 +-0.02469182720985269 -0.0066433582144002634 -0.10617517089403188 0 0 0 +-0.013900426540381761 -0.14194908485874441 -0.075552517834562335 0 0 0 +-0.069760441255797667 0.13669241818248523 0.11815989960447701 0 0 0 +-0.43616160241927487 0.01710283095500198 -0.079917373684998599 0 0 0 +-0.023391055217804435 -0.16086112314176049 -0.01369028158027305 0 0 0 +-0.19647815226766985 0.14054591797334931 0.065141045630941613 0 0 0 +0.14090005108082199 0.0062994460912933481 -0.13263742009949311 0 0 0 +0.047836005513039404 -0.091161938964121059 -0.12302223575555626 0 0 0 +-0.016985607411421411 0.13106709952986656 0.086149475966825623 0 0 0 +-0.075462406267379434 0.053182186008613519 -0.11123872022813605 0 0 0 +-0.067204476782439793 -0.11111273524429557 0.034722544943334988 0 0 0 +-0.35419090179787482 0.021090845331730779 -0.036421610899586704 0 0 0 +-0.03254586269448051 0.21363686261230425 0.015730458167232564 0 0 0 +0.055769612693293003 0.090158430834149927 0.077384622240060957 0 0 0 +0.095329952446371269 -0.030123358232403641 -0.12472736351222731 0 0 0 +0.15581171844027236 0.21105356255684976 0.036075229187923025 0 0 0 +0.15496879433605587 0.1826465247823903 -0.056256371530044813 0 0 0 +-0.32530949702594431 0.034262699204704705 0.052585288628104604 0 0 0 +-0.052339380934587731 0.1365792722865441 0.055104251838847068 0 0 0 +0.11455187563416541 0.033262073942062431 -0.069128466171029496 0 0 0 +0.078112689159682447 0.076999854377490906 -0.018702099081015222 0 0 0 +-0.027294399473697439 0.00015363845477392446 0.16831662909055081 0 0 0 +-0.15907160623484529 0.00055519848172691511 -0.025625623038088907 0 0 0 +-0.10745648866256002 -0.055146831552937647 -0.0011397334780995638 0 0 0 +-0.058591479390549983 -0.15487134163876393 -0.080232263323389452 0 0 0 +-0.18034508205466909 0.090812096852862234 0.055711860939865493 0 0 0 +-0.33473624084800252 0.0091142208686438297 -0.059123952748897479 0 0 0 +-0.016013327906720831 -0.019054338085514516 0.12253604651147823 0 0 0 +-0.30958587828550022 -0.031576955600445628 0.088056479208562549 0 0 0 +0.10480926702332211 0.089152002805985953 -0.035575254484823904 0 0 0 +0.012449461194234901 -0.016472106143286924 -0.052845270607613959 0 0 0 +-0.41827579404120568 -0.034205712687192025 -0.048919398346006865 0 0 0 +-0.034946153323212659 -0.17166691045705651 0.11666422705467558 0 0 0 +-0.3571822393875872 0.075628624024422331 -0.059669319951652533 0 0 0 +-0.042676272973213358 -0.098818932341719984 0.13356931048183937 0 0 0 +-0.12379990198204066 -0.063607693756016909 -0.083703025177337687 0 0 0 +-0.28290455645031998 -0.045349315708866356 -0.044669229831178658 0 0 0 +-0.00055035710873319044 -0.029798162625417596 -0.091371525888253924 0 0 0 +-0.2071703796824324 0.10985512561205074 0.03069598044941016 0 0 0 +0.12122253798810528 -0.030076972732926727 0.078173265468620218 0 0 0 +-0.021656577804561261 -0.13437569024249307 -0.1266073387246579 0 0 0 +0.13039332669310738 0.048875701475758537 0.14814048228256263 0 0 0 +-0.25994890943858306 -0.0010739183539534014 0.07261431253465081 0 0 0 +0.025143428437476911 0.13402229574984637 0.1077850052948133 0 0 0 +-0.060044559982402768 -0.16176710826084673 0.010351904468602957 0 0 0 +-0.3356898975678021 -0.035995188936284284 -0.024799632739905264 0 0 0 +0.16531333508607465 0.18902588660968883 -0.05636051148691168 0 0 0 +0.11925859849409898 0.11586178124790919 0.078464077470029731 0 0 0 +-0.36996285459925421 0.080446369402719153 -0.01110889454309269 0 0 0 +-0.081095442902273551 -0.11863932221325162 -0.10889424841372575 0 0 0 +-0.023642133091776651 0.012814215418842617 0.010923214814692744 0 0 0 +-0.032913268824694697 0.11634220238540183 -0.070909287929345394 0 0 0 +0.20561769286755932 0.12347919532256713 0.067810220623632872 0 0 0 +-0.001031172934183866 -0.063521025373901724 0.10985533826809049 0 0 0 +0.12586820272274307 -0.02289061120403979 0.14091410936199875 0 0 0 +-0.052803324809416685 0.044877671636684324 -0.0017551363449883617 0 0 0 +0.038149007525627943 0.054840997548571302 -0.0046096666306485456 0 0 0 +-0.015792962379364783 -0.021100101967160612 -0.010347055832082397 0 0 0 +0.15830386645908695 -0.025314751465529695 0.055328404985812013 0 0 0 +-0.35040264022304912 0.089613210327805948 -0.032227963941418553 0 0 0 +-0.19172511940645987 0.10925912314338471 -0.039832400687710851 0 0 0 +0.042245629072068247 -0.10254356888732595 -0.092240495232551817 0 0 0 +0.042820603729595896 0.13580100326724909 0.065413912274339708 0 0 0 +-0.14019694343485406 -0.10301274902730483 -0.033759162051406694 0 0 0 +-0.098928460206782975 -0.13865214123908245 0.071901539666681086 0 0 0 +-0.11074683760778514 -0.078395816692457543 0.03064878976605459 0 0 0 +-0.02748968155074405 0.16816699404297719 -0.00066757305894560304 0 0 0 +-0.28737317794124134 0.084096664025491097 0.069930531679797431 0 0 0 +0.14014672713958881 0.036409453438261519 0.010343810892526534 0 0 0 +-0.18428971886596646 0.1040003585899002 -0.031745685531143569 0 0 0 +-0.051907555213307532 -0.18747929743471184 0.067154243875354042 0 0 0 +0.17441989579789102 0.13027190111939563 0.12263079990274225 0 0 0 +0.14454337547251722 0.050375729535154512 -0.037882620005979667 0 0 0 +-0.23562986249176088 -0.1641331726767295 -0.0089012405128809646 0 0 0 +-0.11121090392386312 -0.12677541309895834 -0.040295951263182805 0 0 0 +-0.44093752952661136 0.033048079266868036 -0.067086102055618546 0 0 0 +-0.014852961637876028 0.16934280829427062 -0.056023192146647249 0 0 0 +-0.35107357367459457 -0.072311806270568185 -0.04203051369901234 0 0 0 +-0.18105704050481558 0.067177580024357864 -0.056468935109725671 0 0 0 +-0.26092698449573482 -0.0031384520713230724 -0.01141012044736836 0 0 0 +0.23337401750255832 0.15768886711249264 0.0090813563394495367 0 0 0 +0.14179212325353635 0.022704619418060845 0.091737122686744693 0 0 0 +-0.034676269380371105 -0.077110225803127985 0.0052191409317655368 0 0 0 +-0.074123432605653128 0.083341619775771592 -0.088291862642460028 0 0 0 +-0.17771820822614481 -0.14956090263693037 0.070043565696708859 0 0 0 +-0.069242489830926124 -0.084081602933295085 -0.067536848971702618 0 0 0 +0.083574204877931602 0.183972263407086 -0.0063968807509676429 0 0 0 +0.10222912191491335 -0.063916267105247365 -0.11115114297515387 0 0 0 +-0.38036362687076675 0.038842332866384166 0.01241905963933701 0 0 0 +0.10613205614378435 0.069554751361379841 0.15546427477035299 0 0 0 +0.26623105259378904 0.14693018022788501 0.054139393351681081 0 0 0 +-0.16451422329747822 0.053799799832590367 0.034620920607584066 0 0 0 +-0.056013481916764307 -0.091715880431839286 0.1039751269101333 0 0 0 +-0.1406183064758289 -0.13391461294181645 0.083106051513919116 0 0 0 +0.16382741680938279 0.17201167927602024 -0.072994157706334717 0 0 0 +0.17973285022320223 0.021967287385634138 0.094773434304948417 0 0 0 +-0.22762932907598327 0.033598363191057912 -0.044073751440943221 0 0 0 +0.10248306317574801 0.049307327594262984 0.068078388507820192 0 0 0 +0.070363038996756055 0.16554485360389853 -0.060884322810135783 0 0 0 +-0.11273509567220003 0.10312073447098535 0.028035426067578612 0 0 0 +0.0054379828679817499 -0.092348330042261173 0.080209771311169048 0 0 0 +-0.12300555190849122 0.086340738430839004 -0.061504864405392212 0 0 0 +-0.036137207374842883 0.049559001371766886 0.16621966795866935 0 0 0 +-0.15523322121848587 -0.14913941663324742 -0.023866166330543337 0 0 0 +-0.31631949358085409 -0.030419215529820437 0.053358626870516707 0 0 0 +0.049078427069757569 -0.086011159008694826 -0.11242134841103153 0 0 0 +-0.37607510134087413 -0.038932385295886551 0.0060238317104498729 0 0 0 +-0.13479620241308354 -0.067935339867207234 0.021561223303751542 0 0 0 +0.0068919942400696987 0.10000367358398249 -0.10453528889255551 0 0 0 +0.0083486944068688618 0.1407319864244978 0.001643257822653732 0 0 0 +-0.026054433166345148 0.16241866460026894 0.11602334588950222 0 0 0 +-0.16530148235992997 -0.028777208086024048 0.089717212406536545 0 0 0 +-0.1125998838765454 -0.070524900389800804 -0.0087710475132106724 0 0 0 +-0.30378296348738487 -0.060733973778419686 -0.059501416768572762 0 0 0 +-0.15383472523774722 0.060673181697144141 -0.039457214297396598 0 0 0 +-0.13507587674307642 -0.13330837526262551 0.0086968134573735256 0 0 0 +-0.24984771613602763 -0.11189722489334039 0.0098442298133629424 0 0 0 +-0.44851449406940724 -0.066083198333922316 -0.038501898685550789 0 0 0 +0.28145080027508779 0.13936744018564323 0.036628290467334457 0 0 0 +-0.18992449537589218 0.080059964503863823 0.0025102003385741312 0 0 0 +0.10502880078157634 0.082548159646220975 -0.11341956083003105 0 0 0 +0.15593780269430252 0.02720104391092526 -0.1060779739103578 0 0 0 +-0.05062422958761692 -0.1854792315363088 0.11264674189050775 0 0 0 +-0.034371714535101849 0.10177221250068863 -0.15871928403859026 0 0 0 +0.11217859237055289 0.066097473387308869 0.0010830831516166206 0 0 0 +0.028313503419421571 0.10403201860538075 -0.14237018740726959 0 0 0 +0.061243728900938266 -0.0096252523389240008 0.12215884517381012 0 0 0 +-0.15837029866173868 0.13781031593772858 0.088817762667358385 0 0 0 +0.088257778783708274 -0.001232863540046869 -0.034745796041581789 0 0 0 +-0.033016813685477264 -0.12306517284343858 -0.11338091074626659 0 0 0 +-0.15285285261235204 -0.058829799046102915 0.09851121715302022 0 0 0 +-0.010471722384968352 -0.051887584384125662 0.18172653256120111 0 0 0 +-0.25742967129343425 -0.012871798234308618 -0.04980682486053789 0 0 0 +0.021320627471194509 0.086321675597542891 0.073759973840678589 0 0 0 +-0.0040222527926252472 0.028590891389725259 0.17464286317256514 0 0 0 +0.12287995375132649 0.096545102179837861 0.11796550173866796 0 0 0 +-0.15642115150664704 -0.0047720429028319244 0.16711501688827993 0 0 0 +0.058287384566694966 0.055676167853028979 0.13106170794303482 0 0 0 +-0.17901946129137186 -0.099354108899843419 -0.047159708659013255 0 0 0 +0.024744970601876248 0.071228442166223649 -0.1597848789406307 0 0 0 +-0.085032863993793784 -0.10212271000125447 0.14981942556260616 0 0 0 +-0.12882020141544293 0.092200638050817851 -0.026040945382687253 0 0 0 +-0.34084709236403232 -0.013782048095840049 -0.0085579678515652069 0 0 0 +-0.0037724885167437772 -0.032769693888427237 0.18839882410508904 0 0 0 +-0.098236451744211417 -0.056862307067158641 0.15426975089817355 0 0 0 +0.20341414756437987 0.10093923817876865 0.084968135761149671 0 0 0 +-0.030402395608699895 -0.13841494342644328 0.15835597038310392 0 0 0 +0.18880565531871746 0.072504777502116757 -0.033568489814715469 0 0 0 +-0.36802996340948857 -0.12629760088210273 -0.021787254701271186 0 0 0 +-0.085534336867241711 0.060784893875431234 -0.1561026020073383 0 0 0 +-0.33328890743674944 -0.080627899615281273 0.0026703557947501677 0 0 0 +-0.093735314165682093 0.097502109142299731 -0.1136136330815358 0 0 0 +0.082065246105843592 -0.062862272163417665 0.16465455620924943 0 0 0 +0.01574092420366352 -0.14231173103850056 0.13594888366676403 0 0 0 +0.065442185287631516 0.11228600310427367 -0.10166337072879029 0 0 0 +-0.164626548027203 0.10683254894591915 0.070737562091934963 0 0 0 +0.14186461111826115 0.085880652567123961 0.015962665348742161 0 0 0 +0.16337669356620171 0.081039458815841015 -0.047868384615876253 0 0 0 +0.19965511657031482 0.11824969304492511 -0.0005002570583312882 0 0 0 +-0.45160367015305208 -0.063180037026410479 -0.052455737509965905 0 0 0 +-0.14613549554975475 0.041223505719230946 -0.072202902880265374 0 0 0 +-0.026122995353001222 -0.17268815028356016 0.088685495872139003 0 0 0 +0.069083905094317111 0.066335864179830506 -0.030532727879496291 0 0 0 +0.084308116968437041 0.040350172480945912 0.16050476990627824 0 0 0 +0.013354044670744247 0.033763513800155798 -0.1484390218966212 0 0 0 +0.077223308049109762 0.17110541615192731 0.13545774776772038 0 0 0 +0.1566374833859992 -0.02826654458724151 0.088843554884564607 0 0 0 +-0.10000453776867596 0.01397839929426925 -0.0074321409863084553 0 0 0 +-0.030777237021548276 0.15693305545758129 0.096939950290787974 0 0 0 +-0.098057890077845711 0.18160855303822082 0.077464380851279463 0 0 0 +-0.029225371661419086 0.03722080034140729 0.08217859801636776 0 0 0 +-0.25619355546103795 0.048203876247111699 -0.033465370697677133 0 0 0 +-0.068745589986965117 0.0498188675156091 0.07068545582068711 0 0 0 +0.0034148668381198677 0.22042556817838499 0.032669214271817348 0 0 0 +-0.13407003624319569 0.13323878361609481 0.092880995527431814 0 0 0 +-0.29028973113700052 0.027204902997374547 -0.05110893437208236 0 0 0 +-0.10798148310458289 -0.14724457584406855 0.094385130150683699 0 0 0 +0.10216433764543614 0.017490502511491979 0.083664262288875885 0 0 0 +-0.21067953983138088 -0.057641890720298988 -0.043811107490187046 0 0 0 +0.16067248901923187 0.15861172122413242 -0.063953230759274671 0 0 0 +0.062813321788811549 0.083380183011107112 -0.0063805493557620718 0 0 0 +-0.37518463337526425 -0.033432722121973069 -0.068709430263977966 0 0 0 +2.7409511594966851e-05 -0.095643247737918075 0.010832276531505869 0 0 0 +0.14385858084019737 0.15264099591486713 -0.057558332528793721 0 0 0 +0.004413885017421515 -0.037732459143478447 -0.1310829322129041 0 0 0 +-0.23778356097993208 0.049770023021153631 0.12183033561257881 0 0 0 +-0.11000172441042966 -0.013413573234841242 -0.026300732875461696 0 0 0 +0.0025392694377782132 -0.010141239055300622 0.15699788008711626 0 0 0 +0.19715829537716462 0.082949854606266582 -0.0044456949525494005 0 0 0 +0.061996298165707786 -0.064750076727264572 0.17261140323788673 0 0 0 +0.15903173055654157 -0.0048851678091809403 -0.01869519769140518 0 0 0 +0.17230267951124106 0.052122681513014246 0.05468848896816883 0 0 0 +0.053404335726904673 -0.066448823750691971 -0.13662725051035732 0 0 0 +-0.22994532192804157 0.093102011456649258 -0.035503113280531018 0 0 0 +-0.35757021942667899 -0.014796028307780651 -0.048864689759298696 0 0 0 +0.061669597326389047 0.082329630790755115 0.15474018578428403 0 0 0 +0.16276229282650628 0.10188262996382497 0.022842300247546743 0 0 0 +-0.30106287521160213 -0.14549736021122944 0.0029617178504262043 0 0 0 +0.16945813575236351 0.13007932075436085 0.075803266903625793 0 0 0 +0.13296372185020938 0.053731087618232198 0.078588183115850668 0 0 0 +0.032282916822095775 0.074580143776670549 -0.044465812226371831 0 0 0 +-0.14249685151259184 0.036350695430908353 0.035180191392619159 0 0 0 +-0.41159074824165787 -0.035441498915313285 0.040410900603261302 0 0 0 +-0.084291527201996674 0.12181335184086767 -0.10889571961860685 0 0 0 +-0.42143306408710079 -0.028772164372693282 -0.0010435807250193385 0 0 0 +0.21747433542629463 0.040399129419645297 -0.046582439793924346 0 0 0 +0.17177481903702013 0.098543950896073595 0.1191314482218013 0 0 0 +0.054859094217354409 0.0099542766077727884 -0.077787129907425492 0 0 0 +0.19068249071285587 0.02531574653244717 0.052937134933108448 0 0 0 +0.15884057066821028 0.13043905602036787 -0.07344046297598536 0 0 0 +0.045875842046686433 0.10552696975362158 0.17521074844230713 0 0 0 +-0.062781982386731605 0.13706312115294855 -0.097279303820042407 0 0 0 +-0.11921565551624869 -0.010734845926123698 -0.089412243543503342 0 0 0 +-0.19858431218511896 -0.099856949277766532 -0.012577960283004203 0 0 0 +-0.37523022724639626 0.046020341180119162 -0.062811148240338066 0 0 0 +-0.029185178431919812 0.065542573680453464 0.028401753483996262 0 0 0 +-0.066392182263624866 0.11216687688799526 0.11925840215740027 0 0 0 +0.033855706031215294 -0.11652517959474773 -0.060146571946361554 0 0 0 +-0.099077679054576484 0.20634360173294691 0.024016760597968007 0 0 0 +0.10303160148274609 0.11641113006434917 0.071943536115011669 0 0 0 +0.057953748413175299 -0.080359886939516317 0.15280580439432526 0 0 0 +0.0046974476128792686 0.11471510676177732 -0.093133142343129027 0 0 0 +0.089522050812696097 0.1522417693736986 0.14694912674523566 0 0 0 +-0.021521245079278051 0.0043324056027606028 -0.17341853345985198 0 0 0 +-0.19755194501539231 -0.13249640252694533 -0.00096105309272742634 0 0 0 +-0.17667173990591201 -0.1642932977777552 0.04558119610815356 0 0 0 +-0.11326784812780333 -0.13635656094466153 0.060471687683959469 0 0 0 +-0.16675101026603723 -0.1948821119912332 0.019427109468366954 0 0 0 +0.094817192303712938 0.13338778701759502 -0.03581876070546125 0 0 0 +0.00049031301371282865 -0.082172056578814517 0.098338960317338325 0 0 0 +-0.03775656242698433 -0.13179143259043993 0.10523142635039798 0 0 0 +-0.16248452264933849 0.12868497229311382 0.039310370293755559 0 0 0 +-0.13758999691959939 0.011545177393106731 0.033390594198854179 0 0 0 +-0.068549226723457701 0.11941205853629389 0.13390898616324645 0 0 0 +-0.21642278152635325 -0.12038025146323071 0.080419593344643686 0 0 0 +-0.073398248233187524 -0.1015524833943327 0.033940120131167123 0 0 0 +-0.13967059458099074 -0.11266173866182894 0.042111854593453929 0 0 0 +-0.20903703733670298 -0.13062667964004959 0.054433564712526278 0 0 0 +0.03280589589627686 0.10693799723019498 -0.12833838140723247 0 0 0 +-0.018867533187114205 -0.15965217017963484 0.031351056096301871 0 0 0 +-0.13812711909175157 -0.17867648093454169 0.058611294811829445 0 0 0 +0.23515993422285647 0.10512368793757071 0.096615164873546461 0 0 0 +-0.25559263043892572 -0.024296526858197526 0.026097684946902094 0 0 0 +0.078954579315574314 -0.030847833068718217 0.037970336740375948 0 0 0 +-0.10575726866044338 0.16053305344880558 0.11412959425887279 0 0 0 +-0.31767246522499715 -0.0065742808239739603 -0.0076501934132724991 0 0 0 +-0.10103252766375198 0.0028907913642418348 0.040046635843933087 0 0 0 +-0.27252650647811827 -0.0013596323238560248 -0.022559935403280884 0 0 0 +-0.18523666550299855 -0.020856313422574685 0.0017305965269580614 0 0 0 +0.011761252567337344 -0.15388474599088309 0.071186062751986107 0 0 0 +-0.13638446796932957 0.015687640471251679 0.093902314309729701 0 0 0 +-0.14930500783102124 -0.21984214598281776 0.056248747876352617 0 0 0 +0.21600653694282984 0.10132782106908267 0.081906509394377464 0 0 0 +-0.25156768010431207 0.099747925255440184 0.027363897616270921 0 0 0 +-0.033595686056097085 0.12049120693420573 0.15691013947005897 0 0 0 +0.071802545993607414 -0.041257557060060096 0.017506824356040451 0 0 0 +-0.36697742744514023 0.006887678127259933 -0.078646596103576008 0 0 0 +-0.21839242474187404 -0.065186126509412218 -0.037329384595315429 0 0 0 +-0.14747416273045355 0.0098650614170790463 0.1013350247823023 0 0 0 +-0.035459193493542318 -0.12949957345086244 -0.15614458750285021 0 0 0 +-0.41630264273273992 -0.071811424673444146 -0.079369473596515125 0 0 0 +-0.11145045682632371 0.070805457976853448 0.15907858036737002 0 0 0 +-0.16072847554730718 -0.10892163300096058 -0.031583863390119288 0 0 0 +0.064401183742422152 0.01449907525688407 0.068491995715270731 0 0 0 +-0.072889192694120586 -0.08638461804112002 0.06442071865962537 0 0 0 +-0.24585789737014568 -0.027684329924667739 0.093226588329896304 0 0 0 +-0.093297798705375801 -0.093532483158679236 -0.029960361978712019 0 0 0 +-0.25821022631959989 0.0032861515368576844 -0.038886375293791769 0 0 0 +-0.01054787630696552 -0.067132178905014439 -0.17073543242232037 0 0 0 +0.037523598410678038 0.15919685215494317 0.047344518789408735 0 0 0 +-0.19948259598378792 0.13362663872442671 0.015165871552321131 0 0 0 +-0.024350193073020832 -0.032695697865505247 0.066376129461436534 0 0 0 +-0.25927073834876535 0.0040836982114994813 0.081262198140549496 0 0 0 +-0.14691499055214463 0.043775130338279955 0.03915593684995175 0 0 0 +0.15279798581705656 0.094595585430627183 0.049194368738181421 0 0 0 +-0.1892395994650084 -0.017713389931125118 -0.026557671335894151 0 0 0 +-0.048121208483569822 -0.038820484211269768 0.021451634412415321 0 0 0 +-0.16685943728266983 0.096731321627542388 0.057256624765523706 0 0 0 +-0.27114493913376475 0.023174744518047186 -0.019281270951938351 0 0 0 +0.11945420027885117 -0.02729836709232536 0.050958368823425387 0 0 0 +0.21355427453877168 0.051808343736394757 0.078713049147184938 0 0 0 +-0.29252337960379204 -0.0034103653843626514 0.087072551307163654 0 0 0 +-0.29967986729304774 -0.030985904319561108 0.024266329667843423 0 0 0 +0.023467241750559753 0.073709242975104561 -0.043172752898948258 0 0 0 +0.01088398747183611 -0.085224387062768941 -0.17596043410058784 0 0 0 +0.080784818256378566 -0.011186070112525037 -0.091977986614080604 0 0 0 +0.057775012154658245 -0.013205436155123651 -0.084699098269517062 0 0 0 +-0.21533087578769544 0.012870683847211295 0.032359100433649951 0 0 0 +0.070967305455668817 0.12468188139216835 0.12894410835923534 0 0 0 +-0.00028817713904433218 0.035659035894362701 0.10900767141354781 0 0 0 +-0.023531273500083494 0.041067476587194951 -0.090249259802911888 0 0 0 +-0.25765159152232808 0.062975467737909852 0.040770554782851132 0 0 0 +-0.12481898427625421 -0.17463823096742623 -0.02950461296603224 0 0 0 +-0.16381113012282417 0.061790053746703988 -0.089232270539886777 0 0 0 +-0.040055594142819784 0.12343642153220297 0.067658774885993894 0 0 0 +-0.13908963315103673 0.14035585614519752 -0.021028538657428708 0 0 0 +0.040180884529177507 -0.069735285853390117 -0.067576437099412079 0 0 0 +-0.043725460698469609 0.081565324133854811 -0.12351561883883783 0 0 0 +0.004918425724385278 0.042704614231424409 -0.14519692370888032 0 0 0 +-0.26088810335270596 -0.16264697118991756 0.038027412621045475 0 0 0 +0.035737440964837941 0.22179249202400353 0.090961208861175452 0 0 0 +-0.21776178277515112 0.13591614253190948 -0.020159712071055547 0 0 0 +-0.28651164049975109 -0.093738244773427959 0.020612357416976257 0 0 0 +0.043608894095036599 -0.11500985183608348 -0.0575118541499339 0 0 0 +-0.13119172553086422 -0.025347938795111158 -0.1387550351016768 0 0 0 +0.030168302789891521 -0.042672488814959775 0.12181460309522132 0 0 0 +-0.15236057416972942 0.045425002667940695 0.095049801023656039 0 0 0 +-0.16158832564257319 -0.019212407491582928 0.048363825037685687 0 0 0 +-0.027410418603576292 -0.12548094875244192 0.033908923347689218 0 0 0 +-0.010860390967133038 0.19936812799125164 0.08311737635714514 0 0 0 +-0.11379567005570518 0.037177674439925201 -0.1307075494144177 0 0 0 +0.0088453501241421151 -0.15170463501175074 0.08094985661044854 0 0 0 +0.067051293065368667 -0.093282028705137798 0.067107232335558181 0 0 0 +0.0079750619124015487 -0.11065914009069514 -0.038674335778638241 0 0 0 +0.15479770952188404 0.068755999284443869 -0.041067596088443403 0 0 0 +-0.053184666945613024 0.12269151011520157 0.03705113015836245 0 0 0 +-0.104497639195479 -0.1461009891839628 0.037915910327979363 0 0 0 +0.18709902799894335 0.1418831955192601 0.093608307612446623 0 0 0 +0.013350338933437567 0.058221190174437554 0.17977341294054358 0 0 0 +0.055826652553773004 0.066613545989669842 -0.040541367172730158 0 0 0 +-0.035325796776032092 0.19566712015778104 -0.020748260854249828 0 0 0 +-0.066299922404622236 0.057942077859636842 -0.15997484518461999 0 0 0 +-0.10936152938095156 0.072561770670290071 -0.067434661401174489 0 0 0 +-0.29715510606501716 -0.033541945320149896 -0.038925384221598497 0 0 0 +0.01343401921319537 -0.12146707905336983 -0.13830404091178811 0 0 0 +-0.1633291242742469 0.061001264443953485 0.084102843779311071 0 0 0 +-0.22860382726146378 -0.02533919127547743 0.047738460489393203 0 0 0 +0.018595306721543803 -0.051762474420637833 0.17133265497472602 0 0 0 +0.035277915556314376 -0.06839838612013871 -0.01611577863440708 0 0 0 +-0.20210350155723517 0.029756910569391226 -0.016257494741885453 0 0 0 +0.015954463631389582 0.033601445234237248 0.19247321677354443 0 0 0 +0.11599241846886693 0.098583778647248599 -0.047973636562299915 0 0 0 +-0.10093710814029683 -0.11708246633226566 0.019387675793964887 0 0 0 +-0.11859843220344052 -0.06308221032007319 0.029781482836862105 0 0 0 +0.048322939999792702 0.15719030818301671 -0.030419542750815404 0 0 0 +-0.085943133808183525 0.12516717832625424 -0.021342804356437178 0 0 0 +0.27031342787416884 0.10418935316154315 -0.054015223223407738 0 0 0 +0.06051120561163631 0.086291242402307677 -0.04053856492191879 0 0 0 +-0.22646939399684551 -0.028314742473749932 0.10558000945800125 0 0 0 +0.0062956921309162417 -0.0021578860050672777 -0.17065432512927706 0 0 0 +-0.40589892053409948 0.039728402289357034 -0.012202680515269737 0 0 0 +0.16625601555255237 0.088629319767163095 -0.022843461181298819 0 0 0 +-0.17186743061474063 -0.12383093806281641 -0.023632046675508833 0 0 0 +0.22224840286268616 0.051884226466638927 0.068334134596145263 0 0 0 +-0.12247967279065403 0.081888028833114967 0.10941183469232821 0 0 0 +-0.13202881818164608 0.15050874484697307 -0.033919759704431507 0 0 0 +-0.48129316071481676 -0.0018411220029345976 -0.082076491320285938 0 0 0 +-0.15188842446378903 -0.19314001225022043 0.033423541019986847 0 0 0 +0.018971811672595706 -0.11891078403587967 -0.037286933697830427 0 0 0 +-0.17076872787514474 0.066541105552544333 -0.10226662079361779 0 0 0 +0.052965301466044001 0.043985408998939213 -0.14164679179031495 0 0 0 +-0.00070515610307692045 -0.069423245366217579 0.18260634148316549 0 0 0 +0.069171206460641621 0.066553243319675326 0.034808680879636206 0 0 0 +-0.20643383737250465 0.0071743389847855887 0.14194511247805461 0 0 0 +-0.038529757751533777 -0.10932183127457556 -0.039246042468251197 0 0 0 +0.0087145088008464544 -0.019773296300135579 -0.1048924179833387 0 0 0 +-0.098805598727355282 -0.039307599957772554 0.15997468355634112 0 0 0 +-0.27541496545372068 0.10868803639154229 -0.035312087954668336 0 0 0 +-0.13586212642103435 0.031544620265867573 -0.040398012226552704 0 0 0 +-0.047516651415643318 -0.017324347411578067 0.17835058313235316 0 0 0 +0.052481372458466791 -0.051837283468987805 -0.094391716442498844 0 0 0 +-0.38704955545660347 0.020210419324722589 -0.071548084160509978 0 0 0 +0.17712309133827214 0.069107188573738099 0.1397482519865427 0 0 0 +-0.34755672353498174 0.047210767400267528 0.053649650502659824 0 0 0 +0.12356401751520335 0.20079642990219498 0.051399290689877697 0 0 0 +-0.032308753326328044 -0.1039024258758002 -0.072186794254253145 0 0 0 +0.10561590165761298 0.041820657046799992 0.084499339899379272 0 0 0 +-0.032741907383997515 -0.064941481460957323 -0.098223200468678024 0 0 0 +0.077363065665084829 -0.095048407407284735 0.089371206367218375 0 0 0 +-0.073549927998923292 0.075499958252674415 -0.00271368879321357 0 0 0 +0.036012047209676823 0.16105922075993145 -0.016502627734557268 0 0 0 +0.16283965755640989 0.00083364212809083904 -0.0081059006567285319 0 0 0 +0.18627987185742007 0.1429591063796668 0.048465776658509846 0 0 0 +-0.33689667322696193 0.0084468574275932962 -0.022088085747151626 0 0 0 +-0.32192372062125713 -0.072582052838644495 -0.064297867881899701 0 0 0 +0.014364569304208208 0.062223051042444966 0.097382159206254898 0 0 0 +-0.21862345550666334 -0.19600438157867781 0.020158128061477099 0 0 0 +-0.017432056548041308 0.12369467554685754 0.15334889508156527 0 0 0 +-0.38506705855527662 -0.074893244035164841 -0.077225955930915191 0 0 0 +-0.049804924173583343 0.071942168403722806 -0.075313123747593261 0 0 0 +0.17421969944306176 0.042858719174723614 0.13570179698826654 0 0 0 +-0.1734061860694131 0.038598332069901709 -0.035286532801012044 0 0 0 +0.10510587981523239 0.15016294881197345 0.10993512361161226 0 0 0 +0.079779634555543211 -0.044584001123182032 -0.050488171121478548 0 0 0 +-0.13511073999919465 0.073452075493114999 -0.11170418513354285 0 0 0 +-0.049273588484160191 -0.12705501866917546 0.035738381375784528 0 0 0 +-0.21122685561541471 -0.11734250810330782 0.063141547877561294 0 0 0 +0.023882899936304824 0.056890486654471606 -0.15178799806025622 0 0 0 +-0.011055309877388675 0.1241552268226524 -0.12674936169670009 0 0 0 +-0.035966710203085117 0.018809410737366861 -0.0037500639883670805 0 0 0 +0.0050922813386725663 0.054615763375119752 0.12441072482941393 0 0 0 +-0.10350570938193943 -0.09349637142203937 0.11529619215625572 0 0 0 +-0.21399313636399109 0.042554601616063115 0.093783174560510579 0 0 0 +-0.13520323869421386 0.0084122284557157923 -0.029182977690825701 0 0 0 +-0.11448789543579801 0.14866292310855211 -0.032663148944219095 0 0 0 +0.027161575015413109 0.02457371111793441 0.021897090374516315 0 0 0 +-0.041826793349410918 0.11556223042480601 -0.066619183766866097 0 0 0 +-0.33874978260587207 0.016818501441465683 -0.038576511328402896 0 0 0 +-0.20562954272652745 -0.029531885017880261 -0.009791952687372929 0 0 0 +-0.14169729881967652 0.12785822888156023 -0.019217405623178474 0 0 0 +-0.23306748459113069 -0.1115068962258231 -0.02343589524486614 0 0 0 +-0.12503100150228014 -0.075894696030723879 0.038321706319306037 0 0 0 +0.11131040644482476 0.054958413969804498 0.076448766631100312 0 0 0 +-0.33051299804440004 -0.081330413983680322 -0.051231796223240422 0 0 0 +-0.14514599302060438 -0.020296262698452944 0.11642372376276458 0 0 0 +-0.42111269466964996 -0.008728819840257529 -0.070405500225247358 0 0 0 +0.0070091958349733363 -0.055350853815868517 -0.13928013717655371 0 0 0 +0.0085950458218878589 -0.12819624935464796 -0.10607483843396139 0 0 0 +0.1309609518524561 0.14446381104870976 0.12498621673890389 0 0 0 +0.042444946419659513 0.03288360567920795 0.083219889170695588 0 0 0 +-0.006851408634167222 0.038388021496495228 0.11987399642015437 0 0 0 +-0.020582650144721881 -0.17069702145365906 0.0040495744492402286 0 0 0 +0.076717167669902497 0.16821916603033288 0.11928214304161769 0 0 0 +0.0097199521224782814 -0.12452288502826729 0.14579533120775365 0 0 0 +-0.18841703084052774 0.00012158284973445843 0.078746542681046278 0 0 0 +0.032971482191397727 0.058691554941297963 0.038924908674397962 0 0 0 +-0.10473410234592861 0.053942043300329201 -0.10189116689463053 0 0 0 +-0.18546954649110559 -0.13104834234183005 0.049013959478227898 0 0 0 +0.011328864145378981 0.057253785867560192 0.074566992000510451 0 0 0 +0.072094278519193089 0.031052843973181199 -0.13847968402484989 0 0 0 +0.013380111430096375 -0.0044129825164675729 -0.080854971534692219 0 0 0 +0.057879528609425746 0.025815306536962734 0.00031689635723411436 0 0 0 +0.19675866716950191 0.15929700699257709 -0.060175664860449257 0 0 0 +-0.18793983232259287 0.024114159632102117 0.076772946673058923 0 0 0 +-0.062288786012646757 -0.0047973739137295857 0.065895904054919269 0 0 0 +-0.41694006998534316 0.051836054281671984 -0.030500320159811523 0 0 0 +-0.11498032995322255 0.058082107782118031 -0.0053177414819714497 0 0 0 +0.014211589544964875 -0.096309759387048915 0.10509536746658479 0 0 0 +-0.09000873123630887 0.11249917490178252 0.025221441445877318 0 0 0 +0.16364340801905836 0.011466378180446102 0.014810584391484971 0 0 0 +0.070744180087444819 0.020073269259961307 -0.062348252791935566 0 0 0 +-0.14933226990417114 -0.07341560822958082 -0.0038683523879856907 0 0 0 +-0.24327157502514546 0.14908291285416342 0.016020105457042799 0 0 0 +-0.059416435997290573 0.055177137514446861 0.17265474001419731 0 0 0 +-0.11192705485307147 0.0029855747938914989 -0.065692747767605336 0 0 0 +0.21500124327161346 0.091074519443361091 -0.043277330225998056 0 0 0 +-0.2873293141196086 -0.075092185317529841 0.068107240088615101 0 0 0 +0.14081237936750984 0.17951509994640757 -0.074160786605763709 0 0 0 +0.10065522506597685 0.010135817518214685 -0.14702916486676457 0 0 0 +-0.11450527944781591 0.033778670213330531 0.057507630325414255 0 0 0 +-0.10725637053408432 -0.18900067041010551 0.11396091453951315 0 0 0 +0.096962549670750742 -0.060003655910835146 0.046253408832166804 0 0 0 +0.11625763452804411 -0.018678492879144859 0.15784916879746083 0 0 0 +-0.18869958594101716 -0.18288232958257852 0.042411562325676916 0 0 0 +0.018347070315938907 0.038045353124910974 -0.049549548347854522 0 0 0 +-0.25178075168553743 -0.11589229991186552 0.014815449485026777 0 0 0 +-0.14834316682070031 0.020322432853583233 -0.099901166534526728 0 0 0 +-0.15418990689412926 -0.034935775252798118 0.15087830842885094 0 0 0 +-0.19717645776274617 -0.0028802156193885042 0.1017749536550753 0 0 0 +-0.1044847847538628 -0.099590802748090596 -0.12058862600432335 0 0 0 +0.044272558164282161 0.11030729475845952 0.0024462468303418639 0 0 0 +-0.13629608050377812 -0.040628813397736302 0.12377337604108316 0 0 0 +-0.006637805718386125 -0.022670707958644731 0.097901611483106415 0 0 0 +0.033164926515994508 -0.1037749063928011 -0.022250788940335609 0 0 0 +0.15800547864697173 0.17814714139956606 0.08463930411279294 0 0 0 +-0.010600294388202036 -0.029523088879497283 0.023243988560589041 0 0 0 +-0.18111529721968345 -0.070478195762850832 0.017495783357894978 0 0 0 +0.039713387968602964 0.046675178546583262 0.053039653687170701 0 0 0 +-0.039983368922132112 -0.082146826874826107 -0.015257324738599365 0 0 0 +-0.18243338822407418 0.058290968788586528 0.12130591279810063 0 0 0 +-0.036128378378239012 0.10994085631626194 0.041233417372797621 0 0 0 +-0.25995516074457209 -0.12998468661892695 0.00023204152943567813 0 0 0 +0.19420511259689927 0.17968900749903777 -0.053656250531908589 0 0 0 +-0.19129388057178354 -0.019251577283296739 0.019013516740913977 0 0 0 +-0.15664701328562342 -0.13676337522340568 0.090784527272390642 0 0 0 +-0.017486141190722171 -0.16003712401229564 -0.061670272202224458 0 0 0 +-0.19471477078366328 -0.093001593617670242 -0.056835608746598015 0 0 0 +0.0040715211458620115 -0.028100235909521598 -0.025694380378334769 0 0 0 +0.042076791281558112 -0.06904846998651093 -0.040655537498168637 0 0 0 +-0.33154016977495748 0.010650699710847339 0.061208693384781937 0 0 0 +-0.25641649301043246 0.022088007097482654 0.071678177721634512 0 0 0 +-0.23371898880831432 0.031649194483554466 -0.050623189487517817 0 0 0 +-0.19815861872972457 -0.0098295802360186535 0.0049057696510683702 0 0 0 +-0.22596118572098906 -0.0016577089493773067 0.020827143861924774 0 0 0 +-0.12058363792844817 0.10567736532195049 0.12156444944185438 0 0 0 +0.19215219912864262 0.16891752638709451 -0.0048525130831915952 0 0 0 +-0.39678610813838899 0.003624315284943197 -0.044343233477730309 0 0 0 +-0.24601801726814829 -0.0023131241721650597 0.10416559661249955 0 0 0 +-0.37737071832959779 -0.088781265149537492 -0.050468740078588481 0 0 0 +0.2416661931246053 0.04473637227223487 0.016661899418985937 0 0 0 +-0.21728755761445967 -0.017133377890653917 -0.058776376186766205 0 0 0 +-0.15482123060163344 -0.031803779628415602 -0.031772093333887391 0 0 0 +-0.089429932557181513 0.037045350267930877 -0.13521799607116869 0 0 0 +0.047870401678467178 0.18128512719654338 -0.02589908503215621 0 0 0 +-0.10742890725960957 -0.038400517597045769 0.077586312084132331 0 0 0 +-0.16410959653919799 0.16523056830125954 0.051253131265196955 0 0 0 +-0.14792954025271587 -0.21981090233230871 0.059885902723890744 0 0 0 +0.0015682249269098336 -0.04359159092990636 0.092321723257268756 0 0 0 +-0.35356565442630328 -0.09517724366592431 -0.059614717180311222 0 0 0 +-0.052828628956298362 0.16486103582182993 -0.10319208886073343 0 0 0 +0.078048655409712786 0.055497601681830822 -0.13642792480435034 0 0 0 +-0.077115770510137127 0.017854052957148286 -0.14740864123481978 0 0 0 +-0.042188106137963532 -0.0025086120240767618 0.086416028403079131 0 0 0 +0.19242190470028203 0.013702443342938547 0.070880502687412777 0 0 0 +-0.1581399122251268 -0.080727257276771131 -0.039671283796824525 0 0 0 +0.17962321542190379 0.098678634469573367 0.10543089073022779 0 0 0 +-0.081837939862695108 0.042892460800882437 0.10168732683594758 0 0 0 +-0.15576355999428315 0.12733014466380094 -0.037458770984864803 0 0 0 +-0.085677700831485015 -0.15293273819241349 0.11848610628917208 0 0 0 +0.054063993246392272 0.15666128650153288 -0.088452962268733878 0 0 0 +0.12146443616955066 0.053956859382259192 0.081025958836640238 0 0 0 +0.078001959945245114 0.079981141088918295 -0.11343959687692205 0 0 0 +-0.10184853169892455 0.1695123412303659 0.10944160333963579 0 0 0 +0.031894371059085158 -0.045682157738614365 -0.11918469593449682 0 0 0 +-0.21192236574654472 -0.18461078094836139 0.053175358924889476 0 0 0 +0.18111551802717613 0.082478698231929437 0.043139586715187417 0 0 0 +0.11956885025859104 0.05510598172603498 -0.12174264635304967 0 0 0 +0.10878966537113527 0.12329307953774649 -0.043289463721395943 0 0 0 +-0.062816236081940646 0.037213774396691934 0.019812718486674125 0 0 0 +0.039783493141739068 0.10206953242999361 -0.073551509520410091 0 0 0 +-0.022747186195047175 -0.17271284368205025 -0.004643072170678525 0 0 0 +-0.45318916566499279 0.021496737567675284 -0.0086592118089185155 0 0 0 +-0.43737731440008387 0.028032135166574712 -0.037017682227158455 0 0 0 +-0.33416417379223279 -0.054554129804732759 0.051494153423687433 0 0 0 +-0.0087811257990869085 -0.1867493931477652 0.046072189991836432 0 0 0 +0.072920538898492204 0.11824847757619383 0.00383704131468246 0 0 0 +-0.081879420614833998 0.15061611346475451 -0.0088822189940246654 0 0 0 +0.15827702386058634 0.037387520886328962 -0.081748182436969588 0 0 0 +-0.1489682082339982 0.11810034352933335 -0.051768056621371294 0 0 0 +-0.44150865370918302 -0.052799717097748083 -0.062532857724004881 0 0 0 +-0.40568718711479568 0.0013153260679868717 -0.051939869960717394 0 0 0 +-0.059075083021845221 -0.077086281176212246 -0.098807448135671661 0 0 0 +-0.35655281427525221 0.050427222787636339 -0.029977308959455218 0 0 0 +-0.39360765877966308 0.010419912076826188 -0.048876138610708997 0 0 0 +0.016766978846776748 0.14899610247103168 -0.015713750412703953 0 0 0 +0.20160343686907084 0.15885549777466568 -0.029164676644668902 0 0 0 +0.15518283977869657 0.093971769396338611 0.056987622053784298 0 0 0 +0.036006321191762114 -0.10066339896636783 0.11533768570313233 0 0 0 +0.0067897852737782149 0.049629528543310708 -0.019429130291205354 0 0 0 +0.03494409838625695 0.084552535050587241 0.091318789987780175 0 0 0 +0.062346591619758363 -0.076290998593193021 -0.040816587743937954 0 0 0 +-0.021476814022106161 -0.067497831308402589 0.15425592324306023 0 0 0 +-0.047414737215321578 -0.12726112554129773 0.11777276721616928 0 0 0 +-0.26746423992872703 -0.16075584962796655 0.017127616053581235 0 0 0 +-0.095964684746861484 0.12131131742044865 -0.048211502638243614 0 0 0 +-0.045316487229298819 -0.10882042418594753 0.10522575873083714 0 0 0 +-0.017398928632093635 0.15431633376015907 0.011897142792643062 0 0 0 +-0.043081711849530746 -0.17681201165689855 0.10847903380593146 0 0 0 +-0.19480387551307449 0.13782846272525145 -0.030589254262822219 0 0 0 +0.07895484233751654 0.16254218792193104 -0.064294855856764588 0 0 0 +-0.15491155936562923 0.039098880512865697 -0.017047548470720653 0 0 0 +-0.13174925079879357 0.072881268031356361 -0.13267871630999259 0 0 0 +-0.067594896198883703 0.17458003752617118 0.040836781836342539 0 0 0 +0.024777597415675368 -0.14820662994673339 0.10331926136081013 0 0 0 +-0.19952973737626106 0.012674731868296846 0.10720456939435888 0 0 0 +-0.45243814316575415 -0.067730040237666128 -0.051273887162837206 0 0 0 +-0.17858424009286339 0.15536410742970042 0.0064579977298318547 0 0 0 +0.075737382970126277 0.12159675445624207 -0.033226858219790739 0 0 0 +-0.27908016790475698 0.047230056835487477 -0.035658162681154432 0 0 0 +0.1237888249389803 0.14813926576712866 -0.044214867928009466 0 0 0 +-0.13644241669154961 -0.032922267448214831 -0.023044874605929466 0 0 0 +-0.2434710832148069 -0.0051546493280399674 0.067025146528833096 0 0 0 +0.090968511263192553 0.13816030132398521 0.098920456784794081 0 0 0 +-0.31225368981654988 -0.028042441495793408 -0.042517122928047074 0 0 0 +-0.11206673953336432 0.11780749374062566 -0.077012808139024766 0 0 0 +-0.046733270793124115 -0.20006680191791479 0.031796801658354246 0 0 0 +-0.10760617611266443 0.19420430643115333 0.036648763327485429 0 0 0 +0.12380108115684002 0.07454172811101889 0.037553299444270799 0 0 0 +-0.046801334145062157 0.079051136594266602 0.086713057150111045 0 0 0 +0.24380485023440784 0.13525120959996245 0.072841770648240128 0 0 0 +0.17212751974649027 0.13121997101335553 -0.07161581787631241 0 0 0 +0.0096952749201399402 -0.12090294928043989 0.12124235897492944 0 0 0 +-0.062537791833013778 0.096013207922737542 -0.02928088178104768 0 0 0 +-0.22316426064871253 -0.064953848828525285 0.045204149409433819 0 0 0 +0.017455939882707272 -0.051053828306986487 -0.12100343171003414 0 0 0 +-0.093199947740575328 -0.20718404600480667 0.087372243259902088 0 0 0 +0.060881704895007382 -0.072943504539261572 -0.10878912827240815 0 0 0 +-0.085911927161710366 -0.036901059897690547 0.10382412949549594 0 0 0 +-0.46233010704812827 -0.046992952630390883 -0.069460433667064642 0 0 0 +-0.094786829786289051 0.017688779194830889 -0.011977852006366946 0 0 0 +-0.22205887087855958 -0.10780872862686265 -0.0099091825620410967 0 0 0 +0.049208038689892264 0.17668261809207264 0.10120732921093048 0 0 0 +-0.15092863547810359 0.031766202250278541 0.00066445676859888669 0 0 0 +0.041137270101627765 0.15966885710850731 0.042441251889920789 0 0 0 +0.069624237570203806 -0.046838194867938776 0.036022933748501823 0 0 0 +0.048246711252587782 -0.092760438624365282 0.11236888057615377 0 0 0 +-0.27029625122112455 0.029795907304059233 0.0081646503416313854 0 0 0 +-0.17064756848023976 0.15585987752774916 0.064552040170900965 0 0 0 +-0.083263377075162737 0.0072635556747359109 0.14540577954600611 0 0 0 +-0.18027913837237752 0.15925545830902221 0.052176416379858731 0 0 0 +0.11654364216943031 0.12540354255223224 -0.041352709282604982 0 0 0 +-0.08194147187470463 -0.15493357171018796 0.11109784383990287 0 0 0 +0.022125876327522553 0.09522682835367785 0.051387405396489422 0 0 0 +-0.050225475474426073 0.052264545883016655 -0.087620003750182224 0 0 0 +-0.00014265269140484316 0.083102431592926351 0.18106540798814594 0 0 0 +-0.25065360478567195 0.035814472391688723 -0.059382853620282366 0 0 0 +-0.44727974398600406 -0.033503332180988055 -0.048879651680888148 0 0 0 +0.20763153624024239 0.12071965958318576 0.1168271309257746 0 0 0 +-0.089056259626869638 -0.094756794933618521 0.035715606938584249 0 0 0 +0.21411752355718511 0.084538035954335233 -0.018050022464388971 0 0 0 +-0.15745833280930766 0.084382553836773122 0.047595734866186984 0 0 0 +0.18799113720635646 0.17998912032918074 0.059615874531297935 0 0 0 +-0.0069247989362455353 -0.044494806922080465 0.024123466855942272 0 0 0 +0.088125823018304017 0.16617754373791255 0.12586456021085798 0 0 0 +-0.010374901211536558 0.035517815347973714 0.18218878197894292 0 0 0 +-0.059315978998993546 -0.10544063828697477 0.083955578676867287 0 0 0 +-0.10785204343126392 0.08289701330793553 -0.14458919041403662 0 0 0 +-0.1658627095861151 -0.029897855906202947 0.022309662262140761 0 0 0 +-0.27975196373571642 -0.024023117287086337 -0.018875807072350759 0 0 0 +0.10844368645949048 -0.012290938685507985 0.093490599712217709 0 0 0 +-0.083950125854699909 -0.046441771508224788 0.091427265404431607 0 0 0 +-0.24770312818375187 -0.0059859322743527621 0.069666071974474469 0 0 0 +-0.25767803505305437 -0.16960436925168804 0.0040282420712849099 0 0 0 +-0.1480922128995974 -0.098079349282620965 -0.046008751757977528 0 0 0 +-0.10566883206723027 -0.10185351012845385 0.11948510378393715 0 0 0 +-0.37932674108988607 0.014270906609937073 -0.044532691065394786 0 0 0 +-0.027224646886009785 -0.075672316013450758 0.1804367395870751 0 0 0 +0.076127993984450526 -0.056297436447296317 0.043490535074701075 0 0 0 +-0.022288100290142498 -0.013869719908969486 0.10696068446609283 0 0 0 +0.12187429389007848 0.053660784050099053 -0.013377410973337944 0 0 0 +0.13104573750460052 0.042547362562733226 -0.094139850807880981 0 0 0 +0.14028449092831224 0.019696781086696286 0.0016154929842404075 0 0 0 +0.17324905853482891 0.058849156365132382 -0.076739905852555759 0 0 0 +0.037606646455221326 0.17231662656611063 -0.067224397356491994 0 0 0 +-0.072897047829309058 0.17471134434548297 0.1298037004199801 0 0 0 +-0.28493305309284478 0.031024423851180316 0.034469662924272476 0 0 0 +-0.034114327913567 -0.10134414305825812 -0.024353761684540648 0 0 0 +-0.12656262513210537 -0.17374562114469197 0.02290419128433055 0 0 0 +-0.029236623407551121 -0.056984107528825295 -0.012699464727210813 0 0 0 +0.050715952554407917 0.02009811429754596 -0.055168245937429833 0 0 0 +0.054864932473080608 -0.052924563620436016 0.1768056412769812 0 0 0 +-0.37583487161039841 -0.02224791396068132 0.057930720631784755 0 0 0 +0.010662997645272398 0.05915569372392071 -0.023246457520788077 0 0 0 +0.15192571246988135 0.088980849387702066 -0.067186739523842937 0 0 0 +0.13787061234418535 0.070831734590297069 0.10614565422658109 0 0 0 +-0.15829442892436874 -0.027318322197468964 0.092736987867517856 0 0 0 +0.10233917241181006 0.0087844418200985486 0.10398832969765923 0 0 0 +0.051320164972892879 -0.063051133087045075 0.11098599718279203 0 0 0 +0.090890739529507603 0.035309784501294128 -0.13803662487362836 0 0 0 +-0.080582306366146106 0.21563399575064796 0.043644216301195332 0 0 0 +-0.12476422620670408 -0.028709415772670416 0.13453639925991276 0 0 0 +-0.19179066628840757 0.010868127255261872 -0.050765118153934835 0 0 0 +-0.1670622517639585 0.13427603057679532 0.062090504816153552 0 0 0 +-0.12256326577433624 -0.073979551666335214 0.057195032053818012 0 0 0 +-0.092471040625073997 -0.060643953486939906 0.1201562759901765 0 0 0 +0.10572830650321668 0.043020708065863666 -0.025637551585828894 0 0 0 +-0.010178430245078696 -0.12305520899835556 0.014396547796414222 0 0 0 +-0.1160065108166356 -0.11015799879884162 -0.090776317420024427 0 0 0 +-0.23442877468210183 0.04693888043130795 -0.044909894630754843 0 0 0 +-0.29179315019838281 0.088607643943819203 0.017133038998311395 0 0 0 +-0.27795828673440737 0.082264236859578177 -0.042295271915054417 0 0 0 +0.075715030261992944 0.022826206771112967 -0.16195195333458157 0 0 0 +-0.42282903415022188 0.025655233481558515 -0.050508001106865708 0 0 0 +-0.16136169747207552 -0.0002586729553281375 0.047732005009451878 0 0 0 +0.11131832657968849 0.20809147789540139 0.031485756459317643 0 0 0 +-0.096291295644769015 -0.15008829376978849 0.029025327710538174 0 0 0 +-0.005622125703692471 0.096802936188469135 -0.15884709749199355 0 0 0 +-0.18278607381734069 -0.13720352654321027 0.084393976011435973 0 0 0 +-0.2364293649232993 0.048492941912199383 0.098325621083681453 0 0 0 +0.059855367956792416 0.046678645898704851 0.071172358733775115 0 0 0 +-0.07667484332268365 0.0827289061648524 -0.064972875431084542 0 0 0 +-0.016984539451638747 0.15425113858756934 -0.035077518305863253 0 0 0 +0.2114082853144244 0.034589658579973037 0.10256243087254838 0 0 0 +-0.035274018488111958 -0.10495862600988663 0.036580445213832413 0 0 0 +-0.20254325119243005 0.114708276577136 -0.05720361324375961 0 0 0 +-0.24339606867665428 -0.013620589941530981 0.078256379169531626 0 0 0 +-0.021721351492695995 0.070009509723910568 0.092434951640301383 0 0 0 +-0.058538655061342315 -0.035220452379682576 0.10807658844891374 0 0 0 +-0.37360199936066057 0.012656541388153558 -0.045093777604996693 0 0 0 +-0.33698603871088478 0.088099332350259185 -0.05987273477184446 0 0 0 +-0.20441906662073223 0.15322406215518108 0.043725403976789201 0 0 0 +-0.0016167980908463053 0.041447889814198946 -0.083618852951475878 0 0 0 +0.11638978113551851 0.17915780696937722 -0.066997391464365175 0 0 0 +-0.031973121078126165 0.1812609516841136 0.0070700442075408154 0 0 0 +0.19193200403648186 0.1238486862511714 -0.049246483483887743 0 0 0 +-0.26116019010431368 0.056865361684264593 -0.0005203885246934381 0 0 0 +0.14658527111789205 0.056048353159895592 -0.063291894926767789 0 0 0 +-0.079475731107727654 -0.033315876917498655 0.12829213774361695 0 0 0 +-0.10875478802160832 -0.16158039941295704 0.041724455624678164 0 0 0 +-0.26487999228266768 0.0011338644039644852 -0.022785099551101667 0 0 0 +-0.064370205239702494 -0.091995233698591139 -0.15842972251491946 0 0 0 +-0.097068906790288179 -0.021381817848110579 -0.15532477310927026 0 0 0 +0.065780364238230915 0.011556292453067357 -0.12008556731241056 0 0 0 +-0.24448072166083618 0.049918709222796342 -0.011478172351835292 0 0 0 +0.1308348131800931 0.068629251490226917 0.0801842341646892 0 0 0 +-0.056375952606510848 0.20059390603913085 0.010212476757663291 0 0 0 +-0.28128666313506434 0.012186611834061778 0.0078286869231904976 0 0 0 +0.28611629557929225 0.14926343684028182 -0.043477505239554681 0 0 0 +0.1111824783918634 -0.057666435478207656 -0.046156639871598681 0 0 0 +-0.25255082853728905 -0.10643215042555614 -0.021664352380376312 0 0 0 +-0.17710940199339298 0.077708434095493495 -0.034753097301893854 0 0 0 +-0.16526833781615835 -0.00070808368380043119 -0.035371408791883857 0 0 0 +0.13506767329031594 0.021304150348896156 -0.093085712368531609 0 0 0 +-0.33550981332183116 0.013994005698598905 -0.067932375674497808 0 0 0 +0.077585533856358302 -0.053874029322276362 0.10104635136514903 0 0 0 +0.011142386501105495 -0.094835821604921017 -0.084913430822234126 0 0 0 +-0.052027294818791592 -0.033817082463205805 0.12548438750343258 0 0 0 +0.22383421128004083 0.093414908661870244 0.051573739017499148 0 0 0 +0.086968699175126341 0.18894090703302668 0.041470491689899941 0 0 0 +-0.078204660944086513 -0.037156167829491688 -0.14519534446094046 0 0 0 +-0.04790907410696621 -0.13454870980686601 0.099153895323019964 0 0 0 +0.044570697692753736 0.074403156536835713 0.094267483326341966 0 0 0 +-0.20162286825994263 0.0062612306834854969 0.0061286570538682805 0 0 0 +0.1409852717017242 0.016698790300939681 0.038829993589827805 0 0 0 +0.05904597499325398 -0.10355373327707873 0.12240896763949002 0 0 0 +-0.26025488445117839 -0.044226701292407244 -0.024542411176956269 0 0 0 +0.040572998849947417 0.12150422483759837 -0.05304841402067198 0 0 0 +-0.13859971510360253 0.079239064980298257 0.098531407467577631 0 0 0 +-0.1376720442714659 0.12349130567472055 -0.0041919898013174639 0 0 0 +0.018764959275426818 0.062558590448968554 -0.082833380842383952 0 0 0 +0.14468674472743176 0.094573328109907928 0.0041589312893333952 0 0 0 +0.063801607085668899 0.021322184906354624 0.049010023146581372 0 0 0 +-0.10604646808821477 -0.12463909433377023 0.057947031235198981 0 0 0 +-0.20266650266990999 -0.080019298679353673 0.098977311010116226 0 0 0 +0.17102784692452982 0.029540932591914648 0.087296326117781903 0 0 0 +0.18282611712943991 0.11380907366648035 0.094372413185640242 0 0 0 +-0.063316904017548137 -0.0049366437131222463 -0.16510239388028206 0 0 0 +-0.10071405495194491 -0.084247686508347769 -0.060872838501295545 0 0 0 +-0.085026624402862572 -0.041174293703828496 0.07385734699765642 0 0 0 +0.057387119411642151 0.13345530796550681 0.0063763587609804162 0 0 0 +-0.068072800643525611 0.1008663991535711 0.014520998177561917 0 0 0 +0.18008694691407251 0.15350826808713885 -0.077636692571668414 0 0 0 +0.12801826387442877 0.15191890232636823 0.056246438131099558 0 0 0 +0.053463854644771158 -0.11391569395214228 0.029182325784680441 0 0 0 +-0.0047693707764800974 0.12870470807843698 -0.035172648177064031 0 0 0 +0.0083030925997299443 0.039455525382692425 0.18030598093929465 0 0 0 +-0.19636344786959703 -0.13996073864906469 0.062318191453807043 0 0 0 +-0.20441979144269373 -0.11327719933917049 -0.030574092220240739 0 0 0 +-0.13081105228667617 0.067565993927036883 -0.11472006269056349 0 0 0 +0.17082633357046401 0.012442274919158308 0.044665553461951668 0 0 0 +-0.027584987324767329 0.09884619138548989 -0.041964059420943722 0 0 0 +-0.3525096447583731 0.018685940103864762 0.039067370687392078 0 0 0 +-0.10035556284697961 0.1445555122210006 0.008173632209866305 0 0 0 +0.17017912915738759 0.023605284103886681 0.053964487233367303 0 0 0 +0.12182161089737426 0.01278344724685046 0.013920474622020035 0 0 0 +-0.44608582012312487 -0.041999796159288866 -0.017100419582865678 0 0 0 +-0.080519115344525827 0.093163039552651317 -0.079898989286035296 0 0 0 +0.11900908250186121 0.052998740828129443 0.048941975511857305 0 0 0 +-0.15509979502437871 0.1261760008813636 -0.023173604940204401 0 0 0 +-0.20840561915292638 0.0053582329402342421 0.041609467921941062 0 0 0 +-0.068578640210281649 0.024404098721240164 -0.034732086082858965 0 0 0 +-0.131846412842616 -0.069374359749295761 0.15047761459461598 0 0 0 +0.00017303183665262623 -0.11293516600983963 0.14831644599762187 0 0 0 +-0.24535560482055882 -0.074383518642645335 0.054911084030267315 0 0 0 +-0.19251978843190476 0.011346263097360254 0.069821910349324362 0 0 0 +-0.1180063660324342 0.06769907436688849 0.01381731763421884 0 0 0 +-0.20303622233508156 -0.025156627229506151 0.03350079941829201 0 0 0 +-0.051717064594889561 -0.14328602121669243 0.096083838070484345 0 0 0 +-0.052352936390144766 0.22211305642739915 0.07167346355422119 0 0 0 +0.25956518358800323 0.15010842406267716 -0.046631911262537823 0 0 0 +0.020890296364543037 -0.11175547789371061 0.11439015457510718 0 0 0 +-0.019447654534054504 -0.1469757747735195 0.11925636549005006 0 0 0 +-0.082972461958285448 -0.16232491845309222 -0.045578170837480558 0 0 0 +-0.14621328466707378 0.17586698224419678 0.037182103964055413 0 0 0 +0.0047670751139823886 0.036227617388451927 0.078029826983995271 0 0 0 +-0.20511058305087737 0.11449634809169495 0.027482028963608213 0 0 0 +-0.029602761666190358 0.11666342881766939 0.043491342241744974 0 0 0 +-0.20727582540581474 -0.14942241352185934 -0.016956228880931151 0 0 0 +-0.4397431056952989 0.021605895869459935 -0.079023533831031986 0 0 0 +-0.075277965531537816 -0.1157882999094506 0.065989484009457283 0 0 0 +-0.04812376652312006 -0.037184158307391246 0.031282932163129107 0 0 0 +-0.1877967597231735 -0.069969835764721044 0.12794682878623295 0 0 0 +0.17184988874931578 0.18497148450884687 -0.0062121425286643106 0 0 0 +0.098980470261443354 -0.048182972552004738 -0.047831736855878021 0 0 0 +-0.10166598162224522 0.17167318976089685 -0.015903757126430051 0 0 0 +0.099746706841676469 0.042714125943557335 -0.038312901858834542 0 0 0 +-0.33337272678558016 -0.0099245864123609084 -0.075753775877680632 0 0 0 +0.037045161119860059 -0.083671617084335542 -0.16026746143085463 0 0 0 +-0.12943950093881229 -0.10075848267569347 -0.086856525643549856 0 0 0 +-0.024261210029048408 -0.084650390682254467 -0.027813266639866857 0 0 0 +-0.025984931885541906 -0.022211407062841582 0.030522080319645345 0 0 0 +-0.060329636465648706 0.042122900106370431 0.094226925967000413 0 0 0 +-0.21088454842961862 0.014117057825334345 0.076911387516472002 0 0 0 +-0.089628181944990115 0.17475371162313313 0.053361027765498031 0 0 0 +-0.19889602001792056 -0.045894512441284507 -0.010120342510162861 0 0 0 +-0.16715909825703135 0.078762739597615761 0.10086761510183753 0 0 0 +-0.17797081170296297 0.13707659261590149 0.091360486811545655 0 0 0 +-0.012739913644362277 0.16092612896856573 -0.095706869275955009 0 0 0 +-0.12325355816989675 0.15790036531129387 0.036742305782542561 0 0 0 +-0.048509948489796395 -0.035079615642979289 -0.18709355751776555 0 0 0 +-0.24674627211946532 -0.054609078629462987 -0.028675272404821595 0 0 0 +-0.13427610146406344 -0.098126596426275109 -0.06669738187988522 0 0 0 +-0.21063431668514154 -0.032650143810894344 0.11231831234054498 0 0 0 +-0.10794962457183055 0.07262708128563683 -0.074694635341735552 0 0 0 +0.075414653913297214 0.081504454959050732 0.11510280269232856 0 0 0 +0.0069622656914451464 0.16448201411911612 -0.0095985402039624745 0 0 0 +-0.32979792452260159 0.013014341970627646 0.028007288647689393 0 0 0 +0.060071199000980624 -0.041122545363547758 0.18112804994275236 0 0 0 +0.038744982746879042 0.064147820848287518 -0.058416930110731152 0 0 0 +-0.075977010586874116 -0.011324819669882774 0.093439527832590991 0 0 0 +-0.046129140757948661 0.15234357039506269 0.051343364483886877 0 0 0 +-0.11925036572080577 0.099438631192151461 -0.090774640896203462 0 0 0 +-0.13231878513465406 0.10521656816807573 0.092321328770155558 0 0 0 +0.050351432107456462 -0.0770429732221449 0.16680491975780201 0 0 0 +0.18947025961582548 0.080981785841896192 0.030206394281388271 0 0 0 +-0.12526333188267197 -0.032012365200031562 0.020129309896061209 0 0 0 +0.014631063816302914 -0.039075340267964664 0.0070756277317311489 0 0 0 +-0.19896989025946243 -0.02072560095140899 0.086075316659281947 0 0 0 +-0.34107056162588767 0.0013255195135069009 0.022792416099002594 0 0 0 +0.1150723189651966 -0.027812563053801198 -0.032168542301143049 0 0 0 +-0.038569053456445734 0.0034772829774930014 0.057954549509833558 0 0 0 +-0.3644783289959212 0.069267226075343302 -0.060653052001802238 0 0 0 +-0.15988210381496004 0.040854345483793408 -0.039534724796172233 0 0 0 +-0.030807604340817807 0.10247823577203458 0.054154746047563845 0 0 0 +-0.054397636847093256 0.10664306690170661 0.0017027319993306866 0 0 0 +0.10708165491873395 0.14386148385905101 0.13094124160326923 0 0 0 +-0.19506839244783625 0.14567955264465138 0.055694069292597487 0 0 0 +0.20551740403702706 0.16775170982124704 0.025923214528002309 0 0 0 +-0.27846816572866406 0.05160223643591344 -0.050500164643566575 0 0 0 +-0.1511065006653895 0.031868118286040581 0.044067126350160218 0 0 0 +-0.067630526980238526 -0.094197834811572456 -0.0061538638799917 0 0 0 +0.083725787144154296 0.047103095504296921 0.1282659217080204 0 0 0 +-0.0056390845724847427 0.022544786029530667 0.031141502870987159 0 0 0 +-0.0536345327221463 -0.097288075925888978 -0.13791970817531785 0 0 0 +0.056160174579955646 0.20763275742607606 0.0052018360351850368 0 0 0 +-0.17221379461167152 0.085529041986729448 0.080320018671112575 0 0 0 +0.062874330030635417 0.074017209553777219 0.13590500593259555 0 0 0 +-0.35796575038736222 -0.033805465152289271 -0.022927466887188608 0 0 0 +-0.24712535173789135 -0.08465276379124867 0.037884328525078947 0 0 0 +0.13393337793777921 0.0076829675640235628 -0.084244630365340037 0 0 0 +-0.14146707979501927 -0.17298921342819837 0.044012063931716611 0 0 0 +-0.063166179595878391 -0.13073859807320687 -0.096222846353390248 0 0 0 +-0.055480623647735983 -0.03705027212421505 0.078358816055915298 0 0 0 +-0.28433247687713015 0.020662796653617171 0.041992337250452011 0 0 0 +-0.00016681821025216204 -0.024195538648081966 -0.015467451037663976 0 0 0 +-0.10102535578096522 -0.0049309859471302619 -0.1022333227397236 0 0 0 +0.042424620416520564 -0.06478864531708789 -0.097158200917306814 0 0 0 +-0.068315030625639539 -0.095644911056009141 -0.097393342154733831 0 0 0 +-0.33218274711811918 0.056849526750395507 -0.03103470149979648 0 0 0 +0.1852691809457167 0.17563942036780761 -0.034068770946069166 0 0 0 +-0.026791382857959289 0.16170106385539562 -0.079136725457147686 0 0 0 +-0.18108155331844 -0.12724876074388392 0.0281338415987403 0 0 0 +0.058130108404490122 -0.039371109965960965 0.17538944182254887 0 0 0 +-0.16276972459707412 0.11658041904998012 0.030551953482832767 0 0 0 +0.064979517598289516 0.10771467768004861 -0.022687997429975765 0 0 0 +-0.23654614968888932 -0.122418610302425 0.041282345655861308 0 0 0 +-0.21861434043590683 0.021986929146151496 -0.059680784953829363 0 0 0 +0.0023309258271264621 0.087809458800051809 0.064360962494277835 0 0 0 +-0.33896211916169849 0.073983842741764616 -0.06848511059704096 0 0 0 +-0.057743140284307326 -0.11128463529235871 -0.052616023471761031 0 0 0 +-0.22888510882180185 -0.024737160296083915 0.04724093018629541 0 0 0 +0.21638050615073173 0.098732779478594657 -0.084089107580180747 0 0 0 +-0.00089577898827619684 -0.0045790007667690646 0.10173226031045149 0 0 0 +0.048780723265854087 -0.055655398234296605 -0.13255063534791628 0 0 0 +-0.36122665939240717 -0.085067691404091206 0.018041308726777311 0 0 0 +0.033326096234335523 -0.08023077674528073 0.024304575239880943 0 0 0 +0.097766062809002963 0.1285495740025821 -0.039117999933860725 0 0 0 +-0.060414212758373498 -0.12317786317955751 -0.14258681466831918 0 0 0 +-0.27749466596842975 0.032326294311046111 -0.022454963403476857 0 0 0 +-0.19782811314196563 -0.032300211112797739 -0.043469611598829283 0 0 0 +0.050924224740997837 0.20375884268665589 0.014479530806065538 0 0 0 +-0.30083995202260094 -0.13682311181694967 -0.022376682865856201 0 0 0 +-0.35984076125572906 0.0067023843634067826 0.017594880005865371 0 0 0 +0.24478382924053349 0.11777468208190844 -0.039044891168704715 0 0 0 +0.10323900070857955 -0.028207133332376372 0.033011813056323225 0 0 0 +-0.24920516033345605 -0.081642013475237418 -0.016974294163024983 0 0 0 +0.16589251318191173 -0.00048023887627574036 0.023402406973979911 0 0 0 +0.0181237386115361 -0.12175789756358463 0.13263379329641165 0 0 0 +-0.44770650086632002 -0.02835397352080421 -0.014958382775478535 0 0 0 +0.085172563145400393 0.088281575126962275 0.074817133215930781 0 0 0 +-0.074674063373131261 0.11228751606834725 0.028189172825343917 0 0 0 +-0.054689568528661081 0.03054555808530468 -0.09074107719004619 0 0 0 +-0.063931273013215995 -0.13089794120483381 0.092873927432208764 0 0 0 +-0.03501134610809159 0.22028367575086649 0.052026906135228007 0 0 0 +-0.20367013733778383 0.10047473422007774 -0.052079920497193455 0 0 0 +0.14563100861623418 0.18027852975238534 0.10691093899137152 0 0 0 +0.18550913934033825 0.023919956428904071 0.09323604766676899 0 0 0 +0.12070812488858579 0.14562568157122607 0.046846723205329843 0 0 0 +-0.061390430034105714 0.0031469474905752304 0.067629495217065766 0 0 0 +0.15996718169865892 0.016662709406149556 -0.017645794768183481 0 0 0 +-0.14291291481259283 0.064719183249162038 -0.078997254863138314 0 0 0 +0.15769754155115218 -0.017774283308214067 0.056911067977412161 0 0 0 +-0.21186293374684878 -0.047065079937069682 0.045107490227720703 0 0 0 +0.049828939775030501 0.17193884239261781 -0.0026563834602748859 0 0 0 +0.2584516578991804 0.088911718880756718 -0.042739547014789658 0 0 0 +0.044201784477042871 -0.12598154774177076 -0.14926637572790913 0 0 0 +-0.29211030553304829 0.10438274098333855 -0.0091317576187769922 0 0 0 +-0.13568142354443208 0.072292108598102311 -0.12976443988359859 0 0 0 +0.1952087019161623 0.041750856372161305 0.072147402599743088 0 0 0 +0.017000558959299139 0.13404505018121327 0.030856660712677508 0 0 0 +-0.19272846837808616 0.079414334928805008 -0.0040194075369723026 0 0 0 +-0.051349490296910549 0.054594282669311378 0.05435503077494816 0 0 0 +-0.066272320972702026 -0.053962055388318858 0.14160481248598314 0 0 0 +0.17033796720132693 0.078800872546311462 0.046742767775611482 0 0 0 +-0.0052846190462471632 -0.13657232431426691 0.14396039082980996 0 0 0 +-0.26417728910606592 0.02231254818603301 0.031668897055222661 0 0 0 +-0.19780679249263139 0.13078656206459227 0.0060396271601044493 0 0 0 +0.20060568920667982 0.11168857098736429 -0.071783623969152111 0 0 0 +-0.10777903216799029 -0.058685887976682755 -0.13337910766619582 0 0 0 +0.15206907870155523 0.076717398934685599 -0.0031287440004209022 0 0 0 +0.049164477948141216 -0.05931601588119334 -0.13856262359450849 0 0 0 +0.24508785766401325 0.10722471334603473 -0.019652380851655271 0 0 0 +-0.1994952244381607 0.093405321344369518 0.10872923015672711 0 0 0 +0.024469759330989327 -0.099336285737563396 0.13310582896481735 0 0 0 +-0.11748631685641131 0.080773164288122201 0.0053010147364749571 0 0 0 +-0.43713418122480624 -0.043131107549016834 -0.093954865683055014 0 0 0 +0.012306672779442696 0.021159017599538893 -0.12945985870398907 0 0 0 +-0.073095455181445057 -0.090614608789582746 0.12259590904911563 0 0 0 +0.14780111460967221 0.037861351506054408 0.061051795928058677 0 0 0 +-0.023770654455728402 -0.023626630101877738 -0.084197154351775993 0 0 0 +0.070877985698261703 0.20399777663842028 0.085075065716522263 0 0 0 +-0.031099413203231563 0.1391783325272179 0.11129575477589107 0 0 0 +-0.056581465708043011 -0.18119479164391758 -0.016266214856318184 0 0 0 +0.06519065279383679 -0.081478846382601194 0.0045870656471643512 0 0 0 +-0.052832210740735797 -0.090057004852207384 -0.010363653622115027 0 0 0 +-0.10155098321401285 0.086591566841808576 0.06009750171296438 0 0 0 +-0.062999336766335234 -0.023270201553358238 0.1836665208661156 0 0 0 +-0.11793196672376716 0.14692870838627775 0.052609727708102211 0 0 0 +-0.36588718826792671 -0.10466499232416461 -0.053960143911633646 0 0 0 +0.04759443119625556 0.064168404570299209 -0.040722411324884744 0 0 0 +0.19419333367316743 0.052075014791695851 0.027720007909276534 0 0 0 +-0.038201777703487372 -0.18786001286900744 0.011477976008690438 0 0 0 +-0.29158491580230184 -0.045120785312723372 -0.027325231131071687 0 0 0 +-0.092980723108684216 -0.099762598276551817 0.1081160631499756 0 0 0 +0.084301534239684617 -0.057841845500115313 -0.12399442316354252 0 0 0 +-0.13281659497407033 -0.019760305670187356 -0.057542425508901485 0 0 0 +-0.032869272736280708 0.19986316923642061 0.093034560171381592 0 0 0 +-0.16267443356134931 0.10268382454391706 -0.041854680860854226 0 0 0 +-0.37297836224267494 0.0033736102413725877 -0.060393514381806374 0 0 0 +-0.080338658484136738 0.071494641598239039 0.046558755038314498 0 0 0 +0.017318669260125541 -0.0034942798463110936 -0.080269294246400238 0 0 0 +0.073462249972145066 0.18517171686531092 0.063243229205097534 0 0 0 +-0.20250518330115364 -0.08475488908039408 -0.046179137889358207 0 0 0 +-0.23297792939885292 0.012572242259801358 0.082876514778114835 0 0 0 +-0.14764589678556894 -0.20616872481494072 0.067471044502141891 0 0 0 +-0.043545797060863145 -0.10612959209374387 0.063128806593547554 0 0 0 +0.14186109924626528 0.18449837031958949 0.026468375483612527 0 0 0 +-0.39378957095255146 0.07074700153425334 -0.041880144493500221 0 0 0 +0.017670966366960139 0.055635879830082391 -0.16452823023210744 0 0 0 +-0.14918385221516717 -0.19132599724024582 0.06325801588158822 0 0 0 +-0.0041979990660748756 -0.025436626033307541 0.14445076949923716 0 0 0 +0.098117253787640857 0.19119165034584329 0.0042387595159248392 0 0 0 +-0.26982589883178942 -0.035781452561581523 0.080503871942795319 0 0 0 +-0.047924699348697919 -0.15525081975801802 -0.10736074742720136 0 0 0 +-0.15784460774063602 0.015923119707485639 -0.10080275597180705 0 0 0 +0.126538893181316 -0.029566462586674863 0.093133054414324928 0 0 0 +-0.3775293020434119 0.058646283389463538 -0.048235877300816132 0 0 0 +-0.34641330253034597 0.031911189571747101 0.062116103781084536 0 0 0 +0.142784590070208 0.16740512346384767 0.093754580835056972 0 0 0 +0.040649379892903348 0.10973729411092303 -0.0388944985724273 0 0 0 +-0.16876288361948916 -0.042670858266334072 -0.045394821024174803 0 0 0 +-0.16527364435942382 0.058441332015809144 0.020806486474625296 0 0 0 +-0.29595059330153284 0.011386404835700054 -0.054833527056215803 0 0 0 +0.07063844677828951 -0.067803761254094541 0.10516811720205752 0 0 0 +-0.091400770708594981 -0.06903094945988153 -0.078682691952897704 0 0 0 +-0.29411732431772164 0.081112760040425669 -0.0081881565106045329 0 0 0 +0.0072797641639317789 0.055367551667896087 -0.057660693488010673 0 0 0 +0.18579747676660069 0.047863600260677708 0.07827996411531371 0 0 0 +-0.06227474419323964 0.022006895174450231 0.092462406272612957 0 0 0 +-0.12939775111824975 -0.1951049103010935 0.055715267266472829 0 0 0 +0.096501009272290383 0.068328960891088919 0.0067131677741510687 0 0 0 +-0.29201339592982556 0.044930432617698302 -0.04578859936008417 0 0 0 +-0.076498229001243645 0.031535582104635862 -0.0021771943017886985 0 0 0 +-0.08351239272106209 0.13662606815396622 -0.049933661656669348 0 0 0 +-0.020995162270597667 -0.0050327362079499449 -0.17579044913939618 0 0 0 +0.0092467756484099772 -0.095788821268711244 -0.050744473204582002 0 0 0 +-0.2950117221183563 -0.053252345016671837 0.064034828766493607 0 0 0 +0.24081125881874227 0.11206816047996465 0.039947113706803428 0 0 0 +0.064335269158822428 0.043716975460432905 -0.008317223783284422 0 0 0 +-0.15719587130032714 -0.11013702012980964 0.092529184122934954 0 0 0 +-0.10392748547317698 0.017423955009462755 -0.066759699334033307 0 0 0 +0.00046862050577062275 0.20759159833505375 0.038251961925892614 0 0 0 +0.06152570316130529 0.1448333349609589 -0.048372158768181683 0 0 0 +-0.085534024339732728 0.21249943982437763 0.060875921135035788 0 0 0 +0.1548496151638194 -0.00070880097098649508 -0.052697233424274237 0 0 0 +0.01142335817927026 0.057761698444689147 0.013503855389434383 0 0 0 +-0.0037030076428153924 0.032903683080852952 0.13777137328885028 0 0 0 +-0.044751544440274627 -0.055229483426662174 -0.065114208932473328 0 0 0 +-0.36385101637303596 -0.023753937975518891 -0.063479046296358116 0 0 0 +-0.014340315622554667 -0.10198505618628069 0.077371259986920765 0 0 0 +0.17452381969747827 0.14134638262966415 -0.041234234870709929 0 0 0 +0.16221586058457144 0.17386155457588748 0.037990262702157246 0 0 0 +0.055391913940063653 -0.040967586272354251 -0.1542218567560627 0 0 0 +-0.084576863683944126 -0.18542899101979332 0.038212349107930893 0 0 0 +-0.233490168410393 -0.10553210514687934 0.020987757851357119 0 0 0 +-0.015594419737206822 -0.005812369336557599 0.022882262070578058 0 0 0 +-0.019473123069650045 -0.15929648504820187 0.046904658975085722 0 0 0 +-0.21468173120989004 0.010502148228117708 0.10940529901547733 0 0 0 +-0.063307054299297782 -0.11809857163332543 -0.12757360010081903 0 0 0 +-0.011913962391426336 0.1349761137935524 0.15457363889430978 0 0 0 +0.17623986970275168 0.13165424289137312 -0.022022827554010305 0 0 0 +0.09991738314044657 0.18742943643319604 0.074190966327260272 0 0 0 +0.079483298768063537 -0.018070245125232753 0.1148662470561648 0 0 0 +0.0049132321747415442 0.12722842395975392 -0.12666880538612835 0 0 0 +-0.049950156500588649 0.036464895304228639 -0.050299401890621515 0 0 0 +-0.089162858338679707 0.024616806391746265 -0.042461410394840859 0 0 0 +0.048393299503053988 0.027582350480674311 0.18992606360651135 0 0 0 +0.14112500891082452 0.0011061966945896673 -0.012740950662806616 0 0 0 +-0.1106189420546615 0.058039255173693405 -0.10938223287124745 0 0 0 +0.07999262602088969 0.1678722089281981 0.091080856152873507 0 0 0 +0.075580533840672481 0.15157023478664966 -0.074898872737173924 0 0 0 +-0.46560803727630529 -0.050881930829077521 -0.073875032207607286 0 0 0 +0.064077464952163765 0.022418092422730268 -0.13949175584357276 0 0 0 +-0.26086125395191373 0.015365893796949165 -0.029302093306715599 0 0 0 +-0.24520699062090837 0.026062887558169656 -0.060870498125278394 0 0 0 +0.01058749787698493 0.11797346679905008 -0.038613422327331254 0 0 0 +-0.098206030762419128 -0.051689697079139785 0.0019464041830170864 0 0 0 +-0.42001325652675009 -0.029348787450744318 -0.059743347825372134 0 0 0 +0.012984953839641433 0.21343625244318087 0.065130724177290683 0 0 0 +-0.18614140089735393 0.029200169775449647 0.017635804934375915 0 0 0 +0.021256367356076333 0.074188093320055382 -0.029544073929660492 0 0 0 +0.044783327880834667 0.070842565648224665 0.13434735565166592 0 0 0 +-0.43053548447075768 0.0012038501297016446 -0.092284722899994814 0 0 0 +-0.23717313617968239 0.034935570700268259 0.13039197705347652 0 0 0 +0.14003447232230565 0.10581223266147166 0.020547641295538738 0 0 0 +-0.10106061470371208 0.035260199588265262 -0.12426021614248771 0 0 0 +-0.2845453617732413 -0.041560822184262353 0.019306409035307365 0 0 0 +-0.1219995322815981 -0.045263802396859981 0.10293427034137351 0 0 0 +-0.21603351736576765 0.077172462503021122 0.03753500470990781 0 0 0 +-0.14333731885582213 0.094585770868664099 -0.031330444126018792 0 0 0 +-0.20488173128683357 0.064350749724809087 0.11121036196049069 0 0 0 +0.054784046801459041 0.0080393447094601334 0.074533862694280223 0 0 0 +-0.14432011508125581 0.0640326323223393 -0.003274051704219072 0 0 0 +0.212824749170544 0.15859006810381682 -0.031450795925290792 0 0 0 +-0.089760784306002372 0.20911561814085811 0.056427855421652989 0 0 0 +-0.26145228995364628 -0.039415599548396657 -0.058834905636422324 0 0 0 +-0.033382333313485169 0.020172662689429688 -0.025947202435356087 0 0 0 +-0.14060732455393071 0.1234341938510975 0.061376622928882935 0 0 0 +0.045369169199208248 -0.032983104067733054 -0.11980836743691982 0 0 0 +0.18859950620291982 0.20047118310630552 0.011102829345548987 0 0 0 +-0.16524123521895617 0.045127026706790085 -0.075161911731966305 0 0 0 +-0.35035045228601203 -0.050023878013904677 0.038749978051472928 0 0 0 +-0.052806238835561126 -0.090026388747668828 -0.043555150884974275 0 0 0 +-0.16655539941156289 0.013422231430522624 -0.017534743025810928 0 0 0 +0.22160367032679956 0.11672110843117905 0.025531193841028504 0 0 0 +0.029966024933829882 0.070797578098423297 0.033800328378237321 0 0 0 +-0.079797459849785146 -0.13600090087223149 -0.07518390851904079 0 0 0 +-0.029283314715062791 0.12888420742976942 0.066756626112397272 0 0 0 +-0.019141543475627021 0.13920352517815071 -0.11172323839700921 0 0 0 +-0.010245615345588932 -0.17096454258744373 0.096166633025808274 0 0 0 +-0.057119419271391858 0.21238422195583628 0.10043794512170043 0 0 0 +-0.091736173190502479 -0.19627976138712094 0.089348347092083641 0 0 0 +0.13020441118310205 0.14568334040932307 -0.088125393907344432 0 0 0 +0.056831489337736241 -0.0098543601630316224 0.01006474124093959 0 0 0 +-0.18773519633877328 -0.15762066379975109 0.060253858211829797 0 0 0 +-0.02648592859857718 0.049891961628605597 -0.18200754153922991 0 0 0 +-0.034213460732430701 -0.11575211256744294 -0.022497038563589089 0 0 0 +-0.2272853583519836 0.11704685255189562 -0.044014640934974425 0 0 0 +-0.013029828068562843 -0.042772463955983081 0.057033606627598848 0 0 0 +-0.052261017779437868 -0.11067021531326651 0.13326575701077517 0 0 0 +-0.044594377492640669 0.0077562499408111718 -0.12408243388824676 0 0 0 +0.023703043567102788 -0.11570263967029891 0.0075799057136955728 0 0 0 +-0.056110449717370836 0.047910528276858821 -0.078197252447769039 0 0 0 +-0.035308368171213689 -0.20567273454035354 0.051771291666368041 0 0 0 +-0.091305433568449279 -0.0384306877798401 -0.085916767675244712 0 0 0 +-0.27290745105816056 -0.12224155238335115 -0.025789852014606346 0 0 0 +-0.069688705422200792 -0.081160389933963795 -0.12303360106851904 0 0 0 +-0.14326034110073005 0.11488245528102853 0.039059868749164978 0 0 0 +-0.092756755390015933 0.13337132068252422 0.080889598471852037 0 0 0 +-0.40274668191656471 -0.065123341070513263 -0.065107022212654825 0 0 0 +-0.22818354313951922 0.085631346972485534 0.095031932706657357 0 0 0 +0.16021121579966974 0.18647549737806568 0.087250299589102603 0 0 0 +-0.0089240408120840331 -0.013097513240764858 -0.18280704123878619 0 0 0 +-0.18482041551788342 -0.17920118025929155 0.061202305478162605 0 0 0 +0.23989341049568952 0.15309860157983191 0.040451945084572311 0 0 0 +-0.25619533274867345 -0.027548356562145992 -0.048404376391488119 0 0 0 +-0.10484024908325174 0.13737588685194912 0.054368496430122287 0 0 0 +0.052867469396498057 0.096191536783036269 0.15818107651709576 0 0 0 +0.17253898809850904 0.054057861299863563 -0.061191326047800004 0 0 0 +0.21097387963509878 0.078959327475501662 -0.0067531842962484656 0 0 0 +-0.10270821173690031 -0.0055888016938897833 -0.035865938208306219 0 0 0 +0.085621765320596677 0.15699864793316598 0.04753549714809982 0 0 0 +0.039818756221441987 0.16656269418736547 -0.043228954410533871 0 0 0 +0.22323152144116115 0.12961629677609865 -0.063787392460976255 0 0 0 +-0.26451677711989502 0.027712526646341662 -0.055604524736969724 0 0 0 +-0.34554846597742528 0.0045100128922830329 0.010052592522980186 0 0 0 +-0.036207330309518171 0.069618643037458849 0.0059462373019447679 0 0 0 +-0.12866772200253795 0.16342237383370611 0.098054286535410679 0 0 0 +-0.16831845136233142 0.12713695752820836 -0.044744152865773518 0 0 0 +0.019111168331270967 0.092667497341603511 0.062559027414380103 0 0 0 +-0.0048912735106959593 0.21025930782130919 0.1032497553304336 0 0 0 +0.042264792261246964 0.034802656892077066 -0.060991471821881832 0 0 0 +-0.014176672137498458 -0.0048652733168392526 -0.029389121990559153 0 0 0 +-0.23241218356151372 -0.01264067283919687 0.0046890408443948373 0 0 0 +-0.39470230395231398 0.035938995931672379 0.023567179136047139 0 0 0 +-0.46592358991548655 -0.018482852959779583 -0.036503047519754139 0 0 0 +-0.0064890709670121227 0.097951861272914331 0.11742262955087843 0 0 0 +-0.052376664294898567 0.089221837320987596 0.12043395927481679 0 0 0 +-0.42957765189972008 -0.060661429678410317 -0.043248425366237769 0 0 0 +0.26223096614662783 0.073450832823585721 0.037638751107866408 0 0 0 +-0.16266256620782665 -0.11168892996332237 0.051152714152832984 0 0 0 +-0.066597629609671471 -0.11624698653841299 0.11688905612050135 0 0 0 +-0.16261945290570151 0.033201552594786021 0.073945339900825163 0 0 0 +0.020963098646302247 -0.046831885996229949 -0.054905633731283709 0 0 0 +-0.14362548055621799 -0.067246830482925762 0.13080129428318607 0 0 0 +0.0089198764089191696 0.10547948101547777 -0.0063874668961386161 0 0 0 +-0.074294298234873046 0.1006015914600254 0.085967723222995202 0 0 0 +-0.02693642245336908 -0.18399018060526764 0.042705879043420769 0 0 0 +0.095261290114866559 -0.0024854707845109736 -0.055170327529900698 0 0 0 +-0.027263884015632844 -0.030055471465885192 -0.19407592298700707 0 0 0 +-0.21860489620981743 -0.032997469301790011 0.012433362721037122 0 0 0 +-0.22829798716098537 0.0057932739368798114 0.041369233995113053 0 0 0 +0.025144147212956935 0.14435622889395477 0.041684347516543235 0 0 0 +-0.34798234670002948 0.02867418473108857 -0.074995447266593573 0 0 0 +0.011335689867103926 -0.031091479398108107 0.19069972913399666 0 0 0 +-0.31996822692809396 0.06256819532918928 0.043760881084676378 0 0 0 +-0.0010166553322691896 -0.013362902645865482 -0.042367534157275677 0 0 0 +0.091958170245049986 0.039739734098983903 -0.06583746940278401 0 0 0 +-0.026554856219454692 0.0083428028094028051 -0.031730356226026074 0 0 0 +-0.020342519047474528 -0.093743887118495073 0.036026564886353446 0 0 0 +-0.14508007465795386 -0.075373886848452504 0.12419631709209408 0 0 0 +-0.11053683650541124 -0.014112415495505098 -0.10306554259275831 0 0 0 +-0.32719102373386266 -0.035125094306401927 -0.046815996399822646 0 0 0 +-0.13905260147551546 0.09127056480454282 0.09774306961845422 0 0 0 +-0.10777751714648681 -0.05066972605206585 -0.016860986511287757 0 0 0 +-0.20650640724263392 0.050740724193260978 -0.030307917006487967 0 0 0 +0.16947966538321219 0.17121918124083801 0.0045456225946382545 0 0 0 +-0.0089220205314760603 0.043833577785340583 0.035227122178582482 0 0 0 +-0.042367343498629084 0.0028199260032484297 -0.12180336580951744 0 0 0 +0.24743218319433974 0.034794345441929997 0.05206975244803122 0 0 0 +-0.25170197585802995 -0.15900518292064875 -0.021222628359186924 0 0 0 +0.20452315350833344 0.13979995300732784 -0.037160813104655604 0 0 0 +-0.16663566758626841 -0.16968024512818783 0.081833349763588997 0 0 0 +0.01531116637903257 0.087179358953057284 -0.0064799085000986356 0 0 0 +-0.066638420685022182 -0.066046805807942061 0.052989843052460323 0 0 0 +0.0017191065570967834 0.055091333132483489 0.097118287611602322 0 0 0 +-0.056959178821665735 0.084244792503684274 -0.14420266043075591 0 0 0 +-0.055586678932027456 0.0092626836810554281 -0.081581603616744269 0 0 0 +-0.11390072880427587 0.15798298034614228 0.036887204890511921 0 0 0 +-0.058637115964957076 -0.16864245522242413 0.064053802018691347 0 0 0 +0.03540117005703497 0.02941822957778395 -0.15958623193809948 0 0 0 +0.032947968558829699 -0.065960286923126332 0.063937908016619277 0 0 0 +-0.12029204144869471 -0.010212097562549649 0.14130783014919981 0 0 0 +0.24035036161474416 0.12737479145399849 0.067070071835133221 0 0 0 +-0.21321493644234263 0.049060352272716323 -0.053305193015490193 0 0 0 +0.051046286951161368 0.0098596358216782032 0.088072033324924276 0 0 0 +-0.12503019505281937 -0.05593030342094088 -0.07525796553839649 0 0 0 +-0.15704910656818427 0.081063926469125303 0.089449220324370998 0 0 0 +-0.26924173578991789 0.01252066954672057 0.13188295344304105 0 0 0 +-0.11734693714552563 -0.045345554288274609 0.11503188820372709 0 0 0 +-0.33965511773560431 -0.010488439251181675 0.091784051987580023 0 0 0 +-0.13595447924468901 0.13341519706901672 0.099445823026806129 0 0 0 +0.048656957081642471 -0.068329941630170699 -0.11291713313185842 0 0 0 +-0.082848487926274583 0.037974695732223784 0.082323694275073217 0 0 0 +0.18894572054943531 0.092460459431142061 -0.030230885461478035 0 0 0 +0.067573891589124691 -0.053683676852526618 -0.01554823847127379 0 0 0 +-0.10602609371322441 -0.051815039855757278 0.11580569166247126 0 0 0 +0.022858548889334751 0.037135193647133635 -0.10497332831128686 0 0 0 +0.016827765636218184 0.13967935195092901 -0.027028632142941933 0 0 0 +0.047584251944767286 -0.017549999235078245 -0.036941290772297408 0 0 0 +-0.29153066525928678 0.070716752319219034 0.050946903264325577 0 0 0 +0.20161381489863611 0.06791853490323202 0.035218909235346596 0 0 0 +0.0089540892903785529 -0.026051972124610107 0.17553174548377468 0 0 0 +-0.30263529709697468 -0.06780552052460706 -0.0068360004146457709 0 0 0 +0.16455912080045082 0.17337194770747932 0.05465670258889252 0 0 0 +0.16716265785598888 0.11194833882281041 0.045830953232356336 0 0 0 +-0.022934002820185873 0.078485563679784043 0.11832321782627561 0 0 0 +-0.26403332427273041 0.056421287238336615 -0.06735797811867017 0 0 0 +-0.14569473917540166 -0.080409085472705311 0.084176733164848777 0 0 0 +-0.14833093554457655 -0.096884960527319014 0.12339637092594616 0 0 0 +0.11948393007223485 0.11722828401660684 -0.059015256790744597 0 0 0 +0.17620950918577377 0.019222393386059883 0.12263426934728769 0 0 0 +0.13973815769751091 0.098932281268742872 0.14010883604187377 0 0 0 +-0.12234804277943684 -0.16097526047466323 -0.01429467537926743 0 0 0 +-0.43074373020399132 0.0173629641806958 -0.0072722959218751715 0 0 0 +0.097994125885125183 -0.022997339425080005 0.061008567566088884 0 0 0 +-0.25770948355878476 -0.14039168474761815 0.029015294000428626 0 0 0 +0.1785419257930177 0.059865015788112264 0.052926370725685706 0 0 0 +-0.071033834779928473 -0.0097497831610110774 0.080938460109798688 0 0 0 +-0.36796654262157391 -0.076216613191918026 -0.03955745022414997 0 0 0 +0.13807731509093885 0.096676666871282235 -0.0017338507485636367 0 0 0 +-0.17888873938608452 -0.010561055315507134 0.15152138405621982 0 0 0 +0.17976448125709071 0.022816313391089416 -0.043621048796982503 0 0 0 +0.12222781956635881 0.053358156324124884 0.14172758095972102 0 0 0 +-0.13932222579756059 0.038948102634107695 -0.044242708507948564 0 0 0 +-0.2154693787587737 -0.051846256305468269 0.0087116786600048568 0 0 0 +-0.12130005490283952 -0.10617053336420237 -0.089750447277465367 0 0 0 +-0.23542196480911459 0.063112257124372739 -0.057688276769531421 0 0 0 +-0.020445856816268093 -0.076018117617117714 -0.092817395228984759 0 0 0 +-0.05306007768411658 0.008389159823004616 -0.094165495254855597 0 0 0 +-0.13837903138016122 -0.082491671096073943 -0.12244942988561512 0 0 0 +-0.10801615476282084 -0.142205951632699 -0.072719336820187969 0 0 0 +0.12961078010712052 0.16314121182097446 0.10699249832023636 0 0 0 +0.086004129690059827 0.18073610843073157 -0.039323849250053972 0 0 0 +0.097703171088213525 -0.027943090045509406 0.049457528585261201 0 0 0 +0.24380903931232395 0.12996674329084484 -0.021491027923335321 0 0 0 +-0.31567499647983821 -0.049527890309471662 -0.027976032208424984 0 0 0 +-0.027024385153600061 0.03166253379774836 0.12685071617547236 0 0 0 +-0.0014400594386319021 0.0035905687326555913 0.078288261153920097 0 0 0 +-0.23373327475440925 -0.14027297039854156 0.057501467786962163 0 0 0 +0.065518738655308162 -0.071505880250873982 -0.1683489060539482 0 0 0 +0.075994786975295214 0.044123210383596789 0.06750646758849968 0 0 0 +-0.092538267673049179 0.19955481542119008 0.035900990077702338 0 0 0 +0.19161770604219747 0.097989888202751507 -0.088474658131756354 0 0 0 +-0.12447871966746638 0.093860200718324627 -0.091133191254440221 0 0 0 +-0.1834632846503263 -0.11095060735065213 -0.014030028547822038 0 0 0 +-0.24463496475679336 -0.050810401297417013 0.026043743800065022 0 0 0 +-0.22573774102296451 0.037296303759735527 -0.056495163768909867 0 0 0 +-0.20438663745129482 0.049632294671709654 0.079793628804657152 0 0 0 +0.04449372825157355 -0.06952049271697458 0.069817133063972941 0 0 0 +-0.07043012724264297 0.044110364753178311 0.13104173074433903 0 0 0 +-0.0095684819831466927 -0.087493585795785311 -0.06038949469735333 0 0 0 +-0.074444978819552365 0.12954419966873104 0.12965728351124003 0 0 0 +-0.19370451937557898 -0.053927327893865784 -0.055800642195310446 0 0 0 +-0.013136291112445797 -0.10796217860921381 -0.066857745625257037 0 0 0 +-0.25638529241044078 0.020842259380253025 0.10017340336305788 0 0 0 +0.13542570283945182 0.015587502339619669 -0.058359525831142428 0 0 0 +0.12574892794051901 -0.017368752821465494 -0.0043744143799068491 0 0 0 +-0.056232797623781972 -0.10427735525057606 -0.033736828325927254 0 0 0 +-0.098536155799753056 0.21276596887866217 0.048744479854773731 0 0 0 +-0.23942936863252196 -0.015708495998159988 0.091396380683465367 0 0 0 +-0.24596269649791999 0.10596375417149578 0.015374413405498027 0 0 0 +-0.065629324154891089 0.087191252983903511 -0.13958481043409648 0 0 0 +-0.20533636962674096 0.0093632377492999519 0.013306230340577652 0 0 0 +-0.050848631519232912 0.042618256409601762 -0.069798665247175845 0 0 0 +-0.38390282896270278 0.037345697196280558 -0.031811296070892364 0 0 0 +0.014497690151003162 0.11096050671660618 -0.10588005833334475 0 0 0 +0.067997724239858781 0.20960222563937864 0.011752873378926887 0 0 0 +-0.13801103269476678 0.022139051001348053 -0.099427433921790681 0 0 0 +-0.099640945456624053 -0.044898971800259785 -0.042551841321189887 0 0 0 +0.26014565109600546 0.068149259140117546 0.030270630892137079 0 0 0 +0.24833152663887942 0.049331874065607795 0.063128308518759418 0 0 0 +-0.37754364807641605 0.018820159978720802 -0.078087597282597787 0 0 0 +-0.013777154278121928 0.10651197490444547 -0.051963955208979534 0 0 0 +-0.21735783511231654 -0.076641808570571263 0.084911590442442314 0 0 0 +-0.40647132883816495 0.045440566022188378 0.003335160886161509 0 0 0 +0.011091131611734084 -0.15871185658252659 0.097418184883280662 0 0 0 +0.015054721874885713 0.054070791959548337 0.10659241710128312 0 0 0 +-0.16888334086673801 -0.18574351748856299 0.053320726219446862 0 0 0 +-0.22211608041842473 0.017424684933240037 -0.061068649095072397 0 0 0 +-0.085706160863768366 -0.070568988599830795 0.13837953281541729 0 0 0 +-0.091522365450162957 0.019547137716813934 0.17264489398713315 0 0 0 +0.13321875752418294 0.1751785690265163 0.093118123123499569 0 0 0 +0.1797898923511127 0.099844538206482314 0.04870541486338667 0 0 0 +0.060195481781449567 0.11986266674241841 -0.11509248024544538 0 0 0 +-0.32170094103618996 0.063988537901103482 -0.032164192361360866 0 0 0 +-0.12285119959796315 0.041262256575819112 -0.015510659536047383 0 0 0 +0.012905467172660778 -0.022658324741792885 0.14111335394289112 0 0 0 +-0.32683683143300474 0.015518622208524013 -0.0025872412862474881 0 0 0 +0.074856191818651274 0.025783832429298659 0.050073696293047171 0 0 0 +-0.094562868869912386 0.03523598680860035 0.17231017306386817 0 0 0 +-0.30231085121732437 0.065818137897456497 -0.034936146005506624 0 0 0 +0.24501506898683728 0.15735507048465913 0.06347726383655658 0 0 0 +-0.1747535314625851 -0.10667528443755304 -0.043793168443969438 0 0 0 +0.078426170878973689 0.091906011214698158 -0.082532624238542282 0 0 0 +-0.055543102318262705 0.0033827533505652041 0.058612051855804842 0 0 0 +-0.09096296463927489 0.05763387332752623 -0.07217020314729633 0 0 0 +0.069460441411491491 0.03956256716253842 -0.12578896323442598 0 0 0 +-0.16316545622535983 0.039753443943733813 -0.11373277672921586 0 0 0 +-0.29641086847375386 -0.15895329472114661 0.013301838817212724 0 0 0 +0.14192267774686912 0.019541122913575237 -0.068057566763213367 0 0 0 +-0.077352606652909939 0.12079225294448293 0.0361079744029357 0 0 0 +0.043663847163612879 -0.11176152332461953 -0.052705071558342309 0 0 0 +-0.10927586661109473 0.1709086766349468 0.10345008665370756 0 0 0 +-0.034396916269704259 -0.083446234912841116 0.17938843695802756 0 0 0 +-0.2562400574380998 0.12086122196007609 0.0056393497186200681 0 0 0 +0.079409278498201175 0.038831739547715016 0.0025789413424124885 0 0 0 +-0.2157847125909082 0.076250392502575148 0.03083520878192178 0 0 0 +-0.11636547568086769 -0.102293591411558 0.10821523553947174 0 0 0 +-0.12693349854151487 0.060926395639519682 0.083430031991808679 0 0 0 +-0.069258138502773403 0.029223604012588 -0.11602553935846546 0 0 0 +-0.01152133147439921 -0.15704065175927989 0.13824288192247272 0 0 0 +-0.13573678210516932 -0.078580482267801677 -0.11289785969817265 0 0 0 +-0.19191116926217222 0.16427767272871219 0.0089380104896807921 0 0 0 +-0.030770726850573027 -0.15064675335431471 -0.069230674162066991 0 0 0 +0.1546328011884936 0.13935281279586348 0.1196029314226075 0 0 0 +-0.073004519879780738 0.11418983814788419 0.052647267287437821 0 0 0 +-0.37509008076608419 -0.0042172322946535667 -0.060942014090701935 0 0 0 +0.0209069948567287 0.15145644849396728 0.1574945885575316 0 0 0 +0.043803945272073597 -0.034519178324838196 -0.1358350962536698 0 0 0 +0.075278971247901116 0.015209012230454927 -0.10727141326784762 0 0 0 +0.080937995282078623 -0.040416666877551938 0.06825769320385669 0 0 0 +0.17072943228115328 0.17805602857839503 -0.047572238034849973 0 0 0 +0.022444413661099893 0.021379777348802864 -0.028607591967984569 0 0 0 +0.036402139360313279 -0.026435415777531002 -0.16194343742524273 0 0 0 +-0.20390017950285927 -0.088796789094754969 0.038797034516389495 0 0 0 +-0.27839878537748941 0.030991170125950096 -0.00014842950306787062 0 0 0 +-0.185241037864883 0.0084730425863852599 -0.048015251704027873 0 0 0 +-0.078397260272903391 -0.10713770871318133 -0.16940230954060051 0 0 0 +-0.038098145924534199 0.12360091589527578 0.16597907685856803 0 0 0 +-0.16052074300918501 -0.092211159202087223 -0.020491858896291348 0 0 0 +-0.091434654812626581 -0.19164831041935787 0.1008334811065453 0 0 0 +-0.32866418809169207 0.02891118721201269 -0.011547201841779042 0 0 0 +-0.030240256563804635 0.08867552342823426 -0.015002044609170401 0 0 0 +0.071178337861031726 0.039730354535609913 0.10915383269463849 0 0 0 +-0.038985892973500358 -0.067707878441009228 -0.092827366563720162 0 0 0 +-0.091272925794753268 0.048570125997159153 0.013640804607457008 0 0 0 +0.056668518901644205 -0.10220542805644825 0.11962083055601128 0 0 0 +0.051780715260018984 -0.058977683359652311 -0.05607176789746246 0 0 0 +-0.095276202516679231 -0.025402079948901202 0.029145598941618583 0 0 0 +-0.013919858042174049 -0.066007910166003742 0.045030096497130578 0 0 0 +0.0038359721478237185 -0.06801778655695917 0.0060232371023446196 0 0 0 +-0.24791745705520971 -0.064316517424483799 -0.0049402592694787195 0 0 0 +0.041611627151195429 -0.042459645783002042 0.02910442933827731 0 0 0 +-0.1110713824985689 0.17712892750120951 0.026577658067307913 0 0 0 +0.079956096581232206 0.057296149932517637 0.16806887744601115 0 0 0 +-0.036283041326750587 0.14533881403047122 0.14520271020370487 0 0 0 +0.0064811875998624369 0.15469805262546893 0.12280961766245027 0 0 0 +-0.16119322473788172 0.046322043436421545 -0.11366869995536329 0 0 0 +-0.090670978539374225 -0.14516859016236572 -0.0073135147200799611 0 0 0 +0.060097371573757774 0.071841312128186674 0.068563256981249904 0 0 0 +0.046054878361844465 -0.078873996869714941 0.11771222597505618 0 0 0 +-0.070548108077840899 -0.12789595340102214 -0.13017406175018009 0 0 0 +-0.087969479792844529 -0.0048282213321412248 -0.13392581946667376 0 0 0 +-0.16139354315605486 -0.045880128573609985 -0.090500727980160622 0 0 0 +-0.18809263333272891 -0.1178184813748724 -0.024359232339006387 0 0 0 +-0.14950198519029889 0.059162479787582489 0.1513130848358227 0 0 0 +-0.11129870752605148 0.04727724079618556 -0.13614142988426703 0 0 0 +0.050932821703876752 -0.017417907876213556 0.097913286259606963 0 0 0 +0.25586921815106872 0.11973219822171699 -0.033219757266111677 0 0 0 +-0.086322078136587543 0.15729837009987885 0.10162551432530439 0 0 0 +0.099770619542018879 0.21188736382586598 0.010737264171054584 0 0 0 +0.036875872866483361 0.12019166617753962 -0.065052224146987303 0 0 0 +-0.22167511317303173 -0.043552095585334127 -0.0045651475068442526 0 0 0 +-0.0053136240176693827 0.14478000661841733 -0.0097647687196312505 0 0 0 +-0.2644661695819418 -0.1639335697938516 0.011440795273397114 0 0 0 +0.11353413868207013 0.15778122474498812 0.056973087849046117 0 0 0 +-0.095187351361583017 -0.068439990490366726 -0.084409075056693053 0 0 0 +-0.42536150086302543 0.046548393699310686 -0.046533789786711327 0 0 0 +0.073027517782822182 0.14202216760913094 -0.070661095573084892 0 0 0 +0.11055449801068512 -0.01426800941477252 -0.12359697748978761 0 0 0 +-0.067791025161235641 -0.18823335538777802 0.036971893755261331 0 0 0 +-0.084276598061439612 0.092854660035879333 -0.097964053808616475 0 0 0 +0.21999300860333487 0.10368818466889157 0.04015739427353443 0 0 0 +0.12702004231905556 -0.0079248805497177111 -0.11344453734070761 0 0 0 +-0.11831314333753429 -0.12761391282393181 0.010039471603132788 0 0 0 +0.17454650307256486 0.044333351969368273 -0.044203530089913873 0 0 0 +-0.16653963661237858 -0.076629174121151694 -0.020683489411795986 0 0 0 +0.19917538004179941 0.17004950987213152 0.04723446115456148 0 0 0 +0.058300616913400549 0.13490794837948866 0.00018080034522199862 0 0 0 +-0.043184000931701216 -0.013576165898025988 0.18971281723925285 0 0 0 +0.15669447827577349 -0.00086307190340759177 -0.089024108136902563 0 0 0 +-0.35001206813294905 0.047760734338779476 0.016928851540300521 0 0 0 +-0.28878412022609967 -0.086029386327714202 0.073223594446670287 0 0 0 +0.15458019642214288 0.1563569652581564 0.081521733161571436 0 0 0 +0.03361289634269421 -0.11775526157992287 -0.064220477121565478 0 0 0 +-0.076428953707683878 0.057145240119180152 -0.13089754498968414 0 0 0 +0.072415704559273986 0.044842154462370054 0.1792534067109646 0 0 0 +-0.048366767809521427 0.18856785794018766 0.051784768088719818 0 0 0 +-0.31733391895065088 -0.068827898929397113 0.075949891730279634 0 0 0 +-0.054941662211513642 -0.05853489356243799 0.16381707473350873 0 0 0 +-0.083402198998136501 -0.045268177013394889 -0.1263198142396193 0 0 0 +0.17573183904228723 0.064960441262812363 -0.054876382651068728 0 0 0 +0.12825024129146706 -0.020549297586756304 0.11268177698718709 0 0 0 +-0.22019489786204421 0.11545798518684969 0.075216567847300325 0 0 0 +-0.060399730679537189 0.15813066397348885 0.051217716903965926 0 0 0 +-0.11099212710950296 0.073777000163018247 0.15776776782036431 0 0 0 +-0.0086472642583167447 -0.0010871942710117544 0.087752762002141188 0 0 0 +-0.075842770763109468 -0.15651646025415325 0.030800859999998931 0 0 0 +-0.28443159798093609 -0.065294131882883161 0.075872974540122345 0 0 0 +-0.029524620719233119 0.07869080805101103 -0.1643135354938102 0 0 0 +-0.25220796469729628 0.091173884172774833 0.016502749394435912 0 0 0 +0.008024865646229562 0.14452897623616784 -0.0042351400084285895 0 0 0 +0.016086297711355113 -0.053609942556968437 0.091676697471253094 0 0 0 +-0.032225452841185054 -0.063697563265120161 -0.0043272567406482942 0 0 0 +0.12300025152262756 0.19558917295121958 0.058901214993901524 0 0 0 +0.15921657716244925 0.15106641282402256 0.061786883029203404 0 0 0 +-0.10891201430034131 0.017277880298611215 0.10227292559809889 0 0 0 +0.096968041387509973 0.075800916020992648 -0.078351947274093045 0 0 0 +-0.27696599639941244 0.073698771310398314 -0.036743822033158041 0 0 0 +0.071725046729491926 0.080633642827802776 -0.11893072754433472 0 0 0 +-0.085252724639950372 0.00070577546010258674 0.076364428070907459 0 0 0 +-0.04255377541638683 -0.18613426059343621 -0.024735202691240243 0 0 0 +0.071246781763394773 0.14828435739401957 -0.022271127396406604 0 0 0 +-0.079212360359102063 0.014304702637691957 0.15823657166469748 0 0 0 +0.065138999214596038 0.10715089423538976 -0.010095953553233755 0 0 0 +-0.043289279243128864 -0.1446438109486578 0.15014299521697497 0 0 0 +0.033143880225755262 0.076012763974937114 0.18113052695054141 0 0 0 +-0.10567861980904597 -0.048768753945993726 -0.062658348066003511 0 0 0 +-0.1216578437264334 -0.11403570237383108 -0.031747989521525799 0 0 0 +0.013314248619493985 -0.090547935778359429 -0.095445194371189923 0 0 0 +-0.28488560219610348 -0.16499666308135585 0.010637667777527116 0 0 0 +0.11487186147795053 0.12808993277553421 0.0017443352600350071 0 0 0 +0.084218349015593941 0.061260762199034924 -0.010655573900261422 0 0 0 +0.25409592761771277 0.064944663729052499 -0.06507061021671956 0 0 0 +0.21230938979668074 0.11599519987721041 0.058221860475190429 0 0 0 +-0.40990814056936653 0.024246462386145251 -0.051268818049842485 0 0 0 +-0.061086855096733228 -0.1089148047439349 -0.10234670891760149 0 0 0 +0.29082559764146104 0.11169628723264718 -0.036980829519502351 0 0 0 +-0.36594800491187024 -0.0083714174174964462 0.013106369060301687 0 0 0 +-0.12951519041545462 0.18187441899273588 0.038546408592332632 0 0 0 +0.065733056189613392 -0.011523179240692877 -0.0047251650317614025 0 0 0 +-0.18051765316955748 0.1468319637148357 0.043349021687188655 0 0 0 +0.0031071564853540345 0.051111588012537901 0.099747556102278617 0 0 0 +-0.1786810926324176 -0.0026241832888131145 0.11474963499472615 0 0 0 +-0.15387074186019833 0.10706757797681865 0.0076675002312902307 0 0 0 +-0.041068844605693655 -0.046234920362297927 0.14756209363099512 0 0 0 +-0.14639358356313553 0.022723060059874317 -0.10370617796925502 0 0 0 +-0.0087081583728036427 -0.11056202060510685 -0.13197634880540332 0 0 0 +0.047545799346109863 -0.083661810018655386 0.080465961452752838 0 0 0 +-0.17203737264392205 0.0053800552623644304 -0.034906129156189514 0 0 0 +0.25841403744752983 0.15184391400976666 0.045265133589959705 0 0 0 +-0.2588897533328785 0.064218709983206779 0.035815797197652988 0 0 0 +-0.094362652486113419 0.11684930022366669 0.12426676432231257 0 0 0 +-0.048261009558630219 0.13656189633108534 0.029666155968028129 0 0 0 +0.28385533099892307 0.13140670449188907 0.032268117410983427 0 0 0 +-0.13103197522403909 -0.16972832285998996 0.024831313368842006 0 0 0 +0.26805102914398532 0.11081918015135872 0.014964589932796535 0 0 0 +0.06195647188205039 -0.077745636231125348 0.098960556539084282 0 0 0 +-0.41507570205800937 -0.066145912022684716 -0.0055824748221202647 0 0 0 +-0.12030106279898906 -0.19766902158569871 0.0085144868972292231 0 0 0 +0.081157687004660251 0.17401015767587952 0.11032490379742391 0 0 0 +-0.18057448556014338 0.056951777977094054 0.062177051204693495 0 0 0 +0.032402594451145184 0.060002756559968007 -0.042570633016495024 0 0 0 +-0.23094547533423176 0.15526585215015942 0.02150382496467465 0 0 0 +-0.1363662786415662 0.1756191414232417 0.075912054011506941 0 0 0 +0.0026965924602141422 0.066221710355105323 0.17065991762926244 0 0 0 +-0.19955022512277826 -0.11639835748024006 -0.022121006021622092 0 0 0 +-0.29943588231969864 0.027939157698571193 0.013547792528721042 0 0 0 +0.16090621727054938 0.042035135553512237 0.13403183483389394 0 0 0 +-0.27650423870552565 0.075099425430661504 -0.0014154714307589578 0 0 0 +-0.2499767786600674 -0.1314142406232981 0.0020147904269150474 0 0 0 +0.1575476700612693 0.046077642980969502 -0.026696508708471428 0 0 0 +-0.41722341037260835 -0.0070634167116349622 -0.063320749292177597 0 0 0 +-0.047980972061846427 0.19729692044028452 0.066849907927498203 0 0 0 +0.1153316521758469 -0.00036956482608385688 0.035715622161145794 0 0 0 +-0.17744607688173653 0.046530383129957609 0.082682076256928055 0 0 0 +0.01673470424052087 0.091037265273203605 0.17325766205138757 0 0 0 +-0.083006947309314294 -0.059354712764544432 -0.10669378314538346 0 0 0 +-0.039743105180198357 0.043684380123022948 0.08849129107296419 0 0 0 +-0.042853538803027502 0.14074141139392832 0.10464757112846665 0 0 0 +-0.09246183107804512 -0.076440102444884389 -0.045270539761973067 0 0 0 +-0.055714049952887035 -0.010223696239848645 0.16099282787763372 0 0 0 +0.088762155479863269 0.16311012987599705 0.059824154630672671 0 0 0 +0.0083445351834548487 -0.099148141030224513 -0.15295627025376818 0 0 0 +-0.046274970174995267 0.2069238660768834 0.0065109429127336582 0 0 0 +-0.40998593837850261 0.046525823676503708 -0.015421336329512286 0 0 0 +0.092528095334772853 0.21548676746894418 0.079820192731477307 0 0 0 +-0.26885597178627041 0.084925477696208729 -0.040039615579059357 0 0 0 +0.095529860837522407 0.1906571150411791 -0.0064347290512770383 0 0 0 +0.1908217672556522 0.052723953440216798 0.046984010104321405 0 0 0 +-0.35524007705226313 0.013699894178385352 -0.046982076031413855 0 0 0 +-0.086765411067840192 0.034722730881003194 -0.038882160686294548 0 0 0 +-0.06003751772106164 -0.056664623661068281 -0.0056029866668800832 0 0 0 +-0.013903197718402427 -0.08045728121741863 0.033899333319556441 0 0 0 +-0.12530258488430879 0.018678960207744483 -0.00079220054160197839 0 0 0 +0.021019396301186599 -0.026997375697823733 0.18875424362795426 0 0 0 +-0.010624580458772903 0.1510348431922961 0.0012853328889273208 0 0 0 +-0.27551898382958029 0.027725776005140479 0.11734093563229267 0 0 0 +0.1933080762629304 0.12681112794986643 -0.071028537021110283 0 0 0 +-0.020846181503010486 -0.022480002092700013 0.12959552910622815 0 0 0 +0.0130836592478491 -0.16108673427115336 0.037400062456676264 0 0 0 +-0.19467902247382562 -0.063233993985820108 -0.016066128393515955 0 0 0 +-0.034975473845384575 0.031819852504626822 0.14874435090318369 0 0 0 +0.03960631611962101 -0.012193451667876942 -0.17803561545971733 0 0 0 +-0.26529789598045406 0.0047916964321266797 0.022372150691644749 0 0 0 +-0.031433460895393561 -0.13770341145804571 0.058976821187356004 0 0 0 +-0.026415177585643268 -0.084557708139439136 0.1302506244310653 0 0 0 +0.022445738596343412 0.14546614375042261 0.010526387511090363 0 0 0 +0.040680009100399872 -0.11829191362070526 -0.034396834226349843 0 0 0 +-0.31776096719579072 -0.002712883377780223 -0.068943607096438764 0 0 0 +0.075364919336100511 0.1345318887794274 0.036562913649597684 0 0 0 +0.17848130188066974 0.17611154954548874 -0.030950256010390809 0 0 0 +-0.018658911438316605 -0.080821227252633798 0.052702270672045165 0 0 0 +0.093317503165563032 0.084282661797400571 0.11922332065047228 0 0 0 +-0.16393464953501247 0.1060352421523309 0.018374044590888539 0 0 0 +0.075229319431919073 0.16601787719522226 0.024490925568580152 0 0 0 +0.30420472646286473 0.11053653815819836 -0.030952819898165285 0 0 0 +0.026571206016163307 -0.01730399693105511 0.14697901104688274 0 0 0 +0.1850678947126097 0.13544571972240133 -0.054903235992199262 0 0 0 +0.10206216306850774 0.021693363355334838 0.11646009083357919 0 0 0 +-0.16987929839272053 0.05289907903173241 -0.068262611140054635 0 0 0 +0.16002012242263414 0.058314008935422601 0.1323709763282486 0 0 0 +0.020040695433206801 0.09341200246007042 0.098976347904636969 0 0 0 +0.021998553300609347 0.067912199473263657 -0.048296603811641692 0 0 0 +-0.075452551258457845 0.13915425318138908 -0.070562712714738213 0 0 0 +0.023822362942127417 -0.040010216703978391 -0.01630301762654679 0 0 0 +0.034345950966551853 -0.11581660009092466 0.052582526661389045 0 0 0 +-0.028628504206251848 -0.013398060855317417 -0.15385362874714378 0 0 0 +-0.22618676331533821 0.051031158465431048 0.0024276879288437914 0 0 0 +0.12683621945803519 -0.029689238636019188 0.13947714800438701 0 0 0 +-0.18729740954261276 0.12589009479243868 0.04968883058128179 0 0 0 +-0.044860164566407956 -0.079104405405999639 0.13374732255963143 0 0 0 +0.17780850611284366 0.19653995649959799 0.030670185633230013 0 0 0 +-0.085951573940450388 0.05500715565809422 0.016861132675777657 0 0 0 +-0.22101711956965275 -0.028909590086486664 -0.025844702059752311 0 0 0 +0.16811271162866609 0.18984936549711878 0.066775110386215614 0 0 0 +-0.16200715520782866 -0.090086615383936558 -0.075195834839088843 0 0 0 +0.046266713815522331 -0.10641335938606086 0.057515248660544888 0 0 0 +-0.30009345682633348 0.039008522888654362 0.084608689870755677 0 0 0 +0.033909929365063929 -0.13298215223651988 -0.096247183330840896 0 0 0 +0.26089717734272816 0.047711540303360167 -0.013988216997921937 0 0 0 +-0.12473789264635887 -0.1124883464251049 0.016791993843288167 0 0 0 +-0.13468818655718823 -0.11652667006997253 0.023875587861680425 0 0 0 +0.071922934462129995 0.011084057042348189 0.025648804651017293 0 0 0 +0.01200722910050761 -0.1462992106089876 -0.1616902908677631 0 0 0 +-0.099375289515922838 0.088823785768622543 -0.083564178708351686 0 0 0 +-0.15712757478094896 0.034545590502817192 0.05074913007395529 0 0 0 +0.039590374949234508 0.22094486096971061 0.093030171246990562 0 0 0 +-0.27962647808334795 0.0075943066699071526 -0.0068797068021763108 0 0 0 +-0.4675626398692676 0.011931463850691909 -0.043392768293787715 0 0 0 +-0.039581966072169628 -0.11862558131247249 0.014356911587687204 0 0 0 +-0.13029123703390366 -0.02640797831113173 0.00042226395799732641 0 0 0 +0.23837023909109406 0.088818125646655921 0.10456640758620203 0 0 0 +0.15950377331534166 0.07049683322454009 0.058733982903016707 0 0 0 +-0.21336755870337137 -0.048412108861987491 0.0021336632243841858 0 0 0 +0.018953452665447179 -0.034926113615006693 0.15499527971579555 0 0 0 +-0.0073016031881282251 -0.067688508902651739 -0.054322077020071441 0 0 0 +0.044614768984280462 -0.087780682936977134 0.033598814336187666 0 0 0 +-0.32832586326972818 0.074011803020352929 -0.047547933730214376 0 0 0 +0.1735348057996085 0.091540578345309931 -0.062581235581520012 0 0 0 +0.20887865024445568 0.06447497726870699 -0.068334994791486303 0 0 0 +-0.097245688901587912 0.16415960198906948 -0.07820518340233433 0 0 0 +-0.11827783075226472 0.073157376906858751 0.070873251550169186 0 0 0 +-0.38177836407853294 0.035338503617893868 0.011406807377567524 0 0 0 +-0.020997264556610051 -0.015574627377703792 0.087382194916692107 0 0 0 +-0.29519476498327224 0.013374660233266639 0.11494144632455941 0 0 0 +-0.053027295551325682 0.07561276338901185 0.13788717558427108 0 0 0 +0.10854021853552892 0.0434068182537104 -0.048527215780085869 0 0 0 +0.006777035511871754 0.026040707770433713 0.081378009718019978 0 0 0 +0.019657413132281476 0.14843205494303441 0.033634708579389383 0 0 0 +-0.077653645091322276 0.073992183320325311 -0.14679536247218958 0 0 0 +0.038640507861671447 -0.10508652908839193 -0.084999746644658966 0 0 0 +0.1095154438104014 -0.026848726763416098 -0.038371453028487046 0 0 0 +0.25139381893236884 0.16443931893263292 -0.048657039725459178 0 0 0 +0.10510751274312374 -0.014347154313165716 0.1563870473302291 0 0 0 +0.14927628753305172 0.15297781482979605 -0.064761582749651742 0 0 0 +-0.032854304671499468 0.099969203319123456 0.14252230615854075 0 0 0 +-0.1801936233634106 -0.020983766938284049 0.10796234089682158 0 0 0 +0.038458361387627649 0.0051936546187926758 0.1032996847753804 0 0 0 +-0.33878867319652817 -0.044677007933778712 0.036170526507300793 0 0 0 +0.11013784820198541 0.013130684067428094 0.012260142594235024 0 0 0 +-0.08632685069996171 -0.046618792160063538 -0.014848681571340644 0 0 0 +0.031644086785800718 0.11035105677309259 0.038263745673656924 0 0 0 +-0.093003839185098247 -0.13141520850051336 0.0034109562477893096 0 0 0 +-0.042645269261773255 -0.14134760924682582 0.10470618448785227 0 0 0 +-0.038916718202694378 -0.20308335285765261 0.071870097465808497 0 0 0 +-0.11329734173050621 0.066833746730407206 0.077237058812539089 0 0 0 +0.02599582662228489 0.080630282137078235 0.15941027404293837 0 0 0 +0.030473123302438732 0.11079262296275422 -0.13533597816314641 0 0 0 +0.28125363774231632 0.13159429211831697 -0.063897575217853775 0 0 0 +-0.10467762934308272 0.024383106773078422 -0.071487565010675214 0 0 0 +-0.0091763892029668725 0.12000480740399144 -0.0847635049274168 0 0 0 +0.080533314483370588 0.11153952303652559 -0.11819290186723973 0 0 0 +-0.14071613703375452 0.1736663335916479 0.076966187252908463 0 0 0 +0.15050475229900789 0.19445639785870583 0.08606729028524554 0 0 0 +-0.011042046164560615 0.10826099949744389 -0.070974773161422922 0 0 0 +-0.04727414065004798 0.16068894057982508 0.025454948485630097 0 0 0 +-0.094967832719532352 0.20602586535582923 0.064773177951192945 0 0 0 +0.27257187674035782 0.11251777810584568 0.023668516842102638 0 0 0 +-0.022491453286183571 -0.03714633591898811 0.030456075292783324 0 0 0 +-0.19282116471746708 0.084713305474482914 -0.037382389740258454 0 0 0 +-0.14353133495081916 -0.092870856944219676 -0.037798473769857094 0 0 0 +-0.38372914264989555 0.048507179709446624 -0.082868102948346636 0 0 0 +0.063951900317631594 -0.039330635178479845 0.03922007451405049 0 0 0 +-0.039881857568635659 0.12065898381248114 0.12813005811853331 0 0 0 +-0.2880138196545351 0.044456319709375969 -0.047273661227565267 0 0 0 +-0.011551192778754105 -0.088250890281896116 -0.16267337930058501 0 0 0 +-0.070182148568308955 -0.0029623596734898172 0.15768049594681802 0 0 0 +-0.22990903434764132 -0.042203013321433697 -0.0064544910920602272 0 0 0 +0.199039496708801 0.12992306137934934 0.11075085093305817 0 0 0 +0.056190618613958299 0.085848423905038718 0.024981797486129692 0 0 0 +-0.16383764281018176 -0.14518732829952147 0.055191135537073971 0 0 0 +0.05431915854181163 0.11112862328358786 -0.020195137756387233 0 0 0 +0.18595502653209023 0.17679067551116506 -0.056504388455565546 0 0 0 +0.1809374098469177 0.024847597452639592 0.070904932671001647 0 0 0 +0.26841093007912392 0.06141386799491011 -0.019262180745914098 0 0 0 +-0.19406005664065018 -0.011921385430665704 -0.051130322813617984 0 0 0 +-0.15439134542298738 0.060205714350723638 0.03554313772960474 0 0 0 +-0.055555978678374141 -0.15349785533289428 0.028586067887909239 0 0 0 +-0.46241777195914885 -0.022637367490712101 -0.011021141302447773 0 0 0 +-0.017332752538172125 0.060665190873726738 -0.044973904573849394 0 0 0 +-0.046982252049660334 -0.12594799352268504 -0.10865276642249198 0 0 0 +0.062482292046693588 -0.10261736122553192 0.008157001932659641 0 0 0 +-0.0029068829269661145 0.11871541932609164 -0.034301662214643314 0 0 0 +0.10867897810416288 0.19194788886052228 -0.044761233322391736 0 0 0 +-0.046000183291523777 -0.062197231713355533 -0.17384010262391389 0 0 0 +-0.097056537578806779 0.020073731459348459 -0.0049205384409963249 0 0 0 +-0.14548753494859445 0.1148680692715589 -0.0036843645265819402 0 0 0 +-0.063418918362718568 0.10652995077671762 -0.048473004896883859 0 0 0 +-0.063489878735072003 -0.072585019439066784 0.055748461732692073 0 0 0 +-0.33568084938624643 -0.027733367823222665 -0.034122983314399141 0 0 0 +0.072889588471669653 -0.05864762052325348 0.15540649716672442 0 0 0 +0.11993627830730053 0.020365197434228377 0.12063729816784199 0 0 0 +0.06750954304421547 -0.036569277413988965 -0.17293908050551265 0 0 0 +-0.049766269395703 0.0099377571561830025 0.0057994492968567735 0 0 0 +-0.058609819502444038 0.079131434420973534 0.066665571246665917 0 0 0 +0.21290510842037619 0.05566482147919527 0.0997762521159202 0 0 0 +-0.0030244839675492297 -0.023564675036947258 -0.0059405805701753245 0 0 0 +-0.05758650278170363 -0.023932391488293653 0.01142290542204305 0 0 0 +0.0061692662506852569 -0.094754305096790198 -0.1554535596927665 0 0 0 +0.0010469211059901395 0.036456914547248254 -0.18121931321829324 0 0 0 +0.16403800215302494 0.041229976296471404 -0.038724861873741245 0 0 0 +-0.40209061109428063 -0.014054136821900043 -0.091522110808601592 0 0 0 +-0.0077370072927000488 -0.047694481344675188 -0.008479802040079143 0 0 0 +0.15522701423831281 -0.003345106172098794 -0.027404576691077542 0 0 0 +-0.38226603699183093 -0.010829863453980071 0.028711061268965721 0 0 0 +0.095908875078367928 0.15226497401040001 0.063785868970362009 0 0 0 +-0.24993360905008394 0.13533206986206814 -0.015947658065722792 0 0 0 +-0.084859874537971391 0.03482573687630236 -0.10939480206605931 0 0 0 +0.15850673951566446 0.12301238871994147 0.090903169132462686 0 0 0 +0.07588115242653054 0.11114319648595106 -0.064784337137624631 0 0 0 +0.054851883788248512 -0.044690263289603877 0.10007952805369766 0 0 0 +0.30131616734241368 0.12962090120725006 -0.03552282891106559 0 0 0 +-0.35952365693825067 -0.042061510272268232 -0.038557334984957226 0 0 0 +0.0056661676295426955 -0.050771428122495327 -0.10995743907924695 0 0 0 +0.045319407034940029 0.1410862196330181 -0.095874161885804027 0 0 0 +0.24272477292504852 0.028758649634383127 0.030045405668429087 0 0 0 +-0.41722100311718885 -0.07129543474437483 -0.0532943499106448 0 0 0 +0.010087258107843777 -0.1138913314609984 0.15058026663891225 0 0 0 +-0.036553498551612773 0.097315687080776758 -0.042843700152167125 0 0 0 +-0.084014401841831898 -0.050770146043935815 -0.014838882325807129 0 0 0 +-0.031306923533161224 -0.026883454472048679 -0.016064475074819284 0 0 0 +-0.40159636225452183 -0.029033058792373168 0.0037536684589427882 0 0 0 +-0.14494484358913967 0.026390558009418197 0.13353119096003704 0 0 0 +-0.00047404030964248722 -0.0096216361320414778 -0.13270753614617745 0 0 0 +-0.29436809608857151 0.020071811125842831 0.085317806168057481 0 0 0 +-0.071028590591002749 0.0024896492015169802 0.052011595765491941 0 0 0 +-0.20237139507397084 0.1448458796691629 0.022564999197714042 0 0 0 +-0.1891650225409493 -0.13210636535774406 0.092855076331785386 0 0 0 +0.00057452613964670274 -0.043194054693447448 -0.090588580724378573 0 0 0 +-0.048331954058969895 -0.065103005582556134 0.052683872164366291 0 0 0 +-0.022026353777591157 -0.027978276526656937 -0.075351787568791295 0 0 0 +0.10272266407215497 0.064880014285859655 0.10947109798083546 0 0 0 +-0.14012463318552126 0.079930334710131834 -0.11995805998100713 0 0 0 +0.021659318105285041 0.13166324978239602 0.12012033515108514 0 0 0 +0.10618371161255052 0.085496146583822985 -0.012490203329539401 0 0 0 +-0.061210695350342459 -0.055456712039730516 -0.060244789769864165 0 0 0 +-0.065178879805665946 0.083694979346062015 -0.062030224892533375 0 0 0 +0.23287136518732637 0.084850930375222566 -0.079687143394439011 0 0 0 +-0.047278458593599526 0.031988734335005264 -0.18423004777720337 0 0 0 +-0.0014853075266070825 -0.074231765390389143 -0.049923328136353751 0 0 0 +0.064480821571438474 0.040644048617875628 0.030203371303434479 0 0 0 +-0.1251756749076583 0.19318933585314868 0.036563948598141771 0 0 0 +0.29484301254859185 0.15383286677582469 -0.046869271652412586 0 0 0 +-0.30268003047821812 0.10689763917054795 -0.019592435889416365 0 0 0 +-0.37157279301237783 -0.014243999677285096 0.00070335950975677908 0 0 0 +0.014417455231945431 0.11405341672182312 0.099551445698295743 0 0 0 +-0.39148592312604891 -0.045069104438988983 -0.029921335415010797 0 0 0 +0.10201478057258756 0.019725475786831675 0.12535451566268271 0 0 0 +-0.15888899796078215 -0.1886707249440793 0.036187201152705128 0 0 0 +0.027913123936441242 -0.11667910462725677 0.10091345097721552 0 0 0 +-0.23365098932233641 0.015987226848153846 0.011420810092138606 0 0 0 +-0.19407053594877949 -0.074711259987312373 -0.036013646435803737 0 0 0 +-0.13261287276475692 -0.042082978555664896 0.06283840170283897 0 0 0 +-0.44269063955028776 0.026233987003216497 -0.046907070200935458 0 0 0 +-0.14750943299035313 0.1240637567500551 -0.083961591709291558 0 0 0 +0.1749319768451037 0.17713410636181243 0.094390582426690933 0 0 0 +0.13107794786699106 0.091075485178781168 -0.030844948928591798 0 0 0 +-0.21395319897623738 0.05955550111992608 0.088943867852330688 0 0 0 +-0.090560664264725088 -0.12835496858135612 -0.032846179083732413 0 0 0 +0.075373229091111493 -0.062752602186778583 0.16582453741375638 0 0 0 +0.056813193440737597 0.13476625042696716 0.056460980458140381 0 0 0 +0.038316395672215064 -0.026026740707185608 0.079054277901151687 0 0 0 +0.010737058728884363 -0.056895031340634922 0.0001104010103801234 0 0 0 +-0.10698175068466231 0.039377433390780814 -0.1342471692260308 0 0 0 +-0.072692731553195056 0.21298267827917261 0.046972343681665613 0 0 0 +0.19266345218580444 0.13511775648775975 0.11866486445812088 0 0 0 +0.078729924943358565 0.026787490473832443 -0.083439443368277508 0 0 0 +-0.15495492888740497 0.13370531478386788 -0.01340294329315192 0 0 0 +0.044839475507398585 0.1306961374021936 0.12535573328196539 0 0 0 +-0.076054452787321092 0.059039170645432515 -0.080976536497863003 0 0 0 +-0.47151959487485934 -0.029814187964872924 -0.058028157955519383 0 0 0 +-0.067977334637744413 -0.094482272914121396 0.053044790559128391 0 0 0 +-0.048462802562462215 -0.11756332396760398 -0.029674648050292379 0 0 0 +-0.35890322218799264 -0.088729674659557195 -0.050904348528497373 0 0 0 +0.20780402723925179 0.09923296381638802 -0.017607709218683182 0 0 0 +-0.12732112675096841 0.018420107347174058 0.11183564816828354 0 0 0 +-0.10960823640465972 -0.11338416037334037 0.020230053550934407 0 0 0 +-0.36044424280577109 -0.015777648993954063 -0.015396549172650098 0 0 0 +-0.1311880813920871 -0.0077981055547027001 -0.10303911938181193 0 0 0 +-0.11334684994255428 0.0994183089833241 -0.13431694350764434 0 0 0 +-0.030745172152617073 -0.054772339104366491 -0.12699639639571914 0 0 0 +-0.15920399848062783 0.13612903182664188 0.085735555026094451 0 0 0 +-0.074728373625150446 0.030546637764225226 0.13783583229751048 0 0 0 +0.18349636543905828 0.1408242673807279 0.091189676119210666 0 0 0 +0.056390613167469794 0.0088376133832372694 0.08644365438202864 0 0 0 +0.21798905803008234 0.11869382146409013 -0.0067951566112497697 0 0 0 +-0.18672901761383753 0.076674219702505042 0.051405860153389632 0 0 0 +0.29738745960853991 0.14649341722796205 -0.011444298996499264 0 0 0 +-0.056485473658377361 -0.0045960430305479194 -0.1140609085110235 0 0 0 +0.03986155510653272 0.067197458881595173 -0.021039344819716171 0 0 0 +0.065225412881865619 -0.02385043120021374 0.06936437714104679 0 0 0 +0.047239665991282098 0.22552538047785214 0.069746526368140244 0 0 0 +0.15862386855279093 0.15243125420224479 0.071527777328435321 0 0 0 +0.19222925133103735 0.18060177418401602 0.0077153154109511624 0 0 0 +-0.039411354017264699 0.023574968707383126 0.089891644212109517 0 0 0 +-0.29226548999058322 -0.059510023752676333 -0.0047350539418952453 0 0 0 +-0.40327223716974026 0.013299054222952106 0.0086328055563298922 0 0 0 +0.052296847827695225 -0.10008091914955808 -0.11694572426851978 0 0 0 +-0.26616663931618911 -0.046896271784443416 -0.037815950198716475 0 0 0 +-0.29918401197875388 0.00054986327008016422 -0.026716761955325963 0 0 0 +-0.14992677885367539 -0.02082327109252291 -0.071165169164314396 0 0 0 +0.1811965900060068 0.011643104121276171 0.095053779681449263 0 0 0 +-0.065203444770192742 -0.041478827841640004 -0.078436008857922165 0 0 0 +0.06801020153219578 0.082162078800967431 0.021894767820034633 0 0 0 +-0.059359065091952268 0.13795358318353534 -0.064221301738862868 0 0 0 +-0.03181524858169027 0.13697335851942188 0.11683263907972116 0 0 0 +0.02445956836444324 0.021858206402653346 0.035541130579172631 0 0 0 +-0.25069112584828401 0.044482001117955416 0.11020180321194697 0 0 0 +-0.38482942654438551 -0.062764285250805324 0.030349273429696927 0 0 0 +-0.098822013034913725 -0.11415021366416199 -0.096428012882005879 0 0 0 +-0.19289778006157843 -0.054239148847038399 -0.0073428996474519392 0 0 0 +0.060030052316940863 -0.013816029174693406 -0.17772140638121217 0 0 0 +0.150461813211129 0.020151370033232946 0.12126005780170021 0 0 0 +-0.21487102046802875 -0.081036441894329153 0.021747221285843304 0 0 0 +-0.25188654394788668 -0.082261575476056448 -0.0012551548381997124 0 0 0 +-0.2224512164772442 -0.019110822363167079 -0.0008700696987789247 0 0 0 +0.13008934664147903 -0.036268413670476535 0.091310992694730891 0 0 0 +0.29173806761928128 0.10899640627023621 -0.027368533192516309 0 0 0 +0.0058042125796526345 0.077193771222681284 0.064018963887107067 0 0 0 +0.16328566756731594 0.089418852701179663 0.11951167699280704 0 0 0 +-0.18065854374499063 0.08706939126689639 -0.039621880272814991 0 0 0 +-0.22193035593899435 0.076715504731080464 0.075716044039302016 0 0 0 +0.020051497094377313 -0.057606851594655784 -0.08414754550882661 0 0 0 +-0.026507283259369463 -0.070513651896004115 0.17400371645120297 0 0 0 +0.17593314190321835 0.15015814455133719 0.080060387488055523 0 0 0 +-0.059126008755883697 -0.15519346162795603 -0.034628143276728224 0 0 0 +0.010443846326968542 0.038870562582798751 -0.043186937356052918 0 0 0 +-0.38715981871406552 0.059108667185164054 0.011729528652591636 0 0 0 +-0.051066894382671479 -0.14260742641620619 0.0068552731707948178 0 0 0 +0.1756239732147124 0.15931608417590054 -0.045220737109825465 0 0 0 +-0.41942967659243152 0.026185638548511081 0.025620976694665842 0 0 0 +0.044913144325527787 0.12071925842495962 0.093445678118737413 0 0 0 +-0.0018367210913426413 0.12519964986790622 -0.11254550789274088 0 0 0 +-0.16994714218180162 0.067828267876954285 -0.033105975301633589 0 0 0 +-0.21438210613651204 0.0070657039235490215 0.089525746368953024 0 0 0 +-0.25481902508735427 -0.022918127702679036 0.089035894548668032 0 0 0 +-0.10890919248303865 -0.099360562985261441 0.057984824028850995 0 0 0 +-0.041929208651881267 -0.059912645039111867 0.0018498951848684719 0 0 0 +-0.16795794464533453 0.16709353168275298 0.0067648435439327803 0 0 0 +-0.2064519794621319 0.079913789771180133 0.0085127272062427428 0 0 0 +0.082672940919727489 0.043471374314635991 0.11370894735927137 0 0 0 +-0.32906592047489247 -0.06656870216541691 0.013949924709381084 0 0 0 +0.0087280328902811233 -0.056196926714210782 -0.16810255080096889 0 0 0 +0.095226259446793693 -0.022348423907946335 0.06809163993328668 0 0 0 +-0.044477470285801735 -0.046607989588011073 -0.023801508500378099 0 0 0 +-0.12911451276535868 -0.030392348423461918 0.0061932354296878878 0 0 0 +-0.17797311956934403 -0.018399547410184069 0.034929755193658651 0 0 0 +-0.3274483325069491 -0.08231480358258636 -0.05608416333230351 0 0 0 +-0.34918220896348362 0.092709305396547537 -0.048655691971839415 0 0 0 +-0.12616324709761195 -0.22092892945197737 0.071428662116365532 0 0 0 +0.012141599679433235 0.21746110848032679 -0.010607173394544978 0 0 0 +-0.41851636993274327 -0.0052534079294344616 -0.036309210289748373 0 0 0 +-0.19583816244065533 -0.13648407721496794 0.0028597237178143164 0 0 0 +-0.421832956828326 0.032214739554700444 -0.023857562798655113 0 0 0 +-0.28061467759574998 0.062933197911937688 -0.016214286429143049 0 0 0 +-0.058663765831862169 -0.18948695556846029 0.058918816544791225 0 0 0 +-0.14783837934171318 -0.14399209482022376 0.014760601110649751 0 0 0 +-0.3880648103280715 0.012232501722147682 0.064351852348115773 0 0 0 +-0.1306700804616488 0.060681614158715591 -0.022782465862313278 0 0 0 +-0.2392790387437656 -0.020252205972811216 0.098352070655649076 0 0 0 +-0.31464388130967275 -0.042595362344288734 -0.0028562835395187225 0 0 0 +-0.087745354109848905 -0.078262665787546454 0.048926566195471199 0 0 0 +-0.23831137232649141 -0.028283243735441943 0.0024796167273009317 0 0 0 +-0.20206648915487346 0.028853905115677481 0.02008183666711208 0 0 0 +-0.33364777782470922 0.021610357014517745 0.095620567070350077 0 0 0 +-0.12712852061985996 -0.12457854321554165 0.022895995976989159 0 0 0 +-0.40254366185490742 0.05436304033218603 -0.025003865865600772 0 0 0 +-0.28714144465089081 0.12560238188514949 -0.0251551751571088 0 0 0 +-0.050912994802440548 0.076095934163080969 -0.037838561086200651 0 0 0 +-0.10031955907330153 -0.077983930428687037 -0.0084821706335274361 0 0 0 +-0.11374627408146865 0.14334289229144809 -0.07601950313971377 0 0 0 +-0.026334308541845597 -0.1323157780906358 0.062515541011428005 0 0 0 +-0.023302727461257056 -0.098967591985103215 0.067968316949898383 0 0 0 +0.041284601691404743 0.2038288290549316 0.039793072522420897 0 0 0 +-0.13008813118779106 0.16607775707485989 -0.0052213886078991967 0 0 0 +-0.16355717185626045 0.04812047710106937 0.11212756454796904 0 0 0 +0.19580077791270095 0.013357490104319053 -0.054776539911941619 0 0 0 +-0.073434968514915155 -0.042934624404912358 -0.054349192486286169 0 0 0 +0.078776544070998156 0.055274966148399718 0.032774565536173056 0 0 0 +-0.066270710341210959 0.10605378495777162 -0.089992314102480653 0 0 0 +-0.097555721481128177 0.11084903399101365 -0.024483443800194182 0 0 0 +-0.21983068087287949 -0.058190369111201734 -0.031415300067663188 0 0 0 +-0.059298637312345692 -0.045676322417806836 -0.064518851023243284 0 0 0 +0.081685614368082027 -0.061076968345400884 0.14276191540342245 0 0 0 +-0.22297438072491904 0.037695427494738254 0.066763549222003643 0 0 0 +0.03387447015261974 0.19765335198731721 0.066151715860156363 0 0 0 +-0.091792174567796814 0.15094071879300519 0.070605743062794185 0 0 0 +-0.13104013381701429 0.17577040356187662 0.086018663297515813 0 0 0 +-0.32824998673006661 -0.010222335985767217 -0.012948886955059608 0 0 0 +0.23246595994456204 0.087023074947401857 0.081051645424120605 0 0 0 +-0.20895364766595886 0.081445504404316194 0.08086931923525828 0 0 0 +0.019900918921977262 0.20448771527089271 0.00040937119093212293 0 0 0 +0.021782064323660422 0.0083780421928898174 -0.063444677279566875 0 0 0 +-0.16904687967208448 0.11442875496528759 -0.018520889708375565 0 0 0 +-0.12983210766991371 -0.010592970204607144 -0.081080219777883489 0 0 0 From 0e45fdc64eca3f54da446089268b8d36d417f6e0 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 16 Apr 2020 14:18:01 +0200 Subject: [PATCH 114/138] use "permanent" coplanar_orientation() and collinear() instead of generating it on the fly each time --- .../Triangulation_segment_traverser_3_impl.h | 38 +++++++++++-------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h index b0068beedb1..d18fcf902e8 100644 --- a/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h @@ -758,10 +758,13 @@ walk_to_next_2() &(cell()->vertex(1)->point()), &(cell()->vertex(2)->point()) }; + typename Gt::Coplanar_orientation_3 coplanar_orientation + = _tr->geom_traits().coplanar_orientation_3_object(); + switch( lt() ) { case Tr::VERTEX: { // First we try the incident edges. - Orientation ocw = typename Gt::Coplanar_orientation_3()( *vert[li()], *vert[_tr->cw(li())], *vert[_tr->ccw(li())], _target ); + Orientation ocw = coplanar_orientation( *vert[li()], *vert[_tr->cw(li())], *vert[_tr->ccw(li())], _target ); if( cell()->neighbor( _tr->ccw(li()) ) != prev_cell() && ocw == NEGATIVE) { Cell_handle tmp = cell()->neighbor( _tr->ccw(li()) ); _prev = _cur; @@ -769,7 +772,7 @@ walk_to_next_2() li() = cell()->index( prev_cell()->vertex(li()) ); return; } - Orientation occw = typename Gt::Coplanar_orientation_3()( *vert[li()], *vert[_tr->ccw(li())], *vert[_tr->cw(li())], _target ); + Orientation occw = coplanar_orientation( *vert[li()], *vert[_tr->ccw(li())], *vert[_tr->cw(li())], _target ); if( cell()->neighbor( _tr->cw(li()) ) != prev_cell() && occw == NEGATIVE) { Cell_handle tmp = cell()->neighbor( _tr->cw(li()) ); _prev = _cur; @@ -779,7 +782,7 @@ walk_to_next_2() } // Then we try the opposite edge. - Orientation op = typename Gt::Coplanar_orientation_3()( *vert[_tr->ccw(li())], *vert[_tr->cw(li())], *vert[li()], _target ); + Orientation op = coplanar_orientation( *vert[_tr->ccw(li())], *vert[_tr->cw(li())], *vert[li()], _target ); if( op == NEGATIVE) { Cell_handle tmp = cell()->neighbor(li()); prev_cell() = cell(); @@ -842,7 +845,7 @@ walk_to_next_2() if( cell()->neighbor(lk) != prev_cell() ) { // Check the edge itself - switch( typename Gt::Coplanar_orientation_3()( *vert[li()], *vert[lj()], *vert[lk], _target ) ) { + switch(coplanar_orientation( *vert[li()], *vert[lj()], *vert[lk], _target ) ) { //_prev = _cur; //code not reached case COLLINEAR: // The target lies in this cell. @@ -861,18 +864,20 @@ walk_to_next_2() } } - Orientation o = typename Gt::Coplanar_orientation_3()( _source, *vert[lk], *vert[li()], _target ); + typename Gt::Collinear_3 collinear + = _tr->geom_traits().collinear_3_object(); + Orientation o = coplanar_orientation( _source, *vert[lk], *vert[li()], _target ); Orientation op; switch( o ) { case POSITIVE: { // The ray passes through the edge ik. - op = typename Gt::Coplanar_orientation_3()( *vert[lk], *vert[li()], _source, _target ); + op = coplanar_orientation( *vert[lk], *vert[li()], _source, _target ); if( op == NEGATIVE ) { Cell_handle tmp = cell()->neighbor(lj()); prev_cell() = cell(); cell() = tmp; - if( typename Gt::Collinear_3()( _source, *vert[li()], _target ) ) { + if( collinear( _source, *vert[li()], _target ) ) { prev_lt() = Tr::VERTEX; prev_li() = li(); lt() = Tr::VERTEX; @@ -892,13 +897,13 @@ walk_to_next_2() } default: { // The ray passes through the edge jk. - op = typename Gt::Coplanar_orientation_3()( *vert[lk], *vert[lj()], _source, _target ); + op = coplanar_orientation( *vert[lk], *vert[lj()], _source, _target ); if( op == NEGATIVE ) { Cell_handle tmp = cell()->neighbor(li()); prev_cell() = cell(); cell() = tmp; - if( typename Gt::Collinear_3()( _source, *vert[lj()], _target ) ) { + if( collinear( _source, *vert[lj()], _target ) ) { prev_lt() = Tr::VERTEX; prev_li() = lj(); lt() = Tr::VERTEX; @@ -956,13 +961,13 @@ walk_to_next_2() continue; // The target should lie on the other side of the edge. - Orientation op = typename Gt::Coplanar_orientation_3()( *vert[_tr->ccw(li)], *vert[_tr->cw(li)], *vert[li], _target ); + Orientation op = coplanar_orientation( *vert[_tr->ccw(li)], *vert[_tr->cw(li)], *vert[li], _target ); if( op == POSITIVE ) continue; // The target should lie inside the wedge. if( !calc[_tr->ccw(li)] ) { - o[_tr->ccw(li)] = typename Gt::Coplanar_orientation_3()( _source, *vert[_tr->ccw(li)], *vert[_tr->cw(li)], _target ); + o[_tr->ccw(li)] = coplanar_orientation( _source, *vert[_tr->ccw(li)], *vert[_tr->cw(li)], _target ); calc[_tr->ccw(li)] = true; } if( o[_tr->ccw(li)] == NEGATIVE ) @@ -974,7 +979,7 @@ walk_to_next_2() } if( !calc[_tr->cw(li)] ) { - o[_tr->cw(li)] = typename Gt::Coplanar_orientation_3()( _source, *vert[_tr->cw(li)], *vert[li], _target ); + o[_tr->cw(li)] = coplanar_orientation( _source, *vert[_tr->cw(li)], *vert[li], _target ); calc[_tr->cw(li)] = true; } if( o[_tr->cw(li)] == POSITIVE ) @@ -1035,8 +1040,11 @@ walk_to_next_2_inf( int inf ) return; } + typename Gt::Coplanar_orientation_3 coplanar_orientation + = _tr->geom_traits().coplanar_orientation_3_object(); + // Check the neighboring cells. - Orientation occw = typename Gt::Coplanar_orientation_3()( _source, + Orientation occw = coplanar_orientation( _source, cell()->vertex( _tr->ccw(inf))->point(), cell()->vertex(_tr->cw(inf))->point(), _target ); @@ -1046,7 +1054,7 @@ walk_to_next_2_inf( int inf ) _cur = Simplex( tmp, Tr::EDGE, tmp->index( prev_cell()->vertex( prev_li() ) ), tmp->index( prev_cell()->vertex( prev_lj() ) ) ); return; } - Orientation ocw = typename Gt::Coplanar_orientation_3()( _source, + Orientation ocw = coplanar_orientation( _source, cell()->vertex( _tr->cw(inf))->point(), cell()->vertex(_tr->ccw(inf))->point(), _target ); @@ -1056,7 +1064,7 @@ walk_to_next_2_inf( int inf ) _cur = Simplex( tmp, Tr::EDGE, tmp->index( prev_cell()->vertex( prev_li() ) ), tmp->index( prev_cell()->vertex( prev_lj() ) ) ); return; } - Orientation op = typename Gt::Coplanar_orientation_3()( + Orientation op = coplanar_orientation( cell()->vertex( _tr->ccw(inf) )->point(), cell()->vertex( _tr->cw(inf) )->point(), _source, _target ); From 141f9fef55948d5d76e531ce0a59984ccabc6d71 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 16 Apr 2020 14:28:32 +0200 Subject: [PATCH 115/138] write CHANGES.md --- Installation/CHANGES.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index 8b4d67730cf..fb1648b364a 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -14,6 +14,9 @@ Release History from a soup of disconnected segments that should first be split into polylines. +### 3D Triangulations +- Add `Segment_cell_iterator` to iterate over cells intersected by a line segment. +- Add `Segment_simplex_iterator` to iterate over simplices intersected by a line segment. Release 5.0 ----------- From 570b8cfe42c92033ab901e114ba00508cbd3cba6 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 16 Apr 2020 14:35:52 +0200 Subject: [PATCH 116/138] remove all \cgalModifBegin and \cgalModifEnd --- .../Triangulation_3/CGAL/Triangulation_3.h | 20 ------------------- .../doc/Triangulation_3/Triangulation_3.txt | 4 ---- 2 files changed, 24 deletions(-) diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h index 2392d312749..aaa27b22d4e 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Triangulation_3.h @@ -221,20 +221,16 @@ circulator over all facets incident to a given edge typedef Triangulation_data_structure::Facet_circulator Facet_circulator; /*! -\cgalModifBegin iterator over cells intersected by a line segment. `Segment_cell_iterator` implements the concept `ForwardIterator` and is non-mutable. Its value type is `Cell_handle`. -\cgalModifEnd */ typedef unspecified_type Segment_cell_iterator; /*! -\cgalModifBegin iterator over simplices intersected by a line segment. `Segment_simplex_iterator` implements the concept `ForwardIterator` and is non-mutable. Its value type is `Triangulation_simplex_3 `. -\cgalModifEnd */ typedef unspecified_type Segment_simplex_iterator; @@ -1322,7 +1318,6 @@ Segment_traverser_simplices segment_traverser_simplices() const; /*!\name Segment Cell Iterator -\cgalModifBegin The triangulation defines an iterator that visits cells intersected by a line segment. Segment Cell Iterator iterates over a sequence of cells which union contains the segment `[s,t]`. The sequence of cells is "minimal" (removing any cell would make the union of the @@ -1367,11 +1362,9 @@ The remaining incident cells visited make a facet-connected sequence connecting It is invalidated by any modification of one of the cells traversed. Its `value_type` is `Cell_handle`. -\cgalModifEnd */ /// @{ /*! -\cgalModifBegin returns the iterator that allows to visit the cells intersected by the line segment `[vs,vt]`. The initial value of the iterator is the cell containing `vs` and intersected by the @@ -1382,12 +1375,10 @@ It is followed by `segment_traverser_cells_end()`. \pre `vs` and `vt` must be different vertices and neither can be the infinite vertex. \pre `triangulation.dimension() >= 2` -\cgalModifEnd */ Segment_cell_iterator segment_traverser_cells_begin(Vertex_handle vs, Vertex_handle vt) const; /*! -\cgalModifBegin returns the iterator that allows to visit the cells intersected by the line segment `[ps, pt]`. If `[ps,pt]` entirely lies outside the convex hull, the iterator visits exactly one infinite cell. @@ -1409,26 +1400,22 @@ if it is geometrically close to `ps`. \pre `ps` and `pt` must be different points. \pre `triangulation.dimension() >= 2`. If the dimension is 2, both `ps` and `pt` must lie in the affine hull. -\cgalModifEnd */ Segment_cell_iterator segment_traverser_cells_begin(const Point& ps, const Point& pt, Cell_handle hint = Cell_handle()) const; /*! -\cgalModifBegin returns the past-the-end iterator over the intersected cells. This iterator cannot be dereferenced. It indicates when the `Segment_cell_iterator` has passed the target. \pre `triangulation.dimension() >= 2` -\cgalModifEnd */ Segment_cell_iterator segment_traverser_cells_end() const; /// @} /*!\name Segment Simplex Iterator -\cgalModifBegin The triangulation defines an iterator that visits all the triangulation simplices (vertices, edges, facets and cells) intersected by a line segment. The iterator traverses a connected sequence of simplices - possibly of all dimensions - @@ -1454,11 +1441,9 @@ the source of `[s,t]` and the vertex of `c` opposite of `f`. It is invalidated by any modification of one of the cells traversed. Its `value_type` is `Triangulation_simplex_3`. -\cgalModifEnd */ /// @{ /*! -\cgalModifBegin returns the iterator that allows to visit the simplices intersected by the line segment `[vs,vt]`. The initial value of the iterator is `vs`. @@ -1466,12 +1451,10 @@ The iterator remains valid until `vt` is passed. \pre `vs` and `vt` must be different vertices and neither can be the infinite vertex. \pre `triangulation.dimension() >= 2` -\cgalModifEnd */ Segment_simplex_iterator segment_traverser_simplices_begin(Vertex_handle vs, Vertex_handle vt) const; /*! -\cgalModifBegin returns the iterator that allows to visit the simplices intersected by the line segment `[ps,pt]`. If `[ps,pt]` entirely lies outside the convex hull, the iterator visits exactly one infinite cell. @@ -1484,19 +1467,16 @@ The optional argument `hint` can reduce the time to construct the iterator if it \pre `ps` and `pt` must be different points. \pre `triangulation.dimension() >= 2`. If the dimension is 2, both `ps` and `pt` must lie in the affine hull. -\cgalModifEnd */ Segment_simplex_iterator segment_traverser_simplices_begin(const Point& ps, const Point& pt, Cell_handle hint = Cell_handle()) const; /*! -\cgalModifBegin returns the past-the-end iterator over the intersected simplices. This iterator cannot be dereferenced. It indicates when the `Segment_simplex_iterator` has passed the target. \pre `triangulation.dimension() >= 2` -\cgalModifEnd */ Segment_simplex_iterator segment_traverser_simplices_end() const; diff --git a/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt b/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt index 16fc4ac1d13..942bafb4bf9 100644 --- a/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt +++ b/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt @@ -517,12 +517,10 @@ simplices can be stored in a set. \cgalExample{Triangulation_3/fast_location_3.cpp} -\cgalModifBegin \subsection Triangulation3exsegmenttraverser Traversing the Triangulation Along a Segment The package provides iterators that can be used to traverse the triangulation along a segment. All cells (resp. simplices) visited by this traversal iterator are guaranteed to intersect the segment. -\cgalModifEnd \cgalExample{Triangulation_3/segment_cell_traverser_3.cpp} \cgalExample{Triangulation_3/segment_simplex_traverser_3.cpp} @@ -1131,11 +1129,9 @@ Teillaud in the framework of the Google Summer of Code, 2010. In 2013, Clément Jamin added parallel algorithms (insert, remove) to the Delaunay and regular triangulations. -\cgalModifBegin In 2014, Thijs van Lankveld implemented the segment cell traverser iterator. In 2018, Jane Tournois introduced the segment simplex traverser iterator and finalized both iterators that were integrated in release 5.1. -\cgalModifEnd The authors wish to thank Lutz Kettner for inspiring discussions about the design of \cgal. Jean-Daniel Boissonnat is also acknowledged From 12c916900049276f7740f1a04b998d6cc43d7a49 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 16 Apr 2020 15:05:02 +0200 Subject: [PATCH 117/138] implementation history --- Triangulation_3/doc/Triangulation_3/Triangulation_3.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt b/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt index 942bafb4bf9..a8b36e08dda 100644 --- a/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt +++ b/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt @@ -1132,6 +1132,7 @@ Delaunay and regular triangulations. In 2014, Thijs van Lankveld implemented the segment cell traverser iterator. In 2018, Jane Tournois introduced the segment simplex traverser iterator and finalized both iterators that were integrated in release 5.1. +Olivier Devillers contributed to boost the performances of the cell traverser. The authors wish to thank Lutz Kettner for inspiring discussions about the design of \cgal. Jean-Daniel Boissonnat is also acknowledged From 4eb10d8323fb3fc32a8ddcacb7a6d3076671ac17 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 6 Jul 2020 06:44:00 +0200 Subject: [PATCH 118/138] fix license header --- .../include/CGAL/Triangulation_segment_traverser_3.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 46d137787d9..f1c5d489367 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -1,4 +1,4 @@ -// Copyright (C) 2012 Utrecht University +// Copyright (c) 2012 INRIA Sophia-Antipolis (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org). @@ -7,14 +7,12 @@ // $Id$ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // -// // Author(s): Thijs van Lankveld, Jane Tournois #ifndef CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_H #define CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_H - #include #include From 3ec4c5460aae223ab6411ff08942364ad92e7e4e Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 6 Jul 2020 06:53:49 +0200 Subject: [PATCH 119/138] fix license header --- .../CGAL/internal/Triangulation_segment_traverser_3_impl.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h index d18fcf902e8..6eab0320358 100644 --- a/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h @@ -1,4 +1,4 @@ -// Copyright (C) 2012 Utrecht University +// Copyright (c) 2012 INRIA Sophia-Antipolis (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org). @@ -7,7 +7,6 @@ // $Id$ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // -// // Author(s): Thijs van Lankveld, Jane Tournois #ifndef CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_IMPL_H From 99ea974425039c875fe725cdf5d2caa0271d8ee6 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 6 Jul 2020 06:54:05 +0200 Subject: [PATCH 120/138] remove unnecessary includes --- .../include/CGAL/Triangulation_segment_traverser_3.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index f1c5d489367..dd20b1a4294 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -13,17 +13,10 @@ #ifndef CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_H #define CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_H -#include - #include -#include -#include -#include #include -#include #include -#include #include #include From 5ed2de9e8990da5b0a7ff9b0a295d10254802cff Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 6 Jul 2020 07:00:24 +0200 Subject: [PATCH 121/138] update CHANGES.md --- Installation/CHANGES.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index b6cc3849288..602497a5697 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -1,6 +1,13 @@ Release History =============== +[Release 5.2](https://github.com/CGAL/cgal/releases/tag/releases%2FCGAL-5.2) +----------- + +### [3D Triangulations](https://doc.cgal.org/5.1/Manual/packages.html#PkgTriangulation3) + - Add `Segment_cell_iterator` to iterate over cells intersected by a line segment. + - Add `Segment_simplex_iterator` to iterate over simplices intersected by a line segment. + [Release 5.1](https://github.com/CGAL/cgal/releases/tag/releases%2FCGAL-5.1) ----------- From ea3ef4f1b7e0d6b987f6a2150bf4640d2c288de8 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 6 Jul 2020 08:19:12 +0200 Subject: [PATCH 122/138] ltnext can also be OUTSIDE_AFFINE_HULL, not necessarily facet in particular when query segment ends on a vertex --- .../include/CGAL/Triangulation_segment_traverser_3.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index dd20b1a4294..38f394c3708 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -845,8 +845,7 @@ public: _curr_simplex = shared_facet(Edge(chnext, linext, ljnext), get_vertex()); break; } - default ://FACET - CGAL_assertion(ltnext == Locate_type::FACET); + default ://FACET or OUTSIDE_AFFINE_HULL if(chnext == Cell_handle()) _curr_simplex = Simplex_3(); else From 5f9d38df29c302b7cd94d54aec539fb955446548 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 6 Jul 2020 08:19:30 +0200 Subject: [PATCH 123/138] reintroduce (fixed) grid test --- .../test/Triangulation_3/test_simplex_iterator_3.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp index 18a856b26a4..ccb4b926349 100644 --- a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp @@ -430,7 +430,7 @@ int main(int argc, char* argv[]) // - along a facet and an edge successively //temporatily disable -// test_triangulation_on_a_grid(); + test_triangulation_on_a_grid(); return 0; } From f5128ae1c6101febc890145301af63ebb3216d13 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 6 Jul 2020 10:28:14 +0200 Subject: [PATCH 124/138] fix release number in doc --- Triangulation_3/doc/Triangulation_3/Triangulation_3.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt b/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt index a8b36e08dda..677aa573912 100644 --- a/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt +++ b/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt @@ -1131,7 +1131,7 @@ Delaunay and regular triangulations. In 2014, Thijs van Lankveld implemented the segment cell traverser iterator. In 2018, Jane Tournois introduced the segment simplex traverser iterator -and finalized both iterators that were integrated in release 5.1. +and finalized both iterators that were integrated in release 5.2. Olivier Devillers contributed to boost the performances of the cell traverser. The authors wish to thank Lutz Kettner for inspiring discussions about From e7bfe4cb6f4be37eb52cea060bae75c546a2e1da Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 6 Jul 2020 15:27:16 +0200 Subject: [PATCH 125/138] add missing license header --- .../include/CGAL/Triangulation_segment_traverser_3.h | 2 ++ .../CGAL/internal/Triangulation_segment_traverser_3_impl.h | 1 + 2 files changed, 3 insertions(+) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 38f394c3708..6ad67f22c44 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -13,6 +13,8 @@ #ifndef CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_H #define CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_H +#include + #include #include #include diff --git a/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h index 6eab0320358..541f560a137 100644 --- a/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h @@ -12,6 +12,7 @@ #ifndef CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_IMPL_H #define CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_IMPL_H +#include namespace CGAL { From 0a530e39e755c10106a48a92ec8e76b7212230d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 20 Jul 2020 15:28:50 +0200 Subject: [PATCH 126/138] remove extra const --- .../include/CGAL/Triangulation_segment_traverser_3.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 6ad67f22c44..113dca8b6dc 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -271,7 +271,7 @@ public: // provides a conversion operator. /* \return a handle to the current cell. */ - operator const Cell_handle() const + operator Cell_handle() const { return std::get<0>(_cur); } @@ -279,7 +279,7 @@ public: // provides a conversion operator. /* \return the simplex through wich the current cell was entered. */ - operator const Simplex() const { return _cur; } + operator Simplex() const { return _cur; } // checks whether the iterator has reached the final cell, which contains the `target()`. /* If the `target()` lies on a facet, edge, or vertex, the final cell is the cell containing From a92692160b25305006f3ec5663a7d07a7d7e4969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 21 Jul 2020 11:26:53 +0200 Subject: [PATCH 127/138] please old libstd version (prior to 6) having issues with tuple and init-list --- .../test_segment_simplex_traverser_3.cpp | 57 ++++++++++++------- 1 file changed, 35 insertions(+), 22 deletions(-) diff --git a/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp b/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp index 6ddc394f634..0178ac33e85 100644 --- a/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp @@ -22,8 +22,9 @@ typedef CGAL::Delaunay_triangulation_3 DT; typedef DT::Cell_handle Cell_handle; typedef DT::Segment_simplex_iterator Segment_simplex_iterator; -template -bool test(const DT& dt, const Big_tuple& tuple); +bool test(const DT& dt, + const std::pair& query, + const std::array& expected_result); int main(int, char* []) { @@ -52,33 +53,45 @@ int main(int, char* []) std::cerr << dt.number_of_finite_cells() << '\n'; - const std::vector < std::tuple>> queries = { - {{-1, 0, 0}, { 1, 0, 0}, {0, 0, 1, 2}}, // CFC - {{-1, 0, 0}, { 2, 0, 0}, {1, 0, 1, 2}}, // CFCV - {{ 2, 0, 0}, {-1, 0, 0}, {1, 0, 1, 2}}, // reverse - {{-2, 0, 0}, { 2, 0, 0}, {2, 0, 1, 2}}, // VCFCV - {{ 2, 0, 0}, {-2, 0, 0}, {2, 0, 1, 2}}, // reverse case: VCFCV - {{-3, 0, 0}, { 3, 0, 0}, {2, 0, 3, 2}}, // FVCFCVF - {{-2, 0, 0}, { 2, 2, -2}, {2, 1, 1, 0}}, // VEVF - {{ 2, 2, -2}, {-2, 0, 0}, {2, 1, 1, 0}}, // reverse case: FVEV + const std::vector < std::pair> queries = { + {{-1, 0, 0}, { 1, 0, 0}}, // CFC + {{-1, 0, 0}, { 2, 0, 0}}, // CFCV + {{ 2, 0, 0}, {-1, 0, 0}}, // reverse + {{-2, 0, 0}, { 2, 0, 0}}, // VCFCV + {{ 2, 0, 0}, {-2, 0, 0}}, // reverse case: VCFCV + {{-3, 0, 0}, { 3, 0, 0}}, // FVCFCVF + {{-2, 0, 0}, { 2, 2, -2}}, // VEVF + {{ 2, 2, -2}, {-2, 0, 0}} // reverse case: FVEV }; + + const std::vector< std::array > expected_results ={ + {0, 0, 1, 2}, // CFC + {1, 0, 1, 2}, // CFCV + {1, 0, 1, 2}, // reverse + {2, 0, 1, 2}, // VCFCV + {2, 0, 1, 2}, // reverse case: VCFCV + {2, 0, 3, 2}, // FVCFCVF + {2, 1, 1, 0}, // VEVF + {2, 1, 1, 0} // reverse case: FVEV + }; + bool ok = true; - for(const auto& tuple: queries) { - if(!test(dt, tuple)) ok = false; + for(std::size_t i=0; i -bool test(const DT& dt, const Big_tuple& tuple) +bool test(const DT& dt, + const std::pair& query, + const std::array& expected_result) { bool result = true; using std::get; - const auto& p1 = get<0>(tuple); - const auto& p2 = get<1>(tuple); + const auto& p1 = query.first; + const auto& p2 = query.second; #ifdef CGAL_T3_TEST_SIMPLEX_TRAVERSER - const auto& expected_results = get<2>(tuple); unsigned int nb_cells = 0, nb_collinear = 0; #endif unsigned int nb_facets = 0, nb_edges = 0, nb_vertex = 0; @@ -161,13 +174,13 @@ bool test(const DT& dt, const Big_tuple& tuple) return true; }; std::cout << "\tnb cells : " << nb_cells << std::endl; - result = result && check_expected(nb_cells, expected_results[3]); + result = result && check_expected(nb_cells, expected_result[3]); std::cout << "\tnb facets : " << nb_facets << std::endl; - result = result && check_expected(nb_facets, expected_results[2]); + result = result && check_expected(nb_facets, expected_result[2]); std::cout << "\tnb edges : " << nb_edges << std::endl; - result = result && check_expected(nb_edges, expected_results[1]); + result = result && check_expected(nb_edges, expected_result[1]); std::cout << "\tnb vertices : " << nb_vertex << std::endl; - result = result && check_expected(nb_vertex, expected_results[0]); + result = result && check_expected(nb_vertex, expected_result[0]); std::cout << "\tnb collinear : " << nb_collinear << std::endl; #endif return result; From f7806b63ea6596071aea321e87f55b42e38c065c Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 28 Sep 2020 18:14:56 +0200 Subject: [PATCH 128/138] do not duplicate point creation that blur the examples --- .../Triangulation_3/segment_cell_traverser_3.cpp | 10 ++-------- .../Triangulation_3/segment_simplex_traverser_3.cpp | 10 ++-------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/Triangulation_3/examples/Triangulation_3/segment_cell_traverser_3.cpp b/Triangulation_3/examples/Triangulation_3/segment_cell_traverser_3.cpp index a2254c6b135..a86c6b85755 100644 --- a/Triangulation_3/examples/Triangulation_3/segment_cell_traverser_3.cpp +++ b/Triangulation_3/examples/Triangulation_3/segment_cell_traverser_3.cpp @@ -89,16 +89,10 @@ int main(int argc, char* argv[]) //////////////////////////////////////////////////////////// // Construct a traverser and use range-iterator //////////////////////////////////////////////////////////// - Point_3 p3(rng.get_double(xmin, xmax), - rng.get_double(ymin, ymax), - rng.get_double(zmin, zmax)); - Point_3 p4(rng.get_double(xmin, xmax), - rng.get_double(ymin, ymax), - rng.get_double(zmin, zmax)); // Count the number of finite cells traversed. inf = 0, fin = 0; - for (const Cell_handle ch : dt.segment_traverser_cell_handles(p3, p4)) + for (const Cell_handle ch : dt.segment_traverser_cell_handles(p1, p2)) { if (dt.is_infinite(ch)) ++inf; @@ -106,7 +100,7 @@ int main(int argc, char* argv[]) ++fin; } - std::cout << "While traversing from " << p3 << " to " << p4 << std::endl; + std::cout << "While traversing from " << p1 << " to " << p2 << std::endl; std::cout << inf << " infinite and " << fin << " finite cells were visited." << std::endl; std::cout << std::endl << std::endl; diff --git a/Triangulation_3/examples/Triangulation_3/segment_simplex_traverser_3.cpp b/Triangulation_3/examples/Triangulation_3/segment_simplex_traverser_3.cpp index 366fb26b1a9..7431bd02705 100644 --- a/Triangulation_3/examples/Triangulation_3/segment_simplex_traverser_3.cpp +++ b/Triangulation_3/examples/Triangulation_3/segment_simplex_traverser_3.cpp @@ -75,15 +75,9 @@ int main(int argc, char* argv[]) //////////////////////////////////////////////////////////// // Construct a traverser and use range-iterator //////////////////////////////////////////////////////////// - Point_3 p3(rng.get_double(-0.48, 0.31), - rng.get_double(-0.22, 0.22), - rng.get_double(-0.19, 0.19)); - Point_3 p4(rng.get_double(-0.48, 0.31), - rng.get_double(-0.22, 0.22), - rng.get_double(-0.19, 0.19)); nb_cells = 0, nb_facets = 0, nb_edges = 0, nb_vertex = 0; - for (const Simplex& s : dt.segment_traverser_simplices(p3, p4)) + for (const Simplex& s : dt.segment_traverser_simplices(p1, p2)) { if (s.dimension() == 3) ++nb_cells; else if (s.dimension() == 2) ++nb_facets; @@ -92,7 +86,7 @@ int main(int argc, char* argv[]) } #ifdef CGAL_TRIANGULATION_3_VERBOSE_TRAVERSER_EXAMPLE - std::cout << "While traversing from " << p3 << " to " << p4 << std::endl; + std::cout << "While traversing from " << p1 << " to " << p2 << std::endl; std::cout << "\tcells : " << nb_cells << std::endl; std::cout << "\tfacets : " << nb_facets << std::endl; std::cout << "\tedges : " << nb_edges << std::endl; From c76f41b92ba6a188eaffa2ed4beb345a6eb89e0e Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 29 Sep 2020 10:17:31 +0200 Subject: [PATCH 129/138] segment intersects cells, not the other way around --- Triangulation_3/doc/Triangulation_3/Triangulation_3.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt b/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt index 677aa573912..bb7f1b4f9e1 100644 --- a/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt +++ b/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt @@ -520,7 +520,7 @@ simplices can be stored in a set. \subsection Triangulation3exsegmenttraverser Traversing the Triangulation Along a Segment The package provides iterators that can be used to traverse the triangulation along a segment. -All cells (resp. simplices) visited by this traversal iterator are guaranteed to intersect the segment. +It is guaranteed that the input segment intersects all cells (resp. simplices) visited by this traversal iterator. \cgalExample{Triangulation_3/segment_cell_traverser_3.cpp} \cgalExample{Triangulation_3/segment_simplex_traverser_3.cpp} From ca4526983d2eaf092d63137825f8c5c6976f8966 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 13 Oct 2020 17:13:01 +0200 Subject: [PATCH 130/138] reintroduce complete test --- .../Triangulation_3/test_segment_simplex_traverser_3.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp b/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp index 0178ac33e85..f742f6c2c2b 100644 --- a/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp @@ -91,9 +91,7 @@ bool test(const DT& dt, using std::get; const auto& p1 = query.first; const auto& p2 = query.second; -#ifdef CGAL_T3_TEST_SIMPLEX_TRAVERSER unsigned int nb_cells = 0, nb_collinear = 0; -#endif unsigned int nb_facets = 0, nb_edges = 0, nb_vertex = 0; std::cout << "\n#\n# Query segment: ( " << p1 << " , " @@ -111,7 +109,6 @@ bool test(const DT& dt, else { ++fin; -#ifdef CGAL_T3_TEST_SIMPLEX_TRAVERSER switch (st->dimension()) { case 2: { ++nb_facets; @@ -150,7 +147,6 @@ bool test(const DT& dt, default: CGAL_assume(false); } // end switch -#endif } } @@ -165,7 +161,6 @@ bool test(const DT& dt, std::cout << std::endl << std::endl; #endif -#ifdef CGAL_T3_TEST_SIMPLEX_TRAVERSER auto check_expected = [](unsigned value, unsigned expected) { if(value != expected) { std::cout << "\t ERROR: expected " << expected << '\n'; @@ -182,6 +177,6 @@ bool test(const DT& dt, std::cout << "\tnb vertices : " << nb_vertex << std::endl; result = result && check_expected(nb_vertex, expected_result[0]); std::cout << "\tnb collinear : " << nb_collinear << std::endl; -#endif + return result; } From 478cd5be9fb260f0b4ab7b838840602fffe043ea Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 13 Oct 2020 17:40:29 +0200 Subject: [PATCH 131/138] remove outdated doxygen parameters --- Triangulation_3/doc/Triangulation_3/Doxyfile.in | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Triangulation_3/doc/Triangulation_3/Doxyfile.in b/Triangulation_3/doc/Triangulation_3/Doxyfile.in index 205f022fd1c..e491b159d08 100644 --- a/Triangulation_3/doc/Triangulation_3/Doxyfile.in +++ b/Triangulation_3/doc/Triangulation_3/Doxyfile.in @@ -1,11 +1,3 @@ @INCLUDE = ${CGAL_DOC_PACKAGE_DEFAULTS} PROJECT_NAME = "CGAL ${CGAL_DOC_VERSION} - 3D Triangulations" - - -INPUT = ${CMAKE_SOURCE_DIR}/Triangulation_3/doc/Triangulation_3/ - - -EXTRACT_ALL = false -HIDE_UNDOC_MEMBERS = true -HIDE_UNDOC_CLASSES = true From 52a2265bda6f97a7c4c5ea9587be13d481c967ab Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 20 Oct 2020 14:01:24 +0200 Subject: [PATCH 132/138] remove useless comments --- .../test_simplex_iterator_3.cpp | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp index ccb4b926349..eb210c29beb 100644 --- a/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_simplex_iterator_3.cpp @@ -1,24 +1,3 @@ -// Copyright (c) 1998 INRIA Sophia-Antipolis (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org). -// You can redistribute it and/or modify it under the terms of the GNU -// General Public License as published by the Free Software Foundation, -// either version 3 of the License, or (at your option) any later version. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// -// -// Author(s) : Jane Tournois - - #include #include @@ -428,8 +407,6 @@ int main(int argc, char* argv[]) // - along 2 successive facets (vertex/facet/edge/facet/edge) // - along 2 successive edges (vertex/edge/vertex/edge/vertex) // - along a facet and an edge successively - - //temporatily disable test_triangulation_on_a_grid(); return 0; From d48aa33305635214ec472d680bf5ff27760882ab Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 27 Oct 2020 15:32:01 +0100 Subject: [PATCH 133/138] fix degenerate some degenerate cases in particular iterations ending with : - cell-vertex-facet - vertex-edge-vertex - cell-vertex-facet --- .../CGAL/Triangulation_segment_traverser_3.h | 74 +++++++++++++++---- 1 file changed, 59 insertions(+), 15 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 113dca8b6dc..4041916f0f4 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -642,8 +642,12 @@ public: { case 3 :/*Cell_handle*/ { - if(Cell_handle(_cell_iterator) == Cell_handle()) - _curr_simplex = Simplex_3(); + Cell_handle ch = Cell_handle(_cell_iterator); + if (ch == Cell_handle()) + { + set_curr_simplex_to_entry(); + break; + } else { if (!cell_iterator_is_ahead()) @@ -692,6 +696,7 @@ public: _curr_simplex = ch; break; } + case Locate_type::EDGE: if (facet_has_edge(get_facet(), Edge(chnext, linext, ljnext))) set_curr_simplex_to_entry(); @@ -703,6 +708,10 @@ public: _curr_simplex = ch; break; + case Locate_type::OUTSIDE_AFFINE_HULL: + _curr_simplex = Simplex_3(); + break; + default: CGAL_assertion(false); }; @@ -758,10 +767,24 @@ public: _curr_simplex = shared_facet(get_edge(), Edge(chnext, linext, ljnext)); break; } + case Locate_type::FACET: _curr_simplex = Cell_handle(_cell_iterator);//query goes through the cell break; + case Locate_type::OUTSIDE_AFFINE_HULL: + { + Cell_handle chprev = _cell_iterator.previous(); + Locate_type ltprev; + int liprev, ljprev; + _cell_iterator.exit(ltprev, liprev, ljprev); + + if (ltprev == Locate_type::VERTEX) //edge-vertex-outside + _curr_simplex = chprev->vertex(liprev); + else + _curr_simplex = Simplex_3(); //edge-outside + break; + } default: CGAL_assertion(false);//should not happen }; @@ -778,11 +801,6 @@ public: if (!cell_iterator_is_ahead()) //_curr_simplex does contain v { ++_cell_iterator;//cell_iterator needs to be ahead to detect degeneracies - if (Cell_handle(_cell_iterator) == Cell_handle()) - { - _curr_simplex = _cell_iterator.previous(); - break; - } } else ch = _cell_iterator.previous(); @@ -795,6 +813,12 @@ public: int linext, ljnext; _cell_iterator.entry(ltnext, linext, ljnext); + Cell_handle prev; + Locate_type ltprev; + int liprev, ljprev; + prev = _cell_iterator.previous(); + _cell_iterator.exit(ltprev, liprev, ljprev); + switch (ltnext) { case Locate_type::VERTEX: @@ -804,12 +828,6 @@ public: || triangulation()->is_infinite(chnext)); if (_cell_iterator == _cell_iterator.end()) { - Cell_handle prev; - Locate_type ltprev; - int liprev, ljprev; - prev = _cell_iterator.previous(); - _cell_iterator.exit(ltprev, liprev, ljprev); - if (prev == ch && ltprev == Locate_type::VERTEX) { CGAL_assertion(prev->vertex(liprev) == get_vertex()); @@ -840,6 +858,7 @@ public: } break; } + case Locate_type::EDGE: { //facet shared by get_vertex() and the edge @@ -847,11 +866,36 @@ public: _curr_simplex = shared_facet(Edge(chnext, linext, ljnext), get_vertex()); break; } - default ://FACET or OUTSIDE_AFFINE_HULL - if(chnext == Cell_handle()) + + case Locate_type::OUTSIDE_AFFINE_HULL: + { + CGAL_assertion(_cell_iterator == _cell_iterator.end()); + if (ltprev == Locate_type::VERTEX) //vertex-edge-vertex-outside + { + if(prev->vertex(liprev) != get_vertex())//avoid infinite loop edge-vertex-same edge-... + _curr_simplex = Edge(prev, liprev, prev->index(get_vertex())); + else + _curr_simplex = Simplex_3(); + } + else if (ltprev == Locate_type::EDGE)//vertex-facet-edge-outside + _curr_simplex = Facet(prev, prev->index(get_vertex())); + else + { + CGAL_assertion(ltprev == Locate_type::FACET); + if(prev->vertex(liprev) != get_vertex()) //vertex-facet-outside + _curr_simplex = Facet(prev, liprev); + else //vertex-cell-facet-outside + _curr_simplex = prev; + } + break; + } + + default://FACET + if (chnext == Cell_handle()) _curr_simplex = Simplex_3(); else _curr_simplex = shared_cell(Facet(chnext, linext), get_vertex()); + break; }; } break; From 9152be7543972b638bd5f97f8d61ad18f685036c Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 27 Oct 2020 15:32:34 +0100 Subject: [PATCH 134/138] remove useless and undocumented include --- .../test/Triangulation_3/test_segment_simplex_traverser_3.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp b/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp index f742f6c2c2b..375b8096617 100644 --- a/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_segment_simplex_traverser_3.cpp @@ -1,6 +1,5 @@ #include #include -#include #include #include From 41e1e40827bc1db36689977c297de0ddadaa10e8 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 29 Oct 2020 11:59:02 +0100 Subject: [PATCH 135/138] fix the case ...-vertex-cell-end --- .../CGAL/Triangulation_segment_traverser_3.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 4041916f0f4..f45ad62e075 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -645,7 +645,10 @@ public: Cell_handle ch = Cell_handle(_cell_iterator); if (ch == Cell_handle()) { - set_curr_simplex_to_entry(); + if(!triangulation()->is_infinite(Cell_handle(_curr_simplex))) + set_curr_simplex_to_entry(); + else + _curr_simplex = Simplex_3(); break; } else @@ -879,14 +882,18 @@ public: } else if (ltprev == Locate_type::EDGE)//vertex-facet-edge-outside _curr_simplex = Facet(prev, prev->index(get_vertex())); - else + else if (ltprev == Locate_type::FACET) //vertex-facet-outside { - CGAL_assertion(ltprev == Locate_type::FACET); if(prev->vertex(liprev) != get_vertex()) //vertex-facet-outside _curr_simplex = Facet(prev, liprev); else //vertex-cell-facet-outside _curr_simplex = prev; } + else + { + CGAL_assertion(ltprev == Locate_type::CELL);//vertex-cell-outside + _curr_simplex = prev; + } break; } From 667171927a54dbf6856085656268862762697977 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 3 Nov 2020 17:57:30 +0100 Subject: [PATCH 136/138] fix uninitialized parameter, and member, warnings --- .../include/CGAL/Triangulation_segment_traverser_3.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index f45ad62e075..1c2390d7c4a 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -555,6 +555,7 @@ public: { set_curr_simplex_to_entry(); } Triangulation_segment_simplex_iterator_3(const Tr* tr) : _cell_iterator(tr) + , _curr_simplex() {} bool operator==(const Simplex_iterator& sit) const @@ -853,7 +854,7 @@ public: else { Cell_handle ec; - int ei, ej; + int ei = -1, ej = -1; if (!triangulation()->is_edge(get_vertex(), chnext->vertex(linext), ec, ei, ej)) CGAL_assertion(false); _curr_simplex = Edge(ec, ei, ej); From b87e226ebb356c35f717a656f5e2aa395929494e Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 3 Nov 2020 18:53:02 +0100 Subject: [PATCH 137/138] Simplex_3 can be dereferenced in range-for-loop (not Cell_handle) this error was found thanks to a clang warning : warning: loop variable 's' has type 'const Simplex &' (aka 'const Triangulation_simplex_3&') but is initialized with type 'CGAL::Triangulation_segment_simplex_iterator_3' resulting in a copy [-Wrange-loop-construct] --- Triangulation_3/include/CGAL/Triangulation_3.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_3.h b/Triangulation_3/include/CGAL/Triangulation_3.h index a36929a9b2b..4e4c5606545 100644 --- a/Triangulation_3/include/CGAL/Triangulation_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_3.h @@ -530,7 +530,7 @@ public: typedef Triangulation_segment_simplex_iterator_3 Segment_simplex_iterator; typedef Iterator_range > Segment_traverser_cell_handles; - typedef Iterator_range > Segment_traverser_simplices; + typedef Iterator_range Segment_traverser_simplices; private: // Auxiliary iterators for convenience From 10a28d12621915e84c515a1747180abc965cadda Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 5 Nov 2020 11:13:26 +0100 Subject: [PATCH 138/138] attempt to fix "variable used non initialized" --- .../CGAL/internal/Triangulation_segment_traverser_3_impl.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h index 541f560a137..663032162a4 100644 --- a/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h @@ -124,10 +124,6 @@ template < class Tr, class Inc > Triangulation_segment_cell_iterator_3 Triangulation_segment_cell_iterator_3::end() const { SCI sci(_tr); - sci._source = _source; - sci._target = _target; - sci._s_vertex = _s_vertex; - sci._t_vertex = _t_vertex; std::get<0>(sci._cur) = Cell_handle(); return sci; }