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/mesh.h')
-rw-r--r--intern/cycles/render/mesh.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/intern/cycles/render/mesh.h b/intern/cycles/render/mesh.h
index 637143f5adf..b83752ad8df 100644
--- a/intern/cycles/render/mesh.h
+++ b/intern/cycles/render/mesh.h
@@ -50,6 +50,21 @@ public:
int v[3];
};
+ /* Mesh Curve */
+ struct Curve {
+ int first_key;
+ int num_keys;
+ uint shader;
+ uint pad;
+
+ int num_segments() { return num_keys - 1; }
+ };
+
+ struct CurveKey {
+ float3 co;
+ float radius;
+ };
+
/* Displacement */
enum DisplacementMethod {
DISPLACE_BUMP,
@@ -65,8 +80,12 @@ public:
vector<uint> shader;
vector<bool> smooth;
+ vector<CurveKey> curve_keys;
+ vector<Curve> curves;
+
vector<uint> used_shaders;
AttributeSet attributes;
+ AttributeSet curve_attributes;
BoundBox bounds;
bool transform_applied;
@@ -82,13 +101,18 @@ public:
size_t tri_offset;
size_t vert_offset;
+ size_t curve_offset;
+ size_t curvekey_offset;
+
/* Functions */
Mesh();
~Mesh();
- void reserve(int numverts, int numfaces);
+ void reserve(int numverts, int numfaces, int numcurves, int numcurvekeys);
void clear();
void add_triangle(int v0, int v1, int v2, int shader, bool smooth);
+ void add_curve_key(float3 loc, float radius);
+ void add_curve(int first_key, int num_keys, int shader);
void compute_bounds();
void add_face_normals();
@@ -96,6 +120,7 @@ public:
void pack_normals(Scene *scene, float4 *normal, float4 *vnormal);
void pack_verts(float4 *tri_verts, float4 *tri_vindex, size_t vert_offset);
+ void pack_curves(Scene *scene, float4 *curve_key_co, float4 *curve_data, size_t curvekey_offset);
void compute_bvh(SceneParams *params, Progress *progress, int n, int total);
bool need_attribute(Scene *scene, AttributeStandard std);