Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/cycles/bvh/bvh.h')
-rw-r--r--intern/cycles/bvh/bvh.h48
1 files changed, 6 insertions, 42 deletions
diff --git a/intern/cycles/bvh/bvh.h b/intern/cycles/bvh/bvh.h
index 033b1fd8e04..94935c26f10 100644
--- a/intern/cycles/bvh/bvh.h
+++ b/intern/cycles/bvh/bvh.h
@@ -25,17 +25,16 @@
CCL_NAMESPACE_BEGIN
-class Stats;
-class Device;
-class DeviceScene;
+class BoundBox;
class BVHNode;
-struct BVHStackEntry;
class BVHParams;
-class BoundBox;
-class LeafNode;
+class Device;
+class DeviceScene;
class Geometry;
+class LeafNode;
class Object;
class Progress;
+class Stats;
#define BVH_ALIGN 4096
#define TRI_NODE_SIZE 3
@@ -76,13 +75,10 @@ struct PackedBVH {
}
};
-enum BVH_TYPE { bvh2 };
-
/* BVH */
class BVH {
public:
- PackedBVH pack;
BVHParams params;
vector<Geometry *> geometry;
vector<Object *> objects;
@@ -90,47 +86,15 @@ class BVH {
static BVH *create(const BVHParams &params,
const vector<Geometry *> &geometry,
const vector<Object *> &objects,
- const Device *device);
+ Device *device);
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 &params,
const vector<Geometry *> &geometry,
const vector<Object *> &objects);
-
- /* Refit range of primitives. */
- void refit_primitives(int start, int end, BoundBox &bbox, uint &visibility);
-
- /* triangles and strands */
- void pack_primitives();
- void pack_triangle(int idx, float4 storage[3]);
-
- /* merge instance BVH's */
- void pack_instances(size_t nodes_size, size_t leaf_nodes_size);
-
- /* for subclasses to implement */
- virtual void pack_nodes(const BVHNode *root) = 0;
- virtual void refit_nodes() = 0;
-
- virtual BVHNode *widen_children_nodes(const BVHNode *root) = 0;
-};
-
-/* Pack Utility */
-struct BVHStackEntry {
- const BVHNode *node;
- int idx;
-
- BVHStackEntry(const BVHNode *n = 0, int i = 0);
- int encodeIdx() const;
};
CCL_NAMESPACE_END