Public Types | Public Member Functions | Private Types | List of all members
lar::util::simple_geo::Volume< Point > Class Template Reference

Volume delimited by two points. More...

#include <SimpleGeo.h>

Inheritance diagram for lar::util::simple_geo::Volume< Point >:
lar::util::simple_geo::Area< Point > lar::util::simple_geo::AreaBase< Point >

Public Types

using Point_t = typename Base_t::Point_t
 
using Volume_t = Volume< Point_t >
 
- Public Types inherited from lar::util::simple_geo::Area< Point >
using Point_t = typename Base_t::Point_t
 
using Area_t = Area< Point_t >
 
- Public Types inherited from lar::util::simple_geo::AreaBase< Point >
using Point_t = Point
 
using Area_t = AreaBase< Point >
 

Public Member Functions

 Volume ()=default
 
 Volume (Point_t const &a, Point_t const &b)
 
auto DeltaZ () const
 
bool isEmptyZ () const
 
unsigned int nonEmptyDims () const
 
bool isNullZ () const
 
bool isNull () const
 
bool isEmpty () const
 
bool isLine () const
 
bool isPlane () const
 
bool isVolume () const
 
auto thinnestSize () const
 
unsigned int thinnestSide () const
 Returns the index of the thinnest side (0 is x, 1 is y) More...
 
void IncludePoint (Point_t const &point)
 
void Include (Volume_t const &volume)
 
void Intersect (Volume_t const &volume)
 
- Public Member Functions inherited from lar::util::simple_geo::Area< Point >
 Area ()=default
 
 Area (Point_t const &a, Point_t const &b)
 
auto DeltaY () const
 
bool isEmptyY () const
 
unsigned int nonEmptyDims () const
 
bool isNullY () const
 
bool isNull () const
 
bool isEmpty () const
 
bool isLine () const
 
bool isPlane () const
 
auto thinnestSize () const
 
unsigned int thinnestSide () const
 Returns the index of the thinnest side (0 is x, 1 is y) More...
 
void IncludePoint (Point_t const &point)
 
void Include (Area_t const &area)
 
void Intersect (Area_t const &area)
 
- Public Member Functions inherited from lar::util::simple_geo::AreaBase< Point >
 AreaBase ()=default
 
 AreaBase (Point_t const &a, Point_t const &b)
 
Point_t const & Min () const
 
Point_t const & Max () const
 
Point_t Center () const
 
auto DeltaX () const
 
bool isEmptyX () const
 
bool isNullX () const
 
bool isNull () const
 
unsigned int nonEmptyDims () const
 
bool isEmpty () const
 
bool isLine () const
 
auto thinnestSize () const
 
unsigned int thinnestSide () const
 Returns the index of the thinnest side (0 is x) More...
 
void IncludePoint (Point_t const &point)
 
void Include (Area_t const &area)
 
void Intersect (Area_t const &area)
 
bool operator== (Area_t const &as) const
 
bool operator!= (Area_t const &as) const
 

Private Types

using Base_t = Area< Point >
 

Additional Inherited Members

- Protected Types inherited from lar::util::simple_geo::AreaBase< Point >
using Data_t = typename Point_t::Data_t
 
- Static Protected Member Functions inherited from lar::util::simple_geo::AreaBase< Point >
static void set_min (Data_t &var, Data_t val)
 
static void set_max (Data_t &var, Data_t val)
 
static void set_min_max (Data_t &min_var, Data_t &max_var, Data_t val)
 
static void set_sorted (Data_t &min_var, Data_t &max_var, Data_t a, Data_t b)
 
- Protected Attributes inherited from lar::util::simple_geo::AreaBase< Point >
Point_t min
 
Point_t max
 

Detailed Description

template<typename Point = Point3D<double>>
class lar::util::simple_geo::Volume< Point >

Volume delimited by two points.

Definition at line 261 of file SimpleGeo.h.

Member Typedef Documentation

template<typename Point = Point3D<double>>
using lar::util::simple_geo::Volume< Point >::Base_t = Area<Point>
private

Definition at line 262 of file SimpleGeo.h.

template<typename Point = Point3D<double>>
using lar::util::simple_geo::Volume< Point >::Point_t = typename Base_t::Point_t

Definition at line 265 of file SimpleGeo.h.

template<typename Point = Point3D<double>>
using lar::util::simple_geo::Volume< Point >::Volume_t = Volume<Point_t>

Definition at line 266 of file SimpleGeo.h.

Constructor & Destructor Documentation

template<typename Point = Point3D<double>>
lar::util::simple_geo::Volume< Point >::Volume ( )
default
template<typename Point = Point3D<double>>
lar::util::simple_geo::Volume< Point >::Volume ( Point_t const &  a,
Point_t const &  b 
)
inline

Definition at line 270 of file SimpleGeo.h.

271  : Base_t(a, b)
const double a
static bool * b
Definition: config.cpp:1043
static void set_sorted(Data_t &min_var, Data_t &max_var, Data_t a, Data_t b)
Definition: SimpleGeo.h:190

Member Function Documentation

