34#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
47G4UEllipsoid::G4UEllipsoid(
const G4String& pName,
53 : Base_t(pName, dx, dy, dz, bcut, tcut)
61G4UEllipsoid::G4UEllipsoid( __void__& a )
69G4UEllipsoid::~G4UEllipsoid() =
default;
75G4UEllipsoid::G4UEllipsoid(
const G4UEllipsoid& rhs)
83G4UEllipsoid& G4UEllipsoid::operator = (
const G4UEllipsoid& rhs)
87 if (
this == &rhs) {
return *
this; }
91 Base_t::operator=(rhs);
102 return Base_t::GetDx();
107 return Base_t::GetDy();
112 return Base_t::GetDz();
117 return (i==0) ? GetDx()
122G4double G4UEllipsoid::GetZBottomCut()
const
124 return Base_t::GetZBottomCut();
127G4double G4UEllipsoid::GetZTopCut()
const
129 return Base_t::GetZTopCut();
138 Base_t::SetSemiAxes(x, y, z);
143 Base_t::SetZCuts(newzBottomCut, newzTopCut);
150G4VSolid* G4UEllipsoid::Clone()
const
152 return new G4UEllipsoid(*
this);
165 G4double zmin = std::max(-dz,GetZBottomCut());
166 G4double zmax = std::min( dz,GetZTopCut());
167 pMin.
set(-dx,-dy,zmin);
168 pMax.
set( dx, dy,zmax);
172 if (pMin.
x() >= pMax.
x() || pMin.
y() >= pMax.
y() || pMin.
z() >= pMax.
z())
174 std::ostringstream message;
175 message <<
"Bad bounding box (min >= max) for solid: "
177 <<
"\npMin = " << pMin
178 <<
"\npMax = " << pMax;
179 G4Exception(
"G4UEllipsoid::BoundingLimits()",
"GeomMgt0001",
190G4UEllipsoid::CalculateExtent(
const EAxis pAxis,
198 BoundingLimits(bmin,bmax);
202 return bbox.CalculateExtent(pAxis,pVoxelLimit,pTransform,pMin,pMax);
212 GetZBottomCut(), GetZTopCut());
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4GLOB_DLL std::ostream G4cout
void set(double x, double y, double z)