MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / ProcessCameraEffector

Method ProcessCameraEffector

ogsr_engine/xr_3da/CameraManager.cpp:355–372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

353}
354
355bool CCameraManager::ProcessCameraEffector(CEffectorCam* eff)
356{
357 // Do NOT delete effector here! It's unsafe because:
358 // 1. Leads to failed iterators in UpdateCamEffectors
359 // 2. Child classes with overrided ProcessCameraEffector would be surprised if eff becames invalid pointer
360 // The best way - return 'false' when the effector should be deleted, and delete it in ProcessCameraEffector
361
362 bool res = false;
363 if (eff->Valid() && eff->ProcessCam(m_cam_info))
364 {
365 res = true;
366 }
367 else if (eff->AllowProcessingIfInvalid())
368 {
369 eff->ProcessIfInvalid(m_cam_info);
370 }
371 return res;
372}
373
374void CCameraManager::UpdateCamEffectors()
375{

Callers

nothing calls this directly

Calls 4

ProcessIfInvalidMethod · 0.80
ValidMethod · 0.45
ProcessCamMethod · 0.45

Tested by

no test coverage detected