| 1 | // Copyright 2009-2021 Intel Corporation | 
| 2 | // SPDX-License-Identifier: Apache-2.0 | 
| 3 |  | 
| 4 | #pragma once | 
| 5 |  | 
| 6 | #include "bvh.h" | 
| 7 |  | 
| 8 | namespace embree | 
| 9 | { | 
| 10 |   namespace isa  | 
| 11 |   {  | 
| 12 |     template<int N> | 
| 13 |     class BVHNRotate | 
| 14 |     { | 
| 15 |       typedef typename BVHN<N>::NodeRef NodeRef; | 
| 16 |  | 
| 17 |     public: | 
| 18 |       static const bool enabled = false; | 
| 19 |  | 
| 20 |       static __forceinline size_t rotate(NodeRef parentRef, size_t depth = 1) { return 0; } | 
| 21 |       static __forceinline void restructure(NodeRef ref, size_t depth = 1) {} | 
| 22 |     }; | 
| 23 |  | 
| 24 |     /* BVH4 tree rotations */ | 
| 25 |     template<> | 
| 26 |     class BVHNRotate<4> | 
| 27 |     { | 
| 28 |       typedef BVH4::AABBNode AABBNode; | 
| 29 |       typedef BVH4::NodeRef NodeRef; | 
| 30 |        | 
| 31 |     public: | 
| 32 |       static const bool enabled = true; | 
| 33 |  | 
| 34 |       static size_t rotate(NodeRef parentRef, size_t depth = 1); | 
| 35 |     }; | 
| 36 |   } | 
| 37 | } | 
| 38 |  |