#include <G4BREPSolidBox.hh>
Inheritance diagram for G4BREPSolidBox:
Public Member Functions | |
G4BREPSolidBox (const G4String &, const G4Point3D &, const G4Point3D &, const G4Point3D &, const G4Point3D &, const G4Point3D &, const G4Point3D &, const G4Point3D &, const G4Point3D &) | |
~G4BREPSolidBox () | |
EInside | Inside (register const G4ThreeVector &Pt) const |
G4VSolid * | Clone () const |
std::ostream & | StreamInfo (std::ostream &os) const |
G4BREPSolidBox (__void__ &) | |
G4BREPSolidBox (const G4BREPSolidBox &rhs) | |
G4BREPSolidBox & | operator= (const G4BREPSolidBox &rhs) |
Definition at line 62 of file G4BREPSolidBox.hh.
G4BREPSolidBox::G4BREPSolidBox | ( | const G4String & | , | |
const G4Point3D & | , | |||
const G4Point3D & | , | |||
const G4Point3D & | , | |||
const G4Point3D & | , | |||
const G4Point3D & | , | |||
const G4Point3D & | , | |||
const G4Point3D & | , | |||
const G4Point3D & | ||||
) |
Definition at line 40 of file G4BREPSolidBox.cc.
References G4BREPSolid::active, G4BREPSolid::nb_of_surfaces, and G4BREPSolid::PlaneSolid.
Referenced by Clone().
00048 : G4BREPSolid(name) 00049 { 00050 nb_of_surfaces=6; 00051 active=1; PlaneSolid=1; 00052 00053 // Save the constructor parameters 00054 constructorParams[0] = Pt1; 00055 constructorParams[1] = Pt2; 00056 constructorParams[2] = Pt3; 00057 constructorParams[3] = Pt4; 00058 constructorParams[4] = Pt5; 00059 constructorParams[5] = Pt6; 00060 constructorParams[6] = Pt7; 00061 constructorParams[7] = Pt8; 00062 00063 InitializeBox(); 00064 }
G4BREPSolidBox::~G4BREPSolidBox | ( | ) |
G4BREPSolidBox::G4BREPSolidBox | ( | __void__ & | ) |
G4BREPSolidBox::G4BREPSolidBox | ( | const G4BREPSolidBox & | rhs | ) |
Definition at line 75 of file G4BREPSolidBox.cc.
References constructorParams.
00076 : G4BREPSolid(rhs), Rotation(rhs.Rotation) 00077 { 00078 for (size_t i=0; i<8; ++i) { constructorParams[i]= rhs.constructorParams[i]; } 00079 InitializeBox(); 00080 }
G4VSolid * G4BREPSolidBox::Clone | ( | ) | const [virtual] |
Reimplemented from G4BREPSolid.
Definition at line 168 of file G4BREPSolidBox.cc.
References G4BREPSolidBox().
00169 { 00170 return new G4BREPSolidBox(*this); 00171 }
EInside G4BREPSolidBox::Inside | ( | register const G4ThreeVector & | Pt | ) | const [virtual] |
Reimplemented from G4BREPSolid.
Definition at line 144 of file G4BREPSolidBox.cc.
References G4BREPSolid::bbox, G4BoundingBox3D::GetBoxMax(), G4BoundingBox3D::GetBoxMin(), G4VSolid::kCarTolerance, kInside, kOutside, and kSurface.
00145 { 00146 G4Point3D Point(Pt); 00147 00148 // Get the bounding box extent 00149 G4Point3D min = bbox->GetBoxMin(); 00150 min += G4Point3D(-0.5*kCarTolerance,-0.5*kCarTolerance,-0.5*kCarTolerance); 00151 00152 G4Point3D max = bbox->GetBoxMax(); 00153 max += G4Point3D(0.5*kCarTolerance,0.5*kCarTolerance,0.5*kCarTolerance); 00154 00155 if( (Point.x() < min.x() || Point.x() > max.x()) || 00156 (Point.y() < min.y() || Point.y() > max.y()) || 00157 (Point.z() < min.z() || Point.z() > max.z()) ) 00158 return kOutside; 00159 00160 if( (Point.x() > min.x() && Point.x() < max.x())&& 00161 (Point.y() > min.y() && Point.y() < max.y())&& 00162 (Point.z() > min.z() && Point.z() < max.z()) ) 00163 return kInside; 00164 00165 return kSurface; 00166 }
G4BREPSolidBox & G4BREPSolidBox::operator= | ( | const G4BREPSolidBox & | rhs | ) |
Definition at line 82 of file G4BREPSolidBox.cc.
References constructorParams, G4BREPSolid::operator=(), and Rotation.
00083 { 00084 // Check assignment to self 00085 // 00086 if (this == &rhs) { return *this; } 00087 00088 // Copy base class data 00089 // 00090 G4BREPSolid::operator=(rhs); 00091 00092 // Copy data 00093 // 00094 Rotation= rhs.Rotation; 00095 for (size_t i=0; i<8; ++i) { constructorParams[i]= rhs.constructorParams[i]; } 00096 InitializeBox(); 00097 00098 return *this; 00099 }
std::ostream & G4BREPSolidBox::StreamInfo | ( | std::ostream & | os | ) | const [virtual] |
Reimplemented from G4BREPSolid.
Definition at line 173 of file G4BREPSolidBox.cc.
References G4BREPSolid::StreamInfo().
00174 { 00175 // Streams solid contents to output stream. 00176 00177 G4BREPSolid::StreamInfo( os ) 00178 << "\n" 00179 << " Pt1: " << constructorParams[0] 00180 << " Pt2: " << constructorParams[1] 00181 << " Pt3: " << constructorParams[2] 00182 << " Pt4: " << constructorParams[3] 00183 << "\n Pt5: " << constructorParams[4] 00184 << " Pt6: " << constructorParams[5] 00185 << " Pt7: " << constructorParams[6] 00186 << " Pt8: " << constructorParams[7] 00187 << "\n-----------------------------------------------------------\n"; 00188 00189 return os; 00190 }