| 75 | }; |
| 76 | |
| 77 | struct RTCSceneRef |
| 78 | { |
| 79 | public: |
| 80 | mutable RTCScene scene; |
| 81 | |
| 82 | RTCSceneRef (nullptr_t) |
| 83 | : scene(nullptr) {} |
| 84 | |
| 85 | RTCSceneRef (RTCScene scene) |
| 86 | : scene(scene) {} |
| 87 | |
| 88 | ~RTCSceneRef () { |
| 89 | rtcReleaseScene(scene); |
| 90 | } |
| 91 | |
| 92 | __forceinline operator RTCScene () const { return scene; } |
| 93 | |
| 94 | __forceinline RTCSceneRef& operator= (const RTCSceneRef& in) |
| 95 | { |
| 96 | RTCScene tmp = in.scene; |
| 97 | in.scene = nullptr; |
| 98 | if (scene) rtcReleaseScene(scene); |
| 99 | scene = tmp; |
| 100 | return *this; |
| 101 | } |
| 102 | |
| 103 | __forceinline RTCSceneRef& operator= (RTCScene in) |
| 104 | { |
| 105 | if (scene) rtcReleaseScene(scene); |
| 106 | scene = in; |
| 107 | return *this; |
| 108 | } |
| 109 | |
| 110 | __forceinline RTCSceneRef& operator= (nullptr_t) |
| 111 | { |
| 112 | if (scene) rtcReleaseScene(scene); |
| 113 | scene = nullptr; |
| 114 | return *this; |
| 115 | } |
| 116 | }; |
| 117 | |
| 118 | __forceinline void clearRay(RTCRayHit& rh) |
| 119 | { |
nothing calls this directly
no test coverage detected