1 #ifndef WIRECELLUTIL_POINT_H 2 #define WIRECELLUTIL_POINT_H 21 typedef std::pair<Point, Point>
Ray;
44 bool operator()(
const Point& lhs,
const Point& rhs)
const;
46 typedef std::set<Point, ComparePoints>
PointSet;
68 Ray
ray_pitch(
const Ray& ray1,
const Ray& ray2);
82 double ray_dist(
const Ray& ray,
const Point& point);
92 return Point(get<double>(cfg,
"x"), get<double>(cfg,
"y"), get<double>(cfg,
"z"));
97 return Ray(get<WireCell::Point>(cfg,
"tail"), get<WireCell::Point>(cfg,
"head"));
105 os <<
"[" << ray.first <<
" --> " << ray.second <<
"]";
std::pair< Point, Point > Ray
A line segment running from a first (tail) to a second (head) point.
D3Vector< double > Point
A 3D Cartesian point in double precision.
bool operator()(const Point &lhs, const Point &rhs) const
std::pair< double, Vector > ScalarPoint
A scalar + vector, eg charge at a point.
std::pair< Point, float > PointValue
PointValue - an association of a point and a value.
std::vector< PointValue > PointValueVector
PointValueVector - a collection of point-value associations.
Return true if lhs<rhs w/in tolerance.
double ray_dist(const Ray &ray, const Point &point)
WireCell::Point convert< WireCell::Point >(const Configuration &cfg, const WireCell::Point &def)
double ray_volume(const Ray &ray)
std::vector< ScalarPoint > ScalarField
double ray_length(const Ray &ray)
std::set< Point, ComparePoints > PointSet
Vector ray_unit(const Ray &ray)
Point Vector
An alias for Point.
BoundingBox bounds(int x, int y, int w, int h)
D3Vector< T > operator/(const D3Vector< T > a, T s)
std::vector< ray_pair_t > ray_pair_vector_t
std::vector< Point > PointVector
PointVector - a collection of Points.
Ray ray_pitch(const Ray &ray1, const Ray &ray2)
std::ostream & operator<<(std::ostream &os, const WireCell::WirePlaneId &wpid)
Json::Value Configuration
double point_angle(const Vector &axis, const Vector &vector)
bool point_contained(const Point &point, const Ray &bounds)
WireCell::Ray convert< WireCell::Ray >(const Configuration &cfg, const WireCell::Ray &def)
Vector ray_vector(const Ray &ray)
std::pair< Ray, Ray > ray_pair_t