KSeExpr 6.0.0.0
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
KSeExpr Namespace Reference

Namespaces

namespace  Utils
 

Classes

class  CachedVoronoiFunc
 
class  CCurveFuncX
 
struct  conditional_const
 
class  Context
 
class  ControlSpec
 Generic Expression control specification. More...
 
class  Curve
 Interpolation curve class for double->double and double->Vec3D. More...
 
struct  CurveData
 
class  CurveFuncX
 
class  DExpression
 
class  Examiner
 
class  ExprAssignNode
 Node that compute a local variable assignment. More...
 
class  ExprBinaryOpNode
 Node that implements an binary operator. More...
 
class  ExprBlockNode
 Node that computes local variables before evaluating expression. More...
 
class  ExprCompareEqNode
 Node that implements a numeric/string comparison. More...
 
class  ExprCompareNode
 Node that implements a numeric comparison. More...
 
class  ExprCondNode
 Node that evaluates a conditional (if-then-else) expression. More...
 
class  ExprCurveAssignSpec
 Curve assignment expression. Assignment of curve to a variable. More...
 
class  Expression
 main expression class More...
 
class  Expressions
 
struct  ExprEvalResult
 Evaluation result. More...
 
class  ExprFunc
 Function Definition, used in parse tree and func table. More...
 
class  ExprFuncLocal
 
class  ExprFuncNode
 Node that calls a function. More...
 
class  ExprFuncSimple
 
class  ExprFuncStandard
 
class  ExprFuncX
 Extension function spec, used for complicated argument custom functions. More...
 
class  ExprIfThenElseNode
 Node that computes local variables before evaluating expression. More...
 
class  ExprLocalFunctionNode
 Node that contains local function. More...
 
class  ExprLocalVar
 ExprLocalVar reference, all local variables in seexpr are subclasses of this or this itself. More...
 
class  ExprLocalVarPhi
 ExprLocalVar join (merge) references. Remembers which variables are possible assigners to this. More...
 
class  ExprModuleNode
 Node that contains entire program. More...
 
class  ExprNode
 
class  ExprNodePolicy
 Policy which provides all the AST Types for the parser. More...
 
class  ExprNumNode
 Node that stores a numeric constant. More...
 
class  ExprPrototypeNode
 Node that contains prototype of function. More...
 
class  ExprScalarAssignSpec
 Variable equals scalar control specification. More...
 
class  ExprStrNode
 Node that stores a string. More...
 
class  ExprStrSpec
 
class  ExprSubscriptNode
 Node that evaluates a component of a vector. More...
 
class  ExprType
 
class  ExprUnaryOpNode
 NOde that computes with a single operand. More...
 
class  ExprVarEnv
 Variable scope for tracking variable lookup. More...
 
class  ExprVarEnvBuilder
 Variable scope builder is used by the type checking and code gen to track visiblity of variables and changing of. More...
 
class  ExprVarNode
 Node that references a variable. More...
 
class  ExprVarRef
 abstract class for implementing variable references More...
 
class  ExprVecNode
 Node that constructs a vector from three scalars. More...
 
class  ExprVectorAssignSpec
 Variable equals vector control specification. More...
 
class  GetVar
 
struct  GlobalFP
 
struct  GlobalStr
 
class  GlobalVal
 
class  ImageSynthExpr
 Simple image synthesizer expression class to support our function grapher.
 
class  ImageSynthRandFuncX
 
class  Interpreter
 
class  LLVMEvaluator
 
class  Loader
 
class  MapFuncX
 
class  PerformanceTimer
 
class  PrintFuncX
 
struct  Promote
 Promotes a FP[1] to FP[d]. More...
 
class  RandFuncX
 
class  SpecExaminer
 Examiner that builds a list of specs potentially used in widgets (for qdgui) More...
 
class  SPrintFuncX
 
struct  static_if
 Static conditional type true case. More...
 
struct  static_if< false, T1, T2 >
 Static conditional type false case. More...
 
class  Timer
 
class  TriplanarFuncX
 
class  TypePrintExaminer
 
class  VarBlock
 A thread local evaluation context. Just allocate and fill in with data. More...
 
class  VarBlockCreator
 A class that lets you register for the variables used by one or more expressions. More...
 
class  Vec
 
struct  VoronoiPointData
 
class  Walker
 

Typedefs

using Statistics = std::map< std::string, double >
 
using VariableHandle = std::set< GlobalVal * >::iterator
 
using VariableSetHandle = std::set< GlobalVal * >::iterator
 
using ExprHandle = std::set< DExpression * >::iterator
 
using ExprEvalHandle = std::pair< ExprHandle, std::vector< DExpression * > >
 
using ConstExaminer = Examiner< true >
 
using ConstWalker = Walker< true >
 
using Vec1d = Vec< double, 1, false >
 
using Vec2d = Vec< double, 2, false >
 
using Vec3d = Vec< double, 3, false >
 
using Vec4d = Vec< double, 4, false >
 
using Vec1f = Vec< float, 1, false >
 
using Vec2f = Vec< float, 2, false >
 
using Vec3f = Vec< float, 3, false >
 
using Vec4f = Vec< float, 4, false >
 
using Vec1dRef = Vec< double, 1, true >
 
using Vec2dRef = Vec< double, 2, true >
 
using Vec3dRef = Vec< double, 3, true >
 
using Vec4dRef = Vec< double, 4, true >
 
using Vec1fRef = Vec< float, 1, true >
 
using Vec2fRef = Vec< float, 2, true >
 
using Vec3fRef = Vec< float, 3, true >
 
using Vec4fRef = Vec< float, 4, true >
 
using Vec1dConstRef = Vec< const double, 1, true >
 
using Vec2dConstRef = Vec< const double, 2, true >
 
using Vec3dConstRef = Vec< const double, 3, true >
 
using Vec4dConstRef = Vec< const double, 4, true >
 
using Vec1fConstRef = Vec< const float, 1, true >
 
using Vec2fConstRef = Vec< const float, 2, true >
 
using Vec3fConstRef = Vec< const float, 3, true >
 
using Vec4fConstRef = Vec< const float, 4, true >
 

Enumerations

enum  ErrorCode {
  None = 0 , ExpectedStringOrFloatAnyD , ExpectedFloatAnyD , ExpectedFloatD ,
  TypeMismatch12 , ExpectedFloatOrFloat3 , ArgumentTypeMismatch , WrongNumberOfArguments ,
  WrongNumberOfArgumentsMultiple3Plus1 , WrongNumberOfArguments1Plus , FirstArgumentNotString , IncompleteFormatSpecifier ,
  UndeclaredVariable , UndeclaredFunction , BadAssignmentOperator , ConditionalTypesNotCompatible ,
  InconsistentDefinition , FunctionTooFewArguments , FunctionTooManyArguments , ExpressionIncompatibleTypes ,
  SyntaxError , UnexpectedEndOfExpression , UnexpectedEndOfFormatString , InvalidFormatString ,
  WrongNumberOfArgumentsForFormatString , Unknown
}
 

Functions

double compress (double x, double lo, double hi)
 
double expand (double x, double lo, double hi)
 
double fit (double x, double a1, double b1, double a2, double b2)
 
double gamma (double x, double g)
 
double bias (double x, double b)
 
double contrast (double x, double c)
 
double boxstep (double x, double a)
 
double linearstep (double x, double a, double b)
 
double smoothstep (double x, double a, double b)
 
double gaussstep (double x, double a, double b)
 
double remap (double x, double source, double range, double falloff, double interp)
 
double mix (double x, double y, double alpha)
 
Vec3d hsiAdjust (const Vec3d &rgb, double h, double s, double i)
 
Vec3d hsi (int n, const Vec3d *args)
 
Vec3d midhsi (int n, const Vec3d *args)
 
Vec3d rgbtohsl (const Vec3d &rgb)
 
static double hslvalue (double x, double y, double H)
 
Vec3d hsltorgb (const Vec3d &hsl)
 
static Vec3d saturate (const Vec3d &Cin, double amt)
 
Vec3d saturate (int n, const Vec3d *args)
 
double hash (int n, double *args)
 
double noise (int n, const Vec3d *args)
 
double snoise (const Vec3d &p)
 
Vec3d vnoise (const Vec3d &p)
 
Vec3d cnoise (const Vec3d &p)
 
double snoise4 (int, const Vec3d *args)
 
Vec3d vnoise4 (int, const Vec3d *args)
 
Vec3d cnoise4 (int n, const Vec3d *args)
 
double turbulence (int n, const Vec3d *args)
 
Vec3d vturbulence (int n, const Vec3d *args)
 
Vec3d cturbulence (int n, const Vec3d *args)
 
double fbm (int n, const Vec3d *args)
 
Vec3d vfbm (int n, const Vec3d *args)
 
double fbm4 (int n, const Vec3d *args)
 
Vec3d vfbm4 (int n, const Vec3d *args)
 
Vec3d cfbm (int n, const Vec3d *args)
 
Vec3d cfbm4 (int n, const Vec3d *args)
 
double cellnoise (const Vec3d &p)
 
Vec3d ccellnoise (const Vec3d &p)
 
double pnoise (const Vec3d &p, const Vec3d &period)
 
static Vec3dvoronoi_points (VoronoiPointData &data, const Vec3d &cell, double jitter)
 
static void voronoi_f1_3d (VoronoiPointData &data, const Vec3d &p, double jitter, double &f1, Vec3d &pos1)
 
static void voronoi_f1f2_3d (VoronoiPointData &data, const Vec3d &p, double jitter, double &f1, Vec3d &pos1, double &f2, Vec3d &pos2)
 
Vec3d voronoiFn (VoronoiPointData &data, int n, const Vec3d *args)
 
Vec3d cvoronoiFn (VoronoiPointData &data, int n, const Vec3d *args)
 
Vec3d pvoronoiFn (VoronoiPointData &data, int n, const Vec3d *args)
 
KSeExpr::CachedVoronoiFunc ExprFuncSimple voronoi (voronoiFn)
 
KSeExpr::CachedVoronoiFunc ExprFuncSimple cvoronoi (cvoronoiFn)
 
KSeExpr::CachedVoronoiFunc ExprFuncSimple pvoronoi (pvoronoiFn)
 
double dist (const Vec3d &a, const Vec3d &b)
 
double length (const Vec3d &v)
 
double hypot (double x, double y)
 
double dot (const Vec3d &a, const Vec3d &b)
 
Vec3d norm (const Vec3d &a)
 
Vec3d cross (const Vec3d &a, const Vec3d &b)
 
double angle (const Vec3d &a, const Vec3d &b)
 
Vec3d ortho (const Vec3d &a, const Vec3d &b)
 
Vec3d rotate (int n, const Vec3d *args)
 
Vec3d up (const Vec3d &P, const Vec3d &upvec)
 
double cycle (double index, double loRange, double hiRange)
 
double pick (int n, double *params)
 
double swatch (int n, double *params)
 
double choose (int n, double *params)
 
double wchoose (int n, double *params)
 
double spline (int n, double *params)
 
void defineBuiltins (ExprFunc::Define, ExprFunc::Define3 define3)
 
double deg (double angle)
 
double rad (double angle)
 
