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

References r_max, r_min, z_max, and z_min.

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

Referenced by grow(), and range_r().

double MaterialAccountingGroup::BoundingBox::r_min
private

Definition at line 66 of file MaterialAccountingGroup.h.

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

double MaterialAccountingGroup::BoundingBox::z_max
private

Definition at line 69 of file MaterialAccountingGroup.h.

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

double MaterialAccountingGroup::BoundingBox::z_min
private

Definition at line 68 of file MaterialAccountingGroup.h.

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