diff options
Diffstat (limited to 'chroma')
| -rw-r--r-- | chroma/bvh/__init__.py | 2 | ||||
| -rw-r--r-- | chroma/bvh/bvh.py (renamed from chroma/bvh.py) | 0 | ||||
| -rw-r--r-- | chroma/bvh/grid.py | 19 |
3 files changed, 21 insertions, 0 deletions
diff --git a/chroma/bvh/__init__.py b/chroma/bvh/__init__.py new file mode 100644 index 0000000..fa3d476 --- /dev/null +++ b/chroma/bvh/__init__.py @@ -0,0 +1,2 @@ +from chroma.bvh.bvh import * +from chroma.bvh.grid import make_recursive_grid_bvh diff --git a/chroma/bvh.py b/chroma/bvh/bvh.py index d13d285..d13d285 100644 --- a/chroma/bvh.py +++ b/chroma/bvh/bvh.py diff --git a/chroma/bvh/grid.py b/chroma/bvh/grid.py new file mode 100644 index 0000000..9fcf125 --- /dev/null +++ b/chroma/bvh/grid.py @@ -0,0 +1,19 @@ +from chroma.bvh.bvh import BVH + +def make_recursive_grid_bvh(self, mesh, bits=11): + '''Returns a binary tree BVH created using a 'recursive grid' method. + + This method is somewhat similar to the original Chroma BVH generator, + with a few adjustments: + * It is a strict binary tree, with dummy nodes inserted when + only one child is required on an inner node. + * Every triangle is boxed individually by a leaf node in the BVH + * Triangles are not rearranged in Morton order since the + leaf nodes are sorted instead. + * The GPU is used to assist in the calculation of the tree to + speed things up. + + ''' + pass + + |
