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

Function vtkSessionResetCamera

Serialization/Manager/vtkSession.cxx:328–352  ·  view source on GitHub ↗

-------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

326
327 //-------------------------------------------------------------------------------
328 vtkSessionResult vtkSessionResetCamera(vtkSession session, vtkObjectHandle object)
329 {
330 auto objectImpl = session->Manager->GetObjectAtId(object);
331#if VTK_MODULE_ENABLE_VTK_RenderingCore
332 if (auto* renderer = vtkRenderer::SafeDownCast(objectImpl))
333 {
334 renderer->ResetCamera();
335 return vtkSessionResultSuccess;
336 }
337 else if (objectImpl != nullptr)
338 {
339 vtkLog(ERROR, << "Object " << objectImpl->GetObjectDescription() << " at id=" << object
340 << " is not a vtkRenderer!");
341 }
342 else
343 {
344 vtkLog(TRACE, << "Object at id=" << object << " is null");
345 }
346 return vtkSessionResultFailure;
347#else
348 (void)objectImpl;
349 vtkLog(ERROR, << "VTK_RenderingCore module is not enabled. Cannot reset camera.");
350 return vtkSessionResultFailure;
351#endif
352 }
353
354 //-------------------------------------------------------------------------------
355 vtkSessionResult vtkSessionStartEventLoop(vtkSession session, vtkObjectHandle object)

Callers 1

ResetCameraMethod · 0.85

Calls 3

GetObjectAtIdMethod · 0.45
ResetCameraMethod · 0.45
GetObjectDescriptionMethod · 0.45

Tested by

no test coverage detected