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 388 of file SimpleGeo.h.
using lar::util::simple_geo::Rectangle< Data >::Data_t = Data |
Numerical type for boundaries.
Definition at line 389 of file SimpleGeo.h.
using lar::util::simple_geo::Rectangle< Data >::Range_t = Range<Data_t> |
Type for dimension boundaries.
Definition at line 391 of file SimpleGeo.h.
using lar::util::simple_geo::Rectangle< Data >::Rectangle_t = Rectangle<Data> |
This type.
Definition at line 390 of file SimpleGeo.h.
|
default |
Default constructor: an empty rectangle.
|
inline |
Constructor from width and depth ranges.
Definition at line 400 of file SimpleGeo.h.
|
inline |
Returns whether the specified point is in the area.
Definition at line 408 of file SimpleGeo.h.
void lar::util::simple_geo::Rectangle< Data >::extendToInclude | ( | Rectangle_t const & | r | ) |
Extends the range to include the specified point.
Definition at line 517 of file SimpleGeo.h.
|
inline |
Returns whether the rectangle has null area.
Definition at line 405 of file SimpleGeo.h.
bool lar::util::simple_geo::Rectangle< Data >::overlaps | ( | Rectangle_t const & | r | ) | const |
Returns whether this and the specified rectangle overlap.
Definition at line 527 of file SimpleGeo.h.
Range_t lar::util::simple_geo::Rectangle< Data >::depth |
Range along depth direction.
Definition at line 394 of file SimpleGeo.h.
Range_t lar::util::simple_geo::Rectangle< Data >::width |
Range along width direction.
Definition at line 393 of file SimpleGeo.h.