/disk1/scratch/aselle/projects/seexpr/SeExpr/src/SeExpr/SeExprBuiltins.cpp File Reference

#include <cassert>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <algorithm>
#include <cfloat>
#include "SeExprFunc.h"
#include "SeExprNode.h"
#include "SeVec3d.h"
#include "SeCurve.h"
#include "SeExprBuiltins.h"
#include "SePlatform.h"
#include "SeNoise.h"

Go to the source code of this file.

Classes

struct  SeExpr::VoronoiPointData
class  SeExpr::CachedVoronoiFunc
struct  SeExpr::CurveData< T >
class  SeExpr::CurveFuncX
class  SeExpr::CCurveFuncX
class  SeExpr::PrintFuncX
struct  SeExpr::PrintFuncX::Data

Namespaces

namespace  SeExpr

Defines

#define __STDC_LIMIT_MACROS
#define FUNCADOC(name, func)   define3(name, SeExprFunc(::func),func##_docstring)
#define FUNCDOC(func)   define3(#func, SeExprFunc(::func),func##_docstring)
#define FUNCDOC(func)   define3(#func, SeExprFunc(SeExpr::func),func##_docstring)
#define FUNCNDOC(func, min, max)   define3(#func, SeExprFunc(SeExpr::func, min, max),func##_docstring)

Functions

double SeExpr::compress (double x, double lo, double hi)
double SeExpr::expand (double x, double lo, double hi)
double SeExpr::fit (double x, double a1, double b1, double a2, double b2)
double SeExpr::gamma (double x, double g)
double SeExpr::bias (double x, double b)
double SeExpr::contrast (double x, double c)
double SeExpr::boxstep (double x, double a)
double SeExpr::linearstep (double x, double a, double b)
double SeExpr::smoothstep (double x, double a, double b)
double SeExpr::gaussstep (double x, double a, double b)
double SeExpr::remap (double x, double source, double range, double falloff, double interp)
double SeExpr::mix (double x, double y, double alpha)
SeVec3d SeExpr::satAdjust (const SeVec3d &rgb, double s, double i)
SeVec3d SeExpr::hsiAdjust (const SeVec3d &rgb, double h, double s, double i)
SeVec3d SeExpr::hsi (int n, const SeVec3d *args)
SeVec3d SeExpr::midhsi (int n, const SeVec3d *args)
SeVec3d SeExpr::rgbtohsl (const SeVec3d &rgb)
static double SeExpr::hslvalue (double x, double y, double H)
SeVec3d SeExpr::hsltorgb (const SeVec3d &hsl)
static SeVec3d SeExpr::saturate (const SeVec3d &Cin, double amt)
SeVec3d SeExpr::saturate (int n, const SeVec3d *args)
double SeExpr::hash (int n, double *args)
double SeExpr::noise (int n, const SeVec3d *args)
double SeExpr::snoise (const SeVec3d &p)
SeVec3d SeExpr::vnoise (const SeVec3d &p)
SeVec3d SeExpr::cnoise (const SeVec3d &p)
double SeExpr::snoise4 (int, const SeVec3d *args)
SeVec3d SeExpr::vnoise4 (int, const SeVec3d *args)
SeVec3d SeExpr::cnoise4 (int n, const SeVec3d *args)
double SeExpr::turbulence (int n, const SeVec3d *args)
SeVec3d SeExpr::vturbulence (int n, const SeVec3d *args)
SeVec3d SeExpr::cturbulence (int n, const SeVec3d *args)
double SeExpr::fbm (int n, const SeVec3d *args)
SeVec3d SeExpr::vfbm (int n, const SeVec3d *args)
double SeExpr::fbm4 (int n, const SeVec3d *args)
SeVec3d SeExpr::vfbm4 (int n, const SeVec3d *args)
SeVec3d SeExpr::cfbm (int n, const SeVec3d *args)
SeVec3d SeExpr::cfbm4 (int n, const SeVec3d *args)
double SeExpr::cellnoise (const SeVec3d &p)
SeVec3d SeExpr::ccellnoise (const SeVec3d &p)
double SeExpr::pnoise (const SeVec3d &p, const SeVec3d &period)
static SeVec3dSeExpr::voronoi_points (VoronoiPointData &data, const SeVec3d &cell, double jitter)
static void SeExpr::voronoi_f1_3d (VoronoiPointData &data, const SeVec3d &p, double jitter, double &f1, SeVec3d &pos1)
static void SeExpr::voronoi_f1f2_3d (VoronoiPointData &data, const SeVec3d &p, double jitter, double &f1, SeVec3d &pos1, double &f2, SeVec3d &pos2)
SeVec3d SeExpr::voronoiFn (VoronoiPointData &data, int n, const SeVec3d *args)
SeVec3d SeExpr::cvoronoiFn (VoronoiPointData &data, int n, const SeVec3d *args)
SeVec3d SeExpr::pvoronoiFn (VoronoiPointData &data, int n, const SeVec3d *args)
double SeExpr::dist (double ax, double ay, double az, double bx, double by, double bz)
double SeExpr::length (const SeVec3d &v)
double SeExpr::hypot (double x, double y)
double SeExpr::dot (const SeVec3d &a, const SeVec3d &b)
SeVec3d SeExpr::norm (const SeVec3d &a)
SeVec3d SeExpr::cross (const SeVec3d &a, const SeVec3d &b)
double SeExpr::angle (const SeVec3d &a, const SeVec3d &b)
SeVec3d SeExpr::ortho (const SeVec3d &a, const SeVec3d &b)
SeVec3d SeExpr::rotate (int n, const SeVec3d *args)
SeVec3d SeExpr::up (const SeVec3d &P, const SeVec3d &upvec)
double SeExpr::cycle (double index, double loRange, double hiRange)
double SeExpr::pick (int n, double *params)
double SeExpr::choose (int n, double *params)
double SeExpr::wchoose (int n, double *params)
double SeExpr::spline (int n, double *params)
void SeExpr::defineBuiltins (SeExprFunc::Define, SeExprFunc::Define3 define3)

