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:
authorKévin Dietrich <kevin.dietrich@mailoo.org>2020-08-19 16:46:50 +0300
committerKévin Dietrich <kevin.dietrich@mailoo.org>2020-08-19 16:47:09 +0300
commitaa1e4baa22b3393dc723d48061c9781f4b8b42c7 (patch)
treeabef7319b60e2a1faa5ce227ed8c73ac2d37e1f4 /intern/cycles/render/geometry.h
parent3e56dd8fd9210735c654661c8ada5a5f92623826 (diff)
Cycles : add a Volume Geometry Node
This splits the volume related data (properties for rendering and attributes) of the Mesh node into a new `Volume` node type. This `Volume` node derives from the `Mesh` class since we generate a mesh for the bounds of the volume, as such we can safely work on `Volumes` as if they were `Meshes`, e.g. for BVH creation. However such code should still check for the geometry type of the object to be `MESH` or `VOLUME` which may be bug prone if this is forgotten. This is part of T79131. Reviewed By: brecht Maniphest Tasks: T79131 Differential Revision: https://developer.blender.org/D8538
Diffstat (limited to 'intern/cycles/render/geometry.h')
-rw-r--r--intern/cycles/render/geometry.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/intern/cycles/render/geometry.h b/intern/cycles/render/geometry.h
index b0284304843..bcadb3a8051 100644
--- a/intern/cycles/render/geometry.h
+++ b/intern/cycles/render/geometry.h
@@ -40,6 +40,7 @@ class RenderStats;
class Scene;
class SceneParams;
class Shader;
+class Volume;
/* Geometry
*
@@ -52,6 +53,7 @@ class Geometry : public Node {
enum Type {
MESH,
HAIR,
+ VOLUME,
};
Type type;
@@ -166,7 +168,7 @@ class GeometryManager {
protected:
bool displace(Device *device, DeviceScene *dscene, Scene *scene, Mesh *mesh, Progress &progress);
- void create_volume_mesh(Mesh *mesh, Progress &progress);
+ void create_volume_mesh(Volume *volume, Progress &progress);
/* Attributes */
void update_osl_attributes(Device *device,