godot/thirdparty/embree/kernels/common/rtcore.h

// Copyright 2009-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0

#pragma once

#include "../../include/embree4/rtcore.h"
RTC_NAMESPACE_USE

namespace embree
{  
  /*! decoding of intersection flags */
  __forceinline bool isCoherent  (RTCRayQueryFlags flags) {}
  __forceinline bool isIncoherent(RTCRayQueryFlags flags) {}

/*! Macros used in the rtcore API implementation */
// -- GODOT start --
#define RTC_CATCH_BEGIN
#define RTC_CATCH_END(device)
#define RTC_CATCH_END2(scene)
#define RTC_CATCH_END2_FALSE(scene)
#if 0
// -- GODOT end --
#define RTC_CATCH_BEGIN
  
#define RTC_CATCH_END
  
#define RTC_CATCH_END2

#define RTC_CATCH_END2_FALSE

#endif
  
#define RTC_VERIFY_HANDLE(handle)

#define RTC_VERIFY_GEOMID(id)

#define RTC_VERIFY_UPPER(id,upper)

#define RTC_VERIFY_RANGE(id,lower,upper)
  
#if 0 // enable to debug print all API calls
#define RTC_TRACE
#else
#define RTC_TRACE(x) 
#endif

// -- GODOT start --
#if 0
  /*! used to throw embree API errors */
  struct rtcore_error : public std::exception
  {
    __forceinline rtcore_error(RTCError error, const std::string& str)
      : error(error), str(str) {}
    
    ~rtcore_error() throw() {}
    
    const char* what () const throw () {
      return str.c_str();
    }
    
    RTCError error;
    std::string str;
  };
#endif

#if defined(DEBUG) // only report file and line in debug mode
  #define throw_RTCError
    // throw rtcore_error(error,std::string(__FILE__) + " (" + toString(__LINE__) + "): " + std::string(str));
#else
  #define throw_RTCError(error,str)
    // throw rtcore_error(error,str);
#endif
// -- GODOT end --

#define RTC_BUILD_ARGUMENTS_HAS(settings,member)

  
  inline void storeTransform(const AffineSpace3fa& space, RTCFormat format, float* xfm)
  {}
}