Variables

static const char * SeExpr::fabs_docstring = "float abs(float x)\nabsolute value of x"
static const char * SeExpr::deg_docstring = "float deg(float angle)\nradians to degrees"
static const char * SeExpr::rad_docstring = "float deg(float angle)\ndegrees to radians"
static const char * SeExpr::cosd_docstring = "float cosd(float angle)\ncosine in degrees"
static const char * SeExpr::sind_docstring = "float sind(float angle)\nsine in degrees"
static const char * SeExpr::tand_docstring = "float tand(float angle)\ntangent in degrees"
static const char * SeExpr::acosd_docstring = "float acosd(float angle)\narc cosine in degrees"
static const char * SeExpr::asind_docstring = "float asind(float angle)\narc sine in degrees"
static const char * SeExpr::atand_docstring = "float atand(float angle)\narc tangent in degrees"
static const char * SeExpr::atan2d_docstring = "float atan2d(float y,float x)\narc tangent in degrees of y/x between -180 and 180"
static const char * SeExpr::cos_docstring = "float cos(float angle)\ncosine in radians"
static const char * SeExpr::sin_docstring = "float sin(float angle)\nsine in radians"
static const char * SeExpr::tan_docstring = "float tan(float angle)\ntangent in radians"
static const char * SeExpr::acos_docstring = "float acos(float angle)\narc cosine in radians"
static const char * SeExpr::asin_docstring = "float asin(float angle)\narc sine in radians"
static const char * SeExpr::atan_docstring = "float atan(float angle)\narc tangent in radians"
static const char * SeExpr::atan2_docstring = "float atan2(float y,float x)\narc tangent in radians of y/x between -PI and PI"
static const char * SeExpr::cosh_docstring = "float cosh(float angle)\nhyperbolic cosine in radians"
static const char * SeExpr::sinh_docstring = "float sinh(float angle)\nhyperbolic sine in radians"
static const char * SeExpr::tanh_docstring = "float tanh(float angle)\nhyperbolic tangent in radians"
static const char * SeExpr::acosh_docstring = "float acosh(float angle)\nhyperbolic arc cosine in radians"
static const char * SeExpr::asinh_docstring = "float asinh(float angle)\nhyperbolic arc sine in radians"
static const char * SeExpr::atanh_docstring = "float atanh(float angle)\nhyperbolic arc tangent in radians"
static const char * SeExpr::clamp_docstring = "float clamp(float x,float lo,float hi)\nconstrain x to range [lo,hi]"
static const char * SeExpr::round_docstring = "float round(float x)\nconstrain x to range [lo,hi]"
static const char * SeExpr::max_docstring = "float max(float a,float b)\ngreater of a and b"
static const char * SeExpr::min_docstring = "float min(float a,float b)\nlesser of a and b"
static const char * SeExpr::trunc_docstring = "float trunc(float a)\nnearest integer towards zero"
static const char * SeExpr::floor_docstring = "float floor(float a)\nnext lower integer"
static const char * SeExpr::ceil_docstring = "float ceil(float a)\nnext higher integer"
static const char * SeExpr::invert_docstring = "float invert(float a)\nDefined as 1-x"
static const char * SeExpr::cbrt_docstring = "float cbrt(float x)\ncube root"
static const char * SeExpr::sqrt_docstring = "float sqrt(float x)\nsquare root"
static const char * SeExpr::exp_docstring = "float exp(float x)\nE raised to the x power"
static const char * SeExpr::pow_docstring = "float pow(float x)\nx to the y power, also available as ^"
static const char * SeExpr::log_docstring = "float log(float x)\nNatural logarithm"
static const char * SeExpr::log10_docstring = "float log10(float x)\nBase 10 logarithm"
static const char * SeExpr::fmod_docstring = "float fmod(float x,float y)\nremainder of x/y (also available as % operator)"
static const char * SeExpr::turbulence_docstring = "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"
static const char * SeExpr::cturbulence_docstring = "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"
static const char * SeExpr::vturbulence_docstring = "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"
static const char * SeExpr::compress_docstring = "float compress(float x,float lo,float hi)\nRemaps x in [0,1] to [lo,hi]"
static const char * SeExpr::expand_docstring = "float expand(float x,float lo,float hi)\nRemaps x in [lo,hi] to [0,1]"
static const char * SeExpr::fit_docstring = "float fit(float x,float a1,float b1,float a2,float b2)\nLinearly remaps x from the range [a1,b1] to the range [a2,b2]\n\nNote: This extrapolates if x is outside [a1,b1]\nTo clamp the result, use fit(x,a1,b1,a2,b2)->clamp(a2,b2)"
static const char * SeExpr::gamma_docstring = "float gamma(float x, float g)\nGamma correction of x with gamma factor g"
static const char * SeExpr::bias_docstring = "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))"
static const char * SeExpr::contrast_docstring = "float contrast(float x,float x)\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."
static const char * SeExpr::boxstep_docstring = "float boxstep(float x,float a)\n if x < a then 0 otherwise 1"
static const char * SeExpr::linearstep_docstring = "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 &lt; x &lt; b "
static const char * SeExpr::smoothstep_docstring = "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 &lt; x &lt; b"
static const char * SeExpr::gaussstep_docstring = "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 &lt; x &lt; b"
static const char * SeExpr::remap_docstring
static const char * SeExpr::mix_docstring = "mix(float a,float b,float alpha)\nBlend of a and b according to alpha."
static const char * SeExpr::hsi_docstring
static const char * SeExpr::midhsi_docstring
static const char * SeExpr::rgbtohsl_docstring
static const char * SeExpr::hsltorgb_docstring
static const char * SeExpr::saturate_docstring
static const char * SeExpr::hash_docstring
static const char * SeExpr::noise_docstring
static const char * SeExpr::snoise_docstring
static const char * SeExpr::vnoise_docstring
static const char * SeExpr::cnoise_docstring
static const char * SeExpr::snoise4_docstring
static const char * SeExpr::vnoise4_docstring
static const char * SeExpr::cnoise4_docstring
static const char * SeExpr::fbm_docstring
static const char * SeExpr::vfbm_docstring = "vector vfbm(vector vint octaves=6,float lacunarity=2,float gain=.5)"
static const char * SeExpr::fbm4_docstring
static const char * SeExpr::vfbm4_docstring = "vector vfbm4(vector v,float time,int octaves=6,float lacunarity=2,float gain=.5)"
static const char * SeExpr::cfbm_docstring = "color cfbm(vector vint octaves=6,float lacunarity=2,float gain=.5)"
static const char * SeExpr::cfbm4_docstring = "color cfbm4(vector v,float time,int octaves=6,float lacunarity=2,float gain=.5)"
static const char * SeExpr::cellnoise_docstring
static const char * SeExpr::ccellnoise_docstring
static const char * SeExpr::pnoise_docstring
static const char * SeExpr::voronoi_docstring
static const char * SeExpr::cvoronoi_docstring
static const char * SeExpr::pvoronoi_docstring
SeExpr::CachedVoronoiFunc SeExpr::voronoiFn
SeExpr::CachedVoronoiFunc SeExpr::cvoronoiFn
SeExpr::CachedVoronoiFunc SeExpr::pvoronoiFn
static const char * SeExpr::dist_docstring
static const char * SeExpr::length_docstring
static const char * SeExpr::hypot_docstring
static const char * SeExpr::dot_docstring
static const char * SeExpr::norm_docstring
static const char * SeExpr::cross_docstring
static const char * SeExpr::angle_docstring
static const char * SeExpr::ortho_docstring
static const char * SeExpr::rotate_docstring
static const char * SeExpr::up_docstring
static const char * SeExpr::cycle_docstring
static const char * SeExpr::pick_docstring
static const char * SeExpr::choose_docstring
static const char * SeExpr::wchoose_docstring
static const char * SeExpr::spline_docstring
SeExpr::CurveFuncX SeExpr::curve
static const char * SeExpr::curve_docstring
SeExpr::CCurveFuncX SeExpr::ccurve
static const char * SeExpr::ccurve_docstring
SeExpr::PrintFuncX SeExpr::printf
static const char * SeExpr::printf_docstring

Define Documentation

#define __STDC_LIMIT_MACROS

Definition at line 11 of file SeExprBuiltins.cpp.

#define FUNCADOC ( name,
func   )     define3(name, SeExprFunc(::func),func##_docstring)
#define FUNCDOC ( func   )     define3(#func, SeExprFunc(SeExpr::func),func##_docstring)
#define FUNCDOC ( func   )     define3(#func, SeExprFunc(::func),func##_docstring)
#define FUNCNDOC ( func,
min,
max   )     define3(#func, SeExprFunc(SeExpr::func, min, max),func##_docstring)

Generated on 25 Jul 2013 for SeExpr by  doxygen 1.6.1