CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_8_patch3/src/DetectorDescription/Core/src/Solid.h

Go to the documentation of this file.
00001 #ifndef DDI_Solid_h
00002 #define DDI_Solid_h
00003 
00004 #include <iosfwd>
00005 #include <vector>
00006 #include "DetectorDescription/Core/interface/DDSolidShapes.h"
00007 
00008 namespace DDI {
00009   
00010   class Solid
00011   {
00012   public:
00013   
00014     Solid() : shape_(dd_not_init) { }
00015     
00016     Solid(DDSolidShape shape) : shape_(shape) { }
00017     
00018     virtual ~Solid() { }
00019     
00020     const std::vector<double> & parameters() const { return p_; }
00021     
00022     virtual double volume() const { return 0; }
00023     
00024     DDSolidShape shape() const { return shape_; }
00025     
00026     virtual void stream(std::ostream &) const;
00027     
00028     void setParameters(std::vector<double> const & p) { p_ = p;}
00029 
00030   protected:
00031     DDSolidShape shape_;
00032     std::vector<double> p_; 
00033   };
00034 }
00035 
00036 #endif // DDI_Solid_h