125 {
126 auto ren = static_cast<vtkRenderer*>(caller);
127 int nActors = ren->GetActors()->GetNumberOfItems();
128 vtkCamera* cam = ren->GetActiveCamera();
129 if (cam == nullptr) return;
130
131 double*
pos = cam->GetPosition();
132 double* foc = cam->GetFocalPoint();
133 double viewAngle = cam->GetViewAngle();
134 double distance = cam->GetDistance();
135 double near;
136 double far;
137 cam->GetClippingRange(near,far);
138 double parallelScale = cam->GetParallelScale();
139
140
141 if (pos == nullptr) return;
142
143
144 t2 = std::chrono::steady_clock::now();
145
146
147 std::chrono::duration<double> tdiff =
t2 -
t1;
149 float fps = 1.0 / tdiff.count();
150
151
153 "camera position : %.1f %.1f %.1f \n"
154 "camera focal point : %.1f %.1f %.1f \n"
155 "view angle : %.1f\n"
156 "distance : %.1f\n"
157 "clip near/far : %.1f %.1f\n"
158 "parallel scale : %.1f\n"
159 "number actors : %i\n"
160 "fps : %.1f",
161 pos[0], pos[1], pos[2], foc[0], foc[1], foc[2], viewAngle, distance, near, far, parallelScale,
162 nActors, fps);
165 }
166 }