template<typename Point = Point3D<double>>
auto lar::util::simple_geo::Volume< Point >::DeltaZ ( ) const
inline

Definition at line 274 of file SimpleGeo.h.

274 { return Base_t::Max().z - Base_t::Min().z; }
Point_t const & Min() const
Definition: SimpleGeo.h:140
Point_t const & Max() const
Definition: SimpleGeo.h:141
template<typename Point = Point3D<double>>
void lar::util::simple_geo::Volume< Point >::Include ( Volume_t const &  volume)
inline

Definition at line 301 of file SimpleGeo.h.

302  { IncludePoint(volume.min); IncludePoint(volume.max); }
static const std::string volume[nvol]
void IncludePoint(Point_t const &point)
Definition: SimpleGeo.h:295
template<typename Point = Point3D<double>>
void lar::util::simple_geo::Volume< Point >::IncludePoint ( Point_t const &  point)
inline

Definition at line 295 of file SimpleGeo.h.

296  {
297  Base_t::IncludePoint(point);
299  }
static void set_min_max(Data_t &min_var, Data_t &max_var, Data_t val)
Definition: SimpleGeo.h:186
void IncludePoint(Point_t const &point)
Definition: SimpleGeo.h:234
template<typename Point = Point3D<double>>
void lar::util::simple_geo::Volume< Point >::Intersect ( Volume_t const &  volume)
inline

Definition at line 304 of file SimpleGeo.h.

305  {
309  if (isNullZ())
310  throw typename Base_t::NullIntersection("null z dimension");
311  }
static const std::string volume[nvol]
void Intersect(Area_t const &area)
Definition: SimpleGeo.h:243
static void set_min(Data_t &var, Data_t val)
Definition: SimpleGeo.h:180
static void set_max(Data_t &var, Data_t val)
Definition: SimpleGeo.h:183
template<typename Point = Point3D<double>>
bool lar::util::simple_geo::Volume< Point >::isEmpty ( ) const
inline

Definition at line 280 of file SimpleGeo.h.

280 { return nonEmptyDims() == 0; }
unsigned int nonEmptyDims() const
Definition: SimpleGeo.h:276
template<typename Point = Point3D<double>>
bool lar::util::simple_geo::Volume< Point >::isEmptyZ ( ) const
inline

Definition at line 275 of file SimpleGeo.h.

275 { return DeltaZ() == 0; }
template<typename Point = Point3D<double>>
bool lar::util::simple_geo::Volume< Point >::isLine ( ) const
inline

Definition at line 281 of file SimpleGeo.h.

281 { return nonEmptyDims() == 1; }
unsigned int nonEmptyDims() const
Definition: SimpleGeo.h:276
template<typename Point = Point3D<double>>
bool lar::util::simple_geo::Volume< Point >::isNull ( ) const
inline

Definition at line 279 of file SimpleGeo.h.

279 { return Base_t::isNull() || isNullZ(); }
template<typename Point = Point3D<double>>
bool lar::util::simple_geo::Volume< Point >::isNullZ ( ) const
inline

Definition at line 278 of file SimpleGeo.h.

278 { return Base_t::Max().z < Base_t::Min().z; }
Point_t const & Min() const
Definition: SimpleGeo.h:140
Point_t const & Max() const
Definition: SimpleGeo.h:141
template<typename Point = Point3D<double>>
bool lar::util::simple_geo::Volume< Point >::isPlane ( ) const
inline

Definition at line 282 of file SimpleGeo.h.

282 { return nonEmptyDims() == 2; }
unsigned int nonEmptyDims() const
Definition: SimpleGeo.h:276
template<typename Point = Point3D<double>>
bool lar::util::simple_geo::Volume< Point >::isVolume ( ) const
inline

Definition at line 283 of file SimpleGeo.h.

283 { return nonEmptyDims() == 3; }
unsigned int nonEmptyDims() const
Definition: SimpleGeo.h:276
template<typename Point = Point3D<double>>
unsigned int lar::util::simple_geo::Volume< Point >::nonEmptyDims ( ) const
inline

Definition at line 276 of file SimpleGeo.h.

277  { return Base_t::nonEmptyDims() + (isEmptyZ()? 0: 1); }
unsigned int nonEmptyDims() const
Definition: SimpleGeo.h:216
template<typename Point = Point3D<double>>
unsigned int lar::util::simple_geo::Volume< Point >::thinnestSide ( ) const
inline

Returns the index of the thinnest side (0 is x, 1 is y)

Definition at line 289 of file SimpleGeo.h.

290  {
291  return
293  }
auto thinnestSize() const
Definition: SimpleGeo.h:224
unsigned int thinnestSide() const
Returns the index of the thinnest side (0 is x, 1 is y)
Definition: SimpleGeo.h:228
template<typename Point = Point3D<double>>
auto lar::util::simple_geo::Volume< Point >::thinnestSize ( ) const
inline

Definition at line 285 of file SimpleGeo.h.

286  { return std::min(DeltaZ(), Base_t::thinnestSize()); }
auto thinnestSize() const
Definition: SimpleGeo.h:224
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Definition: statistics.h:55

The documentation for this class was generated from the following file: