texutil.h File Reference

texutil.h File Reference

#include "coreexp.h"
#include "point2.h"
#include "point3.h"
#include "acolor.h"

Macros

#define MAX_OCTAVES   50
 
#define NOISE(p)   ((1.0f+noise3DS(p))*.5f)
 
#define MAX_CELL_LEVELS   20
 

Functions

CoreExport float bias (float a, float b)
 
CoreExport float gain (float a, float b)
 
CoreExport float clamp (float x, float a, float b)
 
CoreExport float boxstep (float a, float b, float x)
 
CoreExport float smoothstep (float a, float b, float x)
 
CoreExport float mod (float x, float m)
 
CoreExport int mod (int x, int m)
 
CoreExport float sramp (float x, float a, float b, float d)
 
CoreExport float threshold (float x, float a, float b)
 
CoreExport void setdebug (int i)
 
CoreExport float noise1 (float arg)
 
CoreExport float noise2 (Point2 p)
 
CoreExport float noise3 (Point3 p)
 
CoreExport float noise4 (Point3 p, float time)
 
CoreExport float noise3DS (Point3 p)
 
CoreExport float turbulence (Point3 &p, float freq)
 
CoreExport int Perm (int v)
 
CoreExport float fBm1 (float point, float H, float lacunarity, float octaves)
 
CoreExport float fBm1 (Point2 point, float H, float lacunarity, float octaves)
 
CoreExport float fBm1 (Point3 point, float H, float lacunarity, float octaves)
 
CoreExport float spline (float x, int nknots, float *knot)
 
CoreExport Color color_spline (float x, int nknots, Color *knot)
 
int FLOOR (float x)
 
float frac (float x)
 
float fmax (float x, float y)
 
float fmin (float x, float y)
 
AColor AComp (AColor cbot, AColor ctop)
 
CoreExport void CellFunction (Point3 v, int n, float *dist, int *celIDs=NULL, Point3 *grads=NULL, float gradSmooth=0.0f)
 
CoreExport void FractalCellFunction (Point3 v, float iterations, float lacunarity, int n, float *dist, int *celIDs=NULL, Point3 *grads=NULL, float gradSmooth=0.0f)
 
CoreExport float RandFromCellID (int id)
 

Macro Definition Documentation

#define MAX_OCTAVES   50
#define NOISE (   p)    ((1.0f+noise3DS(p))*.5f)
#define MAX_CELL_LEVELS   20

Function Documentation

CoreExport float bias ( float  a,
float  b 
)
CoreExport float gain ( float  a,
float  b 
)
CoreExport float clamp ( float  x,
float  a,
float  b 
)
CoreExport float boxstep ( float  a,
float  b,
float  x 
)
CoreExport float smoothstep ( float  a,
float  b,
float  x 
)
CoreExport float mod ( float  x,
float  m 
)
CoreExport int mod ( int  x,
int  m 
)
CoreExport float sramp ( float  x,
float  a,
float  b,
float  d 
)
CoreExport float threshold ( float  x,
float  a,
float  b 
)
CoreExport void setdebug ( int  i)
CoreExport float noise1 ( float  arg)
CoreExport float noise2 ( Point2  p)
CoreExport float noise3 ( Point3  p)
CoreExport float noise4 ( Point3  p,
float  time 
)
CoreExport float noise3DS ( Point3  p)
CoreExport float turbulence ( Point3 p,
float  freq 
)
CoreExport int Perm ( int  v)
CoreExport float fBm1 ( float  point,
float  H,
float  lacunarity,
float  octaves 
)
CoreExport float fBm1 ( Point2  point,
float  H,
float  lacunarity,
float  octaves 
)
CoreExport float fBm1 ( Point3  point,
float  H,
float  lacunarity,
float  octaves 
)
CoreExport float spline ( float  x,
int  nknots,
float *  knot 
)
CoreExport Color color_spline ( float  x,
int  nknots,
Color knot 
)
int FLOOR ( float  x)
inline
71 { return ((int)(x) - ((int)(x)>(x)? 1:0)); }
controller mat max min numsubs x z controller keys x z controller keys x
Definition: generics.inl:211
float frac ( float  x)
inline
73 { return x - (float)FLOOR(x); }
controller mat max min numsubs x z controller keys x z controller keys x
Definition: generics.inl:211
int FLOOR(float x)
Definition: texutil.h:71
float fmax ( float  x,
float  y 
)
inline
74 { return x>y?x:y; }
controller mat max min numsubs x z controller keys x z controller keys x
Definition: generics.inl:211
float fmin ( float  x,
float  y 
)
inline
75 { return x<y?x:y; }
controller mat max min numsubs x z controller keys x z controller keys x
Definition: generics.inl:211
AColor AComp ( AColor  cbot,
AColor  ctop 
)
inline
81  {
82  float ia = 1.0f - ctop.a;
83  return (ctop + ia*cbot);
84  }
float a
Definition: acolor.h:36
CoreExport void CellFunction ( Point3  v,
int  n,
float *  dist,
int celIDs = NULL,
Point3 grads = NULL,
float  gradSmooth = 0.0f 
)
CoreExport void FractalCellFunction ( Point3  v,
float  iterations,
float  lacunarity,
int  n,
float *  dist,
int celIDs = NULL,
Point3 grads = NULL,
float  gradSmooth = 0.0f 
)
CoreExport float RandFromCellID ( int  id)