![]() |
LArSoft
v10_06_00
Liquid Argon Software toolkit - https://larsoft.org/
|
Definition of a rectangle from dimension ranges. More...
#include "SimpleGeo.h"
Public Types | |
| using | Data_t = Data |
| Numerical type for boundaries. More... | |
| using | Rectangle_t = Rectangle< Data > |
| This type. More... | |
| using | Range_t = Range< Data_t > |
| Type for dimension boundaries. More... | |
Public Member Functions | |
| Rectangle ()=default | |
| Default constructor: an empty rectangle. More... | |
| Rectangle (Range_t const &width, Range_t const &depth) | |
| Constructor from width and depth ranges. More... | |
| bool | isNull () const |
| Returns whether the rectangle has null area. More... | |
| bool | contains (Data_t w, Data_t d) const |
| Returns whether the specified point is in the area. More... | |
| bool | overlaps (Rectangle_t const &r) const |
| Returns whether this and the specified rectangle overlap. More... | |
| void | extendToInclude (Rectangle_t const &r) |
| Extends the range to include the specified point. More... | |
Public Attributes | |
| Range_t | width |
| Range along width direction. More... | |
| Range_t | depth |
| Range along depth direction. More... | |
Definition of a rectangle from dimension ranges.
| Data | numerical type for boundary coordinates |
This object defines a 2D area (rectangle) as a list of one range for each dimension. Dimensions are called "width" and "depth".
If the use case asks for point-driven area rather than a dimension-driven area, use Area instead.
Definition at line 423 of file SimpleGeo.h.
| using lar::util::simple_geo::Rectangle< Data >::Data_t = Data |
Numerical type for boundaries.
Definition at line 424 of file SimpleGeo.h.
| using lar::util::simple_geo::Rectangle< Data >::Range_t = Range<Data_t> |
Type for dimension boundaries.
Definition at line 426 of file SimpleGeo.h.
| using lar::util::simple_geo::Rectangle< Data >::Rectangle_t = Rectangle<Data> |
This type.
Definition at line 425 of file SimpleGeo.h.
|
default |
Default constructor: an empty rectangle.
|
inline |
Constructor from width and depth ranges.
Definition at line 435 of file SimpleGeo.h.
|
inline |
Returns whether the specified point is in the area.
Definition at line 441 of file SimpleGeo.h.
Referenced by geo::part::AreaOwner::contains().
| void lar::util::simple_geo::Rectangle< Data >::extendToInclude | ( | Rectangle_t const & | r | ) |
Extends the range to include the specified point.
Definition at line 544 of file SimpleGeo.h.
References lar::util::simple_geo::Rectangle< Data >::depth, and lar::util::simple_geo::Rectangle< Data >::width.
|
inline |
Returns whether the rectangle has null area.
Definition at line 438 of file SimpleGeo.h.
Referenced by lar::util::simple_geo::Rectangle< Data >::overlaps().
| bool lar::util::simple_geo::Rectangle< Data >::overlaps | ( | Rectangle_t const & | r | ) | const |
Returns whether this and the specified rectangle overlap.
Definition at line 552 of file SimpleGeo.h.
References lar::util::simple_geo::Rectangle< Data >::depth, lar::util::simple_geo::Rectangle< Data >::isNull(), and lar::util::simple_geo::Rectangle< Data >::width.
| Range_t lar::util::simple_geo::Rectangle< Data >::depth |
Range along depth direction.
Definition at line 429 of file SimpleGeo.h.
Referenced by geo::PlaneGeo::DeltaFromActivePlane(), lar::util::simple_geo::Rectangle< Data >::extendToInclude(), lar::util::simple_geo::Rectangle< Data >::overlaps(), and geo::PlaneGeo::PrintPlaneInfo().
| Range_t lar::util::simple_geo::Rectangle< Data >::width |
Range along width direction.
Definition at line 428 of file SimpleGeo.h.
Referenced by geo::PlaneGeo::DeltaFromActivePlane(), lar::util::simple_geo::Rectangle< Data >::extendToInclude(), lar::util::simple_geo::Rectangle< Data >::overlaps(), and geo::PlaneGeo::PrintPlaneInfo().