19 #include <boost/container/flat_set.hpp> 72 VecPt3d points3d(a_points.size());
73 for (
int i = 0; i < a_points.size(); ++i)
75 points3d.push_back(a_ugrid->GetPointLocation(a_points[i]));
78 VecInt returnPoints(convexHull.size());
79 for (
int i(0); i < convexHull.size(); i++)
81 for (
int j(0); i < points3d.size(); j++)
83 if (convexHull[i] == points3d[j])
85 returnPoints.push_back(a_points[j]);
102 return gmLinesCross(a_segment1.first, a_segment1.second, a_segment2.first, a_segment2.second);
120 return gmLinesCross(a_segment1Point1, a_segment1Point2, a_segment2Point1, a_segment2Point2);
Contains the XmUGrid Class and supporting data types.
std::vector< int > VecInt
Contains IO functions as well as several utility functions for XmUGrid.
bool DoLineSegmentsCross(const std::pair< Pt3< double >, Pt3< double >> &a_segment1, const std::pair< Pt3< double >, Pt3< double >> &a_segment2)
Determine whether 2 line segments intersect (Deprecated).
void gmGetConvexHull(const VecPt3d &a_pts, VecPt3d &a_hull, bool a_includeOn)
Calculate convex hull using Monotone chain aka Andrew's algorithm.
Code to calculate the convex hull of a set of points in two dimensions.
VecInt ConvexHullWithIndices(const std::vector< int > &a_points, std::shared_ptr< XmUGrid > a_ugrid)
Returns the convex hull of a set of points (Deprecated).
Functions dealing with geometry.
bool gmLinesCross(const Pt3d &a_segment1Point1, const Pt3d &a_segment1Point2, const Pt3d &a_segment2Point1, const Pt3d &a_segment2Point2)
Determine whether 2 line segments cross. The segments may touch at the end points.
VecPt3d ConvexHull(const std::vector< Pt3< double >> &a_points)
Returns the convex hull of a set of points (Deprecated).
std::vector< Pt3d > VecPt3d