31using std::initializer_list;
53 std::copy(l.begin(), l.end(), &fxhi);
74 G4double V = LengthY * LengthX * LengthZ;
82 for(
size_t i = 0; i < 8; i++)
120 output.fxhi = fxhi + trans.
x();
121 output.fxlo = fxlo + trans.
x();
123 output.fyhi = fyhi + trans.
y();
124 output.fylo = fylo + trans.
x();
126 output.fzhi = fzhi + trans.
z();
127 output.fzlo = fzlo + trans.
z();
135 return fxlo <= other.fxlo && fxhi >= other.fxhi && fylo <= other.fylo &&
136 fyhi >= other.fyhi && fzlo <= other.fzlo && fzhi >= other.fzhi;
143 return fxlo <= point.
x() && fxhi >= point.
x() && fylo <= point.
y() &&
144 fyhi >= point.
y() && fzlo <= point.
z() && fzhi >= point.
z();
164 if(fxhi < other.fxlo || fxlo > other.fxhi || fyhi < other.fylo ||
165 fylo > other.fyhi || fzhi < other.fzlo || fzlo > other.fzhi)
171 G4double upperX = std::min(fxhi, other.fxhi);
172 G4double upperY = std::min(fyhi, other.fyhi);
173 G4double upperZ = std::min(fzhi, other.fzhi);
175 G4double lowerX = std::max(fxlo, other.fxlo);
176 G4double lowerY = std::max(fylo, other.fylo);
177 G4double lowerZ = std::max(fzlo, other.fzlo);
206 if(num_less_extent > 1)
215 G4double norm = std::sqrt(x * x + y * y + z * z);
217 return (norm < Radius);
228 G4double norm = std::sqrt(x * x + y * y + z * z);
229 return (norm < Radius);
237 return (((query - Point).mag()) < Radius);
248 std::array<G4DNABoundingBox, 8> ret{ {
267 return (fxhi == rhs.fxhi && fxlo == rhs.fxlo && fyhi == rhs.fyhi &&
268 fylo == rhs.fylo && fzhi == rhs.fzhi && fzlo == rhs.fzlo) ||
269 (std::isnan(fxhi) && std::isnan(rhs.fxhi) && std::isnan(fxlo) &&
270 std::isnan(rhs.fxlo) && std::isnan(fyhi) && std::isnan(rhs.fyhi) &&
271 std::isnan(fylo) && std::isnan(rhs.fylo) && std::isnan(fzhi) &&
272 std::isnan(rhs.fzhi) && std::isnan(fzlo) && std::isnan(rhs.fzlo));
283 stream <<
"{" <<
G4BestUnit(rhs.fxhi,
"Length") <<
", "
std::ostream & operator<<(std::ostream &stream, const G4DNABoundingBox &rhs)
const G4DNABoundingBox invalid
void resize(G4ThreeVector pics[8])
G4bool operator!=(const G4DNABoundingBox &rhs) const
G4ThreeVector middlePoint() const
G4double halfSideLengthInY() const
G4DNABoundingBox translate(const G4ThreeVector &trans) const
G4DNABoundingBox()=default
G4bool operator==(const G4DNABoundingBox &rhs) const
std::array< G4DNABoundingBox, 8 > partition() const
G4bool overlap(const G4DNABoundingBox &other, G4DNABoundingBox *out) const
G4DNABoundingBox & operator=(const G4DNABoundingBox &)=default
G4bool contains(const G4DNABoundingBox &other) const
G4double halfSideLengthInZ() const
G4double halfSideLengthInX() const