Geant4  10.01
UExtrudedSolid.icc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * This Software is part of the AIDA Unified Solids Library package *
4 // * See: https://aidasoft.web.cern.ch/USolids *
5 // ********************************************************************
6 //
7 // $Id:$
8 //
9 // --------------------------------------------------------------------
10 //
11 // UExtrudedSolid.icc
12 //
13 // Implementation of inline methods of UExtrudedSolid
14 //
15 // 13.08.13 Tatiana Nikitina
16 // Created from original implementation in Geant4
17 // --------------------------------------------------------------------
18 
19 inline
20 int UExtrudedSolid::GetNofVertices() const
21 {
22  return fNv;
23 }
24 
25 inline UVector2 UExtrudedSolid::GetVertex(int index) const
26 {
27  if (index < 0 || index >= fNv)
28  {
29  UUtils::Exception ("UExtrudedSolid::GetVertex()", "GeomSolids0003",
30  FatalError, 1, "Index outside range.");
31  return UVector2();
32  }
33  return fPolygon[index];
34 }
35 
36 inline
37 std::vector<UVector2> UExtrudedSolid::GetPolygon() const
38 {
39  return fPolygon;
40 }
41 
42 inline
43 int UExtrudedSolid::GetNofZSections() const
44 {
45  return fNz;
46 }
47 
48 inline
49 UExtrudedSolid::ZSection UExtrudedSolid::GetZSection(int index) const
50 {
51  if (index < 0 || index >= fNz)
52  {
53  UUtils::Exception ("UExtrudedSolid::GetZSection()", "GeomSolids0003",
54  FatalError, 1, "Index outside range.");
55  return ZSection(0.0, UVector2(), 0.0);
56  }
57  return fZSections[index];
58 }
59 
60 inline
61 std::vector<UExtrudedSolid::ZSection> UExtrudedSolid::GetZSections() const
62 {
63  return fZSections;
64 }