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