From bf25f1ea96d01b513907cf3067e8e2dd3c7e41b4 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 3 Jan 2013 12:09:09 +0000 Subject: Cycles Hair: refactoring to store curves with the index of the first key and the number of keys in the curve, rather than curve segments with the indices of two keys. ShaderData.segment now stores the segment number in the curve. --- intern/cycles/kernel/kernel_types.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'intern/cycles/kernel/kernel_types.h') diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h index e80772bd4e2..2bd6b5859f3 100644 --- a/intern/cycles/kernel/kernel_types.h +++ b/intern/cycles/kernel/kernel_types.h @@ -344,6 +344,7 @@ typedef struct Intersection { float t, u, v; int prim; int object; + int segment; } Intersection; /* Attributes */ @@ -357,7 +358,7 @@ typedef enum AttributeElement { ATTR_ELEMENT_FACE, ATTR_ELEMENT_VERTEX, ATTR_ELEMENT_CORNER, - ATTR_ELEMENT_CURVE_SEGMENT, + ATTR_ELEMENT_CURVE, ATTR_ELEMENT_CURVE_KEY } AttributeElement; @@ -464,8 +465,8 @@ typedef struct ShaderData { int prim; #ifdef __HAIR__ - /* strand id if there is one, -1 otherwise */ - int curve_seg; + /* for curves, segment number in curve, ~0 for triangles */ + int segment; #endif /* parametric coordinates * - barycentric weights for triangles */ -- cgit v1.2.3