double cosd (double x)
 
double sind (double x)
 
double tand (double x)
 
double acosd (double x)
 
double asind (double x)
 
double atand (double x)
 
double atan2d (double y, double x)
 
double clamp (double x, double lo, double hi)
 
double round (double x)
 
double max (double x, double y)
 
double min (double x, double y)
 
double invert (double x)
 
static Expression::EvaluationStrategy chooseDefaultEvaluationStrategy ()
 
static void defineInternal (const char *name, const ExprFunc &f)
 
static void defineInternal3 (const char *name, const ExprFunc &f, const char *docString)
 
int Func0Op (int *opData, double *fp, char **c, std::vector< int > &)
 
int Func1Op (int *opData, double *fp, char **c, std::vector< int > &)
 
int Func2Op (int *opData, double *fp, char **c, std::vector< int > &)
 
int Func3Op (int *opData, double *fp, char **c, std::vector< int > &)
 
int Func4Op (int *opData, double *fp, char **c, std::vector< int > &)
 
int Func5Op (int *opData, double *fp, char **c, std::vector< int > &)
 
int Func6Op (int *opData, double *fp, char **c, std::vector< int > &)
 
int FuncNOp (int *opData, double *fp, char **c, std::vector< int > &)
 
int Func1VOp (int *opData, double *fp, char **c, std::vector< int > &)
 
int Func2VOp (int *opData, double *fp, char **c, std::vector< int > &)
 
int Func1VVOp (int *opData, double *fp, char **c, std::vector< int > &)
 
int Func2VVOp (int *opData, double *fp, char **c, std::vector< int > &)
 
int FuncNVOp (int *opData, double *fp, char **c, std::vector< int > &)
 
int FuncNVVOp (int *opData, double *fp, char **c, std::vector< int > &)
 
bool ExprParse (KSeExpr::ExprNode *&parseTree, KSeExpr::ErrorCode &errorCode, std::vector< std::string > &errorIds, int &errorStart, int &errorEnd, std::vector< std::pair< int, int > > &_comments, const KSeExpr::Expression *expr, const char *str, bool wantVec=true)
 
const ExprVarNodeisVariable (const ExprNode *testee)
 
const ExprNumNodeisScalar (const ExprNode *testee)
 
const ExprVecNodeisVector (const ExprNode *testee)
 
const ExprVecNodeisLitVec (const ExprNode *testee)
 
const ExprStrNodeisString (const ExprNode *testee)
 
const ExprAssignNodeisAssign (const ExprNode *testee)
 
const ExprFuncNodeisFunc (const ExprNode *testee)
 
const ExprFuncNodeisNamedFunc (const ExprNode *testee, const std::string &name)
 
const ExprFuncNodeisStrFunc (const ExprNode *testee)
 
bool hasCurveNumArgs (const ExprFuncNode *testee)
 
const ExprFuncNodeisCurveFunc (const ExprNode *testee)
 
const ExprFuncNodeisCcurveFunc (const ExprNode *testee)
 
const ExprAssignNodeisScalarAssign (const ExprNode *testee)
 
const ExprAssignNodeisVectorAssign (const ExprNode *testee)
 
const ExprAssignNodeisStrFuncAssign (const ExprNode *testee)
 
const ExprAssignNodeisCurveAssign (const ExprNode *testee)
 
const ExprAssignNodeisCcurveAssign (const ExprNode *testee)
 
ExprType TypeVec (int n)
 Quick way to get a vector type i.e. 3 vec is TypeVec(3)
 
template<char c, template< char c1, int d > class T>
static Interpreter::OpF getTemplatizedOp2 (int i)
 Return the function f encapsulated in class T for the dynamic i converted to a static d. (partial application of.
 
void copyVarToPromotedPosition (Interpreter *interpreter, ExprLocalVar *varSource, ExprLocalVar *varDest)
 
template<template< int d > class T, class T_FUNCTYPE = Interpreter::OpF>
T_FUNCTYPE getTemplatizedOp (int i)
 Return the function f encapsulated in class T for the dynamic i converted to a static d.
 
double s_curve (double t)
 This is the Quintic interpolant from Perlin's Improved Noise Paper.
 
template<int d>
unsigned char hashReduceChar (int index[d])
 Does a hash reduce to a character.
 
template<int d>
uint32_t hashReduce (uint32_t index[d])
 Does a hash reduce to an integer.
 
template<int d, class T , bool periodic>
T noiseHelper (const T *X, const int *period=0)
 Noise with d_in dimensional domain, 1 dimensional abcissa.
 
template<int d_in, int d_out, class T >
void CellNoise (const T *in, T *out)
 Computes cellular noise (non-interpolated piecewise constant cell random values)
 
template<int d_in, int d_out, class T >
void Noise (const T *in, T *out)
 Noise with d_in dimensional domain, d_out dimensional abcissa.
 
template<int d_in, int d_out, class T >
void PNoise (const T *in, const int *period, T *out)
 Periodic Noise with d_in dimensional domain, d_out dimensional abcissa.
 
template<int d_in, int d_out, bool turbulence, class T >
void FBM (const T *in, T *out, int octaves, T lacunarity, T gain)
 Fractional Brownian Motion. If turbulence is true then turbulence computed.
 
template void CellNoise< 3, 1, double > (const double *, double *)
 
template void CellNoise< 3, 3, double > (const double *, double *)
 
template void Noise< 1, 1, double > (const double *, double *)
 
template void Noise< 2, 1, double > (const double *, double *)
 
template void Noise< 3, 1, double > (const double *, double *)
 
template void PNoise< 3, 1, double > (const double *, const int *, double *)
 
template void Noise< 4, 1, double > (const double *, double *)
 
template void Noise< 3, 3, double > (const double *, double *)
 
template void Noise< 4, 3, double > (const double *, double *)
 
template void FBM< 3, 1, false, double > (const double *, double *, int, double, double)
 
template void FBM< 3, 1, true, double > (const double *, double *, int, double, double)
 
template void FBM< 3, 3, false, double > (const double *, double *, int, double, double)
 
template void FBM< 3, 3, true, double > (const double *, double *, int, double, double)
 
template void FBM< 4, 1, false, double > (const double *, double *, int, double, double)
 
template void FBM< 4, 3, false, double > (const double *, double *, int, double, double)
 
template<class T , size_t d, bool r>
std::ostream & operator<< (std::ostream &out, const Vec< T, d, r > &val)
 Output stream.
 
bool isWS (const char *source, int start, int end)
 Returns true if no newline separates comment and node.
 
std::string findComment (const ExprNode &node)
 Checks if there is whitespace in the range specified in the string.
 
bool loadTranslation (const QString &localeDirName)
 
void load ()
 
void loadOnMainThread ()
 

Variables

static const charfabs_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float abs(float x)\nabsolute value of x")
 
static const chardeg_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float deg(float angle)\nradians to degrees")
 
static const charrad_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float rad(float angle)\ndegrees to radians")
 
static const charcosd_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float cosd(float angle)\ncosine in degrees")
 
static const charsind_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float sind(float angle)\nsine in degrees")
 
static const chartand_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float tand(float angle)\ntangent in degrees")
 
static const characosd_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float acosd(float value)\narc cosine in degrees")
 
static const charasind_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float asind(float value)\narc sine in degrees")
 
static const charatand_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float atand(float value)\narc tangent in degrees")
 
static const charatan2d_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float atan2d(float y,float x)\narc tangent in degrees of y/x between -180 and 180")
 
static const charcos_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float cos(float angle)\ncosine in radians")
 
static const charsin_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float sin(float angle)\nsine in radians")
 
static const chartan_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float tan(float angle)\ntangent in radians")
 
static const characos_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float acos(float value)\narc cosine in radians")
 
static const charasin_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float asin(float value)\narc sine in radians")
 
static const charatan_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float atan(float value)\narc tangent in radians")
 
static const charatan2_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float atan2(float y,float x)\narc tangent in radians of y/x between -PI and PI")
 
static const charcosh_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float cosh(float angle)\nhyperbolic cosine in radians")
 
static const charsinh_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float sinh(float angle)\nhyperbolic sine in radians")
 
static const chartanh_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float tanh(float angle)\nhyperbolic tangent in radians")
 
static const characosh_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float acosh(float value)\nhyperbolic arc cosine in radians")
 
static const charasinh_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float asinh(float value)\nhyperbolic arc sine in radians")
 
static const charatanh_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float atanh(float value)\nhyperbolic arc tangent in radians")
 
static const charclamp_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float clamp(float x,float lo,float hi)\nconstrain x to range [lo,hi]")
 
static const charround_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float round(float x)\nnearest integer to x")
 
static const charmax_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float max(float a,float b)\ngreater of a and b")
 
static const charmin_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float min(float a,float b)\nlesser of a and b")
 
static const chartrunc_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float trunc(float a)\nnearest integer towards zero")
 
static const charfloor_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float floor(float a)\nnext lower integer")
 
static const charceil_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float ceil(float a)\nnext higher integer")
 
static const charinvert_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float invert(float a)\nDefined as 1-x")
 
static const charcbrt_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float cbrt(float x)\ncube root")
 
static const charsqrt_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float sqrt(float x)\nsquare root")
 
static const charexp_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float exp(float x)\nE raised to the x power")
 
static const charpow_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float pow(float x, float y)\nx to the y power, also available as ^")
 
static const charlog_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float log(float x)\nNatural logarithm")
 
static const charlog10_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float log10(float x)\nBase 10 logarithm")
 
static const charfmod_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float fmod(float x,float y)\nremainder of x/y (also available as % operator)")
 
static const charturbulence_docstring
 
static const charcturbulence_docstring
 
static const charvturbulence_docstring
 
static const charcompress_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float compress(float x,float lo,float hi)\nRemaps x in [0,1] to [lo,hi]")
 
static const charexpand_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float expand(float x,float lo,float hi)\nRemaps x in [lo,hi] to [0,1]")
 
static const charfit_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float fit(float x,float a1,float b1,float a2,float b2)\nLinearly remaps x in [a1,b1] to [a2,b2]")
 
static const chargamma_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float gamma(float x, float g)\nGamma correction of x with gamma factor g")
 
static const charbias_docstring
 
static const charcontrast_docstring
 
static const charboxstep_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float boxstep(float x,float a)\n if x < a then 0 otherwise 1")
 
static const charlinearstep_docstring
 
static const charsmoothstep_docstring
 
static const chargaussstep_docstring
 
static const charremap_docstring
 
static const charmix_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "mix(float a,float b,float alpha)\nBlend of a and b according to alpha.")
 
static const charhsi_docstring
 
static const charmidhsi_docstring
 
static const charrgbtohsl_docstring
 
static const charhsltorgb_docstring
 
static const charsaturate_docstring
 
KSeExpr::RandFuncX rand
 
static const charrand_docstring
 
static const charhash_docstring
 
static const charnoise_docstring
 
static const charsnoise_docstring
 
static const charvnoise_docstring
 
static const charcnoise_docstring
 
static const charsnoise4_docstring
 
static const charvnoise4_docstring
 
static const charcnoise4_docstring
 
static const charfbm_docstring
 
