TEXTURES.C File Reference

Go to the source code of this file.

Defines

#define MODULE_TEXTUR2
#define MINX   -10000
#define MINY   MINX
#define MINZ   MINX
#define max_noise   10
#define NRIPPLES   10
#define MAXSIZE   267
#define RNDMASK   0x7FFF
#define RNDDIVISOR   (double) RNDMASK
#define NUMBER_OF_WAVES   10
#define SINTABSIZE   1000
#define EPSILON   (double) 0.00001
#define FLOOR(x)   ((x) >= 0.0 ? floor(x) : (0.0 - floor(0.0 - (x)) - 1.0))
#define FABS(x)   ((x) < 0.0 ? (0.0 - x) : (x))
#define SCURVE(a)   ((a)*(a)*(3.0-2.0*(a)))
#define REALSCALE   ( 2.0 / 65535.0 )
#define Hash3d(a, b, c)
#define INCRSUM(m, s, x, y, z)

Functions

void FreeTextureHashTable (void)
short InitialiseNoise (void)
void Snoise2 (double x, double y, double z, double *r)
void Dnoise2 (vector result, double x, double y, double z)
void STurbulence (double x, double y, double z, double *r)
void DTurbulence (vector result, double x, double y, double z)
void Cycloidal (double value, double *r)
double Triangle_Wave (double value)
void init_ripples (void)
void calcripple (vector point, vector wave_centre, double wave_propagate, double wave_wavelength, double wave_drag, double wave_amplitude, vector ripple)
void Ocean (vector p0, vector Groundn, vector gn)
BOOL GetInternalTexture (matl *Mat, double alpha, double beta, double gamma, long textID, vector p, vector n, long obj, face *f, double *colors, double *colort, long *flag_trans, double tr, double *tr1, long trace_relection_depth, long trace_refraction_depth, long refractive_flag)

Variables

vector Wave_Sources [NUMBER_OF_WAVES]
double Rip_Freq = 10000.0


Define Documentation

#define MODULE_TEXTUR2

Definition at line 7 of file TEXTURES.C.

#define MINX   -10000

Definition at line 17 of file TEXTURES.C.

Referenced by Dnoise2(), and Snoise2().

#define MINY   MINX

Definition at line 18 of file TEXTURES.C.

Referenced by Dnoise2(), and Snoise2().

#define MINZ   MINX

Definition at line 19 of file TEXTURES.C.

Referenced by Dnoise2(), and Snoise2().

#define max_noise   10

Definition at line 21 of file TEXTURES.C.

#define NRIPPLES   10

Definition at line 22 of file TEXTURES.C.

Referenced by init_ripples(), and Ocean().

#define MAXSIZE   267

Definition at line 23 of file TEXTURES.C.

#define RNDMASK   0x7FFF

Definition at line 24 of file TEXTURES.C.

Referenced by InitialiseNoise().

#define RNDDIVISOR   (double) RNDMASK

Definition at line 25 of file TEXTURES.C.

Referenced by InitialiseNoise().

#define NUMBER_OF_WAVES   10

Definition at line 26 of file TEXTURES.C.

Referenced by InitialiseNoise().

#define SINTABSIZE   1000

Definition at line 27 of file TEXTURES.C.

Referenced by Cycloidal(), and InitialiseNoise().

#define EPSILON   (double) 0.00001

Definition at line 28 of file TEXTURES.C.

#define FLOOR ( x   )     ((x) >= 0.0 ? floor(x) : (0.0 - floor(0.0 - (x)) - 1.0))

Definition at line 30 of file TEXTURES.C.

#define FABS ( x   )     ((x) < 0.0 ? (0.0 - x) : (x))

Definition at line 31 of file TEXTURES.C.

Referenced by STurbulence(), and Triangle_Wave().

#define SCURVE (  )     ((a)*(a)*(3.0-2.0*(a)))

Definition at line 32 of file TEXTURES.C.

Referenced by Dnoise2(), and Snoise2().

#define REALSCALE   ( 2.0 / 65535.0 )

Definition at line 33 of file TEXTURES.C.

#define Hash3d ( a,
b,
 ) 

Value:

hashTable[(int)(hashTable[(int)( \
     hashTable[(int)((a) & 0xfffL)] ^ ((b) & 0xfffL))] ^ ((c) & 0xfffL))]

Definition at line 34 of file TEXTURES.C.

Referenced by Dnoise2(), and Snoise2().

#define INCRSUM ( m,
s,
x,
y,
z   ) 

Value:

((s)*(RTable[m]*0.5+RTable[m+1]*(x) \
                                  + RTable[m+2]*(y) + RTable[m+3]*(z)))

Definition at line 36 of file TEXTURES.C.

Referenced by Dnoise2(), and Snoise2().


Variable Documentation

vector Wave_Sources[NUMBER_OF_WAVES]

Definition at line 39 of file TEXTURES.C.

double Rip_Freq = 10000.0

Definition at line 40 of file TEXTURES.C.

Referenced by GetInternalTexture(), and init_ripples().


Generated on Sun Apr 27 14:20:17 2014 for OpenFX by  doxygen 1.5.6