CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
MaterialAccountingGroup::BoundingBox Class Reference

Public Member Functions

 BoundingBox (double min_r, double max_r, double min_z, double max_z)
 
 BoundingBox ()
 
void grow (double r, double z)
 
void grow (double skin)
 
bool inside (double r, double z) const
 
std::pair< double, double > range_r () const
 
std::pair< double, double > range_z () const
 

Private Attributes

double r_max
 
double r_min
 
double z_max
 
double z_min
 

Detailed Description

Definition at line 22 of file MaterialAccountingGroup.h.

Constructor & Destructor Documentation

MaterialAccountingGroup::BoundingBox::BoundingBox ( double  min_r,
double  max_r,
double  min_z,
double  max_z 
)
inline
MaterialAccountingGroup::BoundingBox::BoundingBox ( )
inline

Member Function Documentation

void MaterialAccountingGroup::BoundingBox::grow ( double  r,
double  z 
)
inline
void MaterialAccountingGroup::BoundingBox::grow ( double  skin)
inline

Definition at line 40 of file MaterialAccountingGroup.h.

References r_max, r_min, z_max, and z_min.

40  {
41  r_min -= skin; // yes, we allow r_min to go negative
42  r_max += skin;
43  z_min -= skin;
44  z_max += skin;
45  }
bool MaterialAccountingGroup::BoundingBox::inside ( double  r,
double  z 
) const
inline
std::pair<double, double> MaterialAccountingGroup::BoundingBox::range_r ( ) const
inline
std::pair<double, double> MaterialAccountingGroup::BoundingBox::range_z ( ) const
inline

Member Data Documentation

double MaterialAccountingGroup::BoundingBox::r_max
private

Definition at line 55 of file MaterialAccountingGroup.h.

Referenced by grow(), and range_r().

double MaterialAccountingGroup::BoundingBox::r_min
private

Definition at line 54 of file MaterialAccountingGroup.h.

Referenced by grow(), inside(), and range_r().

double MaterialAccountingGroup::BoundingBox::z_max
private

Definition at line 57 of file MaterialAccountingGroup.h.

Referenced by grow(), inside(), and range_z().

double MaterialAccountingGroup::BoundingBox::z_min
private

Definition at line 56 of file MaterialAccountingGroup.h.

Referenced by grow(), inside(), and range_z().