#include <G4PlacedSolid.hh>
Public Member Functions | |
G4PlacedSolid () | |
G4PlacedSolid (G4BREPSolid *, G4Axis2Placement3D *=0) | |
~G4PlacedSolid () | |
G4bool | operator== (const G4PlacedSolid &ps) const |
G4VSolid * | GetSolid () const |
G4RotationMatrix * | GetRotation () const |
G4ThreeVector * | GetTranslation () const |
std::ostream & | StreamInfo (std::ostream &os) const |
Definition at line 47 of file G4PlacedSolid.hh.
G4PlacedSolid::G4PlacedSolid | ( | ) |
G4PlacedSolid::G4PlacedSolid | ( | G4BREPSolid * | , | |
G4Axis2Placement3D * | = 0 | |||
) |
Definition at line 47 of file G4PlacedSolid.cc.
References G4Axis2Placement3D::GetAxis(), G4GeometryTolerance::GetInstance(), G4Axis2Placement3D::GetLocation(), G4Axis2Placement3D::GetRefDirection(), and G4GeometryTolerance::GetSurfaceTolerance().
00048 { 00049 solid = sol; 00050 if(p) 00051 { 00052 G4double x,y,z; 00053 G4Point3D srfpoint = p->GetLocation(); 00054 00055 x = srfpoint.x(); 00056 y = srfpoint.y(); 00057 z = srfpoint.z(); 00058 solidTranslation = new G4ThreeVector(x,y,z); 00059 00060 G4Vector3D tmpvec = p->GetAxis(); 00061 x = tmpvec.x(); 00062 y = tmpvec.y(); 00063 z = tmpvec.z(); 00064 G4ThreeVector x_axis(x,y,z); 00065 00066 G4double kCarTolerance = G4GeometryTolerance::GetInstance() 00067 ->GetSurfaceTolerance(); 00068 if( (x<kCarTolerance)&& 00069 (y<kCarTolerance)&& 00070 (z<kCarTolerance) ) 00071 solidRotation=0; 00072 else 00073 { 00074 tmpvec = p->GetRefDirection(); 00075 x = tmpvec.x(); 00076 y = tmpvec.y(); 00077 z = tmpvec.z(); 00078 00079 G4ThreeVector y_axis(x,y,z); 00080 solidRotation = new G4RotationMatrix(); 00081 solidRotation->rotateAxes(x_axis, y_axis, x_axis.cross(y_axis)); 00082 } 00083 } 00084 else 00085 { 00086 solidTranslation=0; 00087 solidRotation=0; 00088 } 00089 }
G4PlacedSolid::~G4PlacedSolid | ( | ) |
Definition at line 92 of file G4PlacedSolid.cc.
00093 { 00094 //delete solid; 00095 if(solidRotation) 00096 delete solidRotation; 00097 00098 if(solidTranslation) 00099 delete solidTranslation; 00100 }
G4RotationMatrix * G4PlacedSolid::GetRotation | ( | ) | const [inline] |
G4VSolid * G4PlacedSolid::GetSolid | ( | ) | const [inline] |
G4ThreeVector * G4PlacedSolid::GetTranslation | ( | ) | const [inline] |
G4bool G4PlacedSolid::operator== | ( | const G4PlacedSolid & | ps | ) | const [inline] |
std::ostream & G4PlacedSolid::StreamInfo | ( | std::ostream & | os | ) | const [inline] |
Definition at line 62 of file G4PlacedSolid.icc.
References G4BREPSolid::StreamInfo().
00063 { 00064 return solid->StreamInfo( os ); 00065 }