7 : m_nMedia(0), m_nSolids(0),
8 m_hasBoundingBox(false), m_debug(false) {
21 std::cerr <<
" Solid pointer is null.\n";
27 std::cerr <<
" Medium pointer is null.\n";
34 for (
unsigned int i = 0; i <
m_nMedia; ++i) {
50 double xmin, ymin, zmin;
51 double xmax, ymax, zmax;
54 std::cerr <<
" Solid has no bounding box.\n";
84 const double z)
const {
86 for (
unsigned int i = 0; i <
m_nSolids; ++i) {
96 for (
unsigned int i = 0; i <
m_nSolids; ++i) {
109 std::cerr <<
" Requested solid " << i <<
" does not exist.\n";
120 std::cerr <<
" Requested medium " << i <<
" does not exist.\n";
139 std::cout <<
" 1 solid\n";
141 std::cout <<
" " <<
m_nSolids <<
" solids\n";
144 std::cout <<
" Index Type Medium\n";
145 for (
unsigned int i = 0; i <
m_nSolids; ++i) {
146 std::cout <<
" " << i <<
" ";
150 std::cout <<
"tube ";
152 std::cout <<
"unknown ";
159 const double z)
const {
163 for (
unsigned int i = 0; i <
m_nSolids; ++i) {
170 const double z)
const {
174 std::cerr <<
m_className <<
"::IsInBoundingBox:\n";
175 std::cerr <<
" Bounding box is not defined.\n";
std::vector< medium > m_media
bool IsInBoundingBox(const double x, const double y, const double z) const
Medium * GetMedium(const double x, const double y, const double z) const
Solid * GetSolid(const double x, const double y, const double z) const
void AddSolid(Solid *s, Medium *m)
bool IsInside(const double x, const double y, const double z) const
std::vector< solid > m_solids
Abstract base class for media.
Abstract base class for solids.
virtual bool GetBoundingBox(double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax) const =0
Return the bounding box of the solid.