[MOAB-dev] r5697 - MOAB/trunk/src/moab/point_locater

rhl6856 at mcs.anl.gov rhl6856 at mcs.anl.gov
Wed Aug 15 11:01:25 CDT 2012


Author: rhl6856
Date: 2012-08-15 11:01:25 -0500 (Wed, 15 Aug 2012)
New Revision: 5697

Removed:
   MOAB/trunk/src/moab/point_locater/element_utility.hpp
Log:
this is not needed anymore

Deleted: MOAB/trunk/src/moab/point_locater/element_utility.hpp
===================================================================
--- MOAB/trunk/src/moab/point_locater/element_utility.hpp	2012-08-15 06:53:47 UTC (rev 5696)
+++ MOAB/trunk/src/moab/point_locater/element_utility.hpp	2012-08-15 16:01:25 UTC (rev 5697)
@@ -1,64 +0,0 @@
-#ifndef MOAB_ELEMENT_UTILITY_HPP
-#define MOAB_ELEMENT_UTILITY_HPP
-namespace moab { 
-
-namespace element_utility {
-//non-exported functionality
-
-template< std::size_t N, typename Points, typename Point>
-bool point_inside_polygon( const Points & vertices, const Point & p){
-   double anglesum=0;
-   for (std::size_t i=0; i < N; ++i) {
-      double costheta=0;
-      double x[ 3], y[ 3];
-      double mx = 0.0, my = 0.0;
-      for(std::size_t j = 0; j < N; ++j){
-       	x[ j] = vertices[i][ j] - p [ j];
-	mx += x[ j]*x[ j];
-        y[ j] = vertices[(i+1)%n][ j] - p[ j];
-	my += y[ j]*y[ j];
-	costheta += x[ i]*y[ i];
-      }
-      /* We are on a node, consider this inside */
-      if (mx*my <= 1e-12){ return true; }
-      costheta /= (mx*my);
-      anglesum += acos(costheta);
-   }
-   return anglesum < PI;
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-


More information about the moab-dev mailing list