46#if !defined(G4GEOM_USE_UEXTRUDEDSOLID)
67 const std::vector<G4TwoVector>& polygon,
68 const std::vector<ZSection>& zsections)
71 fNz(zsections.size()),
73 fGeometryType(
"G4ExtrudedSolid"),
82 std::ostringstream message;
83 message <<
"Number of vertices in polygon < 3 - " << pName;
84 G4Exception(
"G4ExtrudedSolid::G4ExtrudedSolid()",
"GeomSolids0002",
90 std::ostringstream message;
91 message <<
"Number of z-sides < 2 - " << pName;
92 G4Exception(
"G4ExtrudedSolid::G4ExtrudedSolid()",
"GeomSolids0002",
96 for (
G4int i=0; i<fNz-1; ++i )
98 if ( zsections[i].fZ > zsections[i+1].fZ )
100 std::ostringstream message;
101 message <<
"Z-sections have to be ordered by z value (z0 < z1 < z2...) - "
103 G4Exception(
"G4ExtrudedSolid::G4ExtrudedSolid()",
"GeomSolids0002",
108 std::ostringstream message;
109 message <<
"Z-sections with the same z position are not supported - "
111 G4Exception(
"G4ExtrudedSolid::G4ExtrudedSolid()",
"GeomSolids0001",
122 std::vector<G4int> removedVertices;
125 if (removedVertices.size() != 0)
127 G4int nremoved = removedVertices.size();
128 std::ostringstream message;
129 message <<
"The following "<< nremoved
130 <<
" vertices have been removed from polygon in " << pName
131 <<
"\nas collinear or coincident with other vertices: "
132 << removedVertices[0];
133 for (
G4int i=1; i<nremoved; ++i) message <<
", " << removedVertices[i];
134 G4Exception(
"G4ExtrudedSolid::G4ExtrudedSolid()",
"GeomSolids1001",
138 fNv = fPolygon.size();
141 std::ostringstream message;
142 message <<
"Number of vertices in polygon after removal < 3 - " << pName;
143 G4Exception(
"G4ExtrudedSolid::G4ExtrudedSolid()",
"GeomSolids0002",
156 std::reverse(fPolygon.begin(),fPolygon.end());
161 fZSections = zsections;
163 G4bool result = MakeFacets();
166 std::ostringstream message;
167 message <<
"Making facets failed - " << pName;
168 G4Exception(
"G4ExtrudedSolid::G4ExtrudedSolid()",
"GeomSolids0003",
173 ComputeProjectionParameters();
178 && (fZSections[0].fScale == 1) && (fZSections[1].fScale == 1)
182 fSolidType = (fIsConvex) ? 1 : 2;
183 ComputeLateralPlanes();
190 const std::vector<G4TwoVector>& polygon,
197 fGeometryType(
"G4ExtrudedSolid")
205 std::ostringstream message;
206 message <<
"Number of vertices in polygon < 3 - " << pName;
207 G4Exception(
"G4ExtrudedSolid::G4ExtrudedSolid()",
"GeomSolids0002",
217 std::vector<G4int> removedVertices;
220 if (removedVertices.size() != 0)
222 G4int nremoved = removedVertices.size();
223 std::ostringstream message;
224 message <<
"The following "<< nremoved
225 <<
" vertices have been removed from polygon in " << pName
226 <<
"\nas collinear or coincident with other vertices: "
227 << removedVertices[0];
228 for (
G4int i=1; i<nremoved; ++i) message <<
", " << removedVertices[i];
229 G4Exception(
"G4ExtrudedSolid::G4ExtrudedSolid()",
"GeomSolids1001",
233 fNv = fPolygon.size();
236 std::ostringstream message;
237 message <<
"Number of vertices in polygon after removal < 3 - " << pName;
238 G4Exception(
"G4ExtrudedSolid::G4ExtrudedSolid()",
"GeomSolids0002",
251 std::reverse(fPolygon.begin(),fPolygon.end());
256 fZSections.push_back(
ZSection(-dz, off1, scale1));
257 fZSections.push_back(
ZSection( dz, off2, scale2));
259 G4bool result = MakeFacets();
262 std::ostringstream message;
263 message <<
"Making facets failed - " << pName;
264 G4Exception(
"G4ExtrudedSolid::G4ExtrudedSolid()",
"GeomSolids0003",
269 ComputeProjectionParameters();
273 if ((scale1 == 1) && (scale2 == 1)
276 fSolidType = (fIsConvex) ? 1 : 2;
277 ComputeLateralPlanes();
285 fGeometryType(
"G4ExtrudedSolid")
295 fPolygon(rhs.fPolygon), fZSections(rhs.fZSections),
296 fTriangles(rhs.fTriangles), fIsConvex(rhs.fIsConvex),
297 fGeometryType(rhs.fGeometryType),
298 fSolidType(rhs.fSolidType), fPlanes(rhs.fPlanes),
299 fLines(rhs.fLines), fLengths(rhs.fLengths),
300 fKScales(rhs.fKScales), fScale0s(rhs.fScale0s),
301 fKOffsets(rhs.fKOffsets), fOffset0s(rhs.fOffset0s)
311 if (
this == &rhs) {
return *
this; }
319 fNv = rhs.fNv; fNz = rhs.fNz;
320 fPolygon = rhs.fPolygon; fZSections = rhs.fZSections;
321 fTriangles = rhs.fTriangles; fIsConvex = rhs.fIsConvex;
322 fGeometryType = rhs.fGeometryType;
323 fSolidType = rhs.fSolidType; fPlanes = rhs.fPlanes;
324 fLines = rhs.fLines; fLengths = rhs.fLengths;
325 fKScales = rhs.fKScales; fScale0s = rhs.fScale0s;
326 fKOffsets = rhs.fKOffsets; fOffset0s = rhs.fOffset0s;
340void G4ExtrudedSolid::ComputeProjectionParameters()
350 for (
G4int iz=0; iz<fNz-1; ++iz)
354 G4double scale1 = fZSections[iz].fScale;
355 G4double scale2 = fZSections[iz+1].fScale;
359 G4double kscale = (scale2 - scale1)/(z2 - z1);
360 G4double scale0 = scale2 - kscale*(z2 - z1)/2.0;
364 fKScales.push_back(kscale);
365 fScale0s.push_back(scale0);
366 fKOffsets.push_back(koff);
367 fOffset0s.push_back(off0);
373void G4ExtrudedSolid::ComputeLateralPlanes()
377 G4int Nv = fPolygon.size();
379 for (
G4int i=0, k=Nv-1; i<Nv; k=i++)
381 G4TwoVector norm = (fPolygon[i] - fPolygon[k]).unit();
382 fPlanes[i].a = -norm.
y();
383 fPlanes[i].b = norm.
x();
385 fPlanes[i].d = norm.
y()*fPolygon[i].x() - norm.
x()*fPolygon[i].y();
393 for (
G4int i=0, k=Nv-1; i<Nv; k=i++)
395 if (fPolygon[k].y() == fPolygon[i].y())
398 fLines[i].m = fPolygon[i].x();
402 G4double ctg = (fPolygon[k].x()-fPolygon[i].x())/(fPolygon[k].y()-fPolygon[i].y());
404 fLines[i].m = fPolygon[i].x() - ctg*fPolygon[i].y();
406 fLengths[i] = (fPolygon[i] - fPolygon[k]).mag();
416 return G4ThreeVector( fPolygon[ind].x() * fZSections[iz].fScale
417 + fZSections[iz].fOffset.x(),
418 fPolygon[ind].y() * fZSections[iz].fScale
419 + fZSections[iz].fOffset.y(), fZSections[iz].fZ);
435 while ( point.
z() > fZSections[iz+1].fZ && iz < fNz-2 ) { ++iz; }
438 G4double z0 = ( fZSections[iz+1].fZ + fZSections[iz].fZ )/2.0;
440 G4double pscale = fKScales[iz]*(point.
z()-
z0) + fScale0s[iz];
441 G4TwoVector poffset = fKOffsets[iz]*(point.
z()-
z0) + fOffset0s[iz];
450 return (p2 - poffset)/pscale;
461 if ( l1.
x() == l2.
x() )
476 G4bool squareComp = (dy*dy < (1+slope*slope)
500 return IsSameLine(p, l1, l2);
512 return ( (p1.
x() - l1.
x()) * (l2.
y() - l1.
y())
513 - (l2.
x() - l1.
x()) * (p1.
y() - l1.
y()) )
514 * ( (p2.
x() - l1.
x()) * (l2.
y() - l1.
y())
515 - (l2.
x() - l1.
x()) * (p2.
y() - l1.
y()) ) > 0;
530 if ( ( p.
x() < a.
x() && p.
x() < b.
x() && p.
x() < c.
x() ) ||
531 ( p.
x() > a.
x() && p.
x() > b.
x() && p.
x() > c.
x() ) ||
532 ( p.
y() < a.
y() && p.
y() < b.
y() && p.
y() < c.
y() ) ||
533 ( p.
y() > a.
y() && p.
y() > b.
y() && p.
y() > c.
y() ) )
return false;
536 = IsSameSide(p, a, b, c)
537 && IsSameSide(p, b, a, c)
538 && IsSameSide(p, c, a, b);
541 = IsSameLineSegment(p, a, b)
542 || IsSameLineSegment(p, b, c)
543 || IsSameLineSegment(p, c, a);
545 return inside || onEdge;
560 G4double result = (std::atan2(t1.
y(), t1.
x()) - std::atan2(t2.
y(), t2.
x()));
562 if ( result < 0 ) result += 2*
pi;
570G4ExtrudedSolid::MakeDownFacet(
G4int ind1,
G4int ind2,
G4int ind3)
const
575 std::vector<G4ThreeVector> vertices;
583 = (vertices[1]-vertices[0]).cross(vertices[2]-vertices[1]);
585 if ( cross.
z() > 0.0 )
593 vertices[1] = vertices[2];
609 std::vector<G4ThreeVector> vertices;
610 vertices.push_back(
GetVertex(fNz-1, ind1));
611 vertices.push_back(
GetVertex(fNz-1, ind2));
612 vertices.push_back(
GetVertex(fNz-1, ind3));
617 = (vertices[1]-vertices[0]).cross(vertices[2]-vertices[1]);
619 if ( cross.
z() < 0.0 )
627 vertices[1] = vertices[2];
637G4bool G4ExtrudedSolid::AddGeneralPolygonFacets()
641 typedef std::pair < G4TwoVector, G4int > Vertex;
643 static const G4double kAngTolerance =
648 std::vector< Vertex > verticesToBeDone;
649 for (
G4int i=0; i<fNv; ++i )
651 verticesToBeDone.push_back(Vertex(fPolygon[i], i));
653 std::vector< Vertex > ears;
655 std::vector< Vertex >::iterator c1 = verticesToBeDone.begin();
656 std::vector< Vertex >::iterator c2 = c1+1;
657 std::vector< Vertex >::iterator c3 = c1+2;
658 while ( verticesToBeDone.size()>2 )
670 G4double angle = GetAngle(c2->first, c3->first, c1->first);
675 while ( angle >= (pi-kAngTolerance) )
684 if ( c3 == verticesToBeDone.end() ) { c3 = verticesToBeDone.begin(); }
690 angle = GetAngle(c2->first, c3->first, c1->first);
697 G4Exception(
"G4ExtrudedSolid::AddGeneralPolygonFacets",
699 "Triangularisation has failed.");
705 for (
auto it=verticesToBeDone.cbegin(); it!=verticesToBeDone.cend(); ++it )
709 if ( it == c1 || it == c2 || it == c3 ) {
continue; }
711 if ( IsPointInside(c1->first, c2->first, c3->first, it->first) )
721 if ( c3 == verticesToBeDone.end() ) { c3 = verticesToBeDone.begin(); }
736 result =
AddFacet( MakeDownFacet(c1->second, c2->second, c3->second) );
737 if ( ! result ) {
return false; }
739 result =
AddFacet( MakeUpFacet(c1->second, c2->second, c3->second) );
740 if ( ! result ) {
return false; }
742 std::vector<G4int> triangle(3);
743 triangle[0] = c1->second;
744 triangle[1] = c2->second;
745 triangle[2] = c3->second;
746 fTriangles.push_back(triangle);
750 verticesToBeDone.erase(c2);
751 c1 = verticesToBeDone.begin();
761G4bool G4ExtrudedSolid::MakeFacets()
773 if ( ! good ) {
return false; }
779 if ( ! good ) {
return false; }
781 std::vector<G4int> triangle(3);
785 fTriangles.push_back(triangle);
793 if ( ! good ) {
return false; }
800 if ( ! good ) {
return false; }
802 std::vector<G4int> triangle1(3);
806 fTriangles.push_back(triangle1);
808 std::vector<G4int> triangle2(3);
812 fTriangles.push_back(triangle2);
816 good = AddGeneralPolygonFacets();
817 if ( ! good ) {
return false; }
822 for (
G4int iz = 0; iz < fNz-1; ++iz )
824 for (
G4int i = 0; i < fNv; ++i )
826 G4int j = (i+1) % fNv;
830 if ( ! good ) {
return false; }
845 return fGeometryType;
863 G4double dist = std::max(fZSections[0].fZ-p.
z(),p.
z()-fZSections[1].fZ);
866 G4int np = fPlanes.size();
867 for (
G4int i=0; i<np; ++i)
869 G4double dd = fPlanes[i].a*p.
x() + fPlanes[i].b*p.
y() + fPlanes[i].d;
870 if (dd > dist) { dist = dd; }
877 G4double distz = std::max(fZSections[0].fZ-p.
z(),p.
z()-fZSections[1].fZ);
880 G4bool in = PointInPolygon(p);
918 for (
G4int i=0; i<fNv; ++i )
920 G4int j = (i+1) % fNv;
921 if ( IsSameLineSegment(pscaled, fPolygon[i], fPolygon[j]) )
932 auto it = fTriangles.cbegin();
936 if ( IsPointInside(fPolygon[(*it)[0]], fPolygon[(*it)[1]],
937 fPolygon[(*it)[2]], pscaled) ) { inside =
true; }
939 }
while ( (inside ==
false) && (it != fTriangles.cend()) );
982 for (
G4int i=0; i<fNv; ++i)
984 G4double dd = fPlanes[i].a*p.
x() + fPlanes[i].b*p.
y() + fPlanes[i].d;
1004 for (
G4int i=0, k=fNv-1; i<fNv; k=i++)
1008 G4double u = fPlanes[i].a*iy - fPlanes[i].b*ix;
1011 if (ix*ix + iy*iy > sqrCarToleranceHalf)
continue;
1013 else if (u > fLengths[i])
1017 if (kx*kx + ky*ky > sqrCarToleranceHalf)
continue;
1021 G4double dd = fPlanes[i].a*p.
x() + fPlanes[i].b*p.
y() + fPlanes[i].d;
1022 if (dd*dd > sqrCarToleranceHalf)
continue;
1042 else if (nsurf != 0)
1051 std::ostringstream message;
1052 G4int oldprc = message.precision(16);
1053 message <<
"Point p is not on surface (!?) of solid: "
1055 message <<
"Position:\n";
1056 message <<
" p.x() = " << p.
x()/mm <<
" mm\n";
1057 message <<
" p.y() = " << p.
y()/mm <<
" mm\n";
1058 message <<
" p.z() = " << p.
z()/mm <<
" mm";
1059 G4cout.precision(oldprc) ;
1060 G4Exception(
"G4TesselatedSolid::SurfaceNormal(p)",
"GeomSolids1002",
1064 return ApproxSurfaceNormal(p);
1075 if (fSolidType == 1 || fSolidType == 2)
1079 G4double dz0 = fZSections[0].fZ - p.
z();
1080 G4double dz1 = p.
z() - fZSections[1].fZ;
1088 for (
G4int i=0, k=fNv-1; i<fNv; k=i++)
1092 G4double u = fPlanes[i].a*iy - fPlanes[i].b*ix;
1096 if (tmp < dd) { dd = tmp; iside = i; }
1098 else if (u > fLengths[i])
1103 if (tmp < dd) { dd = tmp; iside = i; }
1107 G4double tmp = fPlanes[i].a*p.
x() + fPlanes[i].b*p.
y() + fPlanes[i].d;
1109 if (tmp < dd) { dd = tmp; iside = i; }
1122 if (std::max(dz0,dz1) > 0) iregion = 1;
1124 G4bool in = PointInPolygon(p);
1125 if (!in) iregion += 2;
1133 if (ddz0 <= ddz1 && ddz0 <= dd)
return G4ThreeVector(0, 0,-1);
1134 if (ddz1 <= ddz0 && ddz1 <= dd)
return G4ThreeVector(0, 0, 1);
1135 return G4ThreeVector(fPlanes[iside].a, fPlanes[iside].b, 0);
1143 return G4ThreeVector(fPlanes[iside].a, fPlanes[iside].b, 0);
1147 G4double dzmax = std::max(dz0,dz1);
1148 if (dzmax*dzmax > dd)
return G4ThreeVector(0,0,(dz0 > dz1) ? -1 : 1);
1162 G4double z1 = fZSections[fNz-1].fZ;
1176 G4double ddz = (invz < 0) ? dz : -dz;
1182 G4int np = fPlanes.size();
1183 G4double txmin = tzmin, txmax = tzmax;
1184 for (
G4int i=0; i<np; ++i)
1186 G4double cosa = fPlanes[i].a*v.
x()+fPlanes[i].b*v.
y();
1187 G4double dist = fPlanes[i].a*p.
x()+fPlanes[i].b*p.
y()+fPlanes[i].d;
1190 if (cosa >= 0) {
return kInfinity; }
1192 if (txmin < tmp) { txmin = tmp; }
1197 if (txmax > tmp) { txmax = tmp; }
1203 G4double tmin = txmin, tmax = txmax;
1225 G4double dist = std::max(fZSections[0].fZ-p.
z(),p.
z()-fZSections[1].fZ);
1226 G4int np = fPlanes.size();
1227 for (
G4int i=0; i<np; ++i)
1229 G4double dd = fPlanes[i].a*p.
x() + fPlanes[i].b*p.
y() + fPlanes[i].d;
1230 if (dd > dist) dist = dd;
1232 return (dist > 0) ? dist : 0.;
1236 G4bool in = PointInPolygon(p);
1239 G4double distz= std::max(fZSections[0].fZ-p.
z(),p.
z()-fZSections[1].fZ);
1240 return (distz > 0) ? distz : 0;
1244 G4double distz= std::max(fZSections[0].fZ-p.
z(),p.
z()-fZSections[1].fZ);
1245 G4double dd = DistanceToPolygonSqr(p);
1246 if (distz > 0) dd += distz*distz;
1247 return std::sqrt(dd);
1264 G4bool getnorm = calcNorm;
1265 if (getnorm) *validNorm =
true;
1268 G4double z1 = fZSections[fNz-1].fZ;
1271 if (getnorm) n->set(0,0,-1);
1276 if (getnorm) n->set(0,0,1);
1291 G4int iside = (vz < 0) ? -4 : -2;
1295 G4int np = fPlanes.size();
1296 for (
G4int i=0; i<np; ++i)
1298 G4double cosa = fPlanes[i].a*v.
x()+fPlanes[i].b*v.
y();
1301 G4double dist = fPlanes[i].a*p.
x()+fPlanes[i].b*p.
y()+fPlanes[i].d;
1304 if (getnorm) n->set(fPlanes[i].a, fPlanes[i].b, fPlanes[i].c);
1308 if (tmax > tmp) { tmax = tmp; iside = i; }
1317 { n->set(0, 0, iside + 3); }
1319 { n->set(fPlanes[iside].a, fPlanes[iside].b, fPlanes[iside].c); }
1333 if (validNorm) { *validNorm = fIsConvex; }
1346 G4double dist = std::max(fZSections[0].fZ-p.
z(),p.
z()-fZSections[1].fZ);
1347 G4int np = fPlanes.size();
1348 for (
G4int i=0; i<np; ++i)
1350 G4double dd = fPlanes[i].a*p.
x() + fPlanes[i].b*p.
y() + fPlanes[i].d;
1351 if (dd > dist) dist = dd;
1353 return (dist < 0) ? -dist : 0.;
1357 G4double distz = std::max(fZSections[0].fZ-p.
z(),p.
z()-fZSections[1].fZ);
1358 G4bool in = PointInPolygon(p);
1359 if (distz >= 0 || (!in))
return 0;
1360 return std::min(-distz,std::sqrt(DistanceToPolygonSqr(p)));
1374 G4double xmin0 = kInfinity, xmax0 = -kInfinity;
1375 G4double ymin0 = kInfinity, ymax0 = -kInfinity;
1380 if (x < xmin0) xmin0 = x;
1381 if (x > xmax0) xmax0 = x;
1383 if (y < ymin0) ymin0 = y;
1384 if (y > ymax0) ymax0 = y;
1387 G4double xmin = kInfinity, xmax = -kInfinity;
1388 G4double ymin = kInfinity, ymax = -kInfinity;
1391 for (
G4int i=0; i<nsect; ++i)
1397 xmin = std::min(xmin,xmin0*scale+dx);
1398 xmax = std::max(xmax,xmax0*scale+dx);
1399 ymin = std::min(ymin,ymin0*scale+dy);
1400 ymax = std::max(ymax,ymax0*scale+dy);
1406 pMin.
set(xmin,ymin,zmin);
1407 pMax.
set(xmax,ymax,zmax);
1411 if (pMin.
x() >= pMax.
x() || pMin.
y() >= pMax.
y() || pMin.
z() >= pMax.
z())
1413 std::ostringstream message;
1414 message <<
"Bad bounding box (min >= max) for solid: "
1416 <<
"\npMin = " << pMin
1417 <<
"\npMax = " << pMax;
1445 return exist = (pMin < pMax) ?
true :
false;
1459 std::ostringstream message;
1460 message <<
"Triangulation of the base polygon has failed for solid: "
1462 <<
"\nExtent has been calculated using boundary box";
1470 std::vector<const G4ThreeVectorList *> polygons;
1471 polygons.resize(nsect);
1477 G4int ntria = triangles.size()/3;
1478 for (
G4int i=0; i<ntria; ++i)
1481 for (
G4int k=0; k<nsect; ++k)
1490 G4ThreeVectorList::iterator iter = ptr->begin();
1491 G4double x0 = triangles[i3+0].x()*scale+dx;
1492 G4double y0 = triangles[i3+0].y()*scale+dy;
1495 G4double x1 = triangles[i3+1].x()*scale+dx;
1496 G4double y1 = triangles[i3+1].y()*scale+dy;
1499 G4double x2 = triangles[i3+2].x()*scale+dx;
1500 G4double y2 = triangles[i3+2].y()*scale+dy;
1507 if (!benv.
CalculateExtent(pAxis,pVoxelLimit,pTransform,emin,emax))
continue;
1508 if (emin < pMin) pMin = emin;
1509 if (emax > pMax) pMax = emax;
1510 if (eminlim > pMin && emaxlim < pMax)
break;
1513 for (
G4int k=0; k<nsect; ++k) {
delete polygons[k]; polygons[k]=0;}
1514 return (pMin < pMax);
1521 G4int oldprc = os.precision(16);
1522 os <<
"-----------------------------------------------------------\n"
1523 <<
" *** Dump for solid - " <<
GetName() <<
" ***\n"
1524 <<
" ===================================================\n"
1525 <<
" Solid geometry type: " << fGeometryType <<
G4endl;
1528 { os <<
" Convex polygon; list of vertices:" <<
G4endl; }
1530 { os <<
" Concave polygon; list of vertices:" <<
G4endl; }
1532 for (
G4int i=0; i<fNv; ++i )
1534 os << std::setw(5) <<
"#" << i
1535 <<
" vx = " << fPolygon[i].x()/mm <<
" mm"
1536 <<
" vy = " << fPolygon[i].y()/mm <<
" mm" <<
G4endl;
1539 os <<
" Sections:" <<
G4endl;
1540 for (
G4int iz=0; iz<fNz; ++iz )
1542 os <<
" z = " << fZSections[iz].fZ/mm <<
" mm "
1543 <<
" x0= " << fZSections[iz].fOffset.x()/mm <<
" mm "
1544 <<
" y0= " << fZSections[iz].fOffset.y()/mm <<
" mm "
1545 <<
" scale= " << fZSections[iz].fScale <<
G4endl;
1564 os.precision(oldprc);
std::vector< G4ThreeVector > G4ThreeVectorList
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
CLHEP::Hep3Vector G4ThreeVector
CLHEP::Hep2Vector G4TwoVector
G4GLOB_DLL std::ostream G4cout
void set(double x, double y, double z)
G4bool BoundingBoxVsVoxelLimits(const EAxis pAxis, const G4VoxelLimits &pVoxelLimits, const G4Transform3D &pTransform3D, G4double &pMin, G4double &pMax) const
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimits, const G4Transform3D &pTransform3D, G4double &pMin, G4double &pMax) const
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const
EInside Inside(const G4ThreeVector &p) const
G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=nullptr, G4ThreeVector *n=nullptr) const
std::ostream & StreamInfo(std::ostream &os) const
virtual ~G4ExtrudedSolid()
G4ExtrudedSolid & operator=(const G4ExtrudedSolid &rhs)
void BoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const
G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
G4GeometryType GetEntityType() const
ZSection GetZSection(G4int index) const
G4int GetNofZSections() const
G4int GetNofVertices() const
G4TwoVector GetVertex(G4int index) const
G4ExtrudedSolid(const G4String &pName, const std::vector< G4TwoVector > &polygon, const std::vector< ZSection > &zsections)
static G4GeometryTolerance * GetInstance()
G4double GetAngularTolerance() const
G4double GetMinYExtent() const
G4double GetMinZExtent() const
G4TessellatedSolid & operator=(const G4TessellatedSolid &right)
G4double kCarToleranceHalf
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
G4bool AddFacet(G4VFacet *aFacet)
G4double GetMaxYExtent() const
G4double GetMaxZExtent() const
G4double GetMaxXExtent() const
virtual G4double DistanceToOut(const G4ThreeVector &p) const
G4double GetMinXExtent() const
void SetSolidClosed(const G4bool t)
virtual G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
G4double GetMinExtent(const EAxis pAxis) const
G4double GetMaxExtent(const EAxis pAxis) const