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:
authorMai Lavelle <mai.lavelle@gmail.com>2016-04-12 00:46:00 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2016-04-12 00:50:15 +0300
commit665467e51eb4af3203418568a597cec0eed47d79 (patch)
treeaac68c3f450bf0276c9e73ed209a67793a0f21f4 /intern/cycles/render/mesh.h
parentd456458e06cfdccf7c874df63faf9ffca4812555 (diff)
Cycles microdisplacement: refactor to move some tesselation code from SubdMesh to Mesh
Reviewed By: brecht Differential Revision: https://developer.blender.org/D1915
Diffstat (limited to 'intern/cycles/render/mesh.h')
-rw-r--r--intern/cycles/render/mesh.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/intern/cycles/render/mesh.h b/intern/cycles/render/mesh.h
index 57b16f7fd4e..006a4889d50 100644
--- a/intern/cycles/render/mesh.h
+++ b/intern/cycles/render/mesh.h
@@ -38,6 +38,7 @@ class Progress;
class Scene;
class SceneParams;
class AttributeRequest;
+class DiagSplit;
/* Mesh */
@@ -85,6 +86,7 @@ public:
vector<Triangle> triangles;
vector<uint> shader;
vector<bool> smooth;
+ vector<bool> forms_quad; /* used to tell if triangle is part of a quad patch */
bool has_volume; /* Set in the device_update_flags(). */
bool has_surface_bssrdf; /* Set in the device_update_flags(). */
@@ -123,8 +125,8 @@ public:
void reserve(int numverts, int numfaces, int numcurves, int numcurvekeys);
void clear();
- void set_triangle(int i, int v0, int v1, int v2, int shader, bool smooth);
- void add_triangle(int v0, int v1, int v2, int shader, bool smooth);
+ void set_triangle(int i, int v0, int v1, int v2, int shader, bool smooth, bool forms_quad = false);
+ void add_triangle(int v0, int v1, int v2, int shader, bool smooth, bool forms_quad = false);
void add_curve_key(float3 loc, float radius);
void add_curve(int first_key, int num_keys, int shader);
int split_vertex(int vertex);
@@ -157,6 +159,8 @@ public:
/* Check if the mesh should be treated as instanced. */
bool is_instanced() const;
+
+ void tessellate(DiagSplit *split);
};
/* Mesh Manager */