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 G4Axis2Placement3D 00031 // 00032 // Class description: 00033 // 00034 // Class defining an axis placed in a 3D space. 00035 // Attributes are: a point location, an axis vector with its 00036 // reference direction and coordinates in space. 00037 00038 // Authors: J.Sulkimo, P.Urban. 00039 // Revisions by: L.Broglia, G.Cosmo. 00040 // ---------------------------------------------------------------------- 00041 #ifndef __G4Placement3D_h 00042 #define __G4Placement3D_h 1 00043 00044 #include "G4Point3D.hh" 00045 #include "G4Vector3D.hh" 00046 #include "G4Transform3D.hh" 00047 #include "G4PointRat.hh" 00048 #include "G4Ray.hh" 00049 00050 class G4Axis2Placement3D 00051 { 00052 00053 public: // with description 00054 00055 G4Axis2Placement3D(); 00056 G4Axis2Placement3D( const G4Vector3D& refDirection0 , 00057 const G4Vector3D& axis0 , 00058 const G4Point3D& location0 ); 00059 ~G4Axis2Placement3D(); 00060 // Constructors & destructor 00061 00062 G4Axis2Placement3D(const G4Axis2Placement3D&); 00063 G4Axis2Placement3D& operator=(const G4Axis2Placement3D&); 00064 // Copy constructor and assignment operator. 00065 00066 inline G4bool operator==(const G4Axis2Placement3D& other) const; 00067 // Equality operator. 00068 00069 inline void Init( const G4Vector3D& refDirection0 , 00070 const G4Vector3D& axis0 , 00071 const G4Point3D& location0 ); 00072 00073 inline G4Point3D GetLocation() const; 00074 inline G4Vector3D GetAxis() const; 00075 inline G4Vector3D GetRefDirection() const; 00076 // Get/Set for geometric data 00077 00078 inline G4Vector3D GetPX() const; 00079 inline G4Vector3D GetPY() const; 00080 inline G4Vector3D GetPZ() const; 00081 // Placement coordinate axes 00082 00083 inline const G4Transform3D& GetToPlacementCoordinates() const; 00084 inline const G4Transform3D& GetFromPlacementCoordinates() const; 00085 // Transformation from/to the placement coordinate system 00086 00087 public: 00088 00089 //inline void Project (G4ThreeVec& Coord, const G4ThreeVec& Pt2, 00090 // const G4Plane& Pl1, const G4Plane& Pl2) 00091 // { 00092 // Coord.X(Pt2.X()*Pl1.a + Pt2.Y()*Pl1.b + Pt2.Z()*Pl1.c - Pl1.d); 00093 // Coord.Y(Pt2.X()*Pl2.a + Pt2.Y()*Pl2.b + Pt2.Z()*Pl2.c - Pl2.d); 00094 // Coord.Z(0); 00095 // } 00096 00097 private: 00098 00099 // geometric data 00100 G4Point3D location; 00101 G4Vector3D axis; 00102 G4Vector3D refDirection; 00103 00104 // placement coordinate axes 00105 G4Vector3D pX, pY, pZ; 00106 00107 G4Transform3D toPlacementCoordinates; 00108 G4Transform3D fromPlacementCoordinates; 00109 00110 }; 00111 00112 #include "G4Axis2Placement3D.icc" 00113 00114 #endif