#include <G4VisExtent.hh>
Public Member Functions | |
G4VisExtent (G4double xmin=0., G4double xmax=0., G4double ymin=0., G4double ymax=0., G4double zmin=0., G4double zmax=0.) | |
G4VisExtent (const G4Point3D ¢re, G4double radius) | |
~G4VisExtent () | |
G4bool | operator!= (const G4VisExtent &e) const |
G4double | GetXmin () const |
G4double | GetXmax () const |
G4double | GetYmin () const |
G4double | GetYmax () const |
G4double | GetZmin () const |
G4double | GetZmax () const |
const G4Point3D & | GetExtentCentre () const |
const G4Point3D & | GetExtentCenter () const |
G4double | GetExtentRadius () const |
void | SetXmin (G4double xmin) |
void | SetXmax (G4double xmax) |
void | SetYmin (G4double ymin) |
void | SetYmax (G4double ymax) |
void | SetZmin (G4double zmin) |
void | SetZmax (G4double zmax) |
Static Public Attributes | |
static const G4VisExtent | NullExtent |
Friends | |
std::ostream & | operator<< (std::ostream &os, const G4VisExtent &e) |
Definition at line 54 of file G4VisExtent.hh.
G4VisExtent::G4VisExtent | ( | G4double | xmin = 0. , |
|
G4double | xmax = 0. , |
|||
G4double | ymin = 0. , |
|||
G4double | ymax = 0. , |
|||
G4double | zmin = 0. , |
|||
G4double | zmax = 0. | |||
) |
Definition at line 40 of file G4VisExtent.cc.
00042 : 00043 fXmin(xmin), fXmax(xmax), fYmin(ymin), fYmax(ymax), fZmin(zmin), fZmax(zmax), 00044 fRadiusCached(false), fCentreCached(false), fRadius(0.) 00045 {}
Definition at line 47 of file G4VisExtent.cc.
00047 : 00048 fRadiusCached(true), fCentreCached(true), 00049 fRadius(radius), fCentre(centre) 00050 { 00051 // Use exscribed radius ... see comments in header file. 00052 G4double halfSide (radius / std::sqrt (3.)); 00053 fXmin = centre.x () - halfSide; 00054 fXmax = centre.x () + halfSide; 00055 fYmin = centre.y () - halfSide; 00056 fYmax = centre.y () + halfSide; 00057 fZmin = centre.z () - halfSide; 00058 fZmax = centre.z () + halfSide; 00059 }
G4VisExtent::~G4VisExtent | ( | ) |
const G4Point3D & G4VisExtent::GetExtentCenter | ( | ) | const [inline] |
Definition at line 96 of file G4VisExtent.hh.
References GetExtentCentre().
00096 { 00097 return GetExtentCentre (); 00098 }
const G4Point3D & G4VisExtent::GetExtentCentre | ( | ) | const |
Definition at line 63 of file G4VisExtent.cc.
Referenced by G4Scene::CalculateExtent(), G4VSceneHandler::CreateSectionSolid(), and GetExtentCenter().
00063 { 00064 if (!fCentreCached) { 00065 fCentre = G4Point3D (((fXmin + fXmax) / 2.), 00066 ((fYmin + fYmax) / 2.), 00067 ((fZmin + fZmax) / 2.)); 00068 fCentreCached = true; 00069 } 00070 return fCentre; 00071 }
G4double G4VisExtent::GetExtentRadius | ( | ) | const |
Definition at line 73 of file G4VisExtent.cc.
Referenced by G4Scene::CalculateExtent(), G4VSceneHandler::CreateSectionSolid(), G4VisManager::RegisterEndOfEventUserVisAction(), G4VisManager::RegisterEndOfRunUserVisAction(), G4VisManager::RegisterRunDurationUserVisAction(), G4DAWNFILEViewer::SendViewParameters(), G4VisCommandSceneAddScale::SetNewValue(), G4VisCommandSceneAddLogo::SetNewValue(), G4VisCommandSceneAddAxes::SetNewValue(), G4VisCommandSceneAddArrow::SetNewValue(), and G4RayTracerViewer::SetView().
00073 { 00074 if (!fRadiusCached) { 00075 fRadius = std::sqrt (((fXmax - fXmin) * (fXmax - fXmin)) + 00076 ((fYmax - fYmin) * (fYmax - fYmin)) + 00077 ((fZmax - fZmin) * (fZmax - fZmin))) / 2.; 00078 fRadiusCached = true; 00079 } 00080 return fRadius; 00081 }
G4double G4VisExtent::GetXmax | ( | ) | const [inline] |
Definition at line 90 of file G4VisExtent.hh.
Referenced by G4VSceneHandler::AddPrimitive(), G4tgbVolume::BuildSolidForDivision(), G4VisCommandSceneAddScale::SetNewValue(), G4VisCommandSceneAddLogo::SetNewValue(), G4GeomTestVolume::TestCartGrid(), and G4GeomTestVolume::TestCylinder().
G4double G4VisExtent::GetXmin | ( | ) | const [inline] |
Definition at line 89 of file G4VisExtent.hh.
Referenced by G4VSceneHandler::AddPrimitive(), G4tgbVolume::BuildSolidForDivision(), G4VisCommandSceneAddScale::SetNewValue(), G4VisCommandSceneAddLogo::SetNewValue(), G4GeomTestVolume::TestCartGrid(), and G4GeomTestVolume::TestCylinder().
G4double G4VisExtent::GetYmax | ( | ) | const [inline] |
Definition at line 92 of file G4VisExtent.hh.
Referenced by G4VSceneHandler::AddPrimitive(), G4tgbVolume::BuildSolidForDivision(), G4VisCommandSceneAddScale::SetNewValue(), G4VisCommandSceneAddLogo::SetNewValue(), G4GeomTestVolume::TestCartGrid(), and G4GeomTestVolume::TestCylinder().
G4double G4VisExtent::GetYmin | ( | ) | const [inline] |
Definition at line 91 of file G4VisExtent.hh.
Referenced by G4VSceneHandler::AddPrimitive(), G4tgbVolume::BuildSolidForDivision(), G4VisCommandSceneAddScale::SetNewValue(), G4VisCommandSceneAddLogo::SetNewValue(), G4GeomTestVolume::TestCartGrid(), and G4GeomTestVolume::TestCylinder().
G4double G4VisExtent::GetZmax | ( | ) | const [inline] |
Definition at line 94 of file G4VisExtent.hh.
Referenced by G4VSceneHandler::AddPrimitive(), G4tgbVolume::BuildSolidForDivision(), G4VisCommandSceneAddScale::SetNewValue(), G4VisCommandSceneAddLogo::SetNewValue(), G4GeomTestVolume::TestCartGrid(), and G4GeomTestVolume::TestCylinder().
G4double G4VisExtent::GetZmin | ( | ) | const [inline] |
Definition at line 93 of file G4VisExtent.hh.
Referenced by G4VSceneHandler::AddPrimitive(), G4tgbVolume::BuildSolidForDivision(), G4VisCommandSceneAddScale::SetNewValue(), G4VisCommandSceneAddLogo::SetNewValue(), G4GeomTestVolume::TestCartGrid(), and G4GeomTestVolume::TestCylinder().
G4bool G4VisExtent::operator!= | ( | const G4VisExtent & | e | ) | const |
void G4VisExtent::SetXmax | ( | G4double | xmax | ) | [inline] |
void G4VisExtent::SetXmin | ( | G4double | xmin | ) | [inline] |
void G4VisExtent::SetYmax | ( | G4double | ymax | ) | [inline] |
void G4VisExtent::SetYmin | ( | G4double | ymin | ) | [inline] |
void G4VisExtent::SetZmax | ( | G4double | zmax | ) | [inline] |
void G4VisExtent::SetZmin | ( | G4double | zmin | ) | [inline] |
std::ostream& operator<< | ( | std::ostream & | os, | |
const G4VisExtent & | e | |||
) | [friend] |
const G4VisExtent G4VisExtent::NullExtent [static] |
Definition at line 80 of file G4VisExtent.hh.