GeoModel - GeoModelCore
GeoBox.h
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef GEOMODELKERNEL_GEOBOX_H
6 #define GEOMODELKERNEL_GEOBOX_H
7 
8 #include "GeoModelKernel/GeoShape.h"
9 
10 class GeoBox : public GeoShape
11 {
12  public:
13  // Constructor for the BOX.
14  GeoBox (double XHalfLength, double YHalfLength, double ZHalfLength);
15 
16  // Returns the volume of the shape, for mass inventory
17  virtual double volume () const;
18 
19  // Returns the BOX shape type, as a string.
20  virtual const std::string & type () const;
21 
22  // Returns the BOX shape type, as a coded integer.
23  virtual ShapeType typeID () const;
24 
25  // Executes a GeoShapeAction.
26  virtual void exec (GeoShapeAction *action) const;
27 
28  // For type identification.
29  static const std::string& getClassType ();
30 
31  // For type identification.,
32  static ShapeType getClassTypeID ();
33 
34  // Half length in the x-direction.
35  const double& getXHalfLength () const;
36 
37  // Half-length in the y direction.
38  const double& getYHalfLength () const;
39 
40  // Half-length in the z direction.
41  const double& getZHalfLength () const;
42 
43  protected:
44  virtual ~GeoBox();
45 
46  private:
47  GeoBox(const GeoBox &right);
48  GeoBox & operator=(const GeoBox &right);
49 
50  static const std::string s_classType;
51  static const ShapeType s_classTypeID;
52  double m_xHalfLength;
53  double m_yHalfLength;
54  double m_zHalfLength;
55 };
56 
57 inline const std::string& GeoBox::getClassType ()
58 {
59  return s_classType;
60 }
61 
62 inline ShapeType GeoBox::getClassTypeID ()
63 {
64  return s_classTypeID;
65 }
66 
67 inline const double& GeoBox::getXHalfLength () const
68 {
69  return m_xHalfLength;
70 }
71 
72 inline const double& GeoBox::getYHalfLength () const
73 {
74  return m_yHalfLength;
75 }
76 
77 inline const double& GeoBox::getZHalfLength () const
78 {
79  return m_zHalfLength;
80 }
81 
82 #endif
Definition: GeoBox.h:10
This class is a visitor for shapes. It allows a navigation of the boolean expression tree for shapes...
This class describes a Shape. Shapes will be able to do the following things:
Definition: GeoShape.h:38