116 {
117 vtkRenderer *ren = reinterpret_cast<vtkRenderer *>(caller);
118 int nActors = ren->GetActors()->GetNumberOfItems();
119 vtkCamera *cam = ren->GetActiveCamera();
120 if(!cam) return;
121
122 double *
pos = cam->GetPosition();
123 double *foc = cam->GetFocalPoint();
124 double viewAngle = cam->GetViewAngle();
125 double distance = cam->GetDistance();
126 double parallelScale = cam->GetParallelScale();
127
129
130
131 t2 = std::chrono::steady_clock::now();
132
133
134 std::chrono::duration<double> tdiff =
t2-
t1;
136 float fps = 1.0/tdiff.count();
137
138
139 sprintf(this->
TextBuff,
"camera position : %.1f %.1f %.1f \n"
140 "camera focal point : %.1f %.1f %.1f \n"
141 "view angle : %.1f\n"
142 "distance : %.1f\n"
143 "parallel scale : %.1f\n"
144 "number actors : %i\n"
145 "fps : %.1f",pos[0],
pos[1],
pos[2], foc[0], foc[1], foc[2], viewAngle, distance, parallelScale, nActors, fps);
148 }
149 }
static const G4double pos