CMS 3D CMS Logo

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 23 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 47 of file MaterialAccountingGroup.h.

References r_max, r_min, z_max, and z_min.

47  {
48  r_min -= skin; // yes, we allow r_min to go negative
49  r_max += skin;
50  z_min -= skin;
51  z_max += skin;
52  }
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 68 of file MaterialAccountingGroup.h.

Referenced by grow(), and range_r().

double MaterialAccountingGroup::BoundingBox::r_min
private

Definition at line 67 of file MaterialAccountingGroup.h.

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

double MaterialAccountingGroup::BoundingBox::z_max
private

Definition at line 70 of file MaterialAccountingGroup.h.

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

double MaterialAccountingGroup::BoundingBox::z_min
private

Definition at line 69 of file MaterialAccountingGroup.h.

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