76 : kCarTolerance(rhs.kCarTolerance), fshapeName(rhs.fshapeName)
114 if (
this == &rhs) {
return *
this; }
119 fshapeName = rhs.fshapeName;
141 std::ostringstream message;
142 message <<
"Illegal call to G4VSolid::ComputeDimensions()" <<
G4endl
143 <<
"Method not overloaded by derived class !";
144 G4Exception(
"G4VSolid::ComputeDimensions()",
"GeomMgt0003",
154 std::ostringstream message;
155 message <<
"Not implemented for solid: "
157 <<
"Returning origin.";
158 G4Exception(
"G4VSolid::GetPointOnSurface()",
"GeomMgt1001",
190 G4int cubVolStatistics = 1000000;
206 G4double px,py,pz,minX,maxX,minY,maxY,minZ,maxZ,volume;
223 if(nStat < 100) nStat = 100;
224 if(epsilon > 0.01) epsilon = 0.01;
226 for(
G4int i = 0; i < nStat; i++ )
235 volume = (maxX-minX)*(maxY-minY)*(maxZ-minZ)*iInside/nStat;
250 G4int stat = 1000000;
264 G4double px,py,pz,minX,maxX,minY,maxY,minZ,maxZ,surf;
281 if(nStat < 100) { nStat = 100; }
289 if(dY<dX) { minval=dY; }
290 if(dZ<minval) { minval=dZ; }
295 minX-=ell; minY-=ell; minZ-=ell; dX+=dd; dY+=dd; dZ+=dd;
297 for(
G4int i = 0; i < nStat; i++ )
311 surf = dX*dY*dZ*inside/dd/nStat;
324 std::ostringstream message;
325 message <<
"Clone() method not implemented for type: "
327 <<
"Returning NULL pointer!";
346 const G4int pSectionIndex,
354 polygon.push_back((*pVertices)[pSectionIndex]);
355 polygon.push_back((*pVertices)[pSectionIndex+1]);
356 polygon.push_back((*pVertices)[pSectionIndex+2]);
357 polygon.push_back((*pVertices)[pSectionIndex+3]);
377 const G4int pSectionIndex,
384 polygon.push_back((*pVertices)[pSectionIndex]);
385 polygon.push_back((*pVertices)[pSectionIndex+4]);
386 polygon.push_back((*pVertices)[pSectionIndex+5]);
387 polygon.push_back((*pVertices)[pSectionIndex+1]);
392 polygon.push_back((*pVertices)[pSectionIndex+1]);
393 polygon.push_back((*pVertices)[pSectionIndex+5]);
394 polygon.push_back((*pVertices)[pSectionIndex+6]);
395 polygon.push_back((*pVertices)[pSectionIndex+2]);
400 polygon.push_back((*pVertices)[pSectionIndex+2]);
401 polygon.push_back((*pVertices)[pSectionIndex+6]);
402 polygon.push_back((*pVertices)[pSectionIndex+7]);
403 polygon.push_back((*pVertices)[pSectionIndex+3]);
408 polygon.push_back((*pVertices)[pSectionIndex+3]);
409 polygon.push_back((*pVertices)[pSectionIndex+7]);
410 polygon.push_back((*pVertices)[pSectionIndex+4]);
411 polygon.push_back((*pVertices)[pSectionIndex]);
446 noLeft = pPolygon.size();
451 for (i=0;i<noLeft;i++)
453 component = pPolygon[i].operator()(pAxis);
456 if (component < pMin)
461 if (component > pMax)
505 ClipPolygonToSimpleLimits(pPolygon,outputPolygon,simpleLimit1);
509 if ( !outputPolygon.size() )
return;
514 ClipPolygonToSimpleLimits(outputPolygon,pPolygon,simpleLimit2);
516 if ( !pPolygon.size() )
return;
517 else outputPolygon.clear();
523 ClipPolygonToSimpleLimits(pPolygon,outputPolygon,simpleLimit1);
530 if ( !outputPolygon.size() )
return;
534 ClipPolygonToSimpleLimits(outputPolygon,pPolygon,simpleLimit2);
536 if ( !pPolygon.size() )
return;
537 else outputPolygon.clear();
543 ClipPolygonToSimpleLimits(pPolygon,outputPolygon,simpleLimit1);
550 if ( !outputPolygon.size() )
return;
554 ClipPolygonToSimpleLimits(outputPolygon,pPolygon,simpleLimit2);
572 G4int noVertices=pPolygon.size();
575 for (i = 0 ; i < noVertices ; i++ )
577 vStart = pPolygon[i];
579 if ( i == noVertices-1 ) vEnd = pPolygon[0];
580 else vEnd = pPolygon[i+1];
582 if ( pVoxelLimit.
Inside(vStart) )
584 if (pVoxelLimit.
Inside(vEnd))
588 outputPolygon.push_back(vEnd);
596 outputPolygon.push_back(vEnd);
601 if (pVoxelLimit.
Inside(vEnd))
607 outputPolygon.push_back(vStart);
608 outputPolygon.push_back(vEnd);