root/OpenSceneGraph/trunk/examples/osgshaders/Noise.h @ 2595

Revision 2595, 1.1 kB (checked in by robert, 11 years ago)

Updates to osgGL2 from Mike Weiblen

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1/************************************************************************
2 *                                                                      *
3 *                   Copyright (C) 2002  3Dlabs Inc. Ltd.               *
4 *                                                                      *
5 ***********************************************************************/
6
7#ifndef __ogl2_demo_h__
8#define __ogl2_demo_h__
9
10
11extern void SetNoiseFrequency(int frequency);
12
13extern double noise1(double arg);
14extern double noise2(double vec[2]);
15extern double noise3(double vec[3]);
16extern void normalize2(double vec[2]);
17extern void normalize3(double vec[3]);
18
19/*
20   In what follows "alpha" is the weight when the sum is formed.
21   Typically it is 2, As this approaches 1 the function is noisier.
22   "beta" is the harmonic scaling/spacing, typically 2.
23*/
24
25extern double PerlinNoise1D(double x,double alpha, double beta, int n);
26extern double PerlinNoise2D(double x,double y,double alpha, double beta, int n);
27extern double PerlinNoise3D(double x,double y,double z,double alpha, double beta, int n);
28
29
30#endif // __ogl2_demo_h__
Note: See TracBrowser for help on using the browser.