MCPcopy Create free account
hub / github.com/Geant4/geant4 / getSceneDepth

Method getSceneDepth

source/visualization/OpenGL/src/G4OpenGLViewer.cc:1065–1078  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1063
1064
1065GLdouble G4OpenGLViewer::getSceneDepth()
1066{
1067 if (!fSceneHandler.GetScene()) {
1068 return 0;
1069 }
1070 const G4Point3D targetPoint
1071 = fSceneHandler.GetScene()->GetStandardTargetPoint()
1072 + fVP.GetCurrentTargetPoint ();
1073 G4double radius = fSceneHandler.GetScene()->GetExtent().GetExtentRadius();
1074 if(radius<=0.) radius = 1.;
1075 const G4double cameraDistance = fVP.GetCameraDistance (radius);
1076 const GLdouble pnear = fVP.GetNearDistance (cameraDistance, radius);
1077 return fVP.GetFarDistance (cameraDistance, pnear, radius)- pnear;
1078}
1079
1080
1081

Callers

nothing calls this directly

Calls 5

GetExtentRadiusMethod · 0.80
GetCameraDistanceMethod · 0.80
GetNearDistanceMethod · 0.80
GetFarDistanceMethod · 0.80
GetExtentMethod · 0.45

Tested by

no test coverage detected