Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76914 - in sandbox/gtl/boost/polygon: . detail
From: sydorchuk.andriy_at_[hidden]
Date: 2012-02-06 14:43:21


Author: asydorchuk
Date: 2012-02-06 14:43:20 EST (Mon, 06 Feb 2012)
New Revision: 76914
URL: http://svn.boost.org/trac/boost/changeset/76914

Log:
Minor updater to voronoi structures and voronoi utils.
Text files modified:
   sandbox/gtl/boost/polygon/detail/voronoi_structures.hpp | 8 ++++----
   sandbox/gtl/boost/polygon/voronoi_utils.hpp | 20 ++++++++++----------
   2 files changed, 14 insertions(+), 14 deletions(-)

Modified: sandbox/gtl/boost/polygon/detail/voronoi_structures.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/detail/voronoi_structures.hpp (original)
+++ sandbox/gtl/boost/polygon/detail/voronoi_structures.hpp 2012-02-06 14:43:20 EST (Mon, 06 Feb 2012)
@@ -171,7 +171,7 @@
         }
 
         site_event& index(int index) {
- site_index_ = index << 2;
+ site_index_ = (index << 2) + (site_index_ & 3);
             return *this;
         }
 
@@ -181,7 +181,7 @@
         }
 
         site_event& change_initial_direction() {
- site_index_ ^= IS_INITIAL_DIRECTION;
+ site_index_ ^= HAS_INITIAL_DIRECTION;
             return *this;
         }
 
@@ -202,7 +202,7 @@
         }
 
         bool is_initial() const {
- return (site_index_ & IS_INITIAL_DIRECTION) ? false : true;
+ return (site_index_ & HAS_INITIAL_DIRECTION) ? false : true;
         }
 
         bool has_initial_direction() const {
@@ -212,7 +212,7 @@
     private:
         enum kBits {
             IS_INVERSE = 1,
- IS_INITIAL_DIRECTION = 2
+ HAS_INITIAL_DIRECTION = 2
         };
 
         point_type point0_;

Modified: sandbox/gtl/boost/polygon/voronoi_utils.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/voronoi_utils.hpp (original)
+++ sandbox/gtl/boost/polygon/voronoi_utils.hpp 2012-02-06 14:43:20 EST (Mon, 06 Feb 2012)
@@ -63,8 +63,8 @@
     };
 
     // Get a view rectangle based on the voronoi bounding rectangle.
- template <typename T>
- static brect_type get_view_rectangle(const bounding_rectangle<T> &brect,
+ template <typename CT>
+ static brect_type get_view_rectangle(const bounding_rectangle<CT> &brect,
                                          fpt_type scale = 1.0) {
         fpt_type x_len = to_fpt(brect.x_max()) - to_fpt(brect.x_min());
         fpt_type y_len = to_fpt(brect.y_max()) - to_fpt(brect.y_min());
@@ -84,16 +84,16 @@
     // Max_error is the maximum distance (relative to the minor of two
     // rectangle sides) allowed between the parabola and line segments
     // that interpolate it.
- template <typename T>
+ template <typename CT>
     static point_set_type get_point_interpolation(
- const voronoi_edge<T> *edge,
- const bounding_rectangle<T> &brect,
+ const voronoi_edge<CT> *edge,
+ const bounding_rectangle<CT> &brect,
         fpt_type max_error) {
         // Retrieve the cell to the left of the current edge.
- const voronoi_cell<T> *cell1 = edge->cell();
+ const typename voronoi_edge<CT>::voronoi_cell_type *cell1 = edge->cell();
 
         // Retrieve the cell to the right of the current edge.
- const voronoi_cell<T> *cell2 = edge->twin()->cell();
+ const typename voronoi_edge<CT>::voronoi_cell_type *cell2 = edge->twin()->cell();
 
         // edge_points - contains intermediate points.
         point_set_type edge_points;
@@ -174,10 +174,10 @@
 
     // Interpolate voronoi edge with a set of segments to satisfy maximal
     // error requirement.
- template <typename T>
+ template <typename CT>
     static segment_set_type get_segment_interpolation(
- const voronoi_edge<T> *edge,
- const bounding_rectangle<T> &brect,
+ const voronoi_edge<CT> *edge,
+ const bounding_rectangle<CT> &brect,
         fpt_type max_error) {
         point_set_type point_interpolation =
             get_point_interpolcation(edge, brect, max_error);


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk