diff options
author | Patrick Mours <pmours@nvidia.com> | 2019-08-26 18:29:06 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-08-26 18:39:57 +0300 |
commit | f6da680946e2bf982c4831c2135305cb0674215f (patch) | |
tree | 761f97b6ba45bd5f2e394dac10a276c0e0c23bf8 /intern/cycles/bvh/bvh.h | |
parent | 2dd1e6b376bf6b275f7b0053dae3910afb1c924a (diff) |
Cycles: refactor of BVH building to prepare for Optix
Ref D5363
Diffstat (limited to 'intern/cycles/bvh/bvh.h')
-rw-r--r-- | intern/cycles/bvh/bvh.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/intern/cycles/bvh/bvh.h b/intern/cycles/bvh/bvh.h index edce3ca6f2a..92082e4de86 100644 --- a/intern/cycles/bvh/bvh.h +++ b/intern/cycles/bvh/bvh.h @@ -26,11 +26,14 @@ CCL_NAMESPACE_BEGIN class Stats; +class Device; +class DeviceScene; class BVHNode; struct BVHStackEntry; class BVHParams; class BoundBox; class LeafNode; +class Mesh; class Object; class Progress; @@ -81,18 +84,25 @@ class BVH { public: PackedBVH pack; BVHParams params; + vector<Mesh *> meshes; vector<Object *> objects; - static BVH *create(const BVHParams ¶ms, const vector<Object *> &objects); + static BVH *create(const BVHParams ¶ms, + const vector<Mesh *> &meshes, + const vector<Object *> &objects); virtual ~BVH() { } virtual void build(Progress &progress, Stats *stats = NULL); + virtual void copy_to_device(Progress & /*progress*/, DeviceScene * /*dscene*/) + { + } + void refit(Progress &progress); protected: - BVH(const BVHParams ¶ms, const vector<Object *> &objects); + BVH(const BVHParams ¶ms, const vector<Mesh *> &meshes, const vector<Object *> &objects); /* Refit range of primitives. */ void refit_primitives(int start, int end, BoundBox &bbox, uint &visibility); |