static const charvfbm_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "vector vfbm(vector vint octaves=6,float lacunarity=2,float gain=.5)")
 
static const charfbm4_docstring
 
static const charvfbm4_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "vector vfbm4(vector v,float time,int octaves=6,float lacunarity=2,float gain=.5)")
 
static const charcfbm_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "color cfbm(vector vint octaves=6,float lacunarity=2,float gain=.5)")
 
static const charcfbm4_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "color cfbm4(vector v,float time,int octaves=6,float lacunarity=2,float gain=.5)")
 
static const charcellnoise_docstring
 
static const charccellnoise_docstring
 
static const charpnoise_docstring
 
static const charvoronoi_docstring
 
static const charcvoronoi_docstring
 
static const charpvoronoi_docstring
 
static const chardist_docstring
 
static const charlength_docstring
 
static const charhypot_docstring
 
static const chardot_docstring
 
static const charnorm_docstring
 
static const charcross_docstring
 
static const charangle_docstring
 
static const charortho_docstring
 
static const charrotate_docstring
 
static const charup_docstring
 
static const charcycle_docstring
 
static const charpick_docstring
 
static const charswatch_docstring
 
static const charchoose_docstring
 
static const charwchoose_docstring
 
static const charspline_docstring
 
KSeExpr::CurveData voronoi
 
KSeExpr::CurveFuncX curve
 
static const charcurve_docstring
 
KSeExpr::CCurveFuncX ccurve
 
static const charccurve_docstring
 
KSeExpr::GetVar getVar
 
static const chargetVar_docstring
 
KSeExpr::PrintFuncX printf
 
static const charprintf_docstring
 
KSeExpr::SPrintFuncX sprintf
 
static const charsprintf_docstring
 
static std::mutex mutex
 

Typedef Documentation

◆ ConstExaminer

Definition at line 48 of file ExprWalker.h.

◆ ConstWalker

Definition at line 49 of file ExprWalker.h.

◆ ExprEvalHandle

Definition at line 17 of file ExprMultiExpr.h.

◆ ExprHandle

using KSeExpr::ExprHandle = typedef std::set<DExpression *>::iterator

Definition at line 16 of file ExprMultiExpr.h.

◆ Statistics

using KSeExpr::Statistics = typedef std::map<std::string, double>

Definition at line 16 of file ExprFuncX.h.

◆ VariableHandle

Definition at line 14 of file ExprMultiExpr.h.

◆ VariableSetHandle

Definition at line 15 of file ExprMultiExpr.h.

◆ Vec1d

Definition at line 350 of file Vec.h.

◆ Vec1dConstRef

Definition at line 366 of file Vec.h.

◆ Vec1dRef

Definition at line 358 of file Vec.h.

◆ Vec1f

Definition at line 354 of file Vec.h.

◆ Vec1fConstRef

Definition at line 370 of file Vec.h.

◆ Vec1fRef

Definition at line 362 of file Vec.h.

◆ Vec2d

Definition at line 351 of file Vec.h.

◆ Vec2dConstRef

Definition at line 367 of file Vec.h.

◆ Vec2dRef

Definition at line 359 of file Vec.h.

◆ Vec2f

Definition at line 355 of file Vec.h.

◆ Vec2fConstRef

Definition at line 371 of file Vec.h.

◆ Vec2fRef

Definition at line 363 of file Vec.h.

◆ Vec3d

Definition at line 352 of file Vec.h.

◆ Vec3dConstRef

Definition at line 368 of file Vec.h.

◆ Vec3dRef

Definition at line 360 of file Vec.h.

◆ Vec3f

Definition at line 356 of file Vec.h.

◆ Vec3fConstRef

Definition at line 372 of file Vec.h.

◆ Vec3fRef

Definition at line 364 of file Vec.h.

◆ Vec4d

Definition at line 353 of file Vec.h.

◆ Vec4dConstRef

Definition at line 369 of file Vec.h.

◆ Vec4dRef

Definition at line 361 of file Vec.h.

◆ Vec4f

Definition at line 357 of file Vec.h.

◆ Vec4fConstRef

Definition at line 373 of file Vec.h.

◆ Vec4fRef

Definition at line 365 of file Vec.h.

Enumeration Type Documentation

◆ ErrorCode

Enumerator
None 

OK.

ExpectedStringOrFloatAnyD 

"Expected String or Float[d]"

ExpectedFloatAnyD 

"Expected Float[d]"

ExpectedFloatD 

"Expected Float[" << d << "]"

TypeMismatch12 

"Type mismatch. First: " << first << " Second: " << second

ExpectedFloatOrFloat3 

"Expected float or FP[3]"

ArgumentTypeMismatch 

"Expected "<< type << " for argument, got " << childType

WrongNumberOfArguments 

"Wrong number of arguments, should be 1 to 7"

WrongNumberOfArgumentsMultiple3Plus1 

"Wrong number of arguments, should be multiple of 3 plus 1"

WrongNumberOfArguments1Plus 

"Wrong number of arguments, should be >= 1"

FirstArgumentNotString 

"First argument must be a string."

IncompleteFormatSpecifier 

"incomplete format specifier"

UndeclaredVariable 

name + " fail resolveVar" "No variable named '" << name() << "'"

UndeclaredFunction 

"Function " << _name << " has no definition"

BadAssignmentOperator 

"Assignment operation has bad type: " << _type

ConditionalTypesNotCompatible 

"Types of conditional are not compatible",

InconsistentDefinition 

"Variable " << name() << " defined in conditionals inconsistently."

FunctionTooFewArguments 

"Too few args for function " << _name

FunctionTooManyArguments 

"Too many args for function " << _name

ExpressionIncompatibleTypes 

"Expression generated type " << _parseTree->type() << " incompatible with desired type " << _desiredReturnType

SyntaxError 

Syntax error.

UnexpectedEndOfExpression 

Unexpected end of expression.

UnexpectedEndOfFormatString 

Unexpected end of format string.

InvalidFormatString 

Invalid format string, only v or f is allowed.

WrongNumberOfArgumentsForFormatString 

Wrong number of arguments for format string.

Unknown 

Unknown error (message = %1)

Definition at line 7 of file ErrorCode.h.

Function Documentation

◆ acosd()

double KSeExpr::acosd ( double  x)
inline

Definition at line 48 of file ExprBuiltins.h.

References deg().

Referenced by defineBuiltins().

◆ angle()

double KSeExpr::angle ( const Vec3d a,
const Vec3d b 
)

Definition at line 1286 of file ExprBuiltins.cpp.

References dot(), and length().

Referenced by defineBuiltins(), deg(), rad(), rotate(), and up().

◆ asind()

double KSeExpr::asind ( double  x)
inline

Definition at line 52 of file ExprBuiltins.h.

References deg().

Referenced by defineBuiltins().

◆ atan2d()

double KSeExpr::atan2d ( double  y,
double  x 
)
inline

Definition at line 60 of file ExprBuiltins.h.

References deg().

Referenced by defineBuiltins().

◆ atand()

double KSeExpr::atand ( double  x)
inline

Definition at line 56 of file ExprBuiltins.h.

References deg().

Referenced by defineBuiltins().

◆ bias()

double KSeExpr::bias ( double  x,
double  b 
)

Definition at line 108 of file ExprBuiltins.cpp.

Referenced by contrast(), and defineBuiltins().

◆ boxstep()

double KSeExpr::boxstep ( double  x,
double  a 
)

Definition at line 128 of file ExprBuiltins.cpp.

Referenced by defineBuiltins(), gaussstep(), linearstep(), and smoothstep().

◆ ccellnoise()

Vec3d KSeExpr::ccellnoise ( const Vec3d p)

Definition at line 886 of file ExprBuiltins.cpp.

References p.

Referenced by cvoronoiFn(), defineBuiltins(), and voronoi_points().

◆ CellNoise()

template<int d_in, int d_out, class T >
void KSeExpr::CellNoise ( const T in,
T out 
)

Computes cellular noise (non-interpolated piecewise constant cell random values)

Cellular noise with input and output dimensionality.

Definition at line 130 of file Noise.cpp.

References KSeExpr::Utils::floor().

◆ cellnoise()

double KSeExpr::cellnoise ( const Vec3d p)

Definition at line 874 of file ExprBuiltins.cpp.

References p.

Referenced by defineBuiltins(), and voronoiFn().

◆ CellNoise< 3, 1, double >()

◆ CellNoise< 3, 3, double >()

◆ cfbm()

Vec3d KSeExpr::cfbm ( int  n,
const Vec3d args 
)

Definition at line 862 of file ExprBuiltins.cpp.

References vfbm().

Referenced by defineBuiltins().

◆ cfbm4()

Vec3d KSeExpr::cfbm4 ( int  n,
const Vec3d args 
)

Definition at line 868 of file ExprBuiltins.cpp.

References vfbm4().

Referenced by defineBuiltins().

◆ choose()

double KSeExpr::choose ( int  n,
double params 
)

Definition at line 1420 of file ExprBuiltins.cpp.

References clamp().

Referenced by defineBuiltins(), and swatch().

◆ chooseDefaultEvaluationStrategy()

static Expression::EvaluationStrategy KSeExpr::chooseDefaultEvaluationStrategy ( )
static

◆ clamp()

double KSeExpr::clamp ( double  x,
double  lo,
double  hi 
)
inline

◆ cnoise()

Vec3d KSeExpr::cnoise ( const Vec3d p)

Definition at line 625 of file ExprBuiltins.cpp.

References p, and vnoise().

Referenced by defineBuiltins().

◆ cnoise4()

Vec3d KSeExpr::cnoise4 ( int  n,
const Vec3d args 
)

Definition at line 655 of file ExprBuiltins.cpp.

References vnoise4().

Referenced by defineBuiltins().

◆ compress()

double KSeExpr::compress ( double  x,
double  lo,
double  hi 
)

Definition at line 82 of file ExprBuiltins.cpp.

Referenced by defineBuiltins().

◆ contrast()

double KSeExpr::contrast ( double  x,
double  c 
)

Definition at line 117 of file ExprBuiltins.cpp.

References bias().

Referenced by defineBuiltins().

◆ copyVarToPromotedPosition()

void KSeExpr::copyVarToPromotedPosition ( Interpreter interpreter,
ExprLocalVar varSource,
ExprLocalVar varDest 
)

Definition at line 759 of file Interpreter.cpp.

Referenced by KSeExpr::ExprIfThenElseNode::buildInterpreter().

◆ cosd()

double KSeExpr::cosd ( double  x)
inline

Definition at line 36 of file ExprBuiltins.h.

References rad().

Referenced by defineBuiltins().

◆ cross()

Vec3d KSeExpr::cross ( const Vec3d a,
const Vec3d b 
)

Definition at line 1278 of file ExprBuiltins.cpp.

Referenced by defineBuiltins(), and ortho().

◆ cturbulence()

Vec3d KSeExpr::cturbulence ( int  n,
const Vec3d args 
)

Definition at line 719 of file ExprBuiltins.cpp.

References vturbulence().

Referenced by defineBuiltins().

◆ cvoronoi()

Referenced by defineBuiltins().

◆ cvoronoiFn()

