Newer
Older
Import / research / 3d-z-maps / procedural-editor / noise.h
@John John on 29 Dec 2020 748 bytes bulk import from macbookpro checkouts
/*
 * =====================================================================================
 *
 *       Filename:  noise.h
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  13/08/2011 23:28:13
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  John Ryland (jryland), jryland@xiaofrog.com
 *        Company:  InvertedLogic
 *
 * =====================================================================================
 */

#ifndef __NOISE_H__
#define __NOISE_H__


struct vec3
{
    vec3() {}
    vec3(float a, float b, float c) : x(a), y(b), z(c) {}
    float x, y, z;
};


extern vec3 normalTable[1 << 16];


void initNormalTable();
void buildNormalTable();
vec3& Normalize(vec3 v);


#endif // __NOISE_H__