ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

slang_library_noise.c File Reference

C implementation of Perlin Simplex Noise over 1,2,3, and 4 dimensions. More...

#include "main/imports.h"
#include "slang_library_noise.h"

Go to the source code of this file.

Defines

#define FASTFLOOR(x)   ( ((x)>0) ? ((int)x) : (((int)x)-1) )
#define F2   0.366025403f /* F2 = 0.5*(sqrt(3.0)-1.0) */
#define G2   0.211324865f /* G2 = (3.0-Math.sqrt(3.0))/6.0 */
#define F3   0.333333333f
#define G3   0.166666667f
#define F4   0.309016994f /* F4 = (Math.sqrt(5.0)-1.0)/4.0 */
#define G4   0.138196601f /* G4 = (5.0-Math.sqrt(5.0))/20.0 */

Functions

static float grad1 (int hash, float x)
static float grad2 (int hash, float x, float y)
static float grad3 (int hash, float x, float y, float z)
static float grad4 (int hash, float x, float y, float z, float t)
GLfloat _slang_library_noise1 (GLfloat x)
GLfloat _slang_library_noise2 (GLfloat x, GLfloat y)
GLfloat _slang_library_noise3 (GLfloat x, GLfloat y, GLfloat z)
GLfloat _slang_library_noise4 (GLfloat x, GLfloat y, GLfloat z, GLfloat w)

Variables

unsigned char perm [512]
static unsigned char simplex [64][4]

Detailed Description

C implementation of Perlin Simplex Noise over 1,2,3, and 4 dimensions.

Author:
Stefan Gustavson (stegu@itn.liu.se)

Definition in file slang_library_noise.c.


Generated on Sat May 26 2012 04:58:11 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.