CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Solid.h
Go to the documentation of this file.
1 #ifndef DDI_Solid_h
2 #define DDI_Solid_h
3 
4 #include <iosfwd>
5 #include <vector>
7 
8 namespace DDI {
9 
10  class Solid {
11  public:
13 
15 
16  virtual ~Solid() {}
17 
18  const std::vector<double> &parameters() const { return p_; }
19 
20  virtual double volume() const { return 0; }
21 
22  DDSolidShape shape() const { return shape_; }
23 
24  virtual void stream(std::ostream &) const;
25 
26  void setParameters(std::vector<double> const &p) { p_ = p; }
27 
28  protected:
30  std::vector<double> p_;
31  };
32 } // namespace DDI
33 
34 #endif // DDI_Solid_h
virtual double volume() const
Definition: Solid.h:20
DDSolidShape shape_
Definition: Solid.h:29
virtual ~Solid()
Definition: Solid.h:16
virtual void stream(std::ostream &) const
Definition: Solid.cc:5
void setParameters(std::vector< double > const &p)
Definition: Solid.h:26
Solid()
Definition: Solid.h:12
const std::vector< double > & parameters() const
Definition: Solid.h:18
DDSolidShape
Definition: DDSolidShapes.h:6
std::vector< double > p_
Definition: Solid.h:30
DDSolidShape shape() const
Definition: Solid.h:22
Solid(DDSolidShape shape)
Definition: Solid.h:14