Code cleanup / Cycles: Remove encasing_ratio variable, it was already hard coded...
authorThomas Dinges <blender@dingto.org>
Sun, 2 Feb 2014 18:52:46 +0000 (19:52 +0100)
committerThomas Dinges <blender@dingto.org>
Sun, 2 Feb 2014 18:53:04 +0000 (19:53 +0100)
intern/cycles/blender/blender_curves.cpp
intern/cycles/kernel/kernel_bvh.h
intern/cycles/kernel/kernel_types.h
intern/cycles/render/curves.cpp
intern/cycles/render/curves.h

index 5cde9d52d0de38bc693f31161d46696a47b8f0e3..b0e89ca1827553fd64d88add21c6389e3a3465e4 100644 (file)
@@ -743,8 +743,6 @@ void BlenderSync::sync_curve_settings()
        curve_system_manager->subdivisions = get_int(csscene, "subdivisions");
        curve_system_manager->use_backfacing = !get_boolean(csscene, "cull_backfacing");
 
-       curve_system_manager->encasing_ratio = 1.01f;
-
        if(curve_system_manager->primitive == CURVE_TRIANGLES && curve_system_manager->curve_shape == CURVE_RIBBON) {
                /* camera facing planes */
                curve_system_manager->triangle_method = CURVE_CAMERA_TRIANGLES;
index c1595f64e0d9fd90e64fd4c7c93b3d48d5714f03..9d3d9c08a3b1679846d76f3378b34e0cf0a26d3c 100644 (file)
@@ -640,8 +640,7 @@ ccl_device_inline bool bvh_curve_intersect(KernelGlobals *kg, Intersection *isec
                if(t > 0.0f && t < isect->t && z >= 0 && z <= l) {
 
                        if (flags & CURVE_KN_ENCLOSEFILTER) {
-
-                               float enc_ratio = kernel_data.curve.encasing_ratio;
+                               float enc_ratio = 1.01f;
                                if((dot(P - p1, tg) > -r1 * enc_ratio) && (dot(P - p2, tg) < r2 * enc_ratio)) {
                                        float a2 = 1.0f - (dirz*dirz*(1 + gd*gd*enc_ratio*enc_ratio));
                                        float c2 = dot(dif,dif) - difz * difz * (1 + gd*gd*enc_ratio*enc_ratio) - r1*r1*enc_ratio*enc_ratio - 2*r1*difz*gd*enc_ratio;
index 77ecc2b8dd80f7e457d9cab3c5f39746ade4b5c8..cdde0fe02919cde97bc1bf4cf704fed8435538a7 100644 (file)
@@ -869,14 +869,11 @@ typedef enum CurveFlag {
 
 typedef struct KernelCurves {
        /* strand intersect and normal parameters - many can be changed to flags */
-       float encasing_ratio;
        int curveflags;
        int subdivisions;
-       int pad1;
 
        float minimum_width;
        float maximum_width;
-       int pad2, pad3;
 } KernelCurves;
 
 typedef struct KernelBlackbody {
index 574ad4f6ca00d635417045d0c9009b88558c73fa..6e6b11ca92f878e67b12c66e6e2905d435f50351 100644 (file)
@@ -85,7 +85,6 @@ CurveSystemManager::CurveSystemManager()
        resolution = 3;
        subdivisions = 3;
 
-       encasing_ratio = 1.01f;
        minimum_width = 0.0f;
        maximum_width = 0.0f;
 
@@ -133,7 +132,6 @@ void CurveSystemManager::device_update(Device *device, DeviceScene *dscene, Scen
                if(use_encasing)
                        kcurve->curveflags |= CURVE_KN_ENCLOSEFILTER;
 
-               kcurve->encasing_ratio = encasing_ratio;
                kcurve->minimum_width = minimum_width;
                kcurve->maximum_width = maximum_width;
                kcurve->subdivisions = subdivisions;
@@ -156,7 +154,6 @@ bool CurveSystemManager::modified(const CurveSystemManager& CurveSystemManager)
                primitive == CurveSystemManager.primitive &&
                use_encasing == CurveSystemManager.use_encasing &&
                use_tangent_normal_geometry == CurveSystemManager.use_tangent_normal_geometry &&
-               encasing_ratio == CurveSystemManager.encasing_ratio &&
                minimum_width == CurveSystemManager.minimum_width &&
                maximum_width == CurveSystemManager.maximum_width &&
                use_backfacing == CurveSystemManager.use_backfacing &&
index 8020a93e77e160a28d7411ffae9b7258dd57b571..6fd0fff57fbf35e4ab679aea6002e37eb9b406a0 100644 (file)
@@ -90,7 +90,6 @@ public:
        int resolution;
        int subdivisions;
 
-       float encasing_ratio;
        float minimum_width;
        float maximum_width;