00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #include "G4VModel.hh"
00034
00035 #include "G4RotationMatrix.hh"
00036 #include "G4ModelingParameters.hh"
00037
00038 G4VModel::G4VModel (const G4Transform3D& modelTransformation,
00039 const G4ModelingParameters* pMP):
00040 fType ("Other"),
00041 fGlobalTag ("Empty"),
00042 fGlobalDescription ("Empty"),
00043 fTransform (modelTransformation),
00044 fpMP (pMP)
00045 {}
00046
00047 G4VModel::~G4VModel () {}
00048
00049 G4String G4VModel::GetCurrentTag () const {
00050
00051 return fGlobalTag;
00052 }
00053
00054 G4String G4VModel::GetCurrentDescription () const {
00055
00056 return fGlobalDescription;
00057 }
00058
00059 G4bool G4VModel::Validate (G4bool) {
00060 return true;
00061 }
00062
00063 std::ostream& operator << (std::ostream& os, const G4VModel& model) {
00064 os << model.fGlobalDescription;
00065 os << "\n Modeling parameters:";
00066 const G4ModelingParameters* mp = model.fpMP;
00067 if (mp) os << "\n " << *mp;
00068 else os << " none.";
00069 os << "\n Extent: " << model.fExtent;
00070 os << "\n Transformation: ";
00071 os << "\n Rotation: ";
00072 G4RotationMatrix rotation = model.fTransform.getRotation ();
00073 os << rotation.thetaX() << ", "
00074 << rotation.phiX() << ", "
00075 << rotation.thetaY() << ", "
00076 << rotation.phiY() << ", "
00077 << rotation.thetaZ() << ", "
00078 << rotation.phiZ();
00079 os << "\n Translation: " << model.fTransform.getTranslation ();
00080 return os;
00081 }