00001
00013 #ifndef _RECTANGULAR_BOX_H_
00014 #define _RECTANGULAR_BOX_H_ 1
00015
00016 #include "CLHEP/Geometry/Point3D.h"
00017 #include "CLHEP/Geometry/Normal3D.h"
00018
00019 using namespace std;
00020
00021 class RectangularBox
00022 {
00023 public:
00024
00025 RectangularBox(double xUp, double xLow,
00026 double yUp, double yLow,
00027 double zUp, double zLow);
00028
00029 virtual ~RectangularBox();
00030
00031 bool intersect(const HepGeom::Point3D<double> & linePoint, const HepGeom::Normal3D<double> & lineSlope,
00032 HepGeom::Point3D<double> & intersectA, HepGeom::Point3D<double> & intersectB);
00033
00034 double xUp() const { return m_xUp; }
00035 double xLow() const { return m_xLow; }
00036
00037 double yUp() const { return m_yUp; }
00038 double yLow() const { return m_yLow; }
00039
00040 double zUp() const { return m_zUp; }
00041 double zLow() const { return m_zLow; }
00042
00043
00044 private:
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00061 double m_xUp,m_xLow;
00062 double m_yUp,m_yLow;
00063 double m_zUp,m_zLow;
00064
00065 };
00066
00067 std::ostream & operator<<(std::ostream & os, const RectangularBox & p);
00068
00069 #endif // _RECTANGULAR_BOX_H_
00070
00071