ShNoise.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00027
#ifndef SHUTIL_NOISE_HPP
00028
#define SHUTIL_NOISE_HPP
00029
00030
#include "ShAttrib.hpp"
00031
#include "ShArray.hpp"
00032
00033
namespace ShUtil {
00034
00035
using namespace SH;
00036
00045
template<
int M,
typename T,
int P = 16>
00046 class ShNoise
00047 {
00048
public:
00053
template<
int K>
00054
static ShGeneric<M, T> perlin(
const ShGeneric<K, T> &p,
bool useTexture);
00055
00057
template<
int K>
00058
static ShGeneric<M, T> cellnoise(
const ShGeneric<K, T> &p,
bool useTexture);
00059
00060
private:
00061
static ShAttrib<1, SH_CONST, T> constP, invP;
00062
static bool m_init;
00063
static ShArray3D<ShColor<M, SH_TEMP, T> > noiseTex;
00064
00065
static void init();
00066 };
00067
00068
00069
00070
template<
int N,
int M,
typename T>
00071
ShGeneric<N, T> perlin(
const ShGeneric<M, T> &p,
bool useTexture =
true);
00072
00073
template<
int N,
int M,
int K,
typename T>
00074
ShGeneric<N, T> perlin(
const ShGeneric<M, T> &p,
const ShGeneric<K, T> &,
bool useTexture =
true);
00075
00076
00077
00078
00079
template<
int N,
int M,
typename T>
00080
ShGeneric<N, T> sperlin(
const ShGeneric<M, T> &p,
bool useTexture =
true);
00081
00082
template<
int N,
int M,
int K,
typename T>
00083
ShGeneric<N, T> sperlin(
const ShGeneric<M, T> &p,
const ShGeneric<K, T> &,
bool useTexture =
true);
00084
00085
00086
00087
00088
template<
int N,
int M,
typename T>
00089
ShGeneric<N, T> cellnoise(
const ShGeneric<M, T> &p,
bool useTexture =
true);
00090
00091
template<
int N,
int M,
int K,
typename T>
00092
ShGeneric<N, T> cellnoise(
const ShGeneric<M, T> &p,
const ShGeneric<K, T> &,
00093
bool useTexture =
true);
00094
00095
00096
00097
00098
template<
int N,
int M,
typename T>
00099
ShGeneric<N, T> scellnoise(
const ShGeneric<M, T> &p,
bool useTexture =
true);
00100
00101
template<
int N,
int M,
int K,
typename T>
00102
ShGeneric<N, T> scellnoise(
const ShGeneric<M, T> &p,
const ShGeneric<K, T> &,
00103
bool useTexture =
true);
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
template<
int N,
int M,
typename T>
00117
ShGeneric<N, T> turbulence(
const ShGeneric<M, T> &p,
bool useTexture =
true);
00118
00119
template<
int N,
int M,
int K,
typename T>
00120
ShGeneric<N, T> turbulence(
const ShGeneric<M, T> &p,
const ShGeneric<K, T> &,
00121
bool useTexture =
true);
00122
00123
00127
template<
int N,
int M,
typename T>
00128
ShGeneric<N, T> sturbulence(
const ShGeneric<M, T> &p,
bool useTexture =
true);
00129
00130
template<
int N,
int M,
int K,
typename T>
00131
ShGeneric<N, T> sturbulence(
const ShGeneric<M, T> &p,
const ShGeneric<K, T> &,
00132
bool useTexture =
true);
00133
00134 }
00135
#include "ShNoiseImpl.hpp"
00136
00137
#endif
Generated on Mon Oct 18 14:17:39 2004 for Sh by
1.3.7