42 fpObjectTransformation (0)
50 fpObjectTransformation = &objectTransformation;
57void G4BoundingSphereScene::Accrue (
const G4VSolid& solid) {
61 if (fpObjectTransformation) {
62 newCentre.transform (*fpObjectTransformation);
75 fpObjectTransformation = 0;
89 if (fRadius < newRadius) fRadius = newRadius;
91 else if (join.
mag () + newRadius <= fRadius) {
96 G4Point3D oldExtremity1 = fCentre - fRadius * unitJoin;
97 G4Point3D newExtremity1 = newCentre - newRadius * unitJoin;
98 G4Point3D oldExtremity2 = fCentre + fRadius * unitJoin;
99 G4Point3D newExtremity2 = newCentre + newRadius * unitJoin;
101 if (oldExtremity1 * unitJoin < newExtremity1 * unitJoin) {
102 extremity1 = oldExtremity1;
105 extremity1 = newExtremity1;
108 if (oldExtremity2 * unitJoin > newExtremity2 * unitJoin) {
109 extremity2 = oldExtremity2;
112 extremity2 = newExtremity2;
114 fCentre = 0.5 * (extremity2 + extremity1);
115 fRadius = 0.5 * (extremity2 - extremity1).mag ();
HepGeom::Point3D< G4double > G4Point3D
G4BoundingSphereScene(G4VModel *pModel=0)
void PreAddSolid(const G4Transform3D &objectTransformation, const G4VisAttributes &)
void ResetBoundingSphere()
virtual ~G4BoundingSphereScene()
void AccrueBoundingSphere(const G4Point3D ¢re, G4double radius)
G4VisExtent GetBoundingSphereExtent()
virtual G4VisExtent GetExtent() const
G4double GetExtentRadius() const
const G4Point3D & GetExtentCentre() const
BasicVector3D< T > unit() const