ray_tracing_gltf/hello_vulkan.cpp
void HelloVulkan::updateFrame()
{
  static nvmath::mat4f refCamMatrix;
  static float         refFov{CameraManip.getFov()};

  const auto& m   = CameraManip.getMatrix();
  const auto  fov = CameraManip.getFov();

  if(memcmp(&refCamMatrix.a00, &m.a00, sizeof(nvmath::mat4f)) != 0 || refFov != fov)
  {
    resetFrame();
    refCamMatrix = m;
    refFov       = fov;
  }
  m_pcRay.frame++;
}
//--------------------------------------------------------------------------------------------------
// If the camera matrix has changed, resets the frame.
// otherwise, increments frame.
//
If the camera matrix has changed, resets the frame.
otherwise, increments frame.
If the camera matrix has changed resets the frame . otherwise increments frame .
void HelloVulkan::updateFrame()
{
  static nvmath::mat4f refCamMatrix;
  static float         refFov{CameraManip.getFov()};
  const auto& m   = CameraManip.getMatrix();
  const auto  fov = CameraManip.getFov();
  if(memcmp(&refCamMatrix.a00, &m.a00, sizeof(nvmath::mat4f)) != 0 || refFov != fov)
  {
    resetFrame();
    refCamMatrix = m;
    refFov       = fov;
  }
  m_pcRay.frame++;
}
void HelloVulkan :: updateFrame ( ) { static nvmath :: mat4f refCamMatrix ; static float refFov { CameraManip . getFov ( ) } ; const auto & m = CameraManip . getMatrix ( ) ; const auto fov = CameraManip . getFov ( ) ; if ( memcmp ( & refCamMatrix . a00 , & m . a00 , sizeof ( nvmath :: mat4f ) ) != 0 || refFov != fov ) { resetFrame ( ) ; refCamMatrix = m ; refFov = fov ; } m_pcRay . frame ++ ; }
If the camera matrix has changed, resets the frame.
If the camera matrix has changed resets the frame .