00001 // 00002 // ******************************************************************** 00003 // * License and Disclaimer * 00004 // * * 00005 // * The Geant4 software is copyright of the Copyright Holders of * 00006 // * the Geant4 Collaboration. It is provided under the terms and * 00007 // * conditions of the Geant4 Software License, included in the file * 00008 // * LICENSE and available at http://cern.ch/geant4/license . These * 00009 // * include a list of copyright holders. * 00010 // * * 00011 // * Neither the authors of this software system, nor their employing * 00012 // * institutes,nor the agencies providing financial support for this * 00013 // * work make any representation or warranty, express or implied, * 00014 // * regarding this software system or assume any liability for its * 00015 // * use. Please see the license in the file LICENSE and URL above * 00016 // * for the full disclaimer and the limitation of liability. * 00017 // * * 00018 // * This code implementation is the result of the scientific and * 00019 // * technical work of the GEANT4 collaboration. * 00020 // * By using, copying, modifying or distributing the software (or * 00021 // * any work based on the software) you agree to acknowledge its * 00022 // * use in resulting scientific publications, and indicate your * 00023 // * acceptance of all terms of the Geant4 Software license. * 00024 // ******************************************************************** 00025 // 00026 // 00027 // $Id$ 00028 // 00029 // ---------------------------------------------------------------------- 00030 // Class G4BREPSolidBox 00031 // 00032 // Class description: 00033 // 00034 // Definition of a generic BREP box: 00035 // 00036 // G4BREPSolidBox(const G4String& name, 00037 // const G4Point3D& Pt1, const G4Point3D& Pt2, 00038 // const G4Point3D& Pt3, const G4Point3D& Pt4, 00039 // const G4Point3D& Pt5, const G4Point3D& Pt6, 00040 // const G4Point3D& Pt7, const G4Point3D& Pt8) 00041 // Points have to be given in following way: 00042 // First for YZ plane with X fixed to negative value, then 00043 // for YZ plane with X xixed to positive value 00044 // Examle : 00045 // const G4Point3D Pt1(-x,-y,-z); 00046 // const G4Point3D Pt2(-x,-y, z); 00047 // const G4Point3D Pt3(-x, y, z); 00048 // const G4Point3D Pt4(-x, y,-z); 00049 // const G4Point3D Pt5( x,-y,-z); 00050 // const G4Point3D Pt6( x,-y, z); 00051 // const G4Point3D Pt7( x, y, z); 00052 // const G4Point3D Pt8( x, y,-z); 00053 // Authors: J.Sulkimo, P.Urban. 00054 // Revisions by: L.Broglia, G.Cosmo. 00055 // ---------------------------------------------------------------------- 00056 #ifndef __G4BREPSolidBOX 00057 #define __G4BREPSolidBOX 00058 00059 #include "G4BREPSolid.hh" 00060 #include "G4RotationMatrix.hh" 00061 00062 class G4BREPSolidBox : public G4BREPSolid 00063 { 00064 00065 public: // with description 00066 00067 G4BREPSolidBox(const G4String&, const G4Point3D&, const G4Point3D&, 00068 const G4Point3D&, const G4Point3D&, const G4Point3D&, 00069 const G4Point3D&, const G4Point3D&, const G4Point3D& ); 00070 // Constructor defining the box through its planes. 00071 00072 ~G4BREPSolidBox(); 00073 // Empty destructor. 00074 00075 EInside Inside(register const G4ThreeVector& Pt) const; 00076 // Determines if the point Pt is inside, outside or on the surface 00077 // of the solid. 00078 00079 G4VSolid* Clone() const; 00080 // Returns a pointer of a dynamically allocated copy of the solid. 00081 00082 std::ostream& StreamInfo(std::ostream& os) const; 00083 // Streams solid contents to output stream. 00084 00085 public: // without description 00086 00087 G4BREPSolidBox(__void__&); 00088 // Fake default constructor for usage restricted to direct object 00089 // persistency for clients requiring preallocation of memory for 00090 // persistifiable objects. 00091 00092 G4BREPSolidBox(const G4BREPSolidBox& rhs); 00093 G4BREPSolidBox& operator=(const G4BREPSolidBox& rhs); 00094 // Copy constructor and assignment operator. 00095 00096 private: 00097 00098 void InitializeBox(); 00099 00100 private: 00101 00102 G4RotationMatrix Rotation; 00103 G4Point3D constructorParams[8]; 00104 00105 }; 00106 00107 #endif