11 #include "../system/PseudoNoise.h"
12 #include "../system/RandGen.h"
24 const Vec2f &iOrientation,
46 Vec2r ori2d(-vertexOri[1], vertexOri[0]);
50 if (
_clamp && (scal < 0)) {
59 if (thickness < 0.0) {
77 float iAmount,
float ixScale,
int nbOctave,
bool smooth,
bool pureRandom)
95 Vec2r p(
v->getProjectedX(),
v->getProjectedY());
98 Vec2r p0(
v2->getProjectedX(),
v2->getProjectedY());
99 p0 = p + 2 * (p - p0);
110 Vec2r p(sv->getPoint());
115 Vec2r ori2d(vertexOri[0], vertexOri[1]);
116 ori2d =
Vec2r(p - p0);
131 sv->setPoint(p[0] +
noise[0], p[1] +
noise[1]);
150 real ifactorCurvature,
151 real iFactorCurvatureDifference,
154 real iAnisoCurvature,
155 real iCarricatureFactor)
215 real ifactorCurvature,
216 real iFactorCurvatureDifference,
219 real iAnisoCurvature,
220 real iCarricatureFactor)
230 for (
int i = 0; i < nbIteration; ++i) {
241 return exp(-
x *
x / (sigma * sigma));
289 Vec2r BA, BC, normalCurvature;
296 normalCurvature = BA + BC;
321 normalCurvature = BA + BC;
341 const Vec2r p0((
v)->getPoint());
345 (
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()
ccl_device_inline float2 fabs(const float2 &a)
ccl_device_inline float3 exp(float3 v)
VecMat::Vec2< real > Vec2r
static const unsigned NB_VALUE_NOISE
static const real M_EPSILON
static real edgeStopping(real x, real sigma)
T clamp(const T &a, const T &min, const T &max)
static float noise(int n)
smooth(Type::FLOAT, "mask_weight")