198 if (
true)
return bbox.CalculateExtent(pAxis,pVoxelLimit,pTransform,pMin,pMax);
200 if (bbox.BoundingBoxVsVoxelLimits(pAxis,pVoxelLimit,pTransform,pMin,pMax))
202 return exist = (pMin < pMax) ?
true :
false;
207 static const G4int NTHETA = 8;
208 static const G4int NPHI = 16;
211 static const G4double sinHalfPhi = std::sin(
pi/NPHI);
212 static const G4double cosHalfPhi = std::cos(
pi/NPHI);
213 static const G4double sinStepTheta = 2.*sinHalfTheta*cosHalfTheta;
214 static const G4double cosStepTheta = 1. - 2.*sinHalfTheta*sinHalfTheta;
215 static const G4double sinStepPhi = 2.*sinHalfPhi*cosHalfPhi;
216 static const G4double cosStepPhi = 1. - 2.*sinHalfPhi*sinHalfPhi;
219 G4double rtheta = radius/cosHalfTheta;
226 for (
G4int k=0; k<NPHI; ++k)
228 xy[k].
set(cosCurPhi,sinCurPhi);
230 sinCurPhi = sinCurPhi*cosStepPhi + cosCurPhi*sinStepPhi;
231 cosCurPhi = cosCurPhi*cosStepPhi - sinTmpPhi*sinStepPhi;
236 for (
G4int i=0; i<NTHETA; ++i) circles[i].resize(NPHI);
238 G4double sinCurTheta = sinHalfTheta;
239 G4double cosCurTheta = cosHalfTheta;
240 for (
G4int i=0; i<NTHETA; ++i)
244 for (
G4int k=0; k<NPHI; ++k)
246 circles[i][k].set(rho*xy[k].x(),rho*xy[k].y(),z);
249 sinCurTheta = sinCurTheta*cosStepTheta + cosCurTheta*sinStepTheta;
250 cosCurTheta = cosCurTheta*cosStepTheta - sinTmpTheta*sinStepTheta;
254 std::vector<const G4ThreeVectorList *> polygons;
255 polygons.resize(NTHETA);
256 for (
G4int i=0; i<NTHETA; ++i) polygons[i] = &circles[i];
259 exist = benv.CalculateExtent(pAxis,pVoxelLimit,pTransform,pMin,pMax);
void Extent(G4ThreeVector &pMin, G4ThreeVector &pMax) const
G4double GetRadius() const
void set(double x, double y)
std::vector< G4ThreeVector > G4ThreeVectorList
static constexpr double pi
static constexpr double halfpi