MCPcopy Create free account
hub / github.com/RenderKit/embree / layoutLargeNodesRecursion

Method layoutLargeNodesRecursion

kernels/bvh/bvh.cpp:94–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92
93 template<int N>
94 typename BVHN<N>::NodeRef BVHN<N>::layoutLargeNodesRecursion(NodeRef& node, const FastAllocator::CachedAllocator& allocator)
95 {
96 if (node.isBarrier()) {
97 node.clearBarrier();
98 return node;
99 }
100 else if (node.isAABBNode())
101 {
102 AABBNode* oldnode = node.getAABBNode();
103 AABBNode* newnode = (BVHN::AABBNode*) allocator.malloc0(sizeof(BVHN::AABBNode),byteNodeAlignment);
104 *newnode = *oldnode;
105 for (size_t c=0; c<N; c++)
106 newnode->child(c) = layoutLargeNodesRecursion(oldnode->child(c),allocator);
107 return encodeNode(newnode);
108 }
109 else return node;
110 }
111
112 template<int N>
113 double BVHN<N>::preBuild(const std::string& builderName)

Callers

nothing calls this directly

Calls 5

isBarrierMethod · 0.80
isAABBNodeMethod · 0.80
getAABBNodeMethod · 0.80
clearBarrierMethod · 0.45
childMethod · 0.45

Tested by

no test coverage detected