MCPcopy Create free account
hub / github.com/Kitware/VTK / LoadNextCameraPose

Method LoadNextCameraPose

Rendering/OpenVR/vtkOpenVROverlay.cxx:181–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179}
180
181void vtkOpenVROverlay::LoadNextCameraPose()
182{
183 if (this->SavedCameraPoses.empty())
184 {
185 return;
186 }
187
188 int nextValue = -1;
189 int firstValue = this->LastCameraPoseIndex;
190 // find the next pose index in the map
191 for (auto p : this->SavedCameraPoses)
192 {
193 firstValue = std::min(p.first, firstValue);
194 if (p.first > this->LastCameraPoseIndex)
195 {
196 nextValue = p.first;
197 // is there anything lower than nextValue but still larger than current
198 for (auto p2 : this->SavedCameraPoses)
199 {
200 if (p2.first > this->LastCameraPoseIndex && p2.first < nextValue)
201 {
202 nextValue = p2.first;
203 }
204 }
205 break;
206 }
207 }
208
209 if (nextValue == -1)
210 {
211 nextValue = firstValue;
212 }
213
214 this->LoadCameraPose(nextValue);
215}
216
217void vtkOpenVROverlay::Show()
218{

Callers 2

OnNextPose3DMethod · 0.45
EndLoadCamPoseMethod · 0.45

Calls 3

LoadCameraPoseMethod · 0.95
minFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected