125 fMinExtent.
set(0,0,0);
126 fMaxExtent.
set(0,0,0);
155 if (&ts ==
this)
return *
this;
171void G4TessellatedSolid::Initialize()
175 fpPolyhedron = 0; fCubicVolume = 0.; fSurfaceArea = 0.;
177 fGeometryType =
"G4TessellatedSolid";
178 fSolidClosed =
false;
180 fMinExtent.
set(kInfinity,kInfinity,kInfinity);
181 fMaxExtent.
set(-kInfinity,-kInfinity,-kInfinity);
188void G4TessellatedSolid::DeleteObjects ()
190 G4int size = fFacets.size();
191 for (
G4int i = 0; i < size; ++i) {
delete fFacets[i]; }
207 for (
G4int i = 0; i <
n; ++i)
226 G4Exception(
"G4TessellatedSolid::AddFacet()",
"GeomSolids1002",
227 JustWarning,
"Attempt to add facets when solid is closed.");
232 set<G4VertexInfo,G4VertexComparator>::iterator begin
233 = fFacetList.begin(), end = fFacetList.end(), pos, it;
236 value.
id = fFacetList.size();
243 pos = fFacetList.lower_bound(value);
246 while (!found && it != end)
250 if ((found = (fFacets[
id] == aFacet)))
break;
252 if (dif > kCarTolerance24)
break;
256 if (fFacets.size() > 1)
259 while (!found && it != begin)
264 found = (fFacets[id] == aFacet);
267 if (dif > kCarTolerance24)
break;
274 fFacets.push_back(aFacet);
275 fFacetList.insert(value);
282 G4Exception(
"G4TessellatedSolid::AddFacet()",
"GeomSolids1002",
283 JustWarning,
"Attempt to add facet not properly defined.");
291G4int G4TessellatedSolid::SetAllUsingStack(
const std::vector<G4int> &voxel,
292 const std::vector<G4int> &max,
295 vector<G4int> xyz = voxel;
296 stack<vector<G4int> > pos;
299 G4int cc = 0, nz = 0;
301 vector<G4int> candidates;
319 for (
G4int i = 0; i <= 2; ++i)
321 if (xyz[i] < max[i] - 1)
347void G4TessellatedSolid::PrecalculateInsides()
349 vector<G4int> voxel(3), maxVoxels(3);
350 for (
G4int i = 0; i <= 2; ++i) maxVoxels[i] = fVoxels.
GetBoundary(i).size();
351 unsigned int size = maxVoxels[0] * maxVoxels[1] * maxVoxels[2];
358 for (voxel[2] = 0; voxel[2] < maxVoxels[2] - 1; ++voxel[2])
360 for (voxel[1] = 0; voxel[1] < maxVoxels[1] - 1; ++voxel[1])
362 for (voxel[0] = 0; voxel[0] < maxVoxels[0] - 1; ++voxel[0])
365 if (!checked[index] && fVoxels.
IsEmpty(index))
369 SetAllUsingStack(voxel, maxVoxels, inside, checked);
379void G4TessellatedSolid::Voxelize ()
382 G4cout <<
"Voxelizing...\n";
389 G4cout <<
"Precalculating Insides...\n";
391 PrecalculateInsides();
407void G4TessellatedSolid::SetExtremeFacets()
409 G4int size = fFacets.size();
410 for (
G4int j = 0; j < size; ++j)
415 G4int vsize = fVertexList.size();
416 for (
G4int i=0; i < vsize; ++i)
418 if (!facet.
IsInside(fVertexList[i]))
424 if (isExtreme) fExtremeFacets.insert(&facet);
430void G4TessellatedSolid::CreateVertexList()
442 set<G4VertexInfo,G4VertexComparator> vertexListSorted;
443 set<G4VertexInfo,G4VertexComparator>::iterator begin
444 = vertexListSorted.begin(), end = vertexListSorted.end(), pos, it;
449 G4int size = fFacets.size();
452 for (
G4int k = 0; k < size; ++k)
457 for (
G4int i = 0; i < max; ++i)
460 value.
id = fVertexList.size();
466 pos = vertexListSorted.lower_bound(value);
474 found = (dif < kCarTolerance24);
477 if (dif > kCarTolerance24)
break;
481 if (fVertexList.size() > 1)
484 while (!found && it != begin)
490 found = (dif < kCarTolerance24);
493 if (dif > kCarTolerance24)
break;
500 fVertexList.push_back(p);
501 vertexListSorted.insert(value);
502 begin = vertexListSorted.begin();
503 end = vertexListSorted.end();
509 if (value.
id == 0) fMinExtent = fMaxExtent = p;
512 if (p.
x() > fMaxExtent.
x()) fMaxExtent.
setX(p.
x());
513 else if (p.
x() < fMinExtent.
x()) fMinExtent.
setX(p.
x());
514 if (p.
y() > fMaxExtent.
y()) fMaxExtent.
setY(p.
y());
515 else if (p.
y() < fMinExtent.
y()) fMinExtent.
setY(p.
y());
516 if (p.
z() > fMaxExtent.
z()) fMaxExtent.
setZ(p.
z());
517 else if (p.
z() < fMinExtent.
z()) fMinExtent.
setZ(p.
z());
522 G4int index = (*it).id;
530 vector<G4ThreeVector>(fVertexList).swap(fVertexList);
534 for (set<G4VertexInfo,G4VertexComparator>::iterator res=
535 vertexListSorted.begin(); res!=vertexListSorted.end(); ++res)
537 G4int id = (*res).id;
540 if (previousValue > mvalue)
541 G4cout <<
"Error!" <<
"\n";
542 previousValue = mvalue;
554 G4cout <<
"G4TessellatedSolid - Allocated memory without voxel overhead "
555 << without <<
"; with " << with <<
"; ratio: " << ratio << endl;
602 for (
G4int i = 0; i < size; ++i)
614 return fFacets.size();
628 vector<G4int> startingVoxel(3);
631 const G4double dirTolerance = 1.0E-14;
633 const vector<G4int> &startingCandidates =
635 G4int limit = startingCandidates.size();
636 if (limit == 0 && fInsides.
GetNbits())
645 for(
G4int i = 0; i < limit; ++i)
647 G4int candidate = startingCandidates[i];
648 G4VFacet &facet = *fFacets[candidate];
650 if (dist < minDist) minDist = dist;
651 if (dist <= kCarToleranceHalf)
677 G4bool nearParallel =
false;
685 distOut = distIn = kInfinity;
697 vector<G4int> curVoxel(3);
698 curVoxel = startingVoxel;
706 const vector<G4int> &candidates =
707 started ? startingCandidates : fVoxels.
GetCandidates(curVoxel);
709 if (
G4int candidatesCount = candidates.size())
711 for (
G4int i = 0 ; i < candidatesCount; ++i)
713 G4int candidate = candidates[i];
715 G4VFacet &facet = *fFacets[candidate];
717 crossingO = facet.
Intersect(p,v,
true,distO,distFromSurfaceO,normalO);
718 crossingI = facet.
Intersect(p,v,
false,distI,distFromSurfaceI,normalI);
720 if (crossingO || crossingI)
724 nearParallel = (crossingO
725 && std::fabs(normalO.
dot(v))<dirTolerance)
726 || (crossingI && std::fabs(normalI.
dot(v))<dirTolerance);
729 if (crossingO && distO > 0.0 && distO < distOut)
731 if (crossingI && distI > 0.0 && distI < distIn)
737 if (nearParallel)
break;
744 G4bool inside = fInsides[index];
751 if (shift == kInfinity)
break;
753 currentPoint += direction * (shift + shiftBonus);
758 while (nearParallel && sm!=fMaxTries);
772 std::ostringstream message;
773 G4int oldprc = message.precision(16);
774 message <<
"Cannot determine whether point is inside or outside volume!"
776 <<
"Solid name = " <<
GetName() << endl
777 <<
"Geometry Type = " << fGeometryType << endl
778 <<
"Number of facets = " << fFacets.size() << endl
779 <<
"Position:" << endl << endl
780 <<
"p.x() = " << p.
x()/mm <<
" mm" << endl
781 <<
"p.y() = " << p.
y()/mm <<
" mm" << endl
782 <<
"p.z() = " << p.
z()/mm <<
" mm";
783 message.precision(oldprc);
798 if (distIn == kInfinity && distOut == kInfinity)
800 else if (distIn <= distOut - kCarToleranceHalf)
802 else if (distOut <= distIn - kCarToleranceHalf)
819 const G4double dirTolerance = 1.0E-14;
825 G4int size = fFacets.size();
826 for (
G4int i = 0; i < size; ++i)
830 if (dist < minDist) minDist = dist;
831 if (dist <= kCarToleranceHalf)
866 for (
G4int i=0; i<nTry; ++i)
868 G4bool nearParallel =
false;
877 distOut = distIn = kInfinity;
880 vector<G4VFacet*>::const_iterator f = fFacets.begin();
889 crossingO = ((*f)->Intersect(p,v,
true,distO,distFromSurfaceO,normalO));
890 crossingI = ((*f)->Intersect(p,v,
false,distI,distFromSurfaceI,normalI));
891 if (crossingO || crossingI)
893 nearParallel = (crossingO && std::fabs(normalO.
dot(v))<dirTolerance)
894 || (crossingI && std::fabs(normalI.
dot(v))<dirTolerance);
897 if (crossingO && distO > 0.0 && distO < distOut) distOut = distO;
898 if (crossingI && distI > 0.0 && distI < distIn) distIn = distI;
901 }
while (!nearParallel && ++f!=fFacets.end());
902 }
while (nearParallel && sm!=fMaxTries);
912 std::ostringstream message;
913 G4int oldprc = message.precision(16);
914 message <<
"Cannot determine whether point is inside or outside volume!"
916 <<
"Solid name = " <<
GetName() << endl
917 <<
"Geometry Type = " << fGeometryType << endl
918 <<
"Number of facets = " << fFacets.size() << endl
919 <<
"Position:" << endl << endl
920 <<
"p.x() = " << p.
x()/mm <<
" mm" << endl
921 <<
"p.y() = " << p.
y()/mm <<
" mm" << endl
922 <<
"p.z() = " << p.
z()/mm <<
" mm";
923 message.precision(oldprc);
938 if (distIn == kInfinity && distOut == kInfinity)
940 else if (distIn <= distOut - kCarToleranceHalf)
942 else if (distOut <= distIn - kCarToleranceHalf)
945 if (i == 0) location = locationprime;
964 vector<G4int> curVoxel(3);
966 const vector<G4int> &candidates = fVoxels.
GetCandidates(curVoxel);
969 if (
G4int limit = candidates.size())
972 for(
G4int i = 0 ; i < limit ; ++i)
974 G4int candidate = candidates[i];
975 G4VFacet &fct = *fFacets[candidate];
977 if (dist < minDist) minDist = dist;
978 if (dist <= kCarToleranceHalf)
985 minDist = MinDistanceFacet(p,
true, facet);
990 G4int size = fFacets.size();
991 for (
G4int i = 0; i < size; ++i)
1003 if (minDist != kInfinity)
1006 return minDist <= kCarToleranceHalf;
1011 std::ostringstream message;
1012 message <<
"Point p is not on surface !?" << endl
1013 <<
" No facets found for point: " << p <<
" !" << endl
1014 <<
" Returning approximated value for normal.";
1016 G4Exception(
"G4TessellatedSolid::SurfaceNormal(p)",
1035G4TessellatedSolid::DistanceToInNoVoxels (
const G4ThreeVector &p,
1047 std::ostringstream message;
1048 G4int oldprc = message.precision(16) ;
1049 message <<
"Point p is already inside!?" << endl
1050 <<
"Position:" << endl << endl
1051 <<
" p.x() = " << p.
x()/mm <<
" mm" << endl
1052 <<
" p.y() = " << p.
y()/mm <<
" mm" << endl
1053 <<
" p.z() = " << p.
z()/mm <<
" mm" << endl
1055 message.precision(oldprc) ;
1056 G4Exception(
"G4TriangularFacet::DistanceToIn(p,v)",
1061 G4int size = fFacets.size();
1062 for (
G4int i = 0; i < size; ++i)
1065 if (facet.
Intersect(p,v,
false,dist,distFromSurface,normal))
1074 if (distFromSurface > kCarToleranceHalf && dist >= 0.0 && dist < minDist)
1079 if (-kCarToleranceHalf <= dist && dist <= kCarToleranceHalf)
1089G4TessellatedSolid::DistanceToOutNoVoxels (
const G4ThreeVector &p,
1103 std::ostringstream message;
1104 G4int oldprc = message.precision(16) ;
1105 message <<
"Point p is already outside!?" << endl
1106 <<
"Position:" << endl << endl
1107 <<
" p.x() = " << p.
x()/mm <<
" mm" << endl
1108 <<
" p.y() = " << p.
y()/mm <<
" mm" << endl
1109 <<
" p.z() = " << p.
z()/mm <<
" mm" << endl
1111 message.precision(oldprc) ;
1112 G4Exception(
"G4TriangularFacet::DistanceToOut(p)",
1117 G4bool isExtreme =
false;
1118 G4int size = fFacets.size();
1119 for (
G4int i = 0; i < size; ++i)
1122 if (facet.
Intersect(p,v,
true,dist,distFromSurface,normal))
1124 if (distFromSurface > 0.0 && distFromSurface <= kCarToleranceHalf &&
1128 aConvex = (fExtremeFacets.find(&facet) != fExtremeFacets.end());
1131 aNormalVector = normal;
1134 if (dist >= 0.0 && dist < minDist)
1138 isExtreme = (fExtremeFacets.find(&facet) != fExtremeFacets.end());
1142 if (minDist < kInfinity)
1144 aNormalVector = minNormal;
1145 aConvex = isExtreme;
1152 Normal(p, aNormalVector);
1159void G4TessellatedSolid::
1160DistanceToOutCandidates(
const std::vector<G4int> &candidates,
1164 G4int &minCandidate )
const
1166 G4int candidatesCount = candidates.size();
1171 for (
G4int i = 0 ; i < candidatesCount; ++i)
1173 G4int candidate = candidates[i];
1174 G4VFacet &facet = *fFacets[candidate];
1175 if (facet.
Intersect(aPoint,direction,
true,dist,distFromSurface,normal))
1177 if (distFromSurface > 0.0 && distFromSurface <= kCarToleranceHalf
1187 if (dist >= 0.0 && dist < minDist)
1200G4TessellatedSolid::DistanceToOutCore(
const G4ThreeVector &aPoint,
1210 minDistance = kInfinity;
1215 vector<G4int> curVoxel(3);
1216 if (!fVoxels.
Contains(aPoint))
return 0;
1218 fVoxels.
GetVoxel(curVoxel, currentPoint);
1222 const vector<G4int> *old = 0;
1224 G4int minCandidate = -1;
1227 const vector<G4int> &candidates = fVoxels.
GetCandidates(curVoxel);
1228 if (old == &candidates)
1230 if (old != &candidates && candidates.size())
1232 DistanceToOutCandidates(candidates, aPoint, direction, minDistance,
1233 aNormalVector, minCandidate);
1234 if (minDistance <= totalShift)
break;
1238 if (shift == kInfinity)
break;
1240 totalShift += shift;
1241 if (minDistance <= totalShift)
break;
1243 currentPoint += direction * (shift + shiftBonus);
1249 if (minCandidate < 0)
1254 Normal(aPoint, aNormalVector);
1258 aConvex = (fExtremeFacets.find(fFacets[minCandidate])
1259 != fExtremeFacets.end());
1264 minDistance = DistanceToOutNoVoxels(aPoint, aDirection, aNormalVector,
1273DistanceToInCandidates(
const std::vector<G4int> &candidates,
1277 G4int candidatesCount = candidates.size();
1283 for (
G4int i = 0 ; i < candidatesCount; ++i)
1285 G4int candidate = candidates[i];
1286 G4VFacet &facet = *fFacets[candidate];
1287 if (facet.
Intersect(aPoint,direction,
false,dist,distFromSurface,normal))
1296 if ( (distFromSurface > kCarToleranceHalf)
1297 && (dist >= 0.0) && (dist < minDistance))
1301 else if (-kCarToleranceHalf <= dist && dist <= kCarToleranceHalf)
1313G4TessellatedSolid::DistanceToInCore(
const G4ThreeVector &aPoint,
1321 minDistance = kInfinity;
1325 if (shift == kInfinity)
return shift;
1328 currentPoint += direction * (shift + shiftBonus);
1333 vector<G4int> curVoxel(3);
1335 fVoxels.
GetVoxel(curVoxel, currentPoint);
1338 const vector<G4int> &candidates = fVoxels.
GetCandidates(curVoxel);
1339 if (candidates.size())
1341 G4double distance=DistanceToInCandidates(candidates, aPoint, direction);
1342 if (minDistance > distance) minDistance = distance;
1343 if (distance < totalShift)
break;
1346 shift = fVoxels.
DistanceToNext(currentPoint, direction, curVoxel);
1347 if (shift == kInfinity )
break;
1349 totalShift += shift;
1350 if (minDistance < totalShift)
break;
1352 currentPoint += direction * (shift + shiftBonus);
1358 minDistance = DistanceToInNoVoxels(aPoint, aDirection, aPstep);
1367G4TessellatedSolid::CompareSortedVoxel(
const std::pair<G4int, G4double> &l,
1368 const std::pair<G4int, G4double> &r)
1370 return l.second < r.second;
1383 vector<pair<G4int, G4double> > voxelsSorted(size);
1385 pair<G4int, G4double> info;
1387 for (
G4int i = 0; i < size; ++i)
1394 info.second = safety;
1395 voxelsSorted[i] = info;
1398 std::sort(voxelsSorted.begin(), voxelsSorted.end(),
1399 &G4TessellatedSolid::CompareSortedVoxel);
1401 for (
G4int i = 0; i < size; ++i)
1403 const pair<G4int,G4double> &inf = voxelsSorted[i];
1405 if (dist > minDist)
break;
1408 G4int csize = candidates.size();
1409 for (
G4int j = 0; j < csize; ++j)
1411 G4int candidate = candidates[j];
1412 G4VFacet &facet = *fFacets[candidate];
1413 dist = simple ? facet.
Distance(p,minDist)
1433 std::ostringstream message;
1434 G4int oldprc = message.precision(16) ;
1435 message <<
"Point p is already inside!?" << endl
1436 <<
"Position:" << endl << endl
1437 <<
"p.x() = " << p.
x()/mm <<
" mm" << endl
1438 <<
"p.y() = " << p.
y()/mm <<
" mm" << endl
1439 <<
"p.z() = " << p.
z()/mm <<
" mm" << endl
1441 message.precision(oldprc) ;
1456 vector<G4int> startingVoxel(3);
1457 fVoxels.
GetVoxel(startingVoxel, p);
1458 const vector<G4int> &candidates = fVoxels.
GetCandidates(startingVoxel);
1459 if (candidates.size() == 0 && fInsides.
GetNbits())
1462 if (fInsides[index])
return 0.;
1467 minDist = MinDistanceFacet(p,
true, facet);
1471 minDist = kInfinity;
1472 G4int size = fFacets.size();
1473 for (
G4int i = 0; i < size; ++i)
1477 if (dist < minDist) minDist = dist;
1491 std::ostringstream message;
1492 G4int oldprc = message.precision(16) ;
1493 message <<
"Point p is already outside!?" << endl
1494 <<
"Position:" << endl << endl
1495 <<
"p.x() = " << p.
x()/mm <<
" mm" << endl
1496 <<
"p.y() = " << p.
y()/mm <<
" mm" << endl
1497 <<
"p.z() = " << p.
z()/mm <<
" mm" << endl
1499 message.precision(oldprc) ;
1500 G4Exception(
"G4TriangularFacet::DistanceToOut(p)",
1512 minDist = MinDistanceFacet(p,
true, facet);
1516 minDist = kInfinity;
1518 G4int size = fFacets.size();
1519 for (
G4int i = 0; i < size; ++i)
1523 if (dist < minDist) minDist = dist;
1537 return fGeometryType;
1545 os <<
"Geometry Type = " << fGeometryType << endl;
1546 os <<
"Number of facets = " << fFacets.size() << endl;
1548 G4int size = fFacets.size();
1549 for (
G4int i = 0; i < size; ++i)
1551 os <<
"FACET # = " << i + 1 << endl;
1585 location = InsideVoxels(aPoint);
1589 location = InsideNoVoxels(aPoint);
1620 return DistanceToInCore(p,v,kInfinity);
1662 G4double dist = DistanceToOutCore(p, v, n, valid);
1682 G4int nVertices = fVertexList.size();
1683 G4int nFacets = fFacets.size();
1686 for (G4ThreeVectorList::const_iterator v= fVertexList.begin();
1687 v!=fVertexList.end(); ++v)
1692 G4int size = fFacets.size();
1693 for (
G4int i = 0; i < size; ++i)
1699 else if (n == 3) v[3] = 0;
1700 for (
G4int j=0; j<n; ++j)
1705 polyhedron->
AddFacet(v[0],v[1],v[2],v[3]);
1725 if (!fpPolyhedron ||
1729 delete fpPolyhedron;
1732 return fpPolyhedron;
1748 G4int size = fVertexList.size();
1751 for (
G4int i=0; i < size; ++i)
1758 G4ThreeVector maxExtent(-kInfinity, -kInfinity, -kInfinity);
1760 size = transVertexList.size();
1761 for (
G4int i=0; i< size; ++i)
1765 G4double coordinate = transVertexList[i][axis];
1766 if (coordinate < minExtent[axis])
1767 { minExtent[axis] = coordinate; }
1768 if (coordinate > maxExtent[axis])
1769 { maxExtent[axis] = coordinate; }
1796 if (minExtent[axis] < voxelMinExtent)
1798 minExtent[axis] = voxelMinExtent ;
1800 if (maxExtent[axis] > voxelMaxExtent)
1802 maxExtent[axis] = voxelMaxExtent;
1828 return fMinExtent.
x();
1835 return fMaxExtent.
x();
1842 return fMinExtent.
y();
1849 return fMaxExtent.
y();
1856 return fMinExtent.
z();
1863 return fMaxExtent.
z();
1870 return G4VisExtent (fMinExtent.
x(), fMaxExtent.
x(), fMinExtent.
y(), fMaxExtent.
y(), fMinExtent.
z(), fMaxExtent.
z());
1877 if(fCubicVolume != 0.) {;}
1879 return fCubicVolume;
1886 if (fSurfaceArea != 0.)
return fSurfaceArea;
1888 G4int size = fFacets.size();
1889 for (
G4int i = 0; i < size; ++i)
1892 fSurfaceArea += facet.
GetArea();
1894 return fSurfaceArea;
1903 G4int i = (
G4int) G4RandFlat::shoot(0., fFacets.size());
1904 return fFacets[i]->GetPointOnFace();
1916void G4TessellatedSolid::SetRandomVectors ()
1920 G4ThreeVector(-0.9577428892113370, 0.2732676269591740, 0.0897405271949221);
1922 G4ThreeVector(-0.8331264504940770,-0.5162067214954600,-0.1985722492445700);
1924 G4ThreeVector(-0.1516671651108820, 0.9666292616127460, 0.2064580868390110);
1926 G4ThreeVector( 0.6570250350323190,-0.6944539025883300, 0.2933460081893360);
1928 G4ThreeVector(-0.4820456281280320,-0.6331060000098690,-0.6056474264406270);
1930 G4ThreeVector( 0.7629032554236800 , 0.1016854697539910,-0.6384658864065180);
1932 G4ThreeVector( 0.7689540409061150, 0.5034929891988220, 0.3939600142169160);
1934 G4ThreeVector( 0.5765188359255740, 0.5997271636278330,-0.5549354566343150);
1936 G4ThreeVector( 0.6660632777862070,-0.6362809868288380, 0.3892379937580790);
1938 G4ThreeVector( 0.3824415020414780, 0.6541792713761380,-0.6525243125110690);
1940 G4ThreeVector(-0.5107726564526760, 0.6020905056811610, 0.6136760679616570);
1942 G4ThreeVector( 0.7459135439578050, 0.6618796061649330, 0.0743530220183488);
1944 G4ThreeVector( 0.1536405855311580, 0.8117477913978260,-0.5634359711967240);
1946 G4ThreeVector( 0.0744395301705579,-0.8707110101772920,-0.4861286795736560);
1948 G4ThreeVector(-0.1665874645185400, 0.6018553940549240,-0.7810369397872780);
1950 G4ThreeVector( 0.7766902003633100, 0.6014617505959970,-0.1870724331097450);
1952 G4ThreeVector(-0.8710128685847430,-0.1434320216603030,-0.4698551243971010);
1954 G4ThreeVector( 0.8901082092766820,-0.4388411398893870, 0.1229871120030100);
1956 G4ThreeVector(-0.6430417431544370,-0.3295938228697690, 0.6912779675984150);
1958 G4ThreeVector( 0.6331124368380410, 0.6306211461665000, 0.4488714875425340);
1967 G4int base =
sizeof(*this);
1971 G4int limit = fFacets.size();
1972 for (
G4int i = 0; i < limit; i++)
1978 std::set<G4VFacet *>::const_iterator beg, end, it;
1979 beg = fExtremeFacets.begin();
1980 end = fExtremeFacets.end();
1981 for (it = beg; it != end; it++)
1996 size += sizeInsides + sizeVoxels;
CLHEP::Hep3Vector G4ThreeVector
std::vector< G4ThreeVector > G4ThreeVectorList
G4DLLIMPORT std::ostream G4cout
double dot(const Hep3Vector &) const
void set(double x, double y, double z)
void AddVertex(const G4ThreeVector v)
void AddFacet(const G4int iv1, const G4int iv2, const G4int iv3, const G4int iv4=0)
G4int GetNumberOfRotationStepsAtTimeOfCreation() const
unsigned int GetNbits() const
unsigned int GetNbytes() const
void ResetBitNumber(unsigned int bitnumber)
void SetBitNumber(unsigned int bitnumber, G4bool value=true)
G4int GetMaxVoxels(G4ThreeVector &ratioOfReduction)
G4bool Contains(const G4ThreeVector &point) const
G4int GetCandidates(std::vector< G4int > &curVoxel, std::vector< G4int > *&candidates, std::vector< G4int > &space) const
G4bool UpdateCurrentVoxel(const G4ThreeVector &point, const G4ThreeVector &direction, std::vector< G4int > &curVoxel) const
G4int GetPointIndex(const G4ThreeVector &p) const
long long GetCountOfVoxels() const
G4double DistanceToBoundingBox(const G4ThreeVector &point) const
void SetMaxVoxels(G4int max)
G4double DistanceToNext(const G4ThreeVector &point, const G4ThreeVector &direction, const std::vector< G4int > &curVoxel) const
const G4VoxelBox & GetVoxelBox(G4int i) const
G4int GetVoxelsIndex(G4int x, G4int y, G4int z) const
static G4double MinDistanceToBox(const G4ThreeVector &aPoint, const G4ThreeVector &f)
G4double DistanceToFirst(const G4ThreeVector &point, const G4ThreeVector &direction) const
void Voxelize(std::vector< G4VFacet * > &facets)
void GetVoxel(std::vector< G4int > &curVoxel, const G4ThreeVector &point) const
G4int GetVoxelBoxesSize() const
G4bool IsEmpty(G4int index) const
const std::vector< G4double > & GetBoundary(G4int index) const
const G4SurfBits & Empty() const
const std::vector< G4int > & GetVoxelBoxCandidates(G4int i) const
virtual G4bool Normal(const G4ThreeVector &p, G4ThreeVector &n) const
G4double GetMinYExtent() const
virtual G4Polyhedron * GetPolyhedron() const
virtual G4double GetSurfaceArea()
G4double GetMinZExtent() const
virtual std::ostream & StreamInfo(std::ostream &os) const
G4TessellatedSolid & operator=(const G4TessellatedSolid &right)
G4TessellatedSolid & operator+=(const G4TessellatedSolid &right)
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
G4bool AddFacet(G4VFacet *aFacet)
void DisplayAllocatedMemory()
G4int GetNumberOfFacets() const
G4double GetMaxYExtent() 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
virtual G4NURBS * CreateNURBS() const
G4double GetMinXExtent() const
virtual void DescribeYourselfTo(G4VGraphicsScene &scene) const
void SetSolidClosed(const G4bool t)
G4int AllocatedMemoryWithoutVoxels()
virtual G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
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
virtual G4GeometryType GetEntityType() const
virtual EInside Inside(const G4ThreeVector &p) const
virtual G4double SafetyFromOutside(const G4ThreeVector &p, G4bool aAccurate=false) const
virtual ~G4TessellatedSolid()
virtual G4double GetCubicVolume()
virtual G4VSolid * Clone() const
virtual G4ThreeVector GetPointOnSurface() const
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 G4int GetNumberOfVertices() const =0
virtual G4double GetArea()=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)
virtual G4double GetCubicVolume()
G4double GetMinExtent(const EAxis pAxis) const
G4double GetMaxExtent(const EAxis pAxis) const
static G4int GetNumberOfRotationSteps()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)