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/render/geometry.h')
-rw-r--r--intern/cycles/render/geometry.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/intern/cycles/render/geometry.h b/intern/cycles/render/geometry.h
index abdd851a089..7db122f69cb 100644
--- a/intern/cycles/render/geometry.h
+++ b/intern/cycles/render/geometry.h
@@ -43,6 +43,24 @@ class Shader;
class Volume;
struct PackedBVH;
+/* Flags used to determine which geometry data need to be packed. */
+enum PackFlags : uint32_t {
+ PACK_NONE = 0u,
+
+ /* Pack the geometry information (e.g. triangle or curve keys indices). */
+ PACK_GEOMETRY = (1u << 0),
+
+ /* Pack the vertices, for Meshes and Volumes' bounding meshes. */
+ PACK_VERTICES = (1u << 1),
+
+ /* Pack the visibility flags for each triangle or curve. */
+ PACK_VISIBILITY = (1u << 2),
+
+ PACK_ALL = (PACK_GEOMETRY | PACK_VERTICES | PACK_VISIBILITY),
+};
+
+PackFlags operator|=(PackFlags &pack_flags, uint32_t value);
+
/* Geometry
*
* Base class for geometric types like Mesh and Hair. */
@@ -126,7 +144,10 @@ class Geometry : public Node {
int n,
int total);
- virtual void pack_primitives(PackedBVH *pack, int object, uint visibility, bool pack_all) = 0;
+ virtual void pack_primitives(PackedBVH *pack,
+ int object,
+ uint visibility,
+ PackFlags pack_flags) = 0;
/* Check whether the geometry should have own BVH built separately. Briefly,
* own BVH is needed for geometry, if:
@@ -191,6 +212,8 @@ class GeometryManager {
TRANSFORM_MODIFIED = (1 << 10),
+ VISIBILITY_MODIFIED = (1 << 11),
+
/* tag everything in the manager for an update */
UPDATE_ALL = ~0u,