50 #if !defined(G4GEOM_USE_UGENERICTRAP)
82 const std::vector<G4TwoVector>& vertices )
84 fRebuildPolyhedron(false),
101 G4String errorDescription =
"InvalidSetup in \" ";
102 errorDescription +=
name;
103 errorDescription +=
"\"";
111 G4Exception(
"G4GenericTrap::G4GenericTrap()",
"GeomSolids0002",
119 G4Exception(
"G4GenericTrap::G4GenericTrap()",
"GeomSolids0002",
137 for (
G4int j=0; j < 2; j++)
139 for (
G4int i=1; i<4; ++i)
146 message <<
"Length segment is too small." <<
G4endl
147 <<
"Distance between " <<
fVertices[k-1] <<
" and "
148 <<
fVertices[k] <<
" is only " << length <<
" mm !";
149 G4Exception(
"G4GenericTrap::G4GenericTrap()",
"GeomSolids1001",
150 JustWarning, message,
"Vertices will be collapsed.");
177 fRebuildPolyhedron(false),
179 halfCarTolerance(0.),
183 fTessellatedSolid(0),
206 fRebuildPolyhedron(false), fpPolyhedron(0),
207 halfCarTolerance(rhs.halfCarTolerance),
208 fDz(rhs.fDz), fVertices(rhs.fVertices),
209 fIsTwisted(rhs.fIsTwisted), fTessellatedSolid(0),
210 fMinBBoxVector(rhs.fMinBBoxVector), fMaxBBoxVector(rhs.fMaxBBoxVector),
211 fVisSubdivisions(rhs.fVisSubdivisions),
212 fSurfaceArea(rhs.fSurfaceArea), fCubicVolume(rhs.fCubicVolume)
214 for (
size_t i=0; i<4; ++i) {
fTwist[i] = rhs.
fTwist[i]; }
227 if (
this == &rhs) {
return *
this; }
242 for (
size_t i=0; i<4; ++i) {
fTwist[i] = rhs.
fTwist[i]; }
257 const std::vector<G4TwoVector>& poly)
const
263 for (
G4int i = 0; i < 4; i++)
267 cross = (p.
x()-poly[i].x())*(poly[j].
y()-poly[i].y())-
268 (p.
y()-poly[i].y())*(poly[j].
x()-poly[i].x());
270 len2=(poly[i]-poly[j]).mag2();
282 if (poly[j].
x() > poly[i].x())
291 if ( p.
x() > poly[iMax].x()+halfCarTolerance
297 if (poly[j].
y() > poly[i].y())
307 if ( p.
y() > poly[iMax].y()+halfCarTolerance
313 if ( poly[iMax].
x() != poly[iMin].x() )
315 test = (p.
x()-poly[iMin].x())/(poly[iMax].
x()-poly[iMin].x())
316 * (poly[iMax].
y()-poly[iMin].y())+poly[iMin].
y();
325 if( (test>=(poly[iMin].
y()-halfCarTolerance))
326 && (test<=(poly[iMax].
y()+halfCarTolerance)) )
335 else if (cross<0.) {
return kOutside; }
369 std::vector<G4TwoVector> xy;
376 for (
G4int i=0; i<4; i++)
406 p0, p1, p2, r1, r2, r3, r4;
407 G4int noSurfaces = 0;
411 distz =
fDz-std::fabs(p.
z());
428 std:: vector<G4TwoVector> vertices;
430 for (
G4int i=0; i<4; i++)
437 for (
G4int q=0; q<4; q++)
463 lnorm = (p1-p0).cross(p2-p0);
464 lnorm = lnorm.
unit();
465 if(zPlusSide) { lnorm=-lnorm; }
475 if(proj<0) { proj=0; }
476 if(proj>normP) { proj=normP; }
482 r1=r1+proj*(r2-r1)/normP;
483 r3=r3+proj*(r4-r3)/normP;
490 distxy=std::fabs((p0-p).dot(lnorm));
497 sumnorm=sumnorm+lnorm;
511 if ( noSurfaces == 0 )
514 G4Exception(
"G4GenericTrap::SurfaceNormal(p)",
"GeomSolids1002",
520 else if ( noSurfaces == 1 ) { ; }
521 else { sumnorm = sumnorm.unit(); }
529 const G4int ipl )
const
581 lnorm=-(p1-p0).cross(p2-p0);
583 else { lnorm=lnorm.
unit(); }
593 if (proj<0) { proj=0; }
594 if (proj>normP) { proj=normP; }
600 r1=r1+proj*(r2-r1)/normP;
601 r3=r3+proj*(r4-r3)/normP;
615 const G4int ipl)
const
651 G4double a = (dtx*v.
y()-dty*v.
x()+(tx1*ty2-tx2*ty1)*v.
z())*v.
z();
652 G4double b = dxs*v.
y()-dys*v.
x()+(dtx*p.
y()-dty*p.
x()+ty2*xs1-ty1*xs2
653 + tx1*ys2-tx2*ys1)*v.
z();
654 G4double c=dxs*p.
y()-dys*p.
x()+xs1*ys2-xs2*ys1;
678 if (std::fabs(zi)<
fDz)
686 zi = (xp-
x1)*(xp-x2)+(yp-
y1)*(yp-y2);
695 if (a>0) { q=0.5*(-b-std::sqrt(d))/a; }
696 else { q=0.5*(-b+std::sqrt(d))/a; }
710 if (a>0) { q=0.5*(-b+std::sqrt(d))/a; }
711 else { q=0.5*(-b-std::sqrt(d))/a; }
718 if (std::fabs(zi)<
fDz)
726 zi = (xp-
x1)*(xp-x2)+(yp-
y1)*(yp-y2);
730 if (a>0) { q=0.5*(-b+std::sqrt(d))/a; }
731 else { q=0.5*(-b-std::sqrt(d))/a; }
745 if (a>0) { q=0.5*(-b-std::sqrt(d))/a; }
746 else { q=0.5*(-b+std::sqrt(d))/a; }
753 if (std::fabs(zi)<
fDz)
761 zi = (xp-
x1)*(xp-x2)+(yp-
y1)*(yp-y2);
802 dist[4] = (
fDz-p.
z())/v.
z();
806 dist[4] = (-
fDz-p.
z())/v.
z();
818 if (n.
dot(v)<0) { dist[4]=0.; }
829 if (dist[i] < distmin) { distmin = dist[i]; }
851 if(safz<0) { safz=0; }
857 for (iseg=0; iseg<4; iseg++)
860 if (safxy>safe) { safe=safxy; }
880 safe = (p-p1).dot(norm);
917 G4double c=(xb-xa)*(yc-ya)-(xc-xa)*(yb-ya);
923 t=-(a*p.
x()+b*p.
y()+c*p.
z()+
d)/t;
957 G4bool lateral_cross =
false;
960 if (calcNorm) { *validNorm=
true; }
964 distmin=(-
fDz-p.
z())/v.
z();
971 distmin = (
fDz-p.
z())/v.
z();
981 for (
G4int ipl=0; ipl<4; ipl++)
997 if ( (q>=0) && (q<distmin) )
1018 G4double a = (dtx*v.
y()-dty*v.
x()+(tx1*ty2-tx2*ty1)*v.
z())*v.
z();
1019 G4double b = dxs*v.
y()-dys*v.
x()+(dtx*p.
y()-dty*p.
x()+ty2*xs1-ty1*xs2
1020 + tx1*ys2-tx2*ys1)*v.
z();
1021 G4double c=dxs*p.
y()-dys*p.
x()+xs1*ys2-xs2*ys1;
1046 if (a > 0) { q=0.5*(-b-std::sqrt(d))/a; }
1047 else { q=0.5*(-b+std::sqrt(d))/a; }
1059 if (a > 0) { q=0.5*(-b+std::sqrt(d))/a; }
1060 else { q=0.5*(-b-std::sqrt(d))/a; }
1064 lateral_cross =
true;
1071 lateral_cross =
true;
1077 if (a > 0) { q=0.5*(-b+std::sqrt(d))/a; }
1078 else { q=0.5*(-b-std::sqrt(d))/a; }
1088 if (a > 0) { q=0.5*(-b-std::sqrt(d))/a; }
1089 else { q=0.5*(-b+std::sqrt(d))/a; }
1093 lateral_cross =
true;
1100 lateral_cross =
true;
1114 if (v.z()>0.) { i=4; }
1115 std::vector<G4TwoVector> xy;
1131 if(v.z()>0) {side=
kPZ;}
1162 G4int oldprc = message.precision(16);
1163 message <<
"Undefined side for valid surface normal to solid." <<
G4endl
1165 <<
" p.x() = " << p.
x()/
mm <<
" mm" <<
G4endl
1166 <<
" p.y() = " << p.
y()/
mm <<
" mm" <<
G4endl
1167 <<
" p.z() = " << p.
z()/
mm <<
" mm" <<
G4endl
1168 <<
"Direction:" <<
G4endl
1169 <<
" v.x() = " << v.
x() <<
G4endl
1170 <<
" v.y() = " << v.
y() <<
G4endl
1171 <<
" v.z() = " << v.
z() <<
G4endl
1172 <<
"Proposed distance :" <<
G4endl
1173 <<
" distmin = " << distmin/
mm <<
" mm";
1174 message.precision(oldprc);
1175 G4Exception(
"G4GenericTrap::DistanceToOut(p,v,..)",
1199 if (safz<0) { safz = 0; }
1204 for (
G4int iseg=0; iseg<4; iseg++)
1207 if (safxy < safe) { safe = safxy; }
1223 if (pMin.
x() >= pMax.
x() || pMin.
y() >= pMax.
y() || pMin.
z() >= pMax.
z())
1226 message <<
"Bad bounding box (min >= max) for solid: "
1228 <<
"\npMin = " << pMin
1229 <<
"\npMax = " << pMax;
1230 G4Exception(
"G4GenericTrap::BoundingLimits()",
"GeomMgt0001",
1251 #ifdef G4BBOX_EXTENT
1252 if (
true)
return bbox.
CalculateExtent(pAxis,pVoxelLimit,pTransform,pMin,pMax);
1256 return exist = (pMin < pMax) ?
true :
false;
1268 for (
G4int i=0; i<4; ++i)
1272 baseA[2*i].set(va.
x(),va.
y(),-dz);
1273 baseB[2*i].set(vb.
x(),vb.
y(), dz);
1275 for (
G4int i=0; i<4; ++i)
1277 G4int k1=2*i, k2=(2*i+2)%8;
1278 G4double ax = (baseA[k2].x()-baseA[k1].x());
1279 G4double ay = (baseA[k2].y()-baseA[k1].y());
1280 G4double bx = (baseB[k2].x()-baseB[k1].x());
1281 G4double by = (baseB[k2].y()-baseB[k1].y());
1283 baseA[k1+1] = (znorm < 0.0) ? baseA[k2] : baseA[k1];
1284 baseB[k1+1] = (znorm < 0.0) ? baseB[k1] : baseB[k2];
1287 std::vector<const G4ThreeVectorList *> polygons(2);
1288 polygons[0] = &baseA;
1289 polygons[1] = &baseB;
1314 G4int oldprc = os.precision(16);
1315 os <<
"-----------------------------------------------------------\n"
1316 <<
" *** Dump for solid - " <<
GetName() <<
" *** \n"
1317 <<
" =================================================== \n"
1319 <<
" half length Z: " <<
fDz/
mm <<
" mm \n"
1320 <<
" list of vertices:\n";
1324 os << std::setw(5) <<
"#" << i
1328 os.precision(oldprc);
1347 G4double rand,area,chose,cf,lambda0,lambda1,alfa,
beta,zp;
1350 std::vector<G4ThreeVector> vertices;
1351 for (
G4int i=0; i<4;i++)
1355 for (
G4int i=4; i<8;i++)
1363 vertices[2],vertices[3]);
1365 vertices[5],vertices[4]);
1367 vertices[4],vertices[7]);
1369 vertices[7],vertices[6]);
1371 vertices[5],vertices[6]);
1373 vertices[6],vertices[7]);
1375 area = Surface0+Surface1+Surface2+Surface3+Surface4+Surface5;
1378 if ( ( chose < Surface0)
1379 || ( chose > (Surface0+Surface1+Surface2+Surface3+Surface4)) )
1383 if(chose < Surface0)
1398 lambda0=alfa-lambda1;
1401 v = u+lambda0*v+lambda1*
w;
1405 if (chose < Surface0+Surface1) { ipl=0; }
1406 else if (chose < Surface0+Surface1+Surface2) { ipl=1; }
1407 else if (chose < Surface0+Surface1+Surface2+Surface3) { ipl=2; }
1411 cf = 0.5*(fDz-zp)/fDz;
1489 return (((p2-p0).cross(p3-p1)).mag()) / 2.;
1501 return (((p2-p0).cross(p3-p1)).dot(p0)) / 6.;
1515 for (
G4int i=0; i<4; i++ )
1519 if ( (dx1 == 0) && (dy1 == 0) ) {
continue; }
1524 if ( dx2 == 0 && dy2 == 0 ) {
continue; }
1525 G4double twist_angle = std::fabs(dy1*dx2 - dx1*dy2);
1532 twist_angle = std::acos( (dx1*dx2 + dy1*dy2)
1533 / (std::sqrt(dx1*dx1+dy1*dy1)
1534 * std::sqrt(dx2*dx2+dy2*dy2)) );
1539 message <<
"Twisted Angle is bigger than 90 degrees - " <<
GetName()
1541 <<
" Potential problem of malformed Solid !" <<
G4endl
1542 <<
" TwistANGLE = " << twist_angle
1543 <<
"*rad for lateral plane N= " << i;
1544 G4Exception(
"G4GenericTrap::ComputeIsTwisted()",
"GeomSolids1002",
1559 G4bool clockwise_order=
true;
1564 for (
G4int i=0; i<4; i++)
1567 sum1 += vertices[i].x()*vertices[j].y() - vertices[j].x()*vertices[i].y();
1568 sum2 += vertices[i+4].x()*vertices[j+4].y()
1569 - vertices[j+4].x()*vertices[i+4].y();
1574 message <<
"Lower/upper faces defined with opposite clockwise - "
1576 G4Exception(
"G4GenericTrap::CheckOrder()",
"GeomSolids0002",
1580 if ((sum1 > 0.)||(sum2 > 0.))
1583 message <<
"Vertices must be defined in clockwise XY planes - "
1585 G4Exception(
"G4GenericTrap::CheckOrder()",
"GeomSolids1001",
1587 clockwise_order =
false;
1592 G4bool illegal_cross =
false;
1594 vertices[1],vertices[5]);
1599 vertices[3],vertices[7]);
1605 vertices[2],vertices[3]);
1610 vertices[1],vertices[2]);
1615 vertices[6],vertices[7]);
1620 vertices[5],vertices[6]);
1626 message <<
"Malformed polygone with opposite sides - " <<
GetName();
1627 G4Exception(
"G4GenericTrap::CheckOrderAndSetup()",
1630 return clockwise_order;
1639 std::vector<G4ThreeVector> oldVertices(vertices);
1641 for (
G4int i=0; i <
G4int(oldVertices.size()); ++i )
1643 vertices[i] = oldVertices[oldVertices.size()-1-i];
1657 G4double dx1,dx2,xm=0.,ym=0.,a1=0.,a2=0.,b1=0.,b2=0.;
1665 a1 = (b.
x()*a.
y()-a.
x()*b.
y())/dx1;
1670 a2 = (d.
x()*c.
y()-c.
x()*d.
y())/dx2;
1673 if (stand1 && stand2)
1711 if (std::fabs(c.
y()-(a1+b1*c.
x())) >
fgkTolerance) {
return false; }
1722 xm = (a1-a2)/(b2-b1);
1723 ym = (a1*b2-a2*b1)/(b2-b1);
1729 G4double check = (xm-a.
x())*(xm-b.
x())+(ym-a.
y())*(ym-b.
y());
1731 check = (xm-c.
x())*(xm-d.
x())+(ym-c.
y())*(ym-d.
y());
1769 det = dv.
x()*v1.
y()*v2.
z()+dv.
y()*v1.
z()*v2.
x()
1770 - dv.
x()*v1.
z()*v2.
y()-dv.
y()*v1.
x()*v2.
z();
1774 temp1 = v1.
cross(v2);
1775 temp2 = (p2-p1).cross(v2);
1776 if (temp1.
dot(temp2) < 0) {
return false; }
1780 q = ((dv).cross(v2)).mag()/q;
1797 if ( (fromVertices[ind1] == fromVertices[ind2]) ||
1798 (fromVertices[ind2] == fromVertices[ind3]) ||
1799 (fromVertices[ind1] == fromVertices[ind3]) ) {
return 0; }
1801 std::vector<G4ThreeVector> vertices;
1802 vertices.push_back(fromVertices[ind1]);
1803 vertices.push_back(fromVertices[ind2]);
1804 vertices.push_back(fromVertices[ind3]);
1808 G4ThreeVector cross=(vertices[1]-vertices[0]).cross(vertices[2]-vertices[1]);
1810 if ( cross.
z() > 0.0 )
1815 message <<
"Vertices in wrong order - " <<
GetName();
1816 G4Exception(
"G4GenericTrap::MakeDownFacet",
"GeomSolids0002",
1834 if ( (fromVertices[ind1] == fromVertices[ind2]) ||
1835 (fromVertices[ind2] == fromVertices[ind3]) ||
1836 (fromVertices[ind1] == fromVertices[ind3]) ) {
return 0; }
1838 std::vector<G4ThreeVector> vertices;
1839 vertices.push_back(fromVertices[ind1]);
1840 vertices.push_back(fromVertices[ind2]);
1841 vertices.push_back(fromVertices[ind3]);
1845 G4ThreeVector cross=(vertices[1]-vertices[0]).cross(vertices[2]-vertices[1]);
1847 if ( cross.
z() < 0.0 )
1852 message <<
"Vertices in wrong order - " <<
GetName();
1853 G4Exception(
"G4GenericTrap::MakeUpFacet",
"GeomSolids0002",
1871 if ( (downVertex0 == downVertex1) && (upVertex0 == upVertex1) )
1876 if ( downVertex0 == downVertex1 )
1881 if ( upVertex0 == upVertex1 )
1897 std::vector<G4ThreeVector> downVertices;
1898 for (
G4int i=0; i<nv; i++ )
1904 std::vector<G4ThreeVector> upVertices;
1905 for (
G4int i=nv; i<2*nv; i++ )
1914 = (downVertices[1]-downVertices[0]).cross(downVertices[2]-downVertices[1]);
1916 = (upVertices[1]-upVertices[0]).cross(upVertices[2]-upVertices[1]);
1917 if ( (cross.
z() > 0.0) || (cross1.
z() > 0.0) )
1927 if (facet) { tessellatedSolid->
AddFacet( facet ); }
1929 if (facet) { tessellatedSolid->
AddFacet( facet ); }
1931 if (facet) { tessellatedSolid->
AddFacet( facet ); }
1933 if (facet) { tessellatedSolid->
AddFacet( facet ); }
1937 for (
G4int i = 0; i < nv; ++i )
1939 G4int j = (i+1) % nv;
1941 upVertices[i], upVertices[j]);
1943 if ( facet ) { tessellatedSolid->
AddFacet( facet ); }
1948 return tessellatedSolid;
2029 minVec.
y(), maxVec.
y(),
2030 minVec.
z(), maxVec.
z());
2049 size_t nVertices, nFacets;
2051 G4int subdivisions=0;
2074 Dx = 0.5*(maxVec.
x()- minVec.
y());
2075 Dy = 0.5*(maxVec.
y()- minVec.
y());
2076 if (Dy > Dx) { Dx=Dy; }
2078 subdivisions=8*
G4int(maxTwist/(Dx*Dx*Dx)*
fDz);
2079 if (subdivisions<4) { subdivisions=4; }
2080 if (subdivisions>30) { subdivisions=30; }
2083 G4int sub4=4*subdivisions;
2084 nVertices = 8+subdivisions*4;
2085 nFacets = 6+subdivisions*4;
2096 for( i=0;i<subdivisions;i++)
2098 for(
G4int j=0;j<4;j++)
2113 for (i=0;i<subdivisions+1;i++)
2116 polyhedron->
AddFacet(5+is,8+is,4+is,1+is);
2117 polyhedron->
AddFacet(8+is,7+is,3+is,4+is);
2118 polyhedron->
AddFacet(7+is,6+is,2+is,3+is);
2119 polyhedron->
AddFacet(6+is,5+is,1+is,2+is);
2121 polyhedron->
AddFacet(5+sub4,6+sub4,7+sub4,8+sub4);
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimits, const G4Transform3D &pTransform3D, G4double &pMin, G4double &pMax) const
G4double GetFaceCubicVolume(const G4ThreeVector &p0, const G4ThreeVector &p1, const G4ThreeVector &p2, const G4ThreeVector &p3) const
G4bool CheckOrder(const std::vector< G4TwoVector > &vertices) const
G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
G4ThreeVector GetMaximumBBox() const
CLHEP::Hep3Vector G4ThreeVector
std::vector< ExP01TrackerHit * > a
virtual void AddSolid(const G4Box &)=0
static const G4double kInfinity
G4VFacet * MakeUpFacet(const std::vector< G4ThreeVector > &fromVertices, G4int ind1, G4int ind2, G4int ind3) const
Float_t y1[n_points_granero]
void AddFacet(const G4int iv1, const G4int iv2, const G4int iv3, const G4int iv4=0)
void AddVertex(const G4ThreeVector &v)
virtual G4VisExtent GetExtent() const
G4TwoVector GetVertex(G4int index) const
static constexpr double mm
G4bool IsSegCrossing(const G4TwoVector &a, const G4TwoVector &b, const G4TwoVector &c, const G4TwoVector &d) const
virtual void DescribeYourselfTo(G4VGraphicsScene &scene) const
Float_t x1[n_points_granero]
std::ostream & StreamInfo(std::ostream &os) const
G4double GetTwistAngle(G4int index) const
void SetTwistAngle(G4int index, G4double twist)
void message(RunManager *runmanager)
G4bool fRebuildPolyhedron
virtual G4double GetSurfaceArea()
EInside InsidePolygone(const G4ThreeVector &p, const std::vector< G4TwoVector > &poly) const
double dot(const Hep3Vector &) const
G4double GetZHalfLength() const
virtual G4Polyhedron * GetPolyhedron() const
void BoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const
G4TessellatedSolid * fTessellatedSolid
G4double DistToTriangle(const G4ThreeVector &p, const G4ThreeVector &v, const G4int ipl) const
G4ThreeVector GetPointOnSurface() const
G4double SafetyToFace(const G4ThreeVector &p, const G4int iseg) const
G4VisExtent GetExtent() const
virtual EInside Inside(const G4ThreeVector &p) const
G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const
Float_t y2[n_points_geant4]
void SetSolidClosed(const G4bool t)
G4bool AddFacet(G4VFacet *aFacet)
G4int GetVisSubdivisions() const
G4GenericTrap & operator=(const G4GenericTrap &rhs)
G4VSolid & operator=(const G4VSolid &rhs)
G4bool BoundingBoxVsVoxelLimits(const EAxis pAxis, const G4VoxelLimits &pVoxelLimits, const G4Transform3D &pTransform3D, G4double &pMin, G4double &pMax) const
G4TessellatedSolid * CreateTessellatedSolid() const
std::vector< G4ThreeVector > G4ThreeVectorList
#define G4MUTEX_INITIALIZER
G4double GetCubicVolume()
G4ThreeVector fMaxBBoxVector
static const G4int fgkNofVertices
G4ThreeVector fMinBBoxVector
virtual G4double DistanceToOut(const G4ThreeVector &p) const
G4VFacet * MakeDownFacet(const std::vector< G4ThreeVector > &fromVertices, G4int ind1, G4int ind2, G4int ind3) const
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pmin, G4double &pmax) const
G4GenericTrap(const G4String &name, G4double halfZ, const std::vector< G4TwoVector > &vertices)
virtual G4Polyhedron * CreatePolyhedron() const
G4VFacet * MakeSideFacet(const G4ThreeVector &downVertex0, const G4ThreeVector &downVertex1, const G4ThreeVector &upVertex1, const G4ThreeVector &upVertex0) const
G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
G4GeometryType GetEntityType() const
Hep3Vector cross(const Hep3Vector &) const
static G4int GetNumberOfRotationSteps()
void ReorderVertices(std::vector< G4ThreeVector > &vertices) const
G4ThreeVector NormalToPlane(const G4ThreeVector &p, const G4int ipl) const
virtual G4ThreeVector GetPointOnSurface() const
G4Polyhedron * fpPolyhedron
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
G4double DistToPlane(const G4ThreeVector &p, const G4ThreeVector &v, const G4int ipl) const
std::vector< G4TwoVector > fVertices
G4ThreeVector GetMinimumBBox() const
G4int GetNumberOfRotationStepsAtTimeOfCreation() const
G4double halfCarTolerance
G4double GetFaceSurfaceArea(const G4ThreeVector &p0, const G4ThreeVector &p1, const G4ThreeVector &p2, const G4ThreeVector &p3) const
virtual G4double GetCubicVolume()
G4Polyhedron * GetPolyhedron() const
virtual G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
G4bool IsSegCrossingZ(const G4TwoVector &a, const G4TwoVector &b, const G4TwoVector &c, const G4TwoVector &d) const
G4Polyhedron * CreatePolyhedron() const
static constexpr double pi
G4double GetSurfaceArea()
Float_t x2[n_points_geant4]
static const G4double fgkTolerance
G4bool ComputeIsTwisted()
EInside Inside(const G4ThreeVector &p) const
void DescribeYourselfTo(G4VGraphicsScene &scene) const