CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/DetectorDescription/Core/src/Box.h

Go to the documentation of this file.
00001 #ifndef DDI_Box_h
00002 #define DDI_Box_h
00003 
00004 #include <iosfwd>
00005 #include "Solid.h"
00006 
00007 
00008 namespace DDI {
00009 
00010   class Box : public Solid
00011   {
00012   public:
00013     Box(double xHalf, double yHalf, double zHalf)
00014      : Solid(ddbox)
00015     { 
00016       p_.push_back(xHalf);
00017       p_.push_back(yHalf);
00018       p_.push_back(zHalf);
00019     }  
00020     ~Box() { }
00021     
00022     double volume() const { return 8.*p_[0]*p_[1]*p_[2]; }
00023     void stream(std::ostream & os) const;
00024   };
00025 
00026 }
00027 #endif // DDI_Box_h