diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2014-10-08 19:34:55 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2014-10-08 20:31:07 +0400 |
commit | 14df7de9163ef6bc0a12303abed3a50697038a8c (patch) | |
tree | 6aa968c53147098341bb6dea23964d710ee62406 /source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp | |
parent | 9c97624fc966000008e940eaffe279afb2e28b07 (diff) |
D801: Freestyle: remove old and unused stroke shaders
This patch removes several stroke shaders written in C++ that are unused
and don't serve a real purpose any more. The removed shaders are:
- BPy_ColorVariationPatternShader
- BPy_StrokeTextureShader
- BPy_TextureAssignerShader
- BPy_ThicknessVariationPatternShader
- BPy_fstreamShader
- BPy_streamShader
and a few more that weren't even exposed to the Python API.
Some minor edits were made by the reviewer.
Differential Revision: https://developer.blender.org/D801
Reviewed by: kjym3
Diffstat (limited to 'source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp')
-rw-r--r-- | source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp b/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp index 274e36a4c9b..e37631e5bd6 100644 --- a/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp +++ b/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp @@ -81,20 +81,6 @@ int CalligraphicShader::shade(Stroke &ioStroke) const return 0; } -#if 0 -void TipRemoverShader::shade(Stroke &ioStroke) const -{ - StrokeInternal::StrokeVertexIterator v, vend; - for (v = ioStroke.strokeVerticesBegin(), vend = ioStroke.strokeVerticesEnd(); v != vend; ++v) { - if (((*v)->curvilinearAbscissa() < _tipLength) || - (((*v)->strokeLength() - (*v)->curvilinearAbscissa()) < _tipLength)) { - (*v)->attribute().setThickness(0.0, 0.0); - (*v)->attribute().setColor(1, 1, 1); - } - } -} -#endif - ///////////////////////////////////////// // // SPATIAL NOISE SHADER @@ -347,63 +333,4 @@ void Smoother::copyVertices() _stroke->UpdateLength(); } -#if 0 // FIXME - -///////////////////////////////////////// -// -// OMISSION SHADER -// -///////////////////////////////////////// - -OmissionShader::OmissionShader(real sizeWindow, real thrVari, real thrFlat, real lFlat) -{ - _sizeWindow = sizeWindow; - _thresholdVariation = thrVari; - _thresholdFlat = thrFlat; - _lengthFlat = lFlat; -} - -int OmissionShader::shade(Stroke &ioStroke) const -{ - Omitter omi(ioStroke); - omi.omit(_sizeWindow, _thresholdVariation, _thresholdFlat, _lengthFlat); - - return 0; -} - - -// OMITTER -/////////////////////////// - -Omitter::Omitter(Stroke &ioStroke) : Smoother(ioStroke) -{ - StrokeInternal::StrokeVertexIterator v, vend; - int i = 0; - for (v = ioStroke.strokeVerticesBegin(), vend = ioStroke.strokeVerticesEnd(); v != vend; ++v, ++i) { - _u[i] = (v)->curvilinearAbscissa(); - } -} - -void Omitter::omit(real sizeWindow, real thrVari, real thrFlat, real lFlat) -{ - _sizeWindow=sizeWindow; - _thresholdVariation=thrVari; - _thresholdFlat=thrFlat; - _lengthFlat=lFlat; - - for (int i = 1; i < _nbVertices-1; ++i) { - if (_u[i] < _lengthFlat) - continue; - // is the previous segment flat? - int j = i - 1; - while ((j >= 0) && (_u[i] - _u[j] < _lengthFlat)) { - if ((_normal[j] * _normal[i]) < _thresholdFlat) - ; // FIXME - --j; - } - } -} - -#endif - } /* namespace Freestyle */ |