Vec3d KSeExpr::cvoronoiFn ( VoronoiPointData data,
int  n,
const Vec3d args 
)

◆ cycle()

double KSeExpr::cycle ( double  index,
double  loRange,
double  hiRange 
)

Definition at line 1331 of file ExprBuiltins.cpp.

Referenced by defineBuiltins().

◆ defineBuiltins()

void KSeExpr::defineBuiltins ( ExprFunc::Define  ,
ExprFunc::Define3  define3 
)

◆ defineInternal()

static void KSeExpr::defineInternal ( const char name,
const ExprFunc f 
)
inlinestaticprivate

Definition at line 125 of file ExprFunc.cpp.

Referenced by KSeExpr::ExprFunc::define(), and KSeExpr::ExprFunc::initInternal().

◆ defineInternal3()

static void KSeExpr::defineInternal3 ( const char name,
const ExprFunc f,
const char docString 
)
inlinestaticprivate

Definition at line 132 of file ExprFunc.cpp.

Referenced by KSeExpr::ExprFunc::define(), and KSeExpr::ExprFunc::initInternal().

◆ deg()

double KSeExpr::deg ( double  angle)
inline

Definition at line 28 of file ExprBuiltins.h.

References angle().

Referenced by acosd(), asind(), atan2d(), atand(), and defineBuiltins().

◆ dist()

double KSeExpr::dist ( const Vec3d a,
const Vec3d b 
)

Definition at line 1231 of file ExprBuiltins.cpp.

Referenced by defineBuiltins(), voronoi_f1_3d(), and voronoi_f1f2_3d().

◆ dot()

double KSeExpr::dot ( const Vec3d a,
const Vec3d b 
)

Definition at line 1258 of file ExprBuiltins.cpp.

Referenced by angle(), and defineBuiltins().

◆ expand()

double KSeExpr::expand ( double  x,
double  lo,
double  hi 
)

Definition at line 88 of file ExprBuiltins.cpp.

Referenced by defineBuiltins().

◆ ExprParse()

bool KSeExpr::ExprParse ( KSeExpr::ExprNode *&  parseTree,
KSeExpr::ErrorCode errorCode,
std::vector< std::string > &  errorIds,
int errorStart,
int errorEnd,
std::vector< std::pair< int, int > > &  _comments,
const KSeExpr::Expression expr,
const char str,
bool  wantVec = true 
)

◆ FBM()

template<int d_in, int d_out, bool turbulence, class T >
void KSeExpr::FBM ( const T in,
T out,
int  octaves,
T  lacunarity,
T  gain 
)

Fractional Brownian Motion. If turbulence is true then turbulence computed.

Noise with d_in dimensional domain, d_out dimensional abcissa If turbulence is true then Perlin's turbulence is computed

Definition at line 181 of file Noise.cpp.

References turbulence().

◆ fbm()

double KSeExpr::fbm ( int  n,
const Vec3d args 
)

Definition at line 724 of file ExprBuiltins.cpp.

References clamp(), and p.

Referenced by defineBuiltins().

◆ fbm4()

double KSeExpr::fbm4 ( int  n,
const Vec3d args 
)

Definition at line 789 of file ExprBuiltins.cpp.

References clamp(), and p.

Referenced by defineBuiltins().

◆ FBM< 3, 1, false, double >()

template void KSeExpr::FBM< 3, 1, false, double > ( const double ,
double ,
int  ,
double  ,
double   
)

◆ FBM< 3, 1, true, double >()

template void KSeExpr::FBM< 3, 1, true, double > ( const double ,
double ,
int  ,
double  ,
double   
)

◆ FBM< 3, 3, false, double >()

template void KSeExpr::FBM< 3, 3, false, double > ( const double ,
double ,
int  ,
double  ,
double   
)

◆ FBM< 3, 3, true, double >()

template void KSeExpr::FBM< 3, 3, true, double > ( const double ,
double ,
int  ,
double  ,
double   
)

◆ FBM< 4, 1, false, double >()

template void KSeExpr::FBM< 4, 1, false, double > ( const double ,
double ,
int  ,
double  ,
double   
)

◆ FBM< 4, 3, false, double >()

template void KSeExpr::FBM< 4, 3, false, double > ( const double ,
double ,
int  ,
double  ,
double   
)

◆ findComment()

std::string KSeExpr::findComment ( const ExprNode node)
inline

◆ fit()

double KSeExpr::fit ( double  x,
double  a1,
double  b1,
double  a2,
double  b2 
)

Definition at line 96 of file ExprBuiltins.cpp.

Referenced by defineBuiltins().

◆ Func0Op()

int KSeExpr::Func0Op ( int opData,
double fp,
char **  c,
std::vector< int > &   
)

Definition at line 55 of file ExprFuncStandard.cpp.

Referenced by KSeExpr::ExprFuncStandard::buildInterpreter().

◆ Func1Op()

int KSeExpr::Func1Op ( int opData,
double fp,
char **  c,
std::vector< int > &   
)

Definition at line 59 of file ExprFuncStandard.cpp.

Referenced by KSeExpr::ExprFuncStandard::buildInterpreter().

◆ Func1VOp()

int KSeExpr::Func1VOp ( int opData,
double fp,
char **  c,
std::vector< int > &   
)

◆ Func1VVOp()

int KSeExpr::Func1VVOp ( int opData,
double fp,
char **  c,
std::vector< int > &   
)

◆ Func2Op()

int KSeExpr::Func2Op ( int opData,
double fp,
char **  c,
std::vector< int > &   
)

Definition at line 63 of file ExprFuncStandard.cpp.

Referenced by KSeExpr::ExprFuncStandard::buildInterpreter().

◆ Func2VOp()

int KSeExpr::Func2VOp ( int opData,
double fp,
char **  c,
std::vector< int > &   
)

◆ Func2VVOp()

int KSeExpr::Func2VVOp ( int opData,
double fp,
char **  c,
std::vector< int > &   
)

◆ Func3Op()

int KSeExpr::Func3Op ( int opData,
double fp,
char **  c,
std::vector< int > &   
)

Definition at line 67 of file ExprFuncStandard.cpp.

Referenced by KSeExpr::ExprFuncStandard::buildInterpreter().

◆ Func4Op()

int KSeExpr::Func4Op ( int opData,
double fp,
char **  c,
std::vector< int > &   
)

Definition at line 71 of file ExprFuncStandard.cpp.

Referenced by KSeExpr::ExprFuncStandard::buildInterpreter().

◆ Func5Op()

int KSeExpr::Func5Op ( int opData,
double fp,
char **  c,
std::vector< int > &   
)

Definition at line 76 of file ExprFuncStandard.cpp.

Referenced by KSeExpr::ExprFuncStandard::buildInterpreter().

◆ Func6Op()

int KSeExpr::Func6Op ( int opData,
double fp,
char **  c,
std::vector< int > &   
)

Definition at line 81 of file ExprFuncStandard.cpp.

Referenced by KSeExpr::ExprFuncStandard::buildInterpreter().

◆ FuncNOp()

int KSeExpr::FuncNOp ( int opData,
double fp,
char **  c,
std::vector< int > &   
)

Definition at line 86 of file ExprFuncStandard.cpp.

Referenced by KSeExpr::ExprFuncStandard::buildInterpreter().

◆ FuncNVOp()

int KSeExpr::FuncNVOp ( int opData,
double fp,
char **  c,
std::vector< int > &   
)

Definition at line 115 of file ExprFuncStandard.cpp.

Referenced by KSeExpr::ExprFuncStandard::buildInterpreter().

◆ FuncNVVOp()

int KSeExpr::FuncNVVOp ( int opData,
double fp,
char **  c,
std::vector< int > &   
)

Definition at line 123 of file ExprFuncStandard.cpp.

Referenced by KSeExpr::ExprFuncStandard::buildInterpreter().

◆ gamma()

double KSeExpr::gamma ( double  x,
double  g 
)

Definition at line 102 of file ExprBuiltins.cpp.

Referenced by defineBuiltins().

◆ gaussstep()

double KSeExpr::gaussstep ( double  x,
double  a,
double  b 
)

Definition at line 169 of file ExprBuiltins.cpp.

References boxstep().

Referenced by defineBuiltins(), and remap().

◆ getTemplatizedOp()

template<template< int d > class T, class T_FUNCTYPE = Interpreter::OpF>
T_FUNCTYPE KSeExpr::getTemplatizedOp ( int  i)

Return the function f encapsulated in class T for the dynamic i converted to a static d.

Definition at line 117 of file Interpreter.h.

◆ getTemplatizedOp2()

template<char c, template< char c1, int d > class T>
static Interpreter::OpF KSeExpr::getTemplatizedOp2 ( int  i)
static

