Changeset View
Changeset View
Standalone View
Standalone View
source/blender/freestyle/intern/system/PseudoNoise.cpp
| Show All 35 Lines | static int modf_to_index(Freestyle::real x, unsigned int range) | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| namespace Freestyle { | namespace Freestyle { | ||||
| real PseudoNoise::_values[]; | real PseudoNoise::_values[]; | ||||
| PseudoNoise::PseudoNoise() | |||||
| { | |||||
| } | |||||
| void PseudoNoise::init(long seed) | void PseudoNoise::init(long seed) | ||||
| { | { | ||||
| RandGen::srand48(seed); | RandGen::srand48(seed); | ||||
| for (unsigned int i = 0; i < NB_VALUE_NOISE; i++) { | for (unsigned int i = 0; i < NB_VALUE_NOISE; i++) { | ||||
| _values[i] = -1.0 + 2.0 * RandGen::drand48(); | _values[i] = -1.0 + 2.0 * RandGen::drand48(); | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 67 Lines • Show Last 20 Lines | |||||