GeoModel - GeoModelCore
GeoGenericTrap.cxx
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "GeoModelKernel/GeoGenericTrap.h"
6 #include "GeoModelKernel/GeoShapeAction.h"
7 
8 const std::string GeoGenericTrap::s_classType = "GenericTrap";
9 const ShapeType GeoGenericTrap::s_classTypeID = 0x23;
10 
11 GeoGenericTrap::GeoGenericTrap(double ZHalfLength, const GeoGenericTrapVertices& Vertices)
12  : m_zHalfLength(ZHalfLength)
13  , m_vertices(Vertices)
14 {
15 }
16 
17 GeoGenericTrap::~GeoGenericTrap()
18 {
19 }
20 
21 double GeoGenericTrap::volume() const
22 {
23  // -- ToDo
24  return 0.;
25 }
26 
27 const std::string& GeoGenericTrap::type() const
28 {
29  return s_classType;
30 }
31 
32 ShapeType GeoGenericTrap::typeID() const
33 {
34  return s_classTypeID;
35 }
36 
37 void GeoGenericTrap::exec(GeoShapeAction *action) const
38 {
39  action->handleGenericTrap(this);
40 }
41 
42 double GeoGenericTrap::getZHalfLength() const
43 {
44  return m_zHalfLength;
45 }
46 
47 const GeoGenericTrapVertices& GeoGenericTrap::getVertices() const
48 {
49  return m_vertices;
50 }
51 
This class is a visitor for shapes. It allows a navigation of the boolean expression tree for shapes...