Return the function f encapsulated in class T for the dynamic i converted to a static d. (partial application of.

Definition at line 103 of file Interpreter.cpp.

Referenced by KSeExpr::ExprUnaryOpNode::buildInterpreter(), KSeExpr::ExprCompareEqNode::buildInterpreter(), KSeExpr::ExprCompareNode::buildInterpreter(), and KSeExpr::ExprBinaryOpNode::buildInterpreter().

◆ hasCurveNumArgs()

bool KSeExpr::hasCurveNumArgs ( const ExprFuncNode testee)
inline

numChildren must be multiple of 3 plus 1

Definition at line 72 of file ExprPatterns.h.

Referenced by isCcurveFunc(), and isCurveFunc().

◆ hash()

double KSeExpr::hash ( int  n,
double args 
)

Definition at line 504 of file ExprBuiltins.cpp.

References p.

Referenced by defineBuiltins(), and pick().

◆ hashReduce()

template<int d>
uint32_t KSeExpr::hashReduce ( uint32_t  index[d])

Does a hash reduce to an integer.

Definition at line 42 of file Noise.cpp.

References p.

◆ hashReduceChar()

template<int d>
unsigned char KSeExpr::hashReduceChar ( int  index[d])

Does a hash reduce to a character.

Definition at line 24 of file Noise.cpp.

◆ hsi()

Vec3d KSeExpr::hsi ( int  n,
const Vec3d args 
)

Definition at line 243 of file ExprBuiltins.cpp.

References hsiAdjust().

Referenced by defineBuiltins().

◆ hsiAdjust()

Vec3d KSeExpr::hsiAdjust ( const Vec3d rgb,
double  h,
double  s,
double  i 
)

Definition at line 235 of file ExprBuiltins.cpp.

References hsltorgb(), and rgbtohsl().

Referenced by hsi(), and midhsi().

◆ hsltorgb()

Vec3d KSeExpr::hsltorgb ( const Vec3d hsl)

Definition at line 381 of file ExprBuiltins.cpp.

References hslvalue().

Referenced by defineBuiltins(), and hsiAdjust().

◆ hslvalue()

static double KSeExpr::hslvalue ( double  x,
double  y,
double  H 
)
static

Definition at line 367 of file ExprBuiltins.cpp.

Referenced by hsltorgb().

◆ hypot()

double KSeExpr::hypot ( double  x,
double  y 
)

Definition at line 1250 of file ExprBuiltins.cpp.

Referenced by defineBuiltins().

◆ invert()

double KSeExpr::invert ( double  x)
inline

Definition at line 84 of file ExprBuiltins.h.

Referenced by defineBuiltins().

◆ isAssign()

const ExprAssignNode * KSeExpr::isAssign ( const ExprNode testee)
inline

◆ isCcurveAssign()

const ExprAssignNode * KSeExpr::isCcurveAssign ( const ExprNode testee)
inline

if testee is an assignment statement, check if its sole child is a ccurve function

Definition at line 148 of file ExprPatterns.h.

References isAssign(), and isCcurveFunc().

◆ isCcurveFunc()

const ExprFuncNode * KSeExpr::isCcurveFunc ( const ExprNode testee)
inline

Definition at line 93 of file ExprPatterns.h.

References hasCurveNumArgs(), isLitVec(), isNamedFunc(), and isScalar().

Referenced by isCcurveAssign().

◆ isCurveAssign()

const ExprAssignNode * KSeExpr::isCurveAssign ( const ExprNode testee)
inline

if testee is an assignment statement, check if its sole child is a curve function

Definition at line 138 of file ExprPatterns.h.

References isAssign(), and isCurveFunc().

Referenced by KSeExpr::ExprCurveAssignSpec< T >::match().

◆ isCurveFunc()

const ExprFuncNode * KSeExpr::isCurveFunc ( const ExprNode testee)
inline

Definition at line 78 of file ExprPatterns.h.

References hasCurveNumArgs(), isNamedFunc(), and isScalar().

Referenced by isCurveAssign().

◆ isFunc()

const ExprFuncNode * KSeExpr::isFunc ( const ExprNode testee)
inline

Definition at line 46 of file ExprPatterns.h.

Referenced by isNamedFunc(), and isStrFunc().

◆ isLitVec()

const ExprVecNode * KSeExpr::isLitVec ( const ExprNode testee)
inline

Definition at line 27 of file ExprPatterns.h.

References isScalar(), and isVector().

Referenced by isCcurveFunc(), and isVectorAssign().

◆ isNamedFunc()

const ExprFuncNode * KSeExpr::isNamedFunc ( const ExprNode testee,
const std::string &  name 
)
inline

Definition at line 51 of file ExprPatterns.h.

References isFunc().

Referenced by isCcurveFunc(), and isCurveFunc().

◆ isScalar()

const ExprNumNode * KSeExpr::isScalar ( const ExprNode testee)
inline

Definition at line 17 of file ExprPatterns.h.

Referenced by isCcurveFunc(), isCurveFunc(), isLitVec(), and isScalarAssign().

◆ isScalarAssign()

const ExprAssignNode * KSeExpr::isScalarAssign ( const ExprNode testee)
inline

if testee is an assignment statement, check if its sole child is a scalar

Definition at line 108 of file ExprPatterns.h.

References isAssign(), and isScalar().

Referenced by KSeExpr::ExprScalarAssignSpec::match().

◆ isStrFunc()

const ExprFuncNode * KSeExpr::isStrFunc ( const ExprNode testee)
inline

Definition at line 60 of file ExprPatterns.h.

References isFunc(), isString(), and max().

Referenced by isStrFuncAssign().

◆ isStrFuncAssign()

const ExprAssignNode * KSeExpr::isStrFuncAssign ( const ExprNode testee)
inline

if testee is an assignment statement, check if its sole child is a function with a string argument

Definition at line 128 of file ExprPatterns.h.

References isAssign(), and isStrFunc().

◆ isString()

const ExprStrNode * KSeExpr::isString ( const ExprNode testee)
inline

◆ isVariable()

const ExprVarNode * KSeExpr::isVariable ( const ExprNode testee)
inline

Definition at line 12 of file ExprPatterns.h.

◆ isVector()

const ExprVecNode * KSeExpr::isVector ( const ExprNode testee)
inline

Definition at line 22 of file ExprPatterns.h.

Referenced by isLitVec().

◆ isVectorAssign()

const ExprAssignNode * KSeExpr::isVectorAssign ( const ExprNode testee)
inline

if testee is an assignment statement, check if its sole child is a vector

Definition at line 118 of file ExprPatterns.h.

References isAssign(), and isLitVec().

Referenced by KSeExpr::ExprVectorAssignSpec::match().

◆ isWS()

bool KSeExpr::isWS ( const char source,
int  start,
int  end 
)
inline

Returns true if no newline separates comment and node.

Definition at line 54 of file ControlSpec.cpp.

Referenced by findComment().

◆ length()

double KSeExpr::length ( const Vec3d v)

◆ linearstep()

double KSeExpr::linearstep ( double  x,
double  a,
double  b 
)

Definition at line 134 of file ExprBuiltins.cpp.

References boxstep().

Referenced by defineBuiltins(), and remap().

◆ load()

void KSeExpr::load ( )

Definition at line 68 of file ECMQmLoader-seexpr2_qt.cpp.

References dbgSeExpr, and loadTranslation().

Referenced by loadOnMainThread(), and KSeExpr::Loader::timerEvent().

◆ loadOnMainThread()

void KSeExpr::loadOnMainThread ( )

Definition at line 147 of file ECMQmLoader-seexpr2_qt.cpp.

References load().

◆ loadTranslation()

bool KSeExpr::loadTranslation ( const QString localeDirName)

Definition at line 31 of file ECMQmLoader-seexpr2_qt.cpp.

References dbgSeExpr.

Referenced by load().

◆ max()

double KSeExpr::max ( double  x,
double  y 
)
inline

Definition at line 74 of file ExprBuiltins.h.

References max().

Referenced by defineBuiltins(), KSeExpr::ExprFunc::ExprFunc(), isStrFunc(), and max().

◆ midhsi()

Vec3d KSeExpr::midhsi ( int  n,
const Vec3d args 
)

Definition at line 269 of file ExprBuiltins.cpp.

References hsiAdjust(), and remap().

Referenced by defineBuiltins().

◆ min()

double KSeExpr::min ( double  x,
double  y 
)
inline

Definition at line 78 of file ExprBuiltins.h.

References min().

Referenced by defineBuiltins(), KSeExpr::ExprFunc::ExprFunc(), and min().

◆ mix()

double KSeExpr::mix ( double  x,
double  y,
double  alpha 
)

Definition at line 229 of file ExprBuiltins.cpp.

Referenced by defineBuiltins().

◆ Noise()

template<int d_in, int d_out, class T >
void KSeExpr::Noise ( const T in,
T out 
)

Noise with d_in dimensional domain, d_out dimensional abcissa.

One octave of non-periodic Perlin noise.

Definition at line 146 of file Noise.cpp.

◆ noise()

double KSeExpr::noise ( int  n,
const Vec3d args 
)

Definition at line 558 of file ExprBuiltins.cpp.

References p.

Referenced by defineBuiltins().

◆ Noise< 1, 1, double >()

template void KSeExpr::Noise< 1, 1, double > ( const double ,
double  
)

◆ Noise< 2, 1, double >()

template void KSeExpr::Noise< 2, 1, double > ( const double ,
double  
)

◆ Noise< 3, 1, double >()

template void KSeExpr::Noise< 3, 1, double > ( const double ,
double  
)

◆ Noise< 3, 3, double >()

template void KSeExpr::Noise< 3, 3, double > ( const double ,
double  
)

◆ Noise< 4, 1, double >()

template void KSeExpr::Noise< 4, 1, double > ( const double ,
double  
)

◆ Noise< 4, 3, double >()

template void KSeExpr::Noise< 4, 3, double > ( const double ,
double  
)

◆ noiseHelper()

template<int d, class T , bool periodic>
T KSeExpr::noiseHelper ( const T X,
const int period = 0 
)

Noise with d_in dimensional domain, 1 dimensional abcissa.

Definition at line 69 of file Noise.cpp.

References KSeExpr::Utils::floor(), and s_curve().

◆ norm()

Vec3d KSeExpr::norm ( const Vec3d a)

Definition at line 1266 of file ExprBuiltins.cpp.

References length().

Referenced by defineBuiltins(), and ortho().

◆ operator<<()

template<class T , size_t d, bool r>
std::ostream & KSeExpr::operator<< ( std::ostream &  out,
const Vec< T, d, r > &  val 
)

Output stream.

Definition at line 340 of file Vec.h.

◆ ortho()

Vec3d KSeExpr::ortho ( const Vec3d a,
const Vec3d b 
)

Definition at line 1297 of file ExprBuiltins.cpp.

References cross(), and norm().

Referenced by defineBuiltins(), and up().

◆ pick()

double KSeExpr::pick ( int  n,
double params 
)

Definition at line 1349 of file ExprBuiltins.cpp.

References hash().

Referenced by defineBuiltins().

◆ PNoise()

template<int d_in, int d_out, class T >
void KSeExpr::PNoise ( const T in,
const int period,
T out 
)

Periodic Noise with d_in dimensional domain, d_out dimensional abcissa.

One octave of periodic noise period gives the integer period before tiles repease

Definition at line 163 of file Noise.cpp.

◆ pnoise()

double KSeExpr::pnoise ( const Vec3d p,
const Vec3d period 
)

Definition at line 898 of file ExprBuiltins.cpp.

References p.

Referenced by defineBuiltins().

◆ PNoise< 3, 1, double >()

template void KSeExpr::PNoise< 3, 1, double > ( const double ,
const int ,
double  
)

◆ pvoronoi()

Referenced by defineBuiltins().

◆ pvoronoiFn()

Vec3d KSeExpr::pvoronoiFn ( VoronoiPointData data,
int  n,
const Vec3d args 
)

Definition at line 1131 of file ExprBuiltins.cpp.

References clamp(), p, vfbm(), and voronoi_f1_3d().

◆ rad()

double KSeExpr::rad ( double  angle)
inline

Definition at line 32 of file ExprBuiltins.h.

References angle().

Referenced by cosd(), defineBuiltins(), sind(), and tand().

◆ remap()

double KSeExpr::remap ( double  x,
double  source,
double  range,
double  falloff,
double  interp 
)

Definition at line 191 of file ExprBuiltins.cpp.

References gaussstep(), linearstep(), and smoothstep().

Referenced by defineBuiltins(), and midhsi().

◆ rgbtohsl()

Vec3d KSeExpr::rgbtohsl ( const Vec3d rgb)

Definition at line 312 of file ExprBuiltins.cpp.

Referenced by defineBuiltins(), and hsiAdjust().

◆ rotate()

Vec3d KSeExpr::rotate ( int  n,
const Vec3d args 
)

◆ round()

double KSeExpr::round ( double  x)
inline

Definition at line 70 of file ExprBuiltins.h.

Referenced by defineBuiltins().

◆ s_curve()

double KSeExpr::s_curve ( double  t)

This is the Quintic interpolant from Perlin's Improved Noise Paper.

Definition at line 18 of file Noise.cpp.

Referenced by noiseHelper().

◆ saturate() [1/2]

static Vec3d KSeExpr::saturate ( const Vec3d Cin,
double  amt 
)
static

Definition at line 422 of file ExprBuiltins.cpp.

References KSeExpr::Vec< T, d, ref >::dot().

Referenced by defineBuiltins(), and saturate().

◆ saturate() [2/2]

Vec3d KSeExpr::saturate ( int  n,
const Vec3d args 
)

Definition at line 435 of file ExprBuiltins.cpp.

References saturate().

◆ sind()

double KSeExpr::sind ( double  x)
inline

Definition at line 40 of file ExprBuiltins.h.

References rad().

Referenced by defineBuiltins().

◆ smoothstep()

double KSeExpr::smoothstep ( double  x,
double  a,
double  b 
)

Definition at line 147 of file ExprBuiltins.cpp.

References boxstep().

Referenced by cvoronoiFn(), defineBuiltins(), remap(), and voronoiFn().

◆ snoise()

double KSeExpr::snoise ( const Vec3d p)

Definition at line 603 of file ExprBuiltins.cpp.

References p.

Referenced by defineBuiltins().

◆ snoise4()

double KSeExpr::snoise4 ( int  ,
const Vec3d args 
)

Definition at line 633 of file ExprBuiltins.cpp.

Referenced by defineBuiltins().

◆ spline()

double KSeExpr::spline ( int  n,
double params 
)

Definition at line 1492 of file ExprBuiltins.cpp.

References clamp(), and p.

Referenced by defineBuiltins().

◆ swatch()

double KSeExpr::swatch ( int  n,
double params 
)

Definition at line 1412 of file ExprBuiltins.cpp.

References choose().

Referenced by defineBuiltins().

◆ tand()

double KSeExpr::tand ( double  x)
inline

Definition at line 44 of file ExprBuiltins.h.

References rad().

Referenced by defineBuiltins().

◆ turbulence()

double KSeExpr::turbulence ( int  n,
const Vec3d args 
)

Definition at line 663 of file ExprBuiltins.cpp.

References clamp(), and p.

Referenced by defineBuiltins(), and FBM().

◆ TypeVec()

ExprType KSeExpr::TypeVec ( int  n)
inline

Quick way to get a vector type i.e. 3 vec is TypeVec(3)

Definition at line 293 of file ExprType.h.

References KSeExpr::ExprType::FP(), and KSeExpr::ExprType::Varying().

◆ up()

Vec3d KSeExpr::up ( const Vec3d P,
const Vec3d upvec 
)

Definition at line 1321 of file ExprBuiltins.cpp.

References angle(), ortho(), and KSeExpr::Vec< T, d, ref >::rotateBy().

Referenced by defineBuiltins().

◆ vfbm()

Vec3d KSeExpr::vfbm ( int  n,
const Vec3d args 
)

Definition at line 760 of file ExprBuiltins.cpp.

References clamp(), and p.

Referenced by cfbm(), cvoronoiFn(), defineBuiltins(), pvoronoiFn(), and voronoiFn().

◆ vfbm4()

Vec3d KSeExpr::vfbm4 ( int  n,
const Vec3d args 
)

Definition at line 829 of file ExprBuiltins.cpp.

References clamp(), and p.

Referenced by cfbm4(), and defineBuiltins().

◆ vnoise()

Vec3d KSeExpr::vnoise ( const Vec3d p)

Definition at line 614 of file ExprBuiltins.cpp.

References p.

Referenced by cnoise(), and defineBuiltins().

◆ vnoise4()

Vec3d KSeExpr::vnoise4 ( int  ,
const Vec3d args 
)

Definition at line 644 of file ExprBuiltins.cpp.

Referenced by cnoise4(), and defineBuiltins().

◆ voronoi()

◆ voronoi_f1_3d()

static void KSeExpr::voronoi_f1_3d ( VoronoiPointData data,
const Vec3d p,
double  jitter,
double f1,
Vec3d pos1 
)
static

Definition at line 935 of file ExprBuiltins.cpp.

References dist(), KSeExpr::Vec< T, d, ref >::dot(), p, and voronoi_points().

Referenced by cvoronoiFn(), pvoronoiFn(), and voronoiFn().

◆ voronoi_f1f2_3d()

static void KSeExpr::voronoi_f1f2_3d ( VoronoiPointData data,
const Vec3d p,
double  jitter,
double f1,
Vec3d pos1,
double f2,
Vec3d pos2 
)
static

Definition at line 955 of file ExprBuiltins.cpp.

References dist(), KSeExpr::Vec< T, d, ref >::dot(), p, and voronoi_points().

Referenced by cvoronoiFn(), and voronoiFn().

◆ voronoi_points()

static Vec3d * KSeExpr::voronoi_points ( VoronoiPointData data,
const Vec3d cell,
double  jitter 
)
static

◆ voronoiFn()

Vec3d KSeExpr::voronoiFn ( VoronoiPointData data,
int  n,
const Vec3d args 
)

◆ vturbulence()

Vec3d KSeExpr::vturbulence ( int  n,
const Vec3d args 
)

Definition at line 691 of file ExprBuiltins.cpp.

References clamp(), and p.

Referenced by cturbulence(), and defineBuiltins().

◆ wchoose()

double KSeExpr::wchoose ( int  n,
double params 
)

Definition at line 1435 of file ExprBuiltins.cpp.

Referenced by defineBuiltins().

Variable Documentation

◆ acos_docstring

const char* KSeExpr::acos_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float acos(float value)\narc cosine in radians")
static

Definition at line 44 of file ExprBuiltins.cpp.

◆ acosd_docstring

const char* KSeExpr::acosd_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float acosd(float value)\narc cosine in degrees")
static

Definition at line 36 of file ExprBuiltins.cpp.

◆ acosh_docstring

const char* KSeExpr::acosh_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float acosh(float value)\nhyperbolic arc cosine in radians")
static

Definition at line 52 of file ExprBuiltins.cpp.

◆ angle_docstring

const char* KSeExpr::angle_docstring
static
Initial value:
"float angle(vector a,vector b)\n"
"angle between two vectors (in radians)")
#define QT_TRANSLATE_NOOP_UTF8(scope, x)

