2 // ********************************************************************
3 // * This Software is part of the AIDA Unified Solids Library package *
4 // * See: https://aidasoft.web.cern.ch/USolids *
5 // ********************************************************************
9 // --------------------------------------------------------------------
13 // 21.10.13 Tatiana Nikitina, CERN; Ivana Hrivnacova, IPN Orsay
14 // Adapted from Root Arb8 implementation
15 // --------------------------------------------------------------------
18 double UGenericTrap::GetZHalfLength() const
24 void UGenericTrap::SetZHalfLength(double halfZ)
29 // --------------------------------------------------------------------
32 int UGenericTrap::GetNofVertices() const
34 return fVertices.size();
37 // --------------------------------------------------------------------
40 UVector2 UGenericTrap::GetVertex(int index) const
42 if (index < 0 || index >= int(fVertices.size()))
44 UUtils::Exception("UGenericTrap::GetVertex()", "GeomSolids0003",
45 UFatalError, 1, "Index outside range.");
47 return fVertices[index];
50 // --------------------------------------------------------------------
53 const std::vector<UVector2>& UGenericTrap::GetVertices() const
58 // --------------------------------------------------------------------
62 double UGenericTrap::GetTwistAngle(int index) const
64 if ((index < 0) || (index >= int(fVertices.size())))
66 UUtils::Exception ("UGenericTrap::GetTwistAngle()", "GeomSolids0003",
67 UFatalError, 1, "Index outside range.");
72 // --------------------------------------------------------------------
75 bool UGenericTrap::IsTwisted() const
80 // --------------------------------------------------------------------
83 void UGenericTrap::SetTwistAngle(int index, double twist)
85 if ((index < 0) || (index >= int(fVertices.size())))
87 UUtils::Exception ("UGenericTrap::SetTwistAngle()", "GeomSolids0003",
88 UFatalError, 1, "Index outside range.");
90 fTwist[index] = twist;
93 // --------------------------------------------------------------------
96 int UGenericTrap::GetVisSubdivisions()const
98 return fVisSubdivisions;
101 // --------------------------------------------------------------------
104 void UGenericTrap::SetVisSubdivisions(int subdiv)
106 fVisSubdivisions = subdiv;
109 // --------------------------------------------------------------------
112 UVector3 UGenericTrap::GetMinimumBBox() const
114 return fMinBBoxVector;
117 // --------------------------------------------------------------------
120 UVector3 UGenericTrap::GetMaximumBBox() const
122 return fMaxBBoxVector;
125 // --------------------------------------------------------------------