LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
Algorithm to compute various geometrical relation among geometrical objects. In particular functions to inspect following relations are implemented:
0) Distance between geometrical objects
1) Closest point of approach
2) Intersection points
3) Containment/Overlap of objects
4) Common Origin functions
5) Bounding Sphere functions
.
More...
#include "GeoAlgo.h"
Public Member Functions | |
GeoAlgo () | |
Default constructor. More... | |
virtual | ~GeoAlgo () |
Default destructor. More... | |
std::vector< Point_t > | Intersection (const AABox_t &box, const HalfLine_t &line, bool back=false) const |
Intersection between a HalfLine and an AABox. More... | |
std::vector< Point_t > | Intersection (const HalfLine_t &line, const AABox_t &box, bool back=false) const |
Intersection between a HalfLine and an AABox. More... | |
std::vector< Point_t > | Intersection (const AABox_t &box, const LineSegment_t &l) const |
Intersection between LineSegment and an AABox. More... | |
std::vector< Point_t > | Intersection (const LineSegment_t &l, const AABox_t &box) const |
Intersection between LineSegment and an AABox. More... | |
std::vector< Point_t > | Intersection (const AABox_t &box, const Trajectory_t &trj) const |
Intersection between Trajectory and an AABox. More... | |
std::vector< Point_t > | Intersection (const Trajectory_t &trj, const AABox_t &box) const |
Intersection between Trajectory and an AABox. More... | |
LineSegment_t | BoxOverlap (const AABox_t &box, const HalfLine_t &line) const |
LineSegment sub-segment of HalfLine inside an AABox. More... | |
LineSegment_t | BoxOverlap (const HalfLine_t &line, const AABox_t &box) const |
LineSegment sub-segment of HalfLine inside an AABox. More... | |
Trajectory_t | BoxOverlap (const AABox_t &box, const Trajectory_t &trj) const |
Get Trajectory inside box given some input trajectory -> now assumes trajectory cannot exit and re-enter box. More... | |
Trajectory_t | BoxOverlap (const Trajectory_t &trj, const AABox_t &box) const |
Get Trajectory inside box given some input trajectory -> now assumes trajectory cannot exit and re-enter box. More... | |
double | SqDist (const Line_t &line, const Point_t &pt) const |
double | SqDist (const Point_t &pt, const Line_t &line) const |
Point_t | ClosestPt (const Line_t &line, const Point_t &pt) const |
Point_t | ClosestPt (const Point_t &pt, const Line_t &line) const |
double | SqDist (const Line_t &l1, const Line_t &l2, Point_t &L1, Point_t &L2) const |
double | SqDist (const Line_t &l1, const Line_t &l2) const |
double | SqDist (const HalfLine_t &l1, const HalfLine_t &l2, Point_t &L1, Point_t &L2) const |
double | SqDist (const HalfLine_t &l1, const HalfLine_t &l2) const |
double | SqDist (const LineSegment_t &seg1, const LineSegment_t &seg2, Point_t &c1, Point_t &c2) const |
LineSegment_t & LineSegment_t distance - keep track of points. More... | |
double | SqDist (const LineSegment_t &seg1, const LineSegment_t &seg2) const |
LineSegment & LineSegment, don't keep track of points. More... | |
double | SqDist (const LineSegment_t &seg, const Trajectory_t &trj, Point_t &c1, Point_t &c2) const |
LineSegment & Trajectory, keep track of points. More... | |
double | SqDist (const Trajectory_t &trj, const LineSegment_t &seg, Point_t &c1, Point_t &c2) const |
LineSegment & Trajectory, keep track of points. More... | |
double | SqDist (const Trajectory_t &trj, const LineSegment_t &seg) const |
LineSegment & Trajectory, don't keep track of points. More... | |
double | SqDist (const LineSegment_t &seg, const Trajectory_t &trj) const |
LineSegment & Trajectory, don't keep track of points. More... | |
double | SqDist (const Trajectory_t &trj1, const Trajectory_t &trj2, Point_t &c1, Point_t &c2) const |
Trajectory & Trajectory, keep track of points. More... | |
double | SqDist (const Trajectory_t &trj1, const Trajectory_t &trj2) const |
Trajectory & Trajectory, don't keep track of points. More... | |
double | SqDist (const LineSegment_t &seg, const std::vector< geoalgo::Trajectory_t > &trj, Point_t &c1, Point_t &c2, int &trackIdx) const |
LineSegment & vector of Trajectories, keep track of points. More... | |
double | SqDist (const std::vector< geoalgo::Trajectory_t > &trj, const LineSegment_t &seg, Point_t &c1, Point_t &c2, int &trackIdx) const |
LineSegment & vector of Trajectories, keep track of points. More... | |
double | SqDist (const std::vector< geoalgo::Trajectory_t > &trj, const LineSegment_t &seg) const |
LineSegment & vector of Trajectories, don't keep track of points. More... | |
double | SqDist (const LineSegment_t &seg, const std::vector< geoalgo::Trajectory_t > &trj) const |
LineSegment & vector of Trajectories, don't keep track of points. More... | |
double | SqDist (const HalfLine_t &hline, const Trajectory_t &trj, Point_t &c1, Point_t &c2) const |
HalfLine & Trajectory, keep track of points. More... | |
double | SqDist (const Trajectory_t &trj, const HalfLine_t &hline, Point_t &c1, Point_t &c2) const |
HalfLine & Trajectory, keep track of points. More... | |
double | SqDist (const Trajectory_t &trj, const HalfLine_t &hline) const |
HalfLine & Trajectory, don't keep track of points. More... | |
double | SqDist (const HalfLine_t &hline, const Trajectory_t &trj) const |
HalfLine & Trajectory, don't keep track of points. More... | |
double | SqDist (const Point_t &pt, const Trajectory_t &trj) const |
Point_t & Trajectory_t distance. More... | |
double | SqDist (const Trajectory_t &trj, const Point_t &pt) const |
Point_t & Trajectory_t distance. More... | |
Point_t | ClosestPt (const Point_t &pt, const Trajectory_t &trj) const |
Point_t & Trajectory_t closest point. More... | |
Point_t | ClosestPt (const Trajectory_t &trj, const Point_t &pt) const |
Point_t & Trajectory_t closest point. More... | |
Point_t | ClosestPt (const Point_t &pt, const Trajectory_t &trj, int &idx) const |
Point_t & Trajectory_t closest point. Keep track of index of segment. More... | |
Point_t | ClosestPt (const Trajectory_t &trj, const Point_t &pt, int &idx) const |
Point_t & Trajectory_t closest point. Keep track of index of segment. More... | |
double | SqDist (const Point_t &pt, const std::vector< geoalgo::Trajectory_t > &trj, int &trackIdx) const |
Point_t & Trajectory_t distance - keep track of which track. More... | |
double | SqDist (const std::vector< geoalgo::Trajectory_t > &trj, const Point_t &pt, int &trackIdx) const |
Point_t & Trajectory_t distance - keep track of which track. More... | |
double | SqDist (const Point_t &pt, const std::vector< geoalgo::Trajectory_t > &trj) const |
Point_t & Trajectory_t distance - don't keep track. More... | |
double | SqDist (const std::vector< geoalgo::Trajectory_t > &trj, const Point_t &pt) const |
Point_t & Trajectory_t distance - don't keep track. More... | |
Point_t | ClosestPt (const Point_t &pt, const std::vector< geoalgo::Trajectory_t > &trj, int &trackIdx) const |
Point_t & Trajectory_t closest point - keep track of which track is closest. More... | |
Point_t | ClosestPt (const std::vector< geoalgo::Trajectory_t > &trj, const Point_t &pt, int &trackIdx) const |
Point_t & Trajectory_t closest point - keep track of which track is closest. More... | |
Point_t | ClosestPt (const Point_t &pt, const std::vector< geoalgo::Trajectory_t > &trj) const |
Point_t & Trajectory_t closest point - don't keep track of which track is closest. More... | |
Point_t | ClosestPt (const std::vector< geoalgo::Trajectory_t > &trj, const Point_t &pt) const |
Point_t & Trajectory_t closest point - don't keep track of which track is closest. More... | |
double | SqDist (const Point_t &pt, const LineSegment_t &line) const |
Point & LineSegment_t distance. More... | |
double | SqDist (const LineSegment_t &line, const Point_t &pt) const |
Point & LineSegment distance. More... | |
Point_t | ClosestPt (const Point_t &pt, const LineSegment_t &line) const |
Point & LineSegment closest point. More... | |
Point_t | ClosestPt (const LineSegment_t &line, const Point_t &pt) const |
Point & LineSegment closest point. More... | |
double | SqDist (const Point_t &pt, const HalfLine_t &line) const |
Point & HalfLine distance. More... | |
double | SqDist (const HalfLine_t &line, const Point_t &pt) const |
Point & HalfLine distance. More... | |
Point_t | ClosestPt (const Point_t &pt, const HalfLine_t &line) const |
Point & HalfLine closest point. More... | |
Point_t | ClosestPt (const HalfLine_t &line, const Point_t &pt) const |
Point & HalfLine closest point. More... | |
double | SqDist (const HalfLine_t &hline, const LineSegment_t &seg, Point_t &L1, Point_t &L2) const |
double | SqDist (const LineSegment_t &seg, const HalfLine_t &hline, Point_t &L1, Point_t &L2) const |
double | SqDist (const HalfLine_t &hline, const LineSegment_t &seg) const |
double | SqDist (const LineSegment_t &seg, const HalfLine_t &hline) const |
double | SqDist (const Point_t &pt, const AABox_t &box) const |
Point & AABox distance. More... | |
double | SqDist (const AABox_t &box, const Point_t &pt) |
Point & AABox distance. More... | |
Point_t | ClosestPt (const Point_t &pt, const AABox_t &box) const |
Point & AABox closest point. More... | |
Point_t | ClosestPt (const AABox_t &box, const Point_t &pt) const |
Point & AABox closest point. More... | |
double | commonOrigin (const Line_t &lin1, const Line_t &lin2) const |
Common origin: Line Segment & Line Segment. Do not keep track of origin. More... | |
double | commonOrigin (const Line_t &lin1, const Line_t &lin2, Point_t &origin) const |
Common origin: Line Segment & Line Segment. Keep track of origin. More... | |
double | commonOrigin (const LineSegment_t &seg1, const LineSegment_t &seg2, bool backwards=false) const |
Common origin: Line Segment & Line Segment. Do not keep track of origin. More... | |
double | commonOrigin (const LineSegment_t &seg1, const LineSegment_t &seg2, Point_t &origin, bool backwards=false) const |
Common origin: Line Segment & Line Segment. Keep track of origin. More... | |
double | commonOrigin (const HalfLine_t &lin, const LineSegment_t &seg, bool backwards=false) const |
Common origin: Line Segment & Half Line. Do not keep track of origin. More... | |
double | commonOrigin (const HalfLine_t &lin, const LineSegment_t &seg, Point_t &origin, bool backwards=false) const |
Common origin: Line Segment & Line Segment. Keep track of origin. More... | |
double | commonOrigin (const LineSegment_t &seg, const HalfLine_t &lin, bool backwards=false) const |
Common origin: Line Segment & Half Line. Do not keep track of origin. More... | |
double | commonOrigin (const LineSegment_t &seg, const HalfLine_t &lin, Point_t &origin, bool backwards=false) const |
Common origin: Line Segment & Line Segment. Keep track of origin. More... | |
double | commonOrigin (const HalfLine_t &lin1, const HalfLine_t &lin2, bool backwards=false) const |
Common origin: Half Line & Half Line. Do not keep track of origin. More... | |
double | commonOrigin (const HalfLine_t &lin1, const HalfLine_t &lin2, Point_t &origin, bool backwards=false) const |
Common origin: Half Line & Half Line. Keep track of origin. More... | |
double | commonOrigin (const Trajectory_t &trj1, const Trajectory_t &trj2, bool backwards=false) const |
Common origin: Trajectory & Trajectory. Do not keep track of origin. More... | |
double | commonOrigin (const Trajectory_t &trj1, const Trajectory_t &trj2, Point_t &origin, bool backwards=false) const |
Common origin: Trajectory & Trajectory. Keep track of origin. More... | |
double | commonOrigin (const Trajectory_t &trj, const HalfLine_t &lin, bool backwards=false) const |
Common origin: Trajectory & Half Line. Do not keep track of origin. More... | |
double | commonOrigin (const Trajectory_t &trj, const HalfLine_t &lin, Point_t &origin, bool backwards=false) const |
Common origin: Trajectory & Half Line. Keep track of origin. More... | |
double | commonOrigin (const HalfLine_t &lin, const Trajectory_t &trj, bool backwards=false) const |
Common origin: Trajectory & Half Line. Do not keep track of origin. More... | |
double | commonOrigin (const HalfLine_t &lin, const Trajectory_t &trj, Point_t &origin, bool backwards=false) const |
Common origin: Trajectory & Half Line. Keep track of origin. More... | |
double | commonOrigin (const Trajectory_t &trj, const LineSegment_t &seg, bool backwards=false) const |
Common origin: Trajectory & Line Segment. Do not keep track of origin. More... | |
double | commonOrigin (const Trajectory_t &trj, const LineSegment_t &seg, Point_t &origin, bool backwards=false) const |
Common origin: Trajectory & Line Segment. Keep track of origin. More... | |
double | commonOrigin (const LineSegment_t &seg, const Trajectory_t &trj, bool backwards=false) const |
Common origin: Trajectory & Line Segment. Do not keep track of origin. More... | |
double | commonOrigin (const LineSegment_t &seg, const Trajectory_t &trj, Point_t &origin, bool backwards=false) const |
Common origin: Trajectory & Line Segment. Keep track of origin. More... | |
Sphere_t | boundingSphere (const std::vector< Point_t > &pts) const |
Protected Member Functions | |
double | _SqDist_ (const Line_t &l1, const Line_t &l2, Point_t &L1, Point_t &L2) const |
Line & Line distance w/o dimensionality check. More... | |
double | _SqDist_ (const HalfLine_t &l1, const HalfLine_t &l2, Point_t &L1, Point_t &L2) const |
HalfLine & HalfLine distance w/o dimensionality check. More... | |
double | _SqDist_ (const Point_t &pt, const LineSegment_t &line) const |
Point & LineSegment distance w/o dimensionality check. More... | |
double | _SqDist_ (const Point_t &pt, const Point_t &line_s, const Point_t &line_e) const |
Point & LineSegment distance w/o dimensionality check. More... | |
double | _SqDist_ (const LineSegment_t &line, const Point_t &pt) const |
Point & LineSegment distance w/o dimensionality check. More... | |
double | _SqDist_ (const HalfLine_t &hline, const LineSegment_t &seg, Point_t &L1, Point_t &L2) const |
HalfLine & LineSegment distance w/o dimensionality check. More... | |
double | _SqDist_ (const LineSegment_t &seg1, const LineSegment_t &seg2, Point_t &c1, Point_t &c2) const |
LineSegment & LineSegment distance w/o dimensionality check. More... | |
Point_t | _ClosestPt_ (const Point_t &pt, const LineSegment_t &line) const |
Point_t | _ClosestPt_ (const LineSegment_t &line, const Point_t &pt) const |
double | _SqDist_ (const Point_t &pt, const HalfLine_t &line) const |
Point & HalfLine distance w/o dimensionality check. More... | |
double | _SqDist_ (const HalfLine_t &line, const Point_t &pt) const |
Point & HalfLine distance w/o dimensionality check. More... | |
Point_t | _ClosestPt_ (const Point_t &pt, const HalfLine_t &line) const |
Point_t | _ClosestPt_ (const HalfLine_t &line, const Point_t &pt) const |
Point_t | _ClosestPt_ (const Line_t &line, const Point_t &pt) const |
Point_t | _ClosestPt_ (const Point_t &pt, const Line_t &line) const |
double | _SqDist_ (const Line_t &line, const Point_t &pt) const |
double | _SqDist_ (const Point_t &pt, const Line_t &line) const |
double | _SqDist_ (const Point_t &pt, const AABox_t &box) const |
Point & AABox distance w/o dimensionality check. More... | |
double | _SqDist_ (const AABox_t &box, const Point_t &pt) const |
Point & AABox distance w/o dimensionality check. More... | |
Point_t | _ClosestPt_ (const Point_t &pt, const AABox_t &box) const |
Point & AABox closest point w/o dimensionality check. More... | |
Point_t | _ClosestPt_ (const AABox_t &box, const Point_t &pt) const |
Point & AABox closest point w/o dimensionality check. More... | |
double | _commonOrigin_ (const Line_t &lin1, const Line_t &lin2, Point_t &origin) const |
Common origin: Line & Line. Keep track of origin. More... | |
double | _commonOrigin_ (const HalfLine_t &lin1, const HalfLine_t &lin2, Point_t &origin, bool backwards) const |
Common origin: Half Line & Half Line. Keep track of origin. More... | |
double | _commonOrigin_ (const HalfLine_t &lin, const LineSegment_t &seg, Point_t &origin, bool backwards) const |
Common origin: Line Segment & Half Line. Keep track of origin. More... | |
double | _commonOrigin_ (const LineSegment_t &seg1, const LineSegment_t &seg2, Point_t &origin, bool backwards) const |
Common origin: Line Segment & Line Segment. Keep track of origin. More... | |
double | _commonOrigin_ (const Trajectory_t &trj1, const Trajectory_t &trj2, Point_t &origin, bool backwards) const |
Common origin: Trajectory & Trajectory. Keep track of origin. More... | |
double | _commonOrigin_ (const Trajectory_t &trj, const LineSegment_t &seg, Point_t &origin, bool backwards) const |
Common origin: Trajectory & Line Segment. Keep track of origin. More... | |
double | _commonOrigin_ (const Trajectory_t &trj, const HalfLine_t &lin, Point_t &origin, bool backwards) const |
Common origin: Trajectory & Half Line. Keep track of origin. More... | |
Sphere_t | _boundingSphere_ (const std::vector< Point_t > &pts) const |
Sphere_t | _RemainingPoints_ (std::vector< Point_t > &remaining, const Sphere_t &thisSphere) const |
Sphere_t | _WelzlSphere_ (const std::vector< Point_t > &pts, int numPts, std::vector< Point_t > sosPts) const |
double | _Clamp_ (const double n, const double min, const double max) const |
Clamp function: checks if value out of bounds. More... | |
void | _Swap_ (double &tmin, double &tmax) const |
Swap two points if min & max are inverted. More... | |
Algorithm to compute various geometrical relation among geometrical objects. In particular functions to inspect following relations are implemented:
0) Distance between geometrical objects
1) Closest point of approach
2) Intersection points
3) Containment/Overlap of objects
4) Common Origin functions
5) Bounding Sphere functions
.
Most functions are taken from the reference Real-Time-Collision-Detection (RTCD): Ref: http://realtimecollisiondetection.net
|
inline |
|
inlinevirtual |
Bounding Sphere problem Real-Time Collision Analysis 4.3.5 (Pg. 100) - WelzlSphere
Definition at line 1014 of file GeoAlgo.cxx.
References _RemainingPoints_().
Referenced by _ClosestPt_(), and boundingSphere().
|
protected |
Clamp function: checks if value out of bounds.
Definition at line 844 of file GeoAlgo.cxx.
Referenced by _ClosestPt_(), and _SqDist_().
|
protected |
Definition at line 387 of file GeoAlgo.cxx.
References geoalgo::LineSegment::Dir(), geoalgo::LineSegment::End(), geoalgo::Vector::SqLength(), and geoalgo::LineSegment::Start().
Referenced by _ClosestPt_(), _SqDist_(), and ClosestPt().
|
inlineprotected |
Definition at line 409 of file GeoAlgo.h.
References _ClosestPt_(), and _SqDist_().
|
protected |
Definition at line 419 of file GeoAlgo.cxx.
References geoalgo::HalfLine::Dir(), geoalgo::Vector::Length(), and geoalgo::HalfLine::Start().
|
inlineprotected |
Definition at line 420 of file GeoAlgo.h.
References _ClosestPt_().
Definition at line 443 of file GeoAlgo.cxx.
References geoalgo::Vector::Length(), geoalgo::Line::Pt1(), and geoalgo::Line::Pt2().
|
inlineprotected |
Definition at line 426 of file GeoAlgo.h.
References _ClosestPt_(), and _SqDist_().
Point & AABox closest point w/o dimensionality check.
Definition at line 499 of file GeoAlgo.cxx.
References geoalgo::AABox::Max(), geoalgo::AABox::Min(), and pt.
|
inlineprotected |
Point & AABox closest point w/o dimensionality check.
Definition at line 443 of file GeoAlgo.h.
References _boundingSphere_(), _Clamp_(), _ClosestPt_(), _commonOrigin_(), _RemainingPoints_(), _WelzlSphere_(), max, min, n, and geo::origin().
|
protected |
Common origin: Line & Line. Keep track of origin.
Common origin: Half Line & Half Line. Keep track of origin.
Definition at line 853 of file GeoAlgo.cxx.
References geoalgo::Vector::Dot(), geoalgo::Vector::Normalize(), geo::origin(), geoalgo::Line::Pt1(), and geoalgo::Line::Pt2().
Referenced by _ClosestPt_(), _commonOrigin_(), and commonOrigin().
|
protected |
Common origin: Half Line & Half Line. Keep track of origin.
Definition at line 905 of file GeoAlgo.cxx.
References _commonOrigin_(), geoalgo::HalfLine::Dir(), geo::origin(), and geoalgo::HalfLine::Start().
|
protected |
Common origin: Line Segment & Half Line. Keep track of origin.
Definition at line 964 of file GeoAlgo.cxx.
References _commonOrigin_(), geoalgo::LineSegment::Dir(), and geoalgo::LineSegment::Start().
|
protected |
Common origin: Line Segment & Line Segment. Keep track of origin.
Definition at line 973 of file GeoAlgo.cxx.
References _commonOrigin_(), geoalgo::LineSegment::Dir(), and geoalgo::LineSegment::Start().
|
protected |
Common origin: Trajectory & Trajectory. Keep track of origin.
Common origin: Trajectory & Trajectory/ Keep track of origin.
Definition at line 984 of file GeoAlgo.cxx.
References _commonOrigin_().
|
protected |
Common origin: Trajectory & Line Segment. Keep track of origin.
Definition at line 994 of file GeoAlgo.cxx.
References _commonOrigin_(), geoalgo::LineSegment::Dir(), and geoalgo::LineSegment::Start().
|
protected |
Common origin: Trajectory & Half Line. Keep track of origin.
Definition at line 1004 of file GeoAlgo.cxx.
References _commonOrigin_().
|
protected |
Definition at line 1049 of file GeoAlgo.cxx.
References geoalgo::Sphere::Center(), geoalgo::Sphere::Contain(), dir, geoalgo::Vector::Normalize(), and geoalgo::Sphere::Radius().
Referenced by _boundingSphere_(), and _ClosestPt_().
|
protected |
Line & Line distance w/o dimensionality check.
Definition at line 192 of file GeoAlgo.cxx.
References _ClosestPt_(), geoalgo::Vector::_SqDist_(), d, e, f, geoalgo::Line::Pt1(), geoalgo::Line::Pt2(), and s.
Referenced by _ClosestPt_(), _SqDist_(), boundingSphere(), ClosestPt(), and SqDist().
|
protected |
HalfLine & HalfLine distance w/o dimensionality check.
Definition at line 249 of file GeoAlgo.cxx.
References _ClosestPt_(), geoalgo::Vector::_SqDist_(), d, geoalgo::HalfLine::Dir(), e, f, s, and geoalgo::HalfLine::Start().
|
inlineprotected |
Point & LineSegment distance w/o dimensionality check.
Definition at line 390 of file GeoAlgo.h.
References _SqDist_(), geoalgo::LineSegment::End(), and geoalgo::LineSegment::Start().
|
protected |
|
inlineprotected |
Point & LineSegment distance w/o dimensionality check.
Definition at line 397 of file GeoAlgo.h.
References _ClosestPt_(), and _SqDist_().
|
protected |
HalfLine & LineSegment distance w/o dimensionality check.
Definition at line 305 of file GeoAlgo.cxx.
References _Clamp_(), _ClosestPt_(), geoalgo::Vector::_SqDist_(), _SqDist_(), d, geoalgo::HalfLine::Dir(), e, geoalgo::LineSegment::End(), f, s, geoalgo::HalfLine::Start(), and geoalgo::LineSegment::Start().
|
protected |
LineSegment & LineSegment distance w/o dimensionality check.
Definition at line 767 of file GeoAlgo.cxx.
References _Clamp_(), c1, e, geoalgo::LineSegment::End(), f, geoalgo::Vector::SqLength(), geoalgo::LineSegment::Start(), t1, and t2.
|
protected |
Point & HalfLine distance w/o dimensionality check.
Definition at line 405 of file GeoAlgo.cxx.
References geoalgo::HalfLine::Dir(), e, f, and geoalgo::HalfLine::Start().
|
inlineprotected |
Point & HalfLine distance w/o dimensionality check.
Definition at line 415 of file GeoAlgo.h.
References _ClosestPt_(), and _SqDist_().
Definition at line 431 of file GeoAlgo.cxx.
References e, f, geoalgo::Line::Pt1(), and geoalgo::Line::Pt2().
Definition at line 431 of file GeoAlgo.h.
References _SqDist_().
Point & AABox distance w/o dimensionality check.
Definition at line 453 of file GeoAlgo.cxx.
References geoalgo::AABox::Contain(), geoalgo::kINVALID_DOUBLE, geoalgo::AABox::Max(), and geoalgo::AABox::Min().
Point & AABox distance w/o dimensionality check.
Definition at line 437 of file GeoAlgo.h.
References _ClosestPt_(), and _SqDist_().
|
inlineprotected |
Swap two points if min & max are inverted.
Definition at line 471 of file GeoAlgo.h.
|
protected |
Definition at line 1095 of file GeoAlgo.cxx.
References geoalgo::Sphere::Contain().
Referenced by _ClosestPt_().
Definition at line 378 of file GeoAlgo.h.
References _boundingSphere_(), _SqDist_(), and geoalgo::Sphere::compat().
LineSegment_t geoalgo::GeoAlgo::BoxOverlap | ( | const AABox_t & | box, |
const HalfLine_t & | line | ||
) | const |
LineSegment sub-segment of HalfLine inside an AABox.
Definition at line 166 of file GeoAlgo.cxx.
References Intersection(), and geoalgo::HalfLine::Start().
Referenced by BoxOverlap(), and Intersection().
|
inline |
LineSegment sub-segment of HalfLine inside an AABox.
Definition at line 77 of file GeoAlgo.h.
References BoxOverlap().
Trajectory_t geoalgo::GeoAlgo::BoxOverlap | ( | const AABox_t & | box, |
const Trajectory_t & | trj | ||
) | const |
Get Trajectory inside box given some input trajectory -> now assumes trajectory cannot exit and re-enter box.
Definition at line 180 of file GeoAlgo.cxx.
References geoalgo::AABox::Contain().
|
inline |
Get Trajectory inside box given some input trajectory -> now assumes trajectory cannot exit and re-enter box.
Definition at line 84 of file GeoAlgo.h.
References BoxOverlap().
Definition at line 98 of file GeoAlgo.h.
References _ClosestPt_(), geoalgo::Vector::compat(), and geoalgo::Line::Pt1().
Referenced by ClosestPt(), and SqDist().
Definition at line 101 of file GeoAlgo.h.
References _ClosestPt_().
|
inline |
Point_t & Trajectory_t closest point.
Definition at line 205 of file GeoAlgo.h.
References ClosestPt().
|
inline |
Point_t & Trajectory_t closest point.
Definition at line 208 of file GeoAlgo.h.
References ClosestPt().
Point_t geoalgo::GeoAlgo::ClosestPt | ( | const Point_t & | pt, |
const Trajectory_t & | trj, | ||
int & | idx | ||
) | const |
Point_t & Trajectory_t closest point. Keep track of index of segment.
Definition at line 574 of file GeoAlgo.cxx.
References _ClosestPt_(), _SqDist_(), geoalgo::Trajectory::compat(), and geoalgo::kINVALID_DOUBLE.
|
inline |
Point_t & Trajectory_t closest point. Keep track of index of segment.
Definition at line 213 of file GeoAlgo.h.
References ClosestPt(), and SqDist().
Point_t geoalgo::GeoAlgo::ClosestPt | ( | const Point_t & | pt, |
const std::vector< geoalgo::Trajectory_t > & | trj, | ||
int & | trackIdx | ||
) | const |
Point_t & Trajectory_t closest point - keep track of which track is closest.
Definition at line 603 of file GeoAlgo.cxx.
References ClosestPt(), geoalgo::kINVALID_DOUBLE, and SqDist().
|
inline |
Point_t & Trajectory_t closest point - keep track of which track is closest.
Definition at line 234 of file GeoAlgo.h.
References ClosestPt().
|
inline |
Point_t & Trajectory_t closest point - don't keep track of which track is closest.
Definition at line 237 of file GeoAlgo.h.
References ClosestPt().
|
inline |
Point_t & Trajectory_t closest point - don't keep track of which track is closest.
Definition at line 240 of file GeoAlgo.h.
References ClosestPt().
|
inline |
Point & LineSegment closest point.
Definition at line 254 of file GeoAlgo.h.
References _ClosestPt_(), geoalgo::Vector::compat(), and geoalgo::LineSegment::Start().
|
inline |
Point & LineSegment closest point.
Definition at line 257 of file GeoAlgo.h.
References ClosestPt().
|
inline |
Point & HalfLine closest point.
Definition at line 270 of file GeoAlgo.h.
References _ClosestPt_(), geoalgo::Vector::compat(), and geoalgo::HalfLine::Start().
|
inline |
Point & HalfLine closest point.
Definition at line 273 of file GeoAlgo.h.
References ClosestPt().
Point & AABox closest point.
Definition at line 303 of file GeoAlgo.h.
References _ClosestPt_(), geoalgo::Vector::compat(), and geoalgo::AABox::Min().
Point & AABox closest point.
Definition at line 306 of file GeoAlgo.h.
References ClosestPt().
Common origin: Line Segment & Line Segment. Do not keep track of origin.
Definition at line 314 of file GeoAlgo.h.
References geo::origin(), and geoalgo::Line::Pt1().
Referenced by commonOrigin().
|
inline |
Common origin: Line Segment & Line Segment. Keep track of origin.
Definition at line 317 of file GeoAlgo.h.
References _commonOrigin_(), geoalgo::Vector::compat(), and geoalgo::Line::Pt1().
|
inline |
Common origin: Line Segment & Line Segment. Do not keep track of origin.
Definition at line 320 of file GeoAlgo.h.
References commonOrigin(), geo::origin(), and geoalgo::LineSegment::Start().
|
inline |
Common origin: Line Segment & Line Segment. Keep track of origin.
Definition at line 323 of file GeoAlgo.h.
References _commonOrigin_(), geoalgo::Vector::compat(), and geoalgo::LineSegment::Start().
|
inline |
Common origin: Line Segment & Half Line. Do not keep track of origin.
Definition at line 326 of file GeoAlgo.h.
References commonOrigin(), geo::origin(), and geoalgo::HalfLine::Start().
|
inline |
Common origin: Line Segment & Line Segment. Keep track of origin.
Definition at line 329 of file GeoAlgo.h.
References _commonOrigin_(), geoalgo::Vector::compat(), geoalgo::HalfLine::Start(), and geoalgo::LineSegment::Start().
|
inline |
Common origin: Line Segment & Half Line. Do not keep track of origin.
Definition at line 332 of file GeoAlgo.h.
References commonOrigin(), geo::origin(), and geoalgo::HalfLine::Start().
|
inline |
Common origin: Line Segment & Line Segment. Keep track of origin.
Definition at line 335 of file GeoAlgo.h.
References _commonOrigin_(), geoalgo::Vector::compat(), geoalgo::HalfLine::Start(), and geoalgo::LineSegment::Start().
|
inline |
Common origin: Half Line & Half Line. Do not keep track of origin.
Definition at line 338 of file GeoAlgo.h.
References commonOrigin(), geo::origin(), and geoalgo::HalfLine::Start().
|
inline |
Common origin: Half Line & Half Line. Keep track of origin.
Definition at line 341 of file GeoAlgo.h.
References _commonOrigin_(), geoalgo::Vector::compat(), and geoalgo::HalfLine::Start().
|
inline |
Common origin: Trajectory & Trajectory. Do not keep track of origin.
Definition at line 344 of file GeoAlgo.h.
References commonOrigin(), and geo::origin().
|
inline |
Common origin: Trajectory & Trajectory. Keep track of origin.
Definition at line 347 of file GeoAlgo.h.
References _commonOrigin_(), and geoalgo::Trajectory::compat().
|
inline |
Common origin: Trajectory & Half Line. Do not keep track of origin.
Definition at line 350 of file GeoAlgo.h.
References commonOrigin(), and geo::origin().
|
inline |
Common origin: Trajectory & Half Line. Keep track of origin.
Definition at line 353 of file GeoAlgo.h.
References _commonOrigin_(), geoalgo::Trajectory::compat(), and geoalgo::HalfLine::Start().
|
inline |
Common origin: Trajectory & Half Line. Do not keep track of origin.
Definition at line 356 of file GeoAlgo.h.
References commonOrigin(), and geo::origin().
|
inline |
Common origin: Trajectory & Half Line. Keep track of origin.
Definition at line 359 of file GeoAlgo.h.
References _commonOrigin_(), geoalgo::Trajectory::compat(), and geoalgo::HalfLine::Start().
|
inline |
Common origin: Trajectory & Line Segment. Do not keep track of origin.
Definition at line 362 of file GeoAlgo.h.
References commonOrigin(), and geo::origin().
|
inline |
Common origin: Trajectory & Line Segment. Keep track of origin.
Definition at line 365 of file GeoAlgo.h.
References _commonOrigin_(), geoalgo::Trajectory::compat(), and geoalgo::LineSegment::Start().
|
inline |
Common origin: Trajectory & Line Segment. Do not keep track of origin.
Definition at line 368 of file GeoAlgo.h.
References commonOrigin(), and geo::origin().
|
inline |
Common origin: Trajectory & Line Segment. Keep track of origin.
Definition at line 371 of file GeoAlgo.h.
References _commonOrigin_(), geoalgo::Trajectory::compat(), and geoalgo::LineSegment::Start().
std::vector< Point_t > geoalgo::GeoAlgo::Intersection | ( | const AABox_t & | box, |
const HalfLine_t & | line, | ||
bool | back = false |
||
) | const |
Intersection between a HalfLine and an AABox.
Definition at line 10 of file GeoAlgo.cxx.
References geoalgo::Vector::_SqDist_(), dir, geoalgo::HalfLine::Dir(), geoalgo::Vector::IsValid(), geoalgo::AABox::Max(), geoalgo::AABox::Min(), s, and geoalgo::HalfLine::Start().
Referenced by BoxOverlap(), Intersection(), and ~GeoAlgo().
|
inline |
Intersection between a HalfLine and an AABox.
Definition at line 59 of file GeoAlgo.h.
References Intersection().
std::vector< Point_t > geoalgo::GeoAlgo::Intersection | ( | const AABox_t & | box, |
const LineSegment_t & | l | ||
) | const |
Intersection between LineSegment and an AABox.
Definition at line 112 of file GeoAlgo.cxx.
References geoalgo::HalfLine::Dir(), geoalgo::LineSegment::End(), Intersection(), pt, geoalgo::HalfLine::Start(), and geoalgo::LineSegment::Start().
|
inline |
Intersection between LineSegment and an AABox.
Definition at line 65 of file GeoAlgo.h.
References Intersection().
std::vector< Point_t > geoalgo::GeoAlgo::Intersection | ( | const AABox_t & | box, |
const Trajectory_t & | trj | ||
) | const |
Intersection between Trajectory and an AABox.
Definition at line 135 of file GeoAlgo.cxx.
References geoalgo::Trajectory::compat(), geoalgo::HalfLine::Dir(), Intersection(), geoalgo::AABox::Min(), pt, and geoalgo::HalfLine::Start().
|
inline |
Intersection between Trajectory and an AABox.
Definition at line 71 of file GeoAlgo.h.
References BoxOverlap(), and Intersection().
Definition at line 92 of file GeoAlgo.h.
References _SqDist_(), geoalgo::Vector::compat(), and geoalgo::Line::Pt1().
Referenced by ClosestPt(), geoalgo::Cylinder::Contain(), and SqDist().
Definition at line 95 of file GeoAlgo.h.
References SqDist().
|
inline |
Definition at line 109 of file GeoAlgo.h.
References _SqDist_(), geoalgo::Vector::compat(), and geoalgo::Line::Pt1().
Definition at line 112 of file GeoAlgo.h.
References SqDist().
|
inline |
Definition at line 120 of file GeoAlgo.h.
References _SqDist_(), geoalgo::Vector::compat(), and geoalgo::HalfLine::Start().
|
inline |
Definition at line 123 of file GeoAlgo.h.
References SqDist().
|
inline |
LineSegment_t & LineSegment_t distance - keep track of points.
Definition at line 131 of file GeoAlgo.h.
References _SqDist_(), geoalgo::Vector::compat(), and geoalgo::LineSegment::Start().
|
inline |
LineSegment & LineSegment, don't keep track of points.
Definition at line 134 of file GeoAlgo.h.
References c1, c2, and SqDist().
double geoalgo::GeoAlgo::SqDist | ( | const LineSegment_t & | seg, |
const Trajectory_t & | trj, | ||
Point_t & | c1, | ||
Point_t & | c2 | ||
) | const |
LineSegment & Trajectory, keep track of points.
Definition at line 633 of file GeoAlgo.cxx.
References _SqDist_(), geoalgo::Trajectory::compat(), geoalgo::kMAX_DOUBLE, and geoalgo::LineSegment::Start().
|
inline |
LineSegment & Trajectory, keep track of points.
Definition at line 144 of file GeoAlgo.h.
References SqDist().
|
inline |
LineSegment & Trajectory, don't keep track of points.
Definition at line 147 of file GeoAlgo.h.
References c1, c2, and SqDist().
|
inline |
LineSegment & Trajectory, don't keep track of points.
Definition at line 150 of file GeoAlgo.h.
References c1, c2, and SqDist().
double geoalgo::GeoAlgo::SqDist | ( | const Trajectory_t & | trj1, |
const Trajectory_t & | trj2, | ||
Point_t & | c1, | ||
Point_t & | c2 | ||
) | const |
Trajectory & Trajectory, keep track of points.
Definition at line 666 of file GeoAlgo.cxx.
References _SqDist_(), geoalgo::Trajectory::compat(), and geoalgo::kMAX_DOUBLE.
|
inline |
Trajectory & Trajectory, don't keep track of points.
Definition at line 160 of file GeoAlgo.h.
References c1, c2, and SqDist().
double geoalgo::GeoAlgo::SqDist | ( | const LineSegment_t & | seg, |
const std::vector< geoalgo::Trajectory_t > & | trj, | ||
Point_t & | c1, | ||
Point_t & | c2, | ||
int & | trackIdx | ||
) | const |
LineSegment & vector of Trajectories, keep track of points.
Definition at line 735 of file GeoAlgo.cxx.
References geoalgo::kMAX_DOUBLE, and SqDist().
|
inline |
LineSegment & vector of Trajectories, keep track of points.
Definition at line 170 of file GeoAlgo.h.
References SqDist().
|
inline |
LineSegment & vector of Trajectories, don't keep track of points.
Definition at line 173 of file GeoAlgo.h.
References c1, c2, and SqDist().
|
inline |
LineSegment & vector of Trajectories, don't keep track of points.
Definition at line 176 of file GeoAlgo.h.
References c1, c2, and SqDist().
double geoalgo::GeoAlgo::SqDist | ( | const HalfLine_t & | hline, |
const Trajectory_t & | trj, | ||
Point_t & | c1, | ||
Point_t & | c2 | ||
) | const |
HalfLine & Trajectory, keep track of points.
Definition at line 701 of file GeoAlgo.cxx.
References _SqDist_(), geoalgo::Trajectory::compat(), geoalgo::kMAX_DOUBLE, and geoalgo::HalfLine::Start().
|
inline |
HalfLine & Trajectory, keep track of points.
Definition at line 186 of file GeoAlgo.h.
References SqDist().
|
inline |
HalfLine & Trajectory, don't keep track of points.
Definition at line 189 of file GeoAlgo.h.
References c1, c2, and SqDist().
|
inline |
HalfLine & Trajectory, don't keep track of points.
Definition at line 192 of file GeoAlgo.h.
References c1, c2, pt, and SqDist().
double geoalgo::GeoAlgo::SqDist | ( | const Point_t & | pt, |
const Trajectory_t & | trj | ||
) | const |
Point_t & Trajectory_t distance.
Definition at line 522 of file GeoAlgo.cxx.
References _SqDist_(), geoalgo::Trajectory::compat(), and geoalgo::kINVALID_DOUBLE.
|
inline |
Point_t & Trajectory_t distance.
Definition at line 202 of file GeoAlgo.h.
References SqDist().
double geoalgo::GeoAlgo::SqDist | ( | const Point_t & | pt, |
const std::vector< geoalgo::Trajectory_t > & | trj, | ||
int & | trackIdx | ||
) | const |
Point_t & Trajectory_t distance - keep track of which track.
Definition at line 547 of file GeoAlgo.cxx.
References geoalgo::kINVALID_DOUBLE, and SqDist().
|
inline |
Point_t & Trajectory_t distance - keep track of which track.
Definition at line 223 of file GeoAlgo.h.
References SqDist().
|
inline |
Point_t & Trajectory_t distance - don't keep track.
Definition at line 226 of file GeoAlgo.h.
References SqDist().
|
inline |
Point_t & Trajectory_t distance - don't keep track.
Definition at line 229 of file GeoAlgo.h.
References ClosestPt(), and SqDist().
|
inline |
Point & LineSegment_t distance.
Definition at line 248 of file GeoAlgo.h.
References _SqDist_(), geoalgo::Vector::compat(), and geoalgo::LineSegment::Start().
|
inline |
Point & LineSegment distance.
Definition at line 251 of file GeoAlgo.h.
References SqDist().
|
inline |
Point & HalfLine distance.
Definition at line 264 of file GeoAlgo.h.
References _SqDist_(), geoalgo::Vector::compat(), and geoalgo::HalfLine::Start().
|
inline |
Point & HalfLine distance.
Definition at line 267 of file GeoAlgo.h.
References SqDist().
|
inline |
Definition at line 281 of file GeoAlgo.h.
References _SqDist_(), geoalgo::Vector::compat(), geoalgo::HalfLine::Start(), and geoalgo::LineSegment::Start().
|
inline |
Definition at line 284 of file GeoAlgo.h.
References SqDist().
|
inline |
Definition at line 287 of file GeoAlgo.h.
References SqDist().
|
inline |
Definition at line 290 of file GeoAlgo.h.
References SqDist().
Point & AABox distance.
Definition at line 297 of file GeoAlgo.h.
References _SqDist_(), geoalgo::Vector::compat(), and geoalgo::AABox::Min().
Point & AABox distance.
Definition at line 300 of file GeoAlgo.h.
References SqDist().