25 #include "../system/PseudoNoise.h"
26 #include "../system/RandGen.h"
38 const Vec2f &iOrientation,
60 Vec2r ori2d(-vertexOri[1], vertexOri[0]);
64 if (
_clamp && (scal < 0)) {
73 if (thickness < 0.0) {
91 float iAmount,
float ixScale,
int nbOctave,
bool smooth,
bool pureRandom)
109 Vec2r p(
v->getProjectedX(),
v->getProjectedY());
112 Vec2r p0(
v2->getProjectedX(),
v2->getProjectedY());
113 p0 = p + 2 * (p - p0);
124 Vec2r p(sv->getPoint());
129 Vec2r ori2d(vertexOri[0], vertexOri[1]);
130 ori2d =
Vec2r(p - p0);
145 sv->setPoint(p[0] +
noise[0], p[1] +
noise[1]);
164 real ifactorCurvature,
165 real iFactorCurvatureDifference,
168 real iAnisoCurvature,
169 real iCarricatureFactor)
229 real ifactorCurvature,
230 real iFactorCurvatureDifference,
233 real iAnisoCurvature,
234 real iCarricatureFactor)
244 for (
int i = 0; i < nbIteration; ++i) {
255 return exp(-
x *
x / (sigma * sigma));
303 Vec2r BA, BC, normalCurvature;
310 normalCurvature = BA + BC;
335 normalCurvature = BA + BC;
355 const Vec2r p0((
v)->getPoint());
359 (
v)->setPoint(p[0], p[1]);
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble v1
Iterators used to iterate over the elements of the Stroke.
ATTR_WARN_UNUSED_RESULT const BMVert * v2
ATTR_WARN_UNUSED_RESULT const BMVert * v
CalligraphicShader(real iMinThickness, real iMaxThickness, const Vec2f &iOrientation, bool clamp)
virtual int shade(Stroke &ioStroke) const
real turbulenceSmooth(real x, unsigned nbOctave=8)
real turbulenceLinear(real x, unsigned nbOctave=8)
void smooth(int nbIterations, real iFactorPoint, real ifactorCurvature, real iFactorCurvatureDifference, real iAnisoPoint, real iAnisoNormal, real iAnisoCurvature, real icarricatureFactor)
Smoother(Stroke &ioStroke)
real _factorCurvatureDifference
real _factorCurvatureDifference
virtual int shade(Stroke &ioStroke) const
SmoothingShader(int iNbIteration, real iFactorPoint, real ifactorCurvature, real iFactorCurvatureDifference, real iAnisoPoint, real iAnisoNormal, real iAnisoCurvature, real icarricatureFactor)
virtual int shade(Stroke &ioStroke) const
SpatialNoiseShader(float iAmount, float ixScale, int nbOctave, bool smooth, bool pureRandom)
void setThickness(float tr, float tl)
void setColor(float r, float g, float b)
const StrokeAttribute & attribute() const
float strokeLength() const
virtual Interface0DIterator verticesBegin()
int vertices_size() const
StrokeInternal::StrokeVertexIterator strokeVerticesEnd()
StrokeInternal::StrokeVertexIterator strokeVerticesBegin(float t=0.0f)
Vec< T, N > & normalizeSafe()
Vec< T, N > & normalize()
VecMat::Vec2< real > Vec2r
static const unsigned NB_VALUE_NOISE
static const real M_EPSILON
static real edgeStopping(real x, real sigma)
INLINE Rall1d< T, V, S > exp(const Rall1d< T, V, S > &arg)
static float noise(int n)
ccl_device_inline int clamp(int a, int mn, int mx)
ccl_device_inline float2 fabs(const float2 &a)