Blender
V3.3
|
#include <BasicStrokeShaders.h>
Public Member Functions | |
PolygonalizationShader (float iError) | |
virtual string | getName () const |
virtual int | shade (Stroke &stroke) const |
![]() | |
StrokeShader () | |
virtual | ~StrokeShader () |
Additional Inherited Members | |
![]() | |
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 495 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 506 of file BasicStrokeShaders.h.
|
inlinevirtual |
Returns the string corresponding to the shader's name.
Reimplemented from Freestyle::StrokeShader.
Definition at line 511 of file BasicStrokeShaders.h.
|
virtual |
The shading method
Reimplemented from Freestyle::StrokeShader.
Definition at line 540 of file BasicStrokeShaders.cpp.
References Freestyle::a, usdtokens::b(), Freestyle::StrokeShaders::CurvePiece::error(), Freestyle::VecMat::Vec< T, N >::normalize(), offset, size(), Freestyle::StrokeShaders::CurvePiece::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().