GeoModel - GeoModelCore
GeoShapeAction.h
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef GEOMODELKERNEL_GEOSHAPEACTION_H
6 #define GEOMODELKERNEL_GEOSHAPEACTION_H
7 
17 #include "GeoModelKernel/Query.h"
18 #include "GeoModelKernel/GeoShapePath.h"
19 
20 class GeoShape;
22 class GeoShapeUnion;
24 class GeoShapeShift;
25 class GeoBox;
26 class GeoCons;
27 class GeoPcon;
28 class GeoPgon;
29 class GeoTrap;
30 class GeoTrd;
31 class GeoPara;
32 class GeoTubs;
33 class GeoTube;
34 class GeoEllipticalTube;
35 class GeoTorus;
39 
40 class GeoGenericTrap;
41 
43 {
44  public:
46  virtual ~GeoShapeAction();
47 
48  Query<unsigned int> getDepthLimit ();
49 
50  // Sets a depth limit.
51  void setDepthLimit (unsigned int limit);
52 
53  // Clears a depth limit, if any.
54  void clearDepthLimit ();
55 
56  // Cause the action to terminate.
57  void terminate ();
58 
59  // Determine whether the action should terminate.
60  bool shouldTerminate () const;
61 
62  // Handles a shape.
63  virtual void handleShape (const GeoShape *);
64 
65  // Handles a shift shape.
66  virtual void handleShift (const GeoShapeShift *shift);
67 
68  // Handles a union shape.
69  virtual void handleUnion (const GeoShapeUnion *unio);
70 
71  // Handles an intersection shape.
72  virtual void handleIntersection (const GeoShapeIntersection *isect);
73 
74  // Handles a subtraction shape.
75  virtual void handleSubtraction (const GeoShapeSubtraction *subtract);
76 
77  // Handles a box shape.
78  virtual void handleBox (const GeoBox *box);
79 
80  // Handles a cons shape.
81  virtual void handleCons (const GeoCons *cons);
82 
83  // Handles a para shape.
84  virtual void handlePara (const GeoPara *para);
85 
86  // Handles a pcon shape.
87  virtual void handlePcon (const GeoPcon *pcon);
88 
89  // Handles a pgon shape.
90  virtual void handlePgon (const GeoPgon *pgon);
91 
92  // Handles a trap shape.
93  virtual void handleTrap (const GeoTrap *trap);
94 
95  // Handles a trd shape.
96  virtual void handleTrd (const GeoTrd *trd);
97 
98  // Handles a tube shape.
99  virtual void handleTube (const GeoTube *tube);
100 
101  // Handles a tubs shape.
102  virtual void handleTubs (const GeoTubs *tubs);
103 
104  // Returns a pointer to the path object.
105  GeoShapePath * getPath ();
106 
107  virtual void handleSimplePolygonBrep (const GeoSimplePolygonBrep *);
108  virtual void handleTessellatedSolid (const GeoTessellatedSolid *);
109  virtual void handleEllipticalTube (const GeoEllipticalTube *);
110  virtual void handleTorus (const GeoTorus *);
111  virtual void handleGenericTrap (const GeoGenericTrap *);
112  virtual void handleUnidentifiedShape(const GeoUnidentifiedShape *shape);
113 
114 
115  private:
116  GeoShapeAction(const GeoShapeAction &right);
117  GeoShapeAction & operator=(const GeoShapeAction &right);
118 
119  // A limit may be placed upon the depth to which the action
120  // descends. 0 = self. 1 = self and children.
121  Query<unsigned int> m_depth;
122 
123  // Termination flag; causes an abortion of action execution.
124  bool m_terminate;
125  GeoShapePath m_path;
126 
127 };
128 
129 #endif
This shape represents a BREP solid consisting of two equivalent polygonial faces perpendicular to Z a...
Definition: GeoTrd.h:10
This is a tube with elliptical cross section The equation of the surface in x/y is 1...
This shape represents a polycone. Specify the starting angle and delta angle (subtended angle) of the...
Definition: GeoPcon.h:20
Definition: GeoBox.h:10
This shape represents a very general trapezoid.
Definition: GeoTrap.h:16
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