218 G4double diff1, diff2, maxDiff, newMin, newMax;
219 G4double xoff1, xoff2, yoff1, yoff2, delta;
222 xMin = xoffset -
fRMax;
223 xMax = xoffset +
fRMax;
245 yMin = yoffset -
fRMax;
246 yMax = yoffset +
fRMax;
295 yoff1 = yoffset - yMin;
296 yoff2 = yMax - yoffset;
298 if ( (yoff1 >= 0) && (yoff2 >= 0) )
308 delta = fRMax*fRMax - yoff1*yoff1;
309 diff1 = (delta>0.) ? std::sqrt(delta) : 0.;
310 delta = fRMax*fRMax - yoff2*yoff2;
311 diff2 = (delta>0.) ? std::sqrt(delta) : 0.;
312 maxDiff = (diff1 > diff2) ? diff1:diff2;
313 newMin = xoffset - maxDiff;
314 newMax = xoffset + maxDiff;
315 pMin = (newMin < xMin) ? xMin : newMin;
316 pMax = (newMax > xMax) ? xMax : newMax;
322 xoff1 = xoffset - xMin;
323 xoff2 = xMax - xoffset;
325 if ( (xoff1 >= 0) && (xoff2 >= 0) )
335 delta = fRMax*fRMax - xoff1*xoff1;
336 diff1 = (delta>0.) ? std::sqrt(delta) : 0.;
337 delta = fRMax*fRMax - xoff2*xoff2;
338 diff2 = (delta>0.) ? std::sqrt(delta) : 0.;
339 maxDiff = (diff1 > diff2) ? diff1 : diff2;
340 newMin = yoffset - maxDiff;
341 newMax = yoffset + maxDiff;
342 pMin = (newMin < yMin) ? yMin : newMin;
343 pMax = (newMax > yMax) ? yMax : newMax;
362 G4int i, noEntries, noBetweenSections4;
363 G4bool existsAfterClip =
false;
369 noEntries = vertices->size();
370 noBetweenSections4 = noEntries - 4;
372 for ( i = 0 ; i < noEntries ; i += 4 )
376 for ( i = 0 ; i < noBetweenSections4 ; i += 4 )
382 existsAfterClip =
true;
400 existsAfterClip =
true;
406 return existsAfterClip;
void ClipBetweenSections(G4ThreeVectorList *pVertices, const G4int pSectionIndex, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
G4double GetMinXExtent() const
static const G4double kInfinity
G4double GetMinYExtent() const
G4double GetMinZExtent() const
G4bool IsYLimited() const
void ClipCrossSection(G4ThreeVectorList *pVertices, const G4int pSectionIndex, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
G4bool IsXLimited() const
G4double GetMaxZExtent() const
G4double GetMaxXExtent() const
void GetMaxMinZ(G4double &zmin, G4double &zmax) const
static const double twopi
std::vector< G4ThreeVector > G4ThreeVectorList
G4double GetMinExtent(const EAxis pAxis) const
EInside Inside(const G4ThreeVector &p) const
G4bool IsZLimited() const
G4double GetMaxExtent(const EAxis pAxis) const
G4ThreeVectorList * CreateRotatedVertices(const G4AffineTransform &pTransform) const
G4double GetMaxYExtent() const