Definition at line 1293 of file ExprBuiltins.cpp.

◆ asin_docstring

const char* KSeExpr::asin_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float asin(float value)\narc sine in radians")
static

Definition at line 45 of file ExprBuiltins.cpp.

◆ asind_docstring

const char* KSeExpr::asind_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float asind(float value)\narc sine in degrees")
static

Definition at line 37 of file ExprBuiltins.cpp.

◆ asinh_docstring

const char* KSeExpr::asinh_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float asinh(float value)\nhyperbolic arc sine in radians")
static

Definition at line 53 of file ExprBuiltins.cpp.

◆ atan2_docstring

const char* KSeExpr::atan2_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float atan2(float y,float x)\narc tangent in radians of y/x between -PI and PI")
static

Definition at line 47 of file ExprBuiltins.cpp.

◆ atan2d_docstring

const char* KSeExpr::atan2d_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float atan2d(float y,float x)\narc tangent in degrees of y/x between -180 and 180")
static

Definition at line 39 of file ExprBuiltins.cpp.

◆ atan_docstring

const char* KSeExpr::atan_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float atan(float value)\narc tangent in radians")
static

Definition at line 46 of file ExprBuiltins.cpp.

◆ atand_docstring

const char* KSeExpr::atand_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float atand(float value)\narc tangent in degrees")
static

Definition at line 38 of file ExprBuiltins.cpp.

◆ atanh_docstring

const char* KSeExpr::atanh_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float atanh(float value)\nhyperbolic arc tangent in radians")
static

Definition at line 54 of file ExprBuiltins.cpp.

◆ bias_docstring

const char* KSeExpr::bias_docstring
static
Initial value:
"float bias(float x, float g)\nVariation of gamma where values less than 0.5 pull the curve down\nand values "
"greater than 0.5 pull the curve up\npow(x,log(b)/log(0.5))")

Definition at line 113 of file ExprBuiltins.cpp.

◆ boxstep_docstring

const char* KSeExpr::boxstep_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float boxstep(float x,float a)\n if x < a then 0 otherwise 1")
static

Definition at line 132 of file ExprBuiltins.cpp.

◆ cbrt_docstring

const char* KSeExpr::cbrt_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float cbrt(float x)\ncube root")
static

Definition at line 65 of file ExprBuiltins.cpp.

◆ ccellnoise_docstring

const char* KSeExpr::ccellnoise_docstring
static
Initial value:
"color cellnoise(vector v)\n"
"cellnoise generates a field of constant colored cubes based on the integer location.\n"
"This is the same as the prman cellnoise function.")

Definition at line 893 of file ExprBuiltins.cpp.

◆ ccurve

KSeExpr::CCurveFuncX KSeExpr::ccurve

Referenced by defineBuiltins().

◆ ccurve_docstring

const char* KSeExpr::ccurve_docstring
static
Initial value:
"color curve(float param,float pos0,color val0,int interp0,float pos1,color val1,int interp1,[...])\n\n"
"Interpolates color ramp given by control points at 'param'. Control points are specified \n"
"by triples of parameters pos_i, val_i, and interp_i. Interpolation codes are \n"
"0 - none, 1 - linear, 2 - smooth, 3 - spline, \n"
"4 - monotone (non oscillating spline)")

Definition at line 1660 of file ExprBuiltins.cpp.

◆ ceil_docstring

const char* KSeExpr::ceil_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float ceil(float a)\nnext higher integer")
static

Definition at line 62 of file ExprBuiltins.cpp.

◆ cellnoise_docstring

const char* KSeExpr::cellnoise_docstring
static
Initial value:
"float cellnoise(vector v)\n"
"cellnoise generates a field of constant colored cubes based on the integer location.\n"
"This is the same as the prman cellnoise function.")

Definition at line 881 of file ExprBuiltins.cpp.

◆ cfbm4_docstring

const char* KSeExpr::cfbm4_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "color cfbm4(vector v,float time,int octaves=6,float lacunarity=2,float gain=.5)")
static

Definition at line 872 of file ExprBuiltins.cpp.

◆ cfbm_docstring

const char* KSeExpr::cfbm_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "color cfbm(vector vint octaves=6,float lacunarity=2,float gain=.5)")
static

Definition at line 866 of file ExprBuiltins.cpp.

◆ choose_docstring

const char* KSeExpr::choose_docstring
static
Initial value:
"float choose(float index,float choice1, float choice2, [...])\n"
"Chooses one of the supplied choices based on the index (assumed to be in range [0, 1]).")

Definition at line 1431 of file ExprBuiltins.cpp.

◆ clamp_docstring

const char* KSeExpr::clamp_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float clamp(float x,float lo,float hi)\nconstrain x to range [lo,hi]")
static

Definition at line 56 of file ExprBuiltins.cpp.

◆ cnoise4_docstring

const char* KSeExpr::cnoise4_docstring
static
Initial value:
"color cnoise4 ( vector v,float t)\n"
"4D color noise formed with original perlin noise at location (C2 interpolant)")

Definition at line 659 of file ExprBuiltins.cpp.

◆ cnoise_docstring

const char* KSeExpr::cnoise_docstring
static
Initial value:
"color cnoise ( vector v)\n"
"color noise formed with original perlin noise at location (C2 interpolant)")

Definition at line 629 of file ExprBuiltins.cpp.

◆ compress_docstring

const char* KSeExpr::compress_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float compress(float x,float lo,float hi)\nRemaps x in [0,1] to [lo,hi]")
static

