71 {
72 vtkRenderer *ren = static_cast<vtkRenderer *>(caller);
73 vtkCamera *cam = ren->GetActiveCamera();
74
75
76
77
78 auto cp = cam->GetPosition();
79 auto fp = cam->GetFocalPoint();
80 auto ud = cam->GetViewUp();
81
86
87 if(cam->GetParallelProjection()) {
89 }
90 else {
91 auto cd = std::sqrt(std::pow(cp[0]-fp[0],2) +
92 std::pow(cp[1]-cp[1],2) +
93 std::pow(cp[2]-cp[2],2));
95 }
96 }
HepGeom::Point3D< G4double > G4Point3D
HepGeom::Vector3D< G4double > G4Vector3D
void SetViewpointDirection(const G4Vector3D &viewpointDirection)
void SetCurrentTargetPoint(const G4Point3D ¤tTargetPoint)
void SetZoomFactor(G4double zoomFactor)
void SetUpVector(const G4Vector3D &upVector)