GeoModel - GeoModelCore
GeoGenericTrap.h
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef GEOMODELKERNEL_GEOGENERICTRAP_H
6 #define GEOMODELKERNEL_GEOGENERICTRAP_H
7 
8 #include "GeoModelKernel/GeoShape.h"
9 #include "GeoModelKernel/GeoDefinitions.h"
10 #include <vector>
11 
12 typedef GeoTrf::Vector2D GeoTwoVector;
13 typedef std::vector<GeoTwoVector> GeoGenericTrapVertices;
14 
15 class GeoGenericTrap : public GeoShape
16 {
17  public:
18  GeoGenericTrap(double ZHalfLength, const GeoGenericTrapVertices& Vertices);
19 
20  virtual double volume() const;
21 
22  virtual const std::string& type() const;
23  virtual ShapeType typeID() const;
24 
25  static const std::string& getClassType();
26  static ShapeType getClassTypeID();
27 
28  virtual void exec(GeoShapeAction *action) const;
29 
30  double getZHalfLength() const;
31  const GeoGenericTrapVertices& getVertices() const;
32 
33  protected:
34  virtual ~GeoGenericTrap();
35 
36  private:
37  GeoGenericTrap(const GeoGenericTrap &right);
38  GeoGenericTrap& operator=(const GeoGenericTrap &right);
39 
40  static const std::string s_classType;
41  static const ShapeType s_classTypeID;
42 
43  double m_zHalfLength;
44  GeoGenericTrapVertices m_vertices;
45 };
46 
47 inline const std::string& GeoGenericTrap::getClassType()
48 {
49  return s_classType;
50 }
51 
52 inline ShapeType GeoGenericTrap::getClassTypeID()
53 {
54  return s_classTypeID;
55 }
56 
57 #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