CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules 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

◆ BoundingBox() [1/2]

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

◆ BoundingBox() [2/2]

MaterialAccountingGroup::BoundingBox::BoundingBox ( )
inline

Member Function Documentation

◆ grow() [1/2]

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

◆ grow() [2/2]

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  }

◆ inside()

bool MaterialAccountingGroup::BoundingBox::inside ( double  r,
double  z 
) const
inline

◆ range_r()

std::pair<double, double> MaterialAccountingGroup::BoundingBox::range_r ( ) const
inline

◆ range_z()

std::pair<double, double> MaterialAccountingGroup::BoundingBox::range_z ( ) const
inline

Member Data Documentation

◆ r_max

double MaterialAccountingGroup::BoundingBox::r_max
private

Definition at line 55 of file MaterialAccountingGroup.h.

Referenced by grow(), and range_r().

◆ r_min

double MaterialAccountingGroup::BoundingBox::r_min
private

Definition at line 54 of file MaterialAccountingGroup.h.

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

◆ z_max

double MaterialAccountingGroup::BoundingBox::z_max
private

Definition at line 57 of file MaterialAccountingGroup.h.

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

◆ z_min

double MaterialAccountingGroup::BoundingBox::z_min
private

Definition at line 56 of file MaterialAccountingGroup.h.

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