|
Blender V5.0
|
#include <BasicStrokeShaders.h>
Inherits Freestyle::StrokeShader.
Public Member Functions | |
| PolygonalizationShader (float iError) | |
| virtual string | getName () const |
| virtual int | shade (Stroke &stroke) const |
| Public Member Functions inherited from Freestyle::StrokeShader | |
| StrokeShader () | |
| virtual | ~StrokeShader () |
Additional Inherited Members | |
| Public Attributes inherited from Freestyle::StrokeShader | |
| void * | py_ss |
[ Geometry Shader ]. Shader to modify the Stroke geometry so that it looks more "polygonal". The basic idea is to start from the minimal stroke approximation consisting in a line joining the first vertex to the last one and to subdivide using the original stroke vertices until a certain error is reached.
Definition at line 487 of file BasicStrokeShaders.h.
|
inline |
Builds the shader.
| iError | The error we want our polygonal approximation to have with respect to the original geometry. The smaller, the closer the new stroke to the original one. This error corresponds * to the maximum distance between the new stroke and the old one. |
Definition at line 498 of file BasicStrokeShaders.h.
|
inlinevirtual |
Returns the string corresponding to the shader's name.
Reimplemented from Freestyle::StrokeShader.
Definition at line 503 of file BasicStrokeShaders.h.
|
virtual |
The shading method
Reimplemented from Freestyle::StrokeShader.
Definition at line 551 of file BasicStrokeShaders.cpp.
References Freestyle::a, b, Freestyle::StrokeShaders::CurvePiece::error(), Freestyle::VecMat::Vec< T, N >::normalize(), Freestyle::StrokeShaders::CurvePiece::size, size(), Freestyle::Stroke::strokeVerticesBegin(), Freestyle::Stroke::strokeVerticesEnd(), Freestyle::Stroke::strokeVerticesSize(), Freestyle::StrokeShaders::CurvePiece::subdivide(), Freestyle::Stroke::UpdateLength(), v, Freestyle::VecMat::Vec2< T >::x(), and Freestyle::VecMat::Vec2< T >::y().