diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-05-23 03:56:42 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-05-23 03:56:42 +0400 |
commit | 7d377478c394931f1226fbbacf96e095daf18c5d (patch) | |
tree | d5fae412ade82e42bee7415d33279afc3d0b0c7e /source/blender/freestyle/intern/application | |
parent | b85985535dd420e50cc906bd6e7dd352cc2b8b97 (diff) |
New option to specify the angular threshold for detecting crease edges.
An entry "Crease Angle" has been added to the Layers tab of the Render
buttons, to allow users to specify an angle (between 0 and 180) used for
crease edge detection. An edge is considered a crease edge if the angle
between two faces sharing the edge is smaller than the threshold. The
default value is 134.43 degrees (for backward compatibility). Be aware
that a larger threshold leads to a larger number of feature edges and
thus a larger memory consumption.
Diffstat (limited to 'source/blender/freestyle/intern/application')
-rwxr-xr-x | source/blender/freestyle/intern/application/Controller.cpp | 2 | ||||
-rwxr-xr-x | source/blender/freestyle/intern/application/Controller.h | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/application/Controller.cpp b/source/blender/freestyle/intern/application/Controller.cpp index 707f4e7118c..5cf1b40a344 100755 --- a/source/blender/freestyle/intern/application/Controller.cpp +++ b/source/blender/freestyle/intern/application/Controller.cpp @@ -116,6 +116,7 @@ Controller::Controller() _ComputeSuggestive = true; _ComputeMaterialBoundaries = true; _sphereRadius = 1.0; + _creaseAngle = 134.43; init_options(); } @@ -468,6 +469,7 @@ void Controller::ComputeViewMap() edgeDetector.enableRidgesAndValleysFlag(_ComputeRidges); edgeDetector.enableSuggestiveContours(_ComputeSuggestive); edgeDetector.enableMaterialBoundaries(_ComputeMaterialBoundaries); + edgeDetector.setCreaseAngle(_creaseAngle); edgeDetector.setSphereRadius(_sphereRadius); edgeDetector.setSuggestiveContourKrDerivativeEpsilon(_suggestiveContourKrDerivativeEpsilon); edgeDetector.processShapes(*_winged_edge); diff --git a/source/blender/freestyle/intern/application/Controller.h b/source/blender/freestyle/intern/application/Controller.h index 739e49c16ca..367b57bf6c3 100755 --- a/source/blender/freestyle/intern/application/Controller.h +++ b/source/blender/freestyle/intern/application/Controller.h @@ -124,6 +124,8 @@ public: void setComputeSteerableViewMapFlag(bool iBool); bool getComputeSteerableViewMapFlag() const; + void setCreaseAngle(real angle){_creaseAngle=angle;} + real getCreaseAngle() const {return _creaseAngle;} void setSphereRadius(real s){_sphereRadius=s;} real getSphereRadius() const {return _sphereRadius;} void setSuggestiveContourKrDerivativeEpsilon(real dkr){_suggestiveContourKrDerivativeEpsilon=dkr;} @@ -225,6 +227,7 @@ private: bool _ComputeRidges; bool _ComputeSuggestive; bool _ComputeMaterialBoundaries; + real _creaseAngle; real _sphereRadius; real _suggestiveContourKrDerivativeEpsilon; |