50#if !defined(G4GEOM_USE_UTESSELLATEDSOLID)
141 if (&
ts ==
this)
return *
this;
195 for (
G4int i = 0; i <
n; ++i)
197 G4VFacet *facetClone = (
ts.GetFacet(i))->GetClone();
214 G4Exception(
"G4TessellatedSolid::AddFacet()",
"GeomSolids1002",
215 JustWarning,
"Attempt to add facets when solid is closed.");
220 set<G4VertexInfo,G4VertexComparator>::iterator begin
225 value.
mag2 = p.
x() + p.
y() + p.
z();
234 while (!found && it != end)
239 if ((found = (facet == aFacet)))
break;
241 if (dif > kCarTolerance3)
break;
248 while (!found && it != begin)
254 found = (facet == aFacet);
257 if (dif > kCarTolerance3)
break;
271 G4Exception(
"G4TessellatedSolid::AddFacet()",
"GeomSolids1002",
272 JustWarning,
"Attempt to add facet not properly defined.");
281 const std::vector<G4int>&
max,
284 vector<G4int> xyz = voxel;
285 stack<vector<G4int> >
pos;
288 G4int cc = 0, nz = 0;
290 vector<G4int> candidates;
308 for (
auto i = 0; i <= 2; ++i)
310 if (xyz[i] <
max[i] - 1)
338 vector<G4int> voxel(3), maxVoxels(3);
340 G4int size = maxVoxels[0] * maxVoxels[1] * maxVoxels[2];
347 for (voxel[2] = 0; voxel[2] < maxVoxels[2] - 1; ++voxel[2])
349 for (voxel[1] = 0; voxel[1] < maxVoxels[1] - 1; ++voxel[1])
351 for (voxel[0] = 0; voxel[0] < maxVoxels[0] - 1; ++voxel[0])
356 for (
auto i = 0; i <= 2; ++i)
403 std::vector<G4ThreeVector> vertices(vsize);
407 std::mt19937 gen(12345678);
408 std::shuffle(vertices.begin(), vertices.end(), gen);
412 for (
G4int i=0; i < 6; ++i) { points[i] = vertices[0]; }
413 for (
G4int i=1; i < vsize; ++i)
415 if (vertices[i].x() < points[0].x()) points[0] = vertices[i];
416 if (vertices[i].x() > points[1].x()) points[1] = vertices[i];
417 if (vertices[i].y() < points[2].y()) points[2] = vertices[i];
418 if (vertices[i].y() > points[3].y()) points[3] = vertices[i];
419 if (vertices[i].z() < points[4].z()) points[4] = vertices[i];
420 if (vertices[i].z() > points[5].z()) points[5] = vertices[i];
425 for (
G4int j = 0; j < size; ++j)
430 if (!facet.
IsInside(points[0]))
continue;
431 if (!facet.
IsInside(points[1]))
continue;
432 if (!facet.
IsInside(points[2]))
continue;
433 if (!facet.
IsInside(points[3]))
continue;
434 if (!facet.
IsInside(points[4]))
continue;
435 if (!facet.
IsInside(points[5]))
continue;
439 for (
G4int i=0; i < vsize; ++i)
465 set<G4VertexInfo,G4VertexComparator> vertexListSorted;
466 set<G4VertexInfo,G4VertexComparator>::iterator begin
467 = vertexListSorted.begin(), end = vertexListSorted.end(),
pos, it;
476 vector<G4int> newIndex(100);
478 for (
G4int k = 0; k < size; ++k)
487 value.
mag2 = p.
x() + p.
y() + p.
z();
493 pos = vertexListSorted.lower_bound(value);
500 found = (dif < kCarTolerance24);
502 dif = q.
x() + q.
y() + q.
z() - value.
mag2;
503 if (dif > kCarTolerance3)
break;
516 found = (dif < kCarTolerance24);
518 dif = value.
mag2 - (q.
x() + q.
y() + q.
z());
519 if (dif > kCarTolerance3)
break;
528 G4cout <<
"Adding new vertex #" << i <<
" of facet " << k
533 vertexListSorted.insert(value);
534 begin = vertexListSorted.begin();
535 end = vertexListSorted.end();
536 newIndex[i] = value.
id;
555 G4cout <<
"Vertex #" << i <<
" of facet " << k
556 <<
" found, redirecting to " <<
id <<
G4endl;
572 for (
auto res=vertexListSorted.cbegin(); res!=vertexListSorted.cend(); ++res)
574 G4int id = (*res).id;
577 if (previousValue && (previousValue - 1e-9 > mvalue))
578 G4cout <<
"Error in CreateVertexList: previousValue " << previousValue
579 <<
" is smaller than mvalue " << mvalue <<
G4endl;
580 previousValue = mvalue;
592 G4cout <<
"G4TessellatedSolid - Allocated memory without voxel overhead "
593 << without <<
"; with " << with <<
"; ratio: " << ratio <<
G4endl;
629 std::ostringstream message;
630 message <<
"Defects in solid: " <<
GetName()
631 <<
" - negative cubic volume, please check orientation of facets!";
632 G4Exception(
"G4TessellatedSolid::SetSolidClosed()",
637 std::ostringstream message;
638 message <<
"Defects in solid: " <<
GetName()
639 <<
" - some facets have wrong orientation!";
640 G4Exception(
"G4TessellatedSolid::SetSolidClosed()",
645 std::ostringstream message;
646 message <<
"Defects in solid: " <<
GetName()
647 <<
" - there are holes in the surface!";
648 G4Exception(
"G4TessellatedSolid::SetSolidClosed()",
685 for (
G4int i = 0; i < nface; ++i)
691 G4int ivolume = (volume <= 0.);
695 std::vector<int64_t> iedge(nedge);
697 for (
G4int i = 0; i < nface; ++i)
701 for (
G4int k = 0; k < nnode; ++k)
705 int64_t inverse = (i2 > i1);
706 if (inverse) std::swap(i1, i2);
707 iedge[kk++] = i1*1000000000 + i2*2 + inverse;
710 std::sort(iedge.begin(), iedge.end());
718 while (i < nedge - 1)
720 if (iedge[i + 1] - iedge[i] == 1)
724 else if (iedge[i + 1] == iedge[i])
735 return ivolume + iorder + ihole;
751 for (
G4int i = 0; i < size; ++i)
777 vector<G4int> startingVoxel(3);
780 const G4double dirTolerance = 1.0E-14;
782 const vector<G4int> &startingCandidates =
784 G4int limit = startingCandidates.size();
794 for(
G4int i = 0; i < limit; ++i)
796 G4int candidate = startingCandidates[i];
799 if (dist < minDist) minDist = dist;
826 G4bool nearParallel =
false;
846 vector<G4int> curVoxel(3);
847 curVoxel = startingVoxel;
855 const vector<G4int> &candidates =
858 if (
G4int candidatesCount = candidates.size())
860 for (
G4int i = 0 ; i < candidatesCount; ++i)
862 G4int candidate = candidates[i];
866 crossingO = facet.
Intersect(p,v,
true,distO,distFromSurfaceO,normalO);
867 crossingI = facet.
Intersect(p,v,
false,distI,distFromSurfaceI,normalI);
869 if (crossingO || crossingI)
873 nearParallel = (crossingO
874 && std::fabs(normalO.
dot(v))<dirTolerance)
875 || (crossingI && std::fabs(normalI.
dot(v))<dirTolerance);
878 if (crossingO && distO > 0.0 && distO < distOut)
880 if (crossingI && distI > 0.0 && distI < distIn)
886 if (nearParallel)
break;
902 currentPoint += direction * (shift + shiftBonus);
921 std::ostringstream message;
922 G4int oldprc = message.precision(16);
923 message <<
"Cannot determine whether point is inside or outside volume!"
929 <<
"p.x() = " << p.
x()/
mm <<
" mm" <<
G4endl
930 <<
"p.y() = " << p.
y()/
mm <<
" mm" <<
G4endl
931 <<
"p.z() = " << p.
z()/
mm <<
" mm";
932 message.precision(oldprc);
968 const G4double dirTolerance = 1.0E-14;
975 for (
G4int i = 0; i < size; ++i)
979 if (dist < minDist) minDist = dist;
1009 G4bool crossingO =
false;
1010 G4bool crossingI =
false;
1015 for (
G4int i=0; i<nTry; ++i)
1017 G4bool nearParallel =
false;
1029 vector<G4VFacet*>::const_iterator f =
fFacets.begin();
1038 crossingO = ((*f)->Intersect(p,v,
true,distO,distFromSurfaceO,normalO));
1039 crossingI = ((*f)->Intersect(p,v,
false,distI,distFromSurfaceI,normalI));
1040 if (crossingO || crossingI)
1042 nearParallel = (crossingO && std::fabs(normalO.
dot(v))<dirTolerance)
1043 || (crossingI && std::fabs(normalI.
dot(v))<dirTolerance);
1046 if (crossingO && distO > 0.0 && distO < distOut) distOut = distO;
1047 if (crossingI && distI > 0.0 && distI < distIn) distIn = distI;
1050 }
while (!nearParallel && ++f !=
fFacets.end());
1061 std::ostringstream message;
1062 G4int oldprc = message.precision(16);
1063 message <<
"Cannot determine whether point is inside or outside volume!"
1069 <<
"p.x() = " << p.
x()/
mm <<
" mm" <<
G4endl
1070 <<
"p.y() = " << p.
y()/
mm <<
" mm" <<
G4endl
1071 <<
"p.z() = " << p.
z()/
mm <<
" mm";
1072 message.precision(oldprc);
1094 if (i == 0) location = locationprime;
1111 vector<G4int> curVoxel(3);
1114 if (
G4int limit = candidates.size())
1117 for(
G4int i = 0 ; i < limit ; ++i)
1119 G4int candidate = candidates[i];
1135 for (
G4int i = 0; i < size; ++i)
1162 vector<G4int> curVoxel(3);
1167 if (
G4int limit = candidates.size())
1170 for(
G4int i = 0 ; i < limit ; ++i)
1172 G4int candidate = candidates[i];
1175 if (dist < minDist) minDist = dist;
1189 for (
G4int i = 0; i < size; ++i)
1209 std::ostringstream message;
1210 message <<
"Point p is not on surface !?" <<
G4endl
1211 <<
" No facets found for point: " << p <<
" !" <<
G4endl
1212 <<
" Returning approximated value for normal.";
1214 G4Exception(
"G4TessellatedSolid::SurfaceNormal(p)",
1245 std::ostringstream message;
1246 G4int oldprc = message.precision(16) ;
1247 message <<
"Point p is already inside!?" <<
G4endl
1249 <<
" p.x() = " << p.
x()/
mm <<
" mm" <<
G4endl
1250 <<
" p.y() = " << p.
y()/
mm <<
" mm" <<
G4endl
1251 <<
" p.z() = " << p.
z()/
mm <<
" mm" <<
G4endl
1253 message.precision(oldprc) ;
1254 G4Exception(
"G4TriangularFacet::DistanceToIn(p,v)",
1260 for (
G4int i = 0; i < size; ++i)
1313 std::ostringstream message;
1314 G4int oldprc = message.precision(16) ;
1315 message <<
"Point p is already outside!?" <<
G4endl
1317 <<
" p.x() = " << p.
x()/
mm <<
" mm" <<
G4endl
1318 <<
" p.y() = " << p.
y()/
mm <<
" mm" <<
G4endl
1319 <<
" p.z() = " << p.
z()/
mm <<
" mm" <<
G4endl
1321 message.precision(oldprc) ;
1322 G4Exception(
"G4TriangularFacet::DistanceToOut(p)",
1327 G4bool isExtreme =
false;
1329 for (
G4int i = 0; i < size; ++i)
1344 if (dist >= 0.0 && dist < minDist)
1354 aNormalVector = minNormal;
1355 aConvex = isExtreme;
1362 Normal(p, aNormalVector);
1374 G4int& minCandidate )
const
1376 G4int candidatesCount = candidates.size();
1381 for (
G4int i = 0 ; i < candidatesCount; ++i)
1383 G4int candidate = candidates[i];
1385 if (facet.
Intersect(aPoint,direction,
true,dist,distFromSurface,
normal))
1394 minCandidate = candidate;
1397 if (dist >= 0.0 && dist < minDist)
1401 minCandidate = candidate;
1425 vector<G4int> curVoxel(3);
1432 const vector<G4int>* old =
nullptr;
1434 G4int minCandidate = -1;
1438 if (old == &candidates)
1440 if (old != &candidates && candidates.size())
1443 aNormalVector, minCandidate);
1444 if (minDistance <= totalShift)
break;
1450 totalShift += shift;
1451 if (minDistance <= totalShift)
break;
1453 currentPoint += direction * (shift + shiftBonus);
1459 if (minCandidate < 0)
1464 Normal(aPoint, aNormalVector);
1487 G4int candidatesCount = candidates.size();
1493 for (
G4int i = 0 ; i < candidatesCount; ++i)
1495 G4int candidate = candidates[i];
1497 if (facet.
Intersect(aPoint,direction,
false,dist,distFromSurface,
normal))
1507 && (dist >= 0.0) && (dist < minDistance))
1546 currentPoint += direction * (shift + shiftBonus);
1551 vector<G4int> curVoxel(3);
1557 if (candidates.size())
1560 if (minDistance > distance) minDistance = distance;
1561 if (distance < totalShift)
break;
1567 totalShift += shift;
1568 if (minDistance < totalShift)
break;
1570 currentPoint += direction * (shift + shiftBonus);
1586 const std::pair<G4int, G4double>& r)
1588 return l.second < r.second;
1601 vector<pair<G4int, G4double> > voxelsSorted(size);
1603 pair<G4int, G4double> info;
1605 for (
G4int i = 0; i < size; ++i)
1612 info.second = safety;
1613 voxelsSorted[i] = info;
1616 std::sort(voxelsSorted.begin(), voxelsSorted.end(),
1619 for (
G4int i = 0; i < size; ++i)
1621 const pair<G4int,G4double>& inf = voxelsSorted[i];
1623 if (dist > minDist)
break;
1626 G4int csize = candidates.size();
1627 for (
G4int j = 0; j < csize; ++j)
1629 G4int candidate = candidates[j];
1631 dist = simple ? facet.
Distance(p,minDist)
1651 std::ostringstream message;
1652 G4int oldprc = message.precision(16) ;
1653 message <<
"Point p is already inside!?" <<
G4endl
1655 <<
"p.x() = " << p.
x()/
mm <<
" mm" <<
G4endl
1656 <<
"p.y() = " << p.
y()/
mm <<
" mm" <<
G4endl
1657 <<
"p.z() = " << p.
z()/
mm <<
" mm" <<
G4endl
1659 message.precision(oldprc) ;
1674 vector<G4int> startingVoxel(3);
1691 for (
G4int i = 0; i < size; ++i)
1695 if (dist < minDist) minDist = dist;
1709 std::ostringstream message;
1710 G4int oldprc = message.precision(16) ;
1711 message <<
"Point p is already outside!?" <<
G4endl
1713 <<
"p.x() = " << p.
x()/
mm <<
" mm" <<
G4endl
1714 <<
"p.y() = " << p.
y()/
mm <<
" mm" <<
G4endl
1715 <<
"p.z() = " << p.
z()/
mm <<
" mm" <<
G4endl
1717 message.precision(oldprc) ;
1718 G4Exception(
"G4TriangularFacet::DistanceToOut(p)",
1737 for (
G4int i = 0; i < size; ++i)
1741 if (dist < minDist) minDist = dist;
1768 for (
G4int i = 0; i < size; ++i)
1770 os <<
"FACET # = " << i + 1 <<
G4endl;
1845 std::ostringstream message;
1846 message <<
"Invalid response from facet in solid '" <<
GetName() <<
"',"
1848 <<
"at point: " << p <<
"and direction: " << v;
1849 G4Exception(
"G4TessellatedSolid::DistanceToIn(p,v)",
1907 std::ostringstream message;
1908 message <<
"Invalid response from facet in solid '" <<
GetName() <<
"',"
1910 <<
"at point: " << p <<
"and direction: " << v;
1911 G4Exception(
"G4TessellatedSolid::DistanceToOut(p,v,..)",
1940 for (
G4int i = 0; i < size; ++i)
1946 for (
G4int j=0; j<
n; ++j)
1951 polyhedron->
AddFacet(v[0],v[1],v[2],v[3]);
1992 std::ostringstream message;
1993 message <<
"Bad bounding box (min >= max) for solid: "
1995 <<
"\npMin = " <<
pMin
1996 <<
"\npMax = " <<
pMax;
1997 G4Exception(
"G4TessellatedSolid::BoundingLimits()",
2029 return (
pMin <
pMax) ? true :
false;
2040 std::vector<const G4ThreeVectorList *> pyramid(2);
2043 apex[0] = (bmin+bmax)*0.5;
2063 if (eminlim >
pMin && emaxlim <
pMax)
break;
2131 for (
G4int i = 0; i < size; ++i)
2149 for (
G4int i = 0; i < size; ++i)
2164 return fFacets[i]->GetPointOnFace();
2180 G4ThreeVector(-0.9577428892113370, 0.2732676269591740, 0.0897405271949221);
2182 G4ThreeVector(-0.8331264504940770,-0.5162067214954600,-0.1985722492445700);
2184 G4ThreeVector(-0.1516671651108820, 0.9666292616127460, 0.2064580868390110);
2186 G4ThreeVector( 0.6570250350323190,-0.6944539025883300, 0.2933460081893360);
2188 G4ThreeVector(-0.4820456281280320,-0.6331060000098690,-0.6056474264406270);
2190 G4ThreeVector( 0.7629032554236800 , 0.1016854697539910,-0.6384658864065180);
2192 G4ThreeVector( 0.7689540409061150, 0.5034929891988220, 0.3939600142169160);
2194 G4ThreeVector( 0.5765188359255740, 0.5997271636278330,-0.5549354566343150);
2196 G4ThreeVector( 0.6660632777862070,-0.6362809868288380, 0.3892379937580790);
2198 G4ThreeVector( 0.3824415020414780, 0.6541792713761380,-0.6525243125110690);
2200 G4ThreeVector(-0.5107726564526760, 0.6020905056811610, 0.6136760679616570);
2202 G4ThreeVector( 0.7459135439578050, 0.6618796061649330, 0.0743530220183488);
2204 G4ThreeVector( 0.1536405855311580, 0.8117477913978260,-0.5634359711967240);
2206 G4ThreeVector( 0.0744395301705579,-0.8707110101772920,-0.4861286795736560);
2208 G4ThreeVector(-0.1665874645185400, 0.6018553940549240,-0.7810369397872780);
2210 G4ThreeVector( 0.7766902003633100, 0.6014617505959970,-0.1870724331097450);
2212 G4ThreeVector(-0.8710128685847430,-0.1434320216603030,-0.4698551243971010);
2214 G4ThreeVector( 0.8901082092766820,-0.4388411398893870, 0.1229871120030100);
2216 G4ThreeVector(-0.6430417431544370,-0.3295938228697690, 0.6912779675984150);
2218 G4ThreeVector( 0.6331124368380410, 0.6306211461665000, 0.4488714875425340);
2227 G4int base =
sizeof(*this);
2232 for (
G4int i = 0; i < limit; ++i)
2253 size += sizeInsides + sizeVoxels;
std::vector< G4ThreeVector > G4ThreeVectorList
static const G4double emax
static const G4double pos
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
static const G4double pMax
static const G4double pMin
static constexpr double mm
#define G4MUTEX_INITIALIZER
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cout
double dot(const Hep3Vector &) const
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
void AddFacet(const G4int iv1, const G4int iv2, const G4int iv3, const G4int iv4=0)
void AddVertex(const G4ThreeVector &v)
G4int GetNumberOfRotationStepsAtTimeOfCreation() const
unsigned int GetNbits() const
unsigned int GetNbytes() const
void ResetBitNumber(unsigned int bitnumber)
void SetBitNumber(unsigned int bitnumber, G4bool value=true)
std::vector< G4ThreeVector > fRandir
virtual G4bool Normal(const G4ThreeVector &p, G4ThreeVector &n) const
G4double GetMinYExtent() const
void BoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const
void CopyObjects(const G4TessellatedSolid &s)
G4int CheckStructure() const
virtual G4Polyhedron * GetPolyhedron() const
virtual G4double GetSurfaceArea()
G4double GetMinZExtent() const
virtual std::ostream & StreamInfo(std::ostream &os) const
EInside InsideVoxels(const G4ThreeVector &aPoint) const
G4double MinDistanceFacet(const G4ThreeVector &p, G4bool simple, G4VFacet *&facet) const
G4double DistanceToOutCore(const G4ThreeVector &p, const G4ThreeVector &v, G4ThreeVector &aNormalVector, G4bool &aConvex, G4double aPstep=kInfinity) const
G4Polyhedron * fpPolyhedron
G4TessellatedSolid & operator=(const G4TessellatedSolid &right)
void PrecalculateInsides()
G4bool OutsideOfExtent(const G4ThreeVector &p, G4double tolerance=0.0) const
G4double kCarToleranceHalf
G4TessellatedSolid & operator+=(const G4TessellatedSolid &right)
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
G4bool AddFacet(G4VFacet *aFacet)
std::set< G4VFacet * > fExtremeFacets
G4bool fRebuildPolyhedron
static G4bool CompareSortedVoxel(const std::pair< G4int, G4double > &l, const std::pair< G4int, G4double > &r)
void DisplayAllocatedMemory()
G4int GetNumberOfFacets() const
G4double GetMaxYExtent() const
EInside InsideNoVoxels(const G4ThreeVector &p) const
G4double GetMaxZExtent() const
G4double GetMaxXExtent() const
G4bool GetSolidClosed() const
virtual G4double DistanceToOut(const G4ThreeVector &p) const
G4VFacet * GetFacet(G4int i) const
virtual G4double SafetyFromInside(const G4ThreeVector &p, G4bool aAccurate=false) const
G4double DistanceToOutNoVoxels(const G4ThreeVector &p, const G4ThreeVector &v, G4ThreeVector &aNormalVector, G4bool &aConvex, G4double aPstep=kInfinity) const
G4double GetMinXExtent() const
virtual void DescribeYourselfTo(G4VGraphicsScene &scene) const
void SetSolidClosed(const G4bool t)
G4int AllocatedMemoryWithoutVoxels()
virtual G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
G4int SetAllUsingStack(const std::vector< G4int > &voxel, const std::vector< G4int > &max, G4bool status, G4SurfBits &checked)
virtual G4VisExtent GetExtent() const
virtual G4Polyhedron * CreatePolyhedron() const
virtual G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const
G4double DistanceToInCore(const G4ThreeVector &p, const G4ThreeVector &v, G4double aPstep=kInfinity) const
G4double DistanceToInNoVoxels(const G4ThreeVector &p, const G4ThreeVector &v, G4double aPstep=kInfinity) const
std::set< G4VertexInfo, G4VertexComparator > fFacetList
virtual G4GeometryType GetEntityType() const
G4double DistanceToInCandidates(const std::vector< G4int > &candidates, const G4ThreeVector &aPoint, const G4ThreeVector &aDirection) const
virtual EInside Inside(const G4ThreeVector &p) const
G4int GetFacetIndex(const G4ThreeVector &p) const
virtual G4double SafetyFromOutside(const G4ThreeVector &p, G4bool aAccurate=false) const
void DistanceToOutCandidates(const std::vector< G4int > &candidates, const G4ThreeVector &aPoint, const G4ThreeVector &direction, G4double &minDist, G4ThreeVector &minNormal, G4int &minCandidate) const
std::vector< G4ThreeVector > fVertexList
virtual ~G4TessellatedSolid()
virtual G4double GetCubicVolume()
virtual G4VSolid * Clone() const
G4GeometryType fGeometryType
virtual G4ThreeVector GetPointOnSurface() const
std::vector< G4VFacet * > fFacets
virtual void SetVertexIndex(G4int i, G4int j)=0
virtual G4int AllocatedMemory()=0
virtual G4ThreeVector GetCircumcentre() const =0
std::ostream & StreamInfo(std::ostream &os) const
G4bool IsInside(const G4ThreeVector &p) const
virtual G4ThreeVector GetSurfaceNormal() const =0
virtual G4ThreeVector GetVertex(G4int i) const =0
virtual G4double GetArea() const =0
virtual G4int GetNumberOfVertices() const =0
virtual G4int GetVertexIndex(G4int i) const =0
virtual G4VFacet * GetClone()=0
virtual G4double Distance(const G4ThreeVector &, G4double)=0
virtual void SetVertices(std::vector< G4ThreeVector > *vertices)=0
virtual G4bool IsDefined() const =0
virtual G4bool Intersect(const G4ThreeVector &, const G4ThreeVector &, const G4bool, G4double &, G4double &, G4ThreeVector &)=0
virtual void AddSolid(const G4Box &)=0
G4VSolid & operator=(const G4VSolid &rhs)
G4double GetMinExtent(const EAxis pAxis) const
G4double GetMaxExtent(const EAxis pAxis) const
const G4SurfBits & Empty() const
G4double DistanceToBoundingBox(const G4ThreeVector &point) const
long long GetCountOfVoxels() const
const std::vector< G4double > & GetBoundary(G4int index) const
G4bool IsEmpty(G4int index) const
G4bool UpdateCurrentVoxel(const G4ThreeVector &point, const G4ThreeVector &direction, std::vector< G4int > &curVoxel) const
void GetVoxel(std::vector< G4int > &curVoxel, const G4ThreeVector &point) const
G4int GetMaxVoxels(G4ThreeVector &ratioOfReduction)
G4double DistanceToFirst(const G4ThreeVector &point, const G4ThreeVector &direction) const
G4int GetVoxelBoxesSize() const
static G4double MinDistanceToBox(const G4ThreeVector &aPoint, const G4ThreeVector &f)
void SetMaxVoxels(G4int max)
const G4VoxelBox & GetVoxelBox(G4int i) const
G4int GetPointIndex(const G4ThreeVector &p) const
G4double DistanceToNext(const G4ThreeVector &point, const G4ThreeVector &direction, std::vector< G4int > &curVoxel) const
void Voxelize(std::vector< G4VSolid * > &solids, std::vector< G4Transform3D > &transforms)
const std::vector< G4int > & GetVoxelBoxCandidates(G4int i) const
G4int GetVoxelsIndex(G4int x, G4int y, G4int z) const
G4bool Contains(const G4ThreeVector &point) const
const std::vector< G4int > & GetCandidates(std::vector< G4int > &curVoxel) const
static G4int GetNumberOfRotationSteps()
static const G4double kInfinity
static double normal(HepRandomEngine *eptr)
ThreeVector shoot(const G4int Ap, const G4int Af)
T max(const T t1, const T t2)
brief Return the largest of the two arguments
const char * name(G4int ptype)