LArSoft
v09_90_00
Liquid Argon Software toolkit - https://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 | |
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
Bounding Sphere problem Real-Time Collision Analysis 4.3.5 (Pg. 100) - WelzlSphere
Definition at line 1033 of file GeoAlgo.cxx.
References _RemainingPoints_().
Referenced by _ClosestPt_(), and boundingSphere().
|
protected |
Clamp function: checks if value out of bounds.
Definition at line 852 of file GeoAlgo.cxx.
References n.
Referenced by _ClosestPt_(), and _SqDist_().
|
protected |
Definition at line 390 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 660 of file GeoAlgo.h.
References _ClosestPt_(), and _SqDist_().
|
protected |
Definition at line 423 of file GeoAlgo.cxx.
References geoalgo::HalfLine::Dir(), geoalgo::Vector::Length(), and geoalgo::HalfLine::Start().
|
inlineprotected |
Definition at line 672 of file GeoAlgo.h.
References _ClosestPt_().
Definition at line 448 of file GeoAlgo.cxx.
References geoalgo::Vector::Length(), geoalgo::Line::Pt1(), and geoalgo::Line::Pt2().
|
inlineprotected |
Definition at line 680 of file GeoAlgo.h.
References _ClosestPt_(), and _SqDist_().
Point & AABox closest point w/o dimensionality check.
Definition at line 502 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 697 of file GeoAlgo.h.
References _boundingSphere_(), _Clamp_(), _ClosestPt_(), _commonOrigin_(), _RemainingPoints_(), _WelzlSphere_(), 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 860 of file GeoAlgo.cxx.
References geoalgo::Vector::Dot(), geoalgo::Vector::Normalize(), geo::origin(), geoalgo::Line::Pt1(), pt1, geoalgo::Line::Pt2(), and pt2.
Referenced by _ClosestPt_(), _commonOrigin_(), and commonOrigin().
|
protected |
Common origin: Half Line & Half Line. Keep track of origin.
Definition at line 909 of file GeoAlgo.cxx.
References _commonOrigin_(), geoalgo::HalfLine::Dir(), geo::origin(), pt1, pt2, and geoalgo::HalfLine::Start().
|
protected |
Common origin: Line Segment & Half Line. Keep track of origin.
Definition at line 969 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 981 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 995 of file GeoAlgo.cxx.
References _commonOrigin_().
|
protected |
Common origin: Trajectory & Line Segment. Keep track of origin.
Definition at line 1008 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 1021 of file GeoAlgo.cxx.
References _commonOrigin_().
|
protected |
Definition at line 1070 of file GeoAlgo.cxx.
References geoalgo::Sphere::Center(), geoalgo::Sphere::Contain(), dir, larg4::dist(), geoalgo::Vector::Normalize(), and geoalgo::Sphere::Radius().
Referenced by _boundingSphere_(), and _ClosestPt_().
|
protected |
Line & Line distance w/o dimensionality check.
Definition at line 193 of file GeoAlgo.cxx.
References _ClosestPt_(), geoalgo::Vector::_SqDist_(), d, larg4::dist(), e, f, geoalgo::Line::Pt1(), geoalgo::Line::Pt2(), and r.
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(), larg4::dist(), e, f, r, and geoalgo::HalfLine::Start().
|
inlineprotected |
Point & LineSegment distance w/o dimensionality check.
Definition at line 631 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 640 of file GeoAlgo.h.
References _ClosestPt_(), and _SqDist_().
|
protected |
HalfLine & LineSegment distance w/o dimensionality check.
Definition at line 306 of file GeoAlgo.cxx.
References _Clamp_(), _ClosestPt_(), geoalgo::Vector::_SqDist_(), _SqDist_(), d, geoalgo::HalfLine::Dir(), e, geoalgo::LineSegment::End(), f, r, geoalgo::LineSegment::Start(), and geoalgo::HalfLine::Start().
|
protected |
LineSegment & LineSegment distance w/o dimensionality check.
Definition at line 776 of file GeoAlgo.cxx.
References _Clamp_(), c1, e, geoalgo::LineSegment::End(), f, r, geoalgo::Vector::SqLength(), geoalgo::LineSegment::Start(), t1, and t2.
|
protected |
Point & HalfLine distance w/o dimensionality check.
Definition at line 410 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 668 of file GeoAlgo.h.
References _ClosestPt_(), and _SqDist_().
Referenced by _SqDist_().
Definition at line 436 of file GeoAlgo.cxx.
References e, f, geoalgo::Line::Pt1(), and geoalgo::Line::Pt2().
Definition at line 687 of file GeoAlgo.h.
References _SqDist_().
Referenced by _SqDist_().
Point & AABox distance w/o dimensionality check.
Definition at line 457 of file GeoAlgo.cxx.
References geoalgo::AABox::Contain(), larg4::dist(), geoalgo::kINVALID_DOUBLE, geoalgo::AABox::Max(), and geoalgo::AABox::Min().
Point & AABox distance w/o dimensionality check.
Definition at line 692 of file GeoAlgo.h.
References _ClosestPt_(), and _SqDist_().
Referenced by _SqDist_().
|
inlineprotected |
Swap two points if min & max are inverted.
Definition at line 746 of file GeoAlgo.h.
|
protected |
Definition at line 1114 of file GeoAlgo.cxx.
References geoalgo::Sphere::Contain().
Referenced by _ClosestPt_().
Definition at line 615 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 168 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 81 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 182 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 89 of file GeoAlgo.h.
References BoxOverlap().
Definition at line 106 of file GeoAlgo.h.
References _ClosestPt_(), geoalgo::Vector::compat(), and geoalgo::Line::Pt1().
Referenced by ClosestPt(), and SqDist().
Definition at line 112 of file GeoAlgo.h.
References _ClosestPt_().
|
inline |
Point_t & Trajectory_t closest point.
Definition at line 280 of file GeoAlgo.h.
References ClosestPt().
|
inline |
Point_t & Trajectory_t closest point.
Definition at line 286 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 572 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 294 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 602 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 330 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 337 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 343 of file GeoAlgo.h.
References ClosestPt().
|
inline |
Point & LineSegment closest point.
Definition at line 361 of file GeoAlgo.h.
References _ClosestPt_(), geoalgo::Vector::compat(), and geoalgo::LineSegment::Start().
|
inline |
Point & LineSegment closest point.
Definition at line 367 of file GeoAlgo.h.
References ClosestPt().
|
inline |
Point & HalfLine closest point.
Definition at line 384 of file GeoAlgo.h.
References _ClosestPt_(), geoalgo::Vector::compat(), and geoalgo::HalfLine::Start().
|
inline |
Point & HalfLine closest point.
Definition at line 390 of file GeoAlgo.h.
References ClosestPt().
Point & AABox closest point.
Definition at line 434 of file GeoAlgo.h.
References _ClosestPt_(), geoalgo::Vector::compat(), and geoalgo::AABox::Min().
Point & AABox closest point.
Definition at line 440 of file GeoAlgo.h.
References ClosestPt().
Referenced by ClosestPt().
Common origin: Line Segment & Line Segment. Do not keep track of origin.
Definition at line 446 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 452 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 458 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 466 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 475 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 483 of file GeoAlgo.h.
References _commonOrigin_(), geoalgo::Vector::compat(), geoalgo::LineSegment::Start(), and geoalgo::HalfLine::Start().
|
inline |
Common origin: Line Segment & Half Line. Do not keep track of origin.
Definition at line 492 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 500 of file GeoAlgo.h.
References _commonOrigin_(), geoalgo::Vector::compat(), geoalgo::LineSegment::Start(), and geoalgo::HalfLine::Start().
|
inline |
Common origin: Half Line & Half Line. Do not keep track of origin.
Definition at line 509 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 517 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 526 of file GeoAlgo.h.
References commonOrigin(), and geo::origin().
|
inline |
Common origin: Trajectory & Trajectory. Keep track of origin.
Definition at line 534 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 543 of file GeoAlgo.h.
References commonOrigin(), and geo::origin().
|
inline |
Common origin: Trajectory & Half Line. Keep track of origin.
Definition at line 551 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 560 of file GeoAlgo.h.
References commonOrigin(), and geo::origin().
|
inline |
Common origin: Trajectory & Half Line. Keep track of origin.
Definition at line 568 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 577 of file GeoAlgo.h.
References commonOrigin(), and geo::origin().
|
inline |
Common origin: Trajectory & Line Segment. Keep track of origin.
Definition at line 585 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 594 of file GeoAlgo.h.
References commonOrigin(), and geo::origin().
|
inline |
Common origin: Trajectory & Line Segment. Keep track of origin.
Definition at line 602 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 11 of file GeoAlgo.cxx.
References geoalgo::Vector::_SqDist_(), dir, geoalgo::HalfLine::Dir(), geoalgo::Vector::IsValid(), geoalgo::AABox::Max(), geoalgo::AABox::Min(), and geoalgo::HalfLine::Start().
Referenced by BoxOverlap(), and Intersection().
|
inline |
Intersection between a HalfLine and an AABox.
Definition at line 55 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 117 of file GeoAlgo.cxx.
References geoalgo::HalfLine::Dir(), geoalgo::LineSegment::End(), Intersection(), pt, geoalgo::LineSegment::Start(), and geoalgo::HalfLine::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 139 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 73 of file GeoAlgo.h.
References BoxOverlap(), and Intersection().
Definition at line 98 of file GeoAlgo.h.
References _SqDist_(), geoalgo::Vector::compat(), and geoalgo::Line::Pt1().
Referenced by ClosestPt(), geoalgo::Cylinder::Contain(), and SqDist().
Definition at line 104 of file GeoAlgo.h.
References SqDist().
Referenced by SqDist().
|
inline |
Definition at line 118 of file GeoAlgo.h.
References _SqDist_(), geoalgo::Vector::compat(), and geoalgo::Line::Pt1().
Definition at line 124 of file GeoAlgo.h.
References SqDist().
|
inline |
Definition at line 135 of file GeoAlgo.h.
References _SqDist_(), geoalgo::Vector::compat(), and geoalgo::HalfLine::Start().
|
inline |
Definition at line 141 of file GeoAlgo.h.
References SqDist().
|
inline |
LineSegment_t & LineSegment_t distance - keep track of points.
Definition at line 152 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 161 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 177 of file GeoAlgo.h.
References SqDist().
|
inline |
LineSegment & Trajectory, don't keep track of points.
Definition at line 182 of file GeoAlgo.h.
References c1, c2, and SqDist().
|
inline |
LineSegment & Trajectory, don't keep track of points.
Definition at line 189 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 667 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 205 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 740 of file GeoAlgo.cxx.
References geoalgo::kMAX_DOUBLE, and SqDist().
|
inline |
LineSegment & vector of Trajectories, keep track of points.
Definition at line 222 of file GeoAlgo.h.
References SqDist().
|
inline |
LineSegment & vector of Trajectories, don't keep track of points.
Definition at line 231 of file GeoAlgo.h.
References c1, c2, and SqDist().
|
inline |
LineSegment & vector of Trajectories, don't keep track of points.
Definition at line 239 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 705 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 253 of file GeoAlgo.h.
References SqDist().
|
inline |
HalfLine & Trajectory, don't keep track of points.
Definition at line 258 of file GeoAlgo.h.
References c1, c2, and SqDist().
|
inline |
HalfLine & Trajectory, don't keep track of points.
Definition at line 265 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 523 of file GeoAlgo.cxx.
References _SqDist_(), geoalgo::Trajectory::compat(), and geoalgo::kINVALID_DOUBLE.
|
inline |
Point_t & Trajectory_t distance.
Definition at line 278 of file GeoAlgo.h.
References SqDist().
Referenced by 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 545 of file GeoAlgo.cxx.
References geoalgo::kINVALID_DOUBLE, and SqDist().
|
inline |
Point_t & Trajectory_t distance - keep track of which track.
Definition at line 307 of file GeoAlgo.h.
References SqDist().
|
inline |
Point_t & Trajectory_t distance - don't keep track.
Definition at line 314 of file GeoAlgo.h.
References SqDist().
|
inline |
Point_t & Trajectory_t distance - don't keep track.
Definition at line 320 of file GeoAlgo.h.
References ClosestPt(), and SqDist().
|
inline |
Point & LineSegment_t distance.
Definition at line 353 of file GeoAlgo.h.
References _SqDist_(), geoalgo::Vector::compat(), and geoalgo::LineSegment::Start().
|
inline |
Point & LineSegment distance.
Definition at line 359 of file GeoAlgo.h.
References SqDist().
Referenced by SqDist().
|
inline |
Point & HalfLine distance.
Definition at line 376 of file GeoAlgo.h.
References _SqDist_(), geoalgo::Vector::compat(), and geoalgo::HalfLine::Start().
|
inline |
|
inline |
Definition at line 399 of file GeoAlgo.h.
References _SqDist_(), geoalgo::Vector::compat(), geoalgo::LineSegment::Start(), and geoalgo::HalfLine::Start().
|
inline |
Definition at line 405 of file GeoAlgo.h.
References SqDist().
|
inline |
Definition at line 410 of file GeoAlgo.h.
References SqDist().
|
inline |
Definition at line 417 of file GeoAlgo.h.
References SqDist().
Point & AABox distance.
Definition at line 426 of file GeoAlgo.h.
References _SqDist_(), geoalgo::Vector::compat(), and geoalgo::AABox::Min().