Definition at line 86 of file ExprBuiltins.cpp.

◆ contrast_docstring

const char* KSeExpr::contrast_docstring
static
Initial value:
"float contrast(float x, float c)\nAdjust the contrast.&nbsp; For c from 0 to 0.5, the contrast is decreased.&nbsp; "
"For c &gt; 0.5, the contrast is increased.")

Definition at line 124 of file ExprBuiltins.cpp.

◆ cos_docstring

const char* KSeExpr::cos_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float cos(float angle)\ncosine in radians")
static

Definition at line 41 of file ExprBuiltins.cpp.

◆ cosd_docstring

const char* KSeExpr::cosd_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float cosd(float angle)\ncosine in degrees")
static

Definition at line 33 of file ExprBuiltins.cpp.

◆ cosh_docstring

const char* KSeExpr::cosh_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float cosh(float angle)\nhyperbolic cosine in radians")
static

Definition at line 49 of file ExprBuiltins.cpp.

◆ cross_docstring

const char* KSeExpr::cross_docstring
static
Initial value:
"vector cross(vector a,vector b)\n"
"vector cross product")

Definition at line 1282 of file ExprBuiltins.cpp.

◆ cturbulence_docstring

const char* KSeExpr::cturbulence_docstring
static
Initial value:
"color cturbulence(vector v,int octaves=6,float lacunarity=2,float gain=.5)\nAbsolute value of each noise term is "
"taken. This gives billowy appearance")

Definition at line 75 of file ExprBuiltins.cpp.

◆ curve

KSeExpr::CurveFuncX KSeExpr::curve

◆ curve_docstring

const char* KSeExpr::curve_docstring
static
Initial value:
"float curve(float param,float pos0,float val0,int interp0,float pos1,float val1,int interp1,[...])\n\n"
"Interpolates a 1D ramp defined by control points at 'param'. Control points are specified \n"
"by triples of parameters pos_i, val_i, and interp_i. Interpolation codes are \n"
"0 - none, 1 - linear, 2 - smooth, 3 - spline, \n"
"4 - monotone (non oscillating spline)")

Definition at line 1588 of file ExprBuiltins.cpp.

◆ cvoronoi_docstring

const char* KSeExpr::cvoronoi_docstring
static
Initial value:
"color cvoronoi(vector v, int type=1,float jitter=0.5, float fbmScale=0, int fbmOctaves=4,float fbmLacunarity=2, "
"float fbmGain=.5)\n"
"returns color in cellular pattern. It is a jittered variant of cellnoise.")

Definition at line 1126 of file ExprBuiltins.cpp.

◆ cycle_docstring

const char* KSeExpr::cycle_docstring
static
Initial value:
"int cycle(int index, int loRange, int hiRange )\n"
"Cycles through values between loRange and hiRange based on supplied index.\n"
"This is an offset \"mod\" function. "
"The result is computed as ``loRange + value % (hiRange-loRange+1)``.")

Definition at line 1343 of file ExprBuiltins.cpp.

◆ deg_docstring

const char* KSeExpr::deg_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float deg(float angle)\nradians to degrees")
static

Definition at line 30 of file ExprBuiltins.cpp.

◆ dist_docstring

const char* KSeExpr::dist_docstring
static
Initial value:
"float dist(vector a, vector b)\n"
"distance between two points")

Definition at line 1238 of file ExprBuiltins.cpp.

◆ dot_docstring

const char* KSeExpr::dot_docstring
static
Initial value:
"float dot(vector a,vector b)\n"
"vector dot product")

Definition at line 1262 of file ExprBuiltins.cpp.

◆ exp_docstring

const char* KSeExpr::exp_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float exp(float x)\nE raised to the x power")
static

Definition at line 67 of file ExprBuiltins.cpp.

◆ expand_docstring

const char* KSeExpr::expand_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float expand(float x,float lo,float hi)\nRemaps x in [lo,hi] to [0,1]")
static

Definition at line 94 of file ExprBuiltins.cpp.

◆ fabs_docstring

const char* KSeExpr::fabs_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float abs(float x)\nabsolute value of x")
static

Definition at line 27 of file ExprBuiltins.cpp.

◆ fbm4_docstring

const char* KSeExpr::fbm4_docstring
static
Initial value:
"float fbm4(vector v,float time,int octaves=6,float lacunarity=2,float gain=.5)\n"
"fbm (Fractal Brownian Motion) is a multi-frequency noise function. \n"
"The base frequency is the same as the \"noise\" function. The total \n"
"number of frequencies is controlled by octaves. The lacunarity is the \n"
"spacing between the frequencies - a value of 2 means each octave is \n"
"twice the previous frequency. The gain controls how much each \n"
"frequency is scaled relative to the previous frequency.")

Definition at line 820 of file ExprBuiltins.cpp.

◆ fbm_docstring

const char* KSeExpr::fbm_docstring
static
Initial value:
"float fbm(vector v,int octaves=6,float lacunarity=2,float gain=.5)\n"
"fbm (Fractal Brownian Motion) is a multi-frequency noise function. \n"
"The base frequency is the same as the \"noise\" function. The total "
"number of frequencies is controlled by octaves. The lacunarity is the "
"spacing between the frequencies - a value of 2 means each octave is "
"twice the previous frequency. The gain controls how much each "
"frequency is scaled relative to the previous frequency.")

Definition at line 751 of file ExprBuiltins.cpp.

◆ fit_docstring

const char* KSeExpr::fit_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float fit(float x,float a1,float b1,float a2,float b2)\nLinearly remaps x in [a1,b1] to [a2,b2]")
static

Definition at line 100 of file ExprBuiltins.cpp.

◆ floor_docstring

const char* KSeExpr::floor_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float floor(float a)\nnext lower integer")
static

Definition at line 61 of file ExprBuiltins.cpp.

◆ fmod_docstring

const char* KSeExpr::fmod_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float fmod(float x,float y)\nremainder of x/y (also available as % operator)")
static

Definition at line 71 of file ExprBuiltins.cpp.

◆ gamma_docstring

const char* KSeExpr::gamma_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float gamma(float x, float g)\nGamma correction of x with gamma factor g")
static

Definition at line 106 of file ExprBuiltins.cpp.

◆ gaussstep_docstring

const char* KSeExpr::gaussstep_docstring
static
Initial value:
"float gasussstep(float x,float a,float b)\n if x &lt; a then 0, if x &gt; b then 1, and\nx transitions smoothly "
"(exponentially) when a &lt; x &lt; b")

Definition at line 187 of file ExprBuiltins.cpp.

◆ getVar

KSeExpr::GetVar KSeExpr::getVar

Referenced by defineBuiltins().

◆ getVar_docstring

const char* KSeExpr::getVar_docstring
static
Initial value:
"getVar(string varName,vector defaultValue)\n"
"return value of varName if variable exists, otherwise return defaultValue")

Definition at line 1732 of file ExprBuiltins.cpp.

◆ hash_docstring

const char* KSeExpr::hash_docstring
static
Initial value:
"float hash(float seed1,[float seed2, ...])\n"
"Like rand, but with no internal seeds. Any number of seeds may be given\n"
"and the result will be a random function based on all the seeds.")

Definition at line 553 of file ExprBuiltins.cpp.

◆ hsi_docstring

const char* KSeExpr::hsi_docstring
static
Initial value:
"color hsi(color x, float h, float s, float i, float map=1)\n"
"The hsi function shifts the hue by h\n"
"(in degrees) and scales the saturation and intensity by s and i\n"
"respectively.&nbsp; A map may be supplied which will control the shift\n"
"- the full shift will happen when the map is one and no shift will\n"
"happen when the map is zero.&nbsp; The shift will be scaled back for\n"
"values between zero and one.")

Definition at line 260 of file ExprBuiltins.cpp.

◆ hsltorgb_docstring

const char* KSeExpr::hsltorgb_docstring
static
Initial value:
"color hsltorgb(color hsl)\n"
"HSL to RGB color space conversion.\n"
"HSL is Hue, Saturation, Lightness (all in range [0..1] )\n"
"These functions have also been extended to support rgb and hsl values\n"
"outside of the range [0..1] in a reasonable way.&nbsp; For any rgb or\n"
"hsl value (except for negative s values), the conversion is\n"
"well-defined and reversible.")

Definition at line 413 of file ExprBuiltins.cpp.

◆ hypot_docstring

const char* KSeExpr::hypot_docstring
static
Initial value:
"float hypot(vector v)\n"
"length of 2d vector [x,y]")

Definition at line 1254 of file ExprBuiltins.cpp.

◆ invert_docstring

const char* KSeExpr::invert_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float invert(float a)\nDefined as 1-x")
static

Definition at line 64 of file ExprBuiltins.cpp.

◆ length_docstring

const char* KSeExpr::length_docstring
static
Initial value:
"float length(vector v)\n"
"length of vector")

Definition at line 1246 of file ExprBuiltins.cpp.

◆ linearstep_docstring

const char* KSeExpr::linearstep_docstring
static
Initial value:
"float linearstep(float x, float a, float b)\n if x &lt; a then 0, if x &gt; b then 1, and\nx transitions linearly "
"when a &lt; x &lt; b")

Definition at line 143 of file ExprBuiltins.cpp.

◆ log10_docstring

const char* KSeExpr::log10_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float log10(float x)\nBase 10 logarithm")
static

Definition at line 70 of file ExprBuiltins.cpp.

◆ log_docstring

const char* KSeExpr::log_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float log(float x)\nNatural logarithm")
static

Definition at line 69 of file ExprBuiltins.cpp.

◆ max_docstring

const char* KSeExpr::max_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float max(float a,float b)\ngreater of a and b")
static

Definition at line 58 of file ExprBuiltins.cpp.

◆ midhsi_docstring

const char* KSeExpr::midhsi_docstring
static
Initial value:
"color midhsi(color x, float h, float s, float i, float map, float falloff=1, int interp=0)\n"
"The midhsi function is just like the hsi function except that\n"
"the control map is centered around the mid point (value of 0.5)\n"
"and can scale the shift in both directions.")

Definition at line 306 of file ExprBuiltins.cpp.

◆ min_docstring

const char* KSeExpr::min_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float min(float a,float b)\nlesser of a and b")
static

Definition at line 59 of file ExprBuiltins.cpp.

◆ mix_docstring

const char* KSeExpr::mix_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "mix(float a,float b,float alpha)\nBlend of a and b according to alpha.")
static

Definition at line 233 of file ExprBuiltins.cpp.

◆ mutex

std::mutex KSeExpr::mutex
staticprivate

◆ noise_docstring

const char* KSeExpr::noise_docstring
static
Initial value:
"float noise ( vector v )\n"
"float noise ( float x, float y )\n"
"float noise ( float x, float y, float z )\n"
"float noise ( float x, float y, float z, float w )\n"
"Original perlin noise at location (C2 interpolant)")

Definition at line 596 of file ExprBuiltins.cpp.

◆ norm_docstring

const char* KSeExpr::norm_docstring
static
Initial value:
"vector norm(vector v)\n"
"vector scaled to unit length")

Definition at line 1274 of file ExprBuiltins.cpp.

◆ ortho_docstring

const char* KSeExpr::ortho_docstring
static
Initial value:
"vector angle(vector a,vector b)\n"
"normalized vector orthogonal to a and b scaled to unit length")

Definition at line 1301 of file ExprBuiltins.cpp.

◆ pick_docstring

const char* KSeExpr::pick_docstring
static
Initial value:
"int pick(float index, int loRange, int hiRange, [float weights, ...] )\n"
"Picks values randomly between loRange and hiRange based on supplied index (which is\n"
"automatically hashed).&nbsp; The values will be distributed according\n"
"to the supplied weights.&nbsp; Any weights not supplied are assumed to\n"
"be 1.0.")

Definition at line 1405 of file ExprBuiltins.cpp.

◆ pnoise_docstring

const char* KSeExpr::pnoise_docstring
static
Initial value:
"float pnoise ( vector v, vector period )\n"
"periodic noise")

Definition at line 906 of file ExprBuiltins.cpp.

◆ pow_docstring

const char* KSeExpr::pow_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float pow(float x, float y)\nx to the y power, also available as ^")
static

Definition at line 68 of file ExprBuiltins.cpp.

◆ printf

KSeExpr::PrintFuncX KSeExpr::printf

Referenced by defineBuiltins().

◆ printf_docstring

const char* KSeExpr::printf_docstring
static
Initial value:
"float printf(string format,[vec0, vec1, ...])\n"
"Prints out a string to STDOUT, Format parameters allowed are \"%v\" and \"%f\".\n"
"Return parameter is empty, but must be assigned to a variable.")

Definition at line 1879 of file ExprBuiltins.cpp.

◆ pvoronoi_docstring

const char* KSeExpr::pvoronoi_docstring
static
Initial value:
"color pvoronoi(vector v, int type=1,float jitter=0.5, float fbmScale=0, int fbmOctaves=4,float fbmLacunarity=2, "
"float fbmGain=.5)\n"
"returns center of voronoi cell.")

Definition at line 1175 of file ExprBuiltins.cpp.

◆ rad_docstring

const char* KSeExpr::rad_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float rad(float angle)\ndegrees to radians")
static

Definition at line 31 of file ExprBuiltins.cpp.

◆ rand

KSeExpr::RandFuncX KSeExpr::rand

Referenced by defineBuiltins().

◆ rand_docstring

const char* KSeExpr::rand_docstring
static
Initial value:
= QT_TRANSLATE_NOOP("builtin",
"float rand ( [float min, float max], [float seed] )\n"
"Random number between [min, max] (or [0, 1] if unspecified).\n"
"If a seed is supplied, it will be used in addition to the internal seeds and may be used to create multiple distinct generators.")
#define QT_TRANSLATE_NOOP(scope, x)

Definition at line 499 of file ExprBuiltins.cpp.

Referenced by main().

◆ remap_docstring

const char* KSeExpr::remap_docstring
static
Initial value:
"remap(float x, float source, float range, float falloff, float interp)\n"
"General remapping function.\n"
"When x is within +/- <i>range</i> of source, the result is one.\n"
"The result falls to zero beyond that range over <i>falloff</i> distance.\n"
"The falloff shape is controlled by <i>interp</i>. Numeric values\n"
"or named constants may be used:\n"
"&nbsp;&nbsp;&nbsp;&nbsp;int <b>linear</b> = 0\n"
"&nbsp;&nbsp;&nbsp;&nbsp;int <b>smooth</b> = 1\n"
"&nbsp;&nbsp;&nbsp;&nbsp;int <b>gaussian</b> = 2\n")

Definition at line 218 of file ExprBuiltins.cpp.

◆ rgbtohsl_docstring

const char* KSeExpr::rgbtohsl_docstring
static
Initial value:
"color rgbtohsl(color rgb)\n"
"RGB to HSL color space conversion.\n"
"HSL is Hue, Saturation, Lightness (all in range [0..1] )\n"
"These functions have also been extended to support rgb and hsl values\n"
"outside of the range [0..1] in a reasonable way.&nbsp; For any rgb or\n"
"hsl value (except for negative s values), the conversion is\n"
"well-defined and reversible.")

Definition at line 358 of file ExprBuiltins.cpp.

◆ rotate_docstring

const char* KSeExpr::rotate_docstring
static
Initial value:
"vector rotate(vector v,vector axis,float angle)\n"
"rotates v around axis by given angle (in radians)")

Definition at line 1317 of file ExprBuiltins.cpp.

◆ round_docstring

const char* KSeExpr::round_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float round(float x)\nnearest integer to x")
static

Definition at line 57 of file ExprBuiltins.cpp.

◆ saturate_docstring

const char* KSeExpr::saturate_docstring
static
Initial value:
"color saturate(color val, float amt)\n"
"Scale saturation of color by amt.\n"
"The color is scaled around the rec709 luminance value,\n"
"and negative results are clamped at zero.\n")

Definition at line 441 of file ExprBuiltins.cpp.

◆ sin_docstring

const char* KSeExpr::sin_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float sin(float angle)\nsine in radians")
static

Definition at line 42 of file ExprBuiltins.cpp.

◆ sind_docstring

const char* KSeExpr::sind_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float sind(float angle)\nsine in degrees")
static

Definition at line 34 of file ExprBuiltins.cpp.

◆ sinh_docstring

const char* KSeExpr::sinh_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float sinh(float angle)\nhyperbolic sine in radians")
static

Definition at line 50 of file ExprBuiltins.cpp.

◆ smoothstep_docstring

const char* KSeExpr::smoothstep_docstring
static
Initial value:
"float smoothstep(float x,float a,float b)\n if x &lt; a then 0, if x &gt; b then 1, and\nx transitions smoothly "
"(cubic) when a &lt; x &lt; b")

Definition at line 165 of file ExprBuiltins.cpp.

◆ snoise4_docstring

const char* KSeExpr::snoise4_docstring
static
Initial value:
"float snoise4 ( vector v,float t)\n"
"4D signed noise w/ range -1 to 1 formed with original perlin noise at location (C2 interpolant)")

Definition at line 640 of file ExprBuiltins.cpp.

◆ snoise_docstring

const char* KSeExpr::snoise_docstring
static
Initial value:
"float snoise ( vector v)\n"
"signed noise w/ range -1 to 1 formed with original perlin noise at location (C2 interpolant)")

Definition at line 610 of file ExprBuiltins.cpp.

◆ spline_docstring

const char* KSeExpr::spline_docstring
static
Initial value:
"float spline(float param,float y1,float y2,float y3,float y4,[...])\n\n"
"Interpolates a set of values to the parameter specified where y1, ..., yn are\n"
"distributed evenly from [0..1]")

Definition at line 1509 of file ExprBuiltins.cpp.

◆ sprintf

KSeExpr::SPrintFuncX KSeExpr::sprintf

◆ sprintf_docstring

const char* KSeExpr::sprintf_docstring
static
Initial value:
"sprintf(string format, [double|string, double|string, ...])\n"
"Returns a string formatted from the given values. See 'man sprintf' for format details.")

Definition at line 1992 of file ExprBuiltins.cpp.

◆ sqrt_docstring

const char* KSeExpr::sqrt_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float sqrt(float x)\nsquare root")
static

Definition at line 66 of file ExprBuiltins.cpp.

◆ swatch_docstring

const char* KSeExpr::swatch_docstring
static
Initial value:
"color swatch(float index, color choice0, color choice1, color choice2, [...])\n"
"Chooses one of the supplied color choices based on the index (assumed to be in range [0..1]).")

Definition at line 1416 of file ExprBuiltins.cpp.

◆ tan_docstring

const char* KSeExpr::tan_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float tan(float angle)\ntangent in radians")
static

Definition at line 43 of file ExprBuiltins.cpp.

◆ tand_docstring

const char* KSeExpr::tand_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float tand(float angle)\ntangent in degrees")
static

Definition at line 35 of file ExprBuiltins.cpp.

◆ tanh_docstring

const char* KSeExpr::tanh_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float tanh(float angle)\nhyperbolic tangent in radians")
static

Definition at line 51 of file ExprBuiltins.cpp.

◆ trunc_docstring

const char* KSeExpr::trunc_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "float trunc(float a)\nnearest integer towards zero")
static

Definition at line 60 of file ExprBuiltins.cpp.

◆ turbulence_docstring

const char* KSeExpr::turbulence_docstring
static
Initial value:
"float turbulence(vector v,int octaves=6,float lacunarity=2,float gain=.5)\nAbsolute value of each noise term is "
"taken. This gives billowy appearance")

Definition at line 72 of file ExprBuiltins.cpp.

◆ up_docstring

const char* KSeExpr::up_docstring
static
Initial value:
"vector up(vector P,vector upvec)\n"
"rotates v such that the Y axis points in the given up direction")

Definition at line 1327 of file ExprBuiltins.cpp.

◆ vfbm4_docstring

const char* KSeExpr::vfbm4_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "vector vfbm4(vector v,float time,int octaves=6,float lacunarity=2,float gain=.5)")
static

Definition at line 860 of file ExprBuiltins.cpp.

◆ vfbm_docstring

const char* KSeExpr::vfbm_docstring = QT_TRANSLATE_NOOP_UTF8("builtin", "vector vfbm(vector vint octaves=6,float lacunarity=2,float gain=.5)")
static

Definition at line 787 of file ExprBuiltins.cpp.

◆ vnoise4_docstring

const char* KSeExpr::vnoise4_docstring
static
Initial value:
"vector vnoise4 ( vector v,float t)\n"
"4D vector noise formed with original perlin noise at location (C2 interpolant)")

Definition at line 651 of file ExprBuiltins.cpp.

◆ vnoise_docstring

const char* KSeExpr::vnoise_docstring
static
Initial value:
"vector vnoise ( vector v)\n"
"vector noise formed with original perlin noise at location (C2 interpolant)")

Definition at line 621 of file ExprBuiltins.cpp.

◆ voronoi

KSeExpr::CurveData KSeExpr::voronoi

Referenced by defineBuiltins().

◆ voronoi_docstring

const char* KSeExpr::voronoi_docstring
static
Initial value:
"float voronoi(vector v, int type=1,float jitter=0.5, float fbmScale=0, int fbmOctaves=4,float fbmLacunarity=2, "
"float fbmGain=.5)\n"
"voronoi is a cellular noise pattern. It is a jittered variant of cellnoise.")

Definition at line 1050 of file ExprBuiltins.cpp.

◆ vturbulence_docstring

const char* KSeExpr::vturbulence_docstring
static
Initial value:
"vector vturbulence(vector v,int octaves=6,float lacunarity=2,float gain=.5)\nAbsolute value of each noise term is "
"taken. This gives billowy appearance")

Definition at line 78 of file ExprBuiltins.cpp.

◆ wchoose_docstring

const char* KSeExpr::wchoose_docstring
static
Initial value:
"float wchoose(float index,float choice1, float weight1, float choice2, float weight2, [...] )\n"
"Chooses one of the supplied choices based on the index (assumed to be in range [0..1]).\n"
"The values will be distributed according to the supplied weights.")

Definition at line 1487 of file ExprBuiltins.cpp.