GeoModel - GeoModelCore
GeoShapeShift.h
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef GEOMODELKERNEL_GEOSHAPESHIFT_H
6 #define GEOMODELKERNEL_GEOSHAPESHIFT_H
7 
8 #include "GeoModelKernel/GeoShape.h"
9 #include "GeoModelKernel/GeoDefinitions.h"
10 
11 
12 #ifndef _GeoShapePersistification_On_
13  class Persistifier;
14 #endif
15 
16 
17 class GeoShapeShift : public GeoShape
18 {
19  public:
20  GeoShapeShift (const GeoShape* A, const GeoTrf::Transform3D &X);
21 
22  // Returns the volume of the shape, for mass inventory
23  virtual double volume () const;
24 
25  // Returns the OR shape type, as a string.
26  virtual const std::string & type () const;
27 
28  // Returns the OR shape type, as a coded integer.
29  virtual ShapeType typeID () const;
30 
31  // Returns the first operand being ORed
32  const GeoShape* getOp () const;
33 
34  // Returns the shift of this shape.
35  const GeoTrf::Transform3D & getX () const;
36 
37  // Executes a GeoShapeAction
38  virtual void exec (GeoShapeAction *action) const;
39 
40  // For type identification.
41  static const std::string& getClassType ();
42 
43  // For type identification.
44  static ShapeType getClassTypeID ();
45 
46  protected:
47  virtual ~GeoShapeShift();
48 
49  private:
50  GeoShapeShift(const GeoShapeShift &right);
51  GeoShapeShift & operator=(const GeoShapeShift &right);
52 
53  // The shape operand in the NOT operation.
54  const GeoShape* m_op;
55 
56  // Gives the amount by which the volume is shifted.
57  GeoTrf::Transform3D m_shift;
58 
59  static const std::string s_classType;
60  static const ShapeType s_classTypeID;
61 
62  // For I/O only!
63  GeoShapeShift(){}
64  friend Persistifier;
65 
66 };
67 
68 inline const std::string& GeoShapeShift::getClassType ()
69 {
70  return s_classType;
71 }
72 
73 inline ShapeType GeoShapeShift::getClassTypeID ()
74 {
75  return s_classTypeID;
76 }
77 
78 #endif
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