From 8dadc19e6488dfa67f6c694c5c9a1f0849a15c80 Mon Sep 17 00:00:00 2001 From: olivier-stasse <olivier.stasse@aist.go.jp> Date: Fri, 11 Mar 2011 05:07:24 +0900 Subject: [PATCH] Revert "Add structure to handle 2-dimensional convex hulls" This reverts commit 2a298cf611612bcdb22edf3e49644339ea483599. --- src/privatepgtypes.cpp | 51 ------------------------------------------ src/privatepgtypes.h | 33 +-------------------------- 2 files changed, 1 insertion(+), 83 deletions(-) diff --git a/src/privatepgtypes.cpp b/src/privatepgtypes.cpp index 7b49a313..032facfe 100644 --- a/src/privatepgtypes.cpp +++ b/src/privatepgtypes.cpp @@ -127,55 +127,4 @@ namespace PatternGeneratorJRL reset(); } - - void - convex_hull_t::rotate(const double & angle) - { - - double c_a = cos(angle); - double s_a = sin(angle); - - for( int j=0;j<X.size();j++ ) - { - X[j] = ( X[j]*c_a - Y[j]*s_a ); - Y[j] = ( X[j]*s_a + Y[j]*c_a ); - } - - } - - convex_hull_s::convex_hull_s(const int & size) - { - resize(size); - reset(); - } - - convex_hull_s::convex_hull_s() - { - - } - - void - convex_hull_t::reset() - { - X.clear(); - Y.clear(); - } - - void - convex_hull_t::resize(const int & size) - { - X.resize(size); - Y.resize(size); - } - - void - convex_hull_t::set(const double * arrayX, const double * arrayY) - { - for(int i=0;i<X.size();i++) - { - X[i] = arrayX[i]; - Y[i] = arrayY[i]; - } - } - } diff --git a/src/privatepgtypes.h b/src/privatepgtypes.h index de92018d..15cf2104 100644 --- a/src/privatepgtypes.h +++ b/src/privatepgtypes.h @@ -149,43 +149,12 @@ namespace PatternGeneratorJRL /// \brief Linear constraints struct linear_constraint_s { - boost_ublas::compressed_vector<double> A; + ublas::compressed_vector<double> A; double b; }; typedef struct linear_constraint_s linear_constraint_t; - /// \brief Set of 2-dimensional point - struct convex_hull_s - { - - MAL_VECTOR(X,double); - MAL_VECTOR(Y,double); - - /// \brief Rotate the points around the origin by angle - /// - /// \param[in] angle - void rotate(const double & angle); - - /// \brief Resize members to the desired number of points - /// - /// \param[in] size - void resize(const int & size); - - /// \brief Set the point values - /// - /// \param[in] X - /// \param[in] Y - void set(const double * arrayX, const double * arrayY); - - /// \brief Set all points to zero - void reset(); - - convex_hull_s(const int & size); - convex_hull_s(); - - }; - typedef struct convex_hull_s convex_hull_t; } #endif /* _PATTERN_GENERATOR_INTERNAL_PRIVATE_H_ */ -- GitLab