50#define MATRIX_A 0x9908b0dfUL
51#define UMASK 0x80000000UL
52#define LMASK 0x7fffffffUL
53#define MIXBITS(u, v) (((u) & UMASK) | ((v) & LMASK))
54#define TWIST(u, v) ((MIXBITS(u, v) >> 1) ^ ((v) & 1UL ? MATRIX_A : 0UL))
66 state[0] = s & 0xffffffffUL;
67 for (j = 1; j <
N; j++) {
73 state[j] &= 0xffffffffUL;
81 const float range = 32;
102 for (j =
N -
M + 1; --j; p++) {
103 *p = p[
M] ^
TWIST(p[0], p[1]);
106 for (j =
M; --j; p++) {
107 *p = p[
M -
N] ^
TWIST(p[0], p[1]);
137 y ^= (y << 7) & 0x9d2c5680UL;
138 y ^= (y << 15) & 0xefc60000UL;
141 return float(y) / 4294967296.0f;
148#define BPY_NOISE_BASIS_ENUM_DOC \
149 " :arg noise_basis: Enumerator in ['BLENDER', 'PERLIN_ORIGINAL', 'PERLIN_NEW', " \
150 "'VORONOI_F1', 'VORONOI_F2', " \
151 "'VORONOI_F3', 'VORONOI_F4', 'VORONOI_F2F1', 'VORONOI_CRACKLE', " \
153 " :type noise_basis: str\n"
155#define BPY_NOISE_METRIC_ENUM_DOC \
156 " :arg distance_metric: Enumerator in ['DISTANCE', 'DISTANCE_SQUARED', 'MANHATTAN', " \
158 "'MINKOVSKY', 'MINKOVSKY_HALF', 'MINKOVSKY_FOUR'].\n" \
159 " :type distance_metric: str\n"
162#define DEFAULT_NOISE_TYPE TEX_STDPERLIN
179#define DEFAULT_METRIC_TYPE TEX_DISTANCE
193static void rand_vn(
float *array_tar,
const int size)
195 float *array_pt = array_tar + (size - 1);
198 *(array_pt--) = 2.0f *
frand() - 1.0f;
207 for (
int j = 0; j < 3; j++) {
216 float x,
float y,
float z,
int oct,
int hard,
int nb,
float ampscale,
float freqscale)
225 for (i = 1; i < oct; i++) {
260 for (i = 1; i < oct; i++) {
281 "The Blender noise module");
290 ".. function:: random()\n"
292 " Returns a random number in the range [0, 1).\n"
294 " :return: The random number.\n"
298 return PyFloat_FromDouble(
frand());
303 M_Noise_random_unit_vector_doc,
304 ".. function:: random_unit_vector(size=3)\n"
306 " Returns a unit vector with random entries.\n"
308 " :arg size: The size of the vector to be produced, in the range [2, 4].\n"
310 " :return: The random unit vector.\n"
311 " :rtype: :class:`mathutils.Vector`\n");
314 static const char *kwlist[] = {
"size",
nullptr};
315 float vec[4] = {0.0f, 0.0f, 0.0f, 0.0f};
319 if (!PyArg_ParseTupleAndKeywords(args, kw,
"|$i:random_unit_vector", (
char **)kwlist, &vec_num))
324 if (vec_num > 4 || vec_num < 2) {
325 PyErr_SetString(PyExc_ValueError,
"Vector(): invalid size");
329 while (
norm == 0.0f ||
norm > 1.0f) {
339 M_Noise_random_vector_doc,
340 ".. function:: random_vector(size=3)\n"
342 " Returns a vector with random entries in the range (-1, 1).\n"
344 " :arg size: The size of the vector to be produced.\n"
346 " :return: The random vector.\n"
347 " :rtype: :class:`mathutils.Vector`\n");
350 static const char *kwlist[] = {
"size",
nullptr};
351 float *vec =
nullptr;
354 if (!PyArg_ParseTupleAndKeywords(args, kw,
"|$i:random_vector", (
char **)kwlist, &vec_num)) {
359 PyErr_SetString(PyExc_ValueError,
"Vector(): invalid size");
363 vec = PyMem_New(
float, vec_num);
372 M_Noise_seed_set_doc,
373 ".. function:: seed_set(seed)\n"
375 " Sets the random seed used for random_unit_vector, and random.\n"
377 " :arg seed: Seed used for the random generator.\n"
378 " When seed is zero, the current time will be used instead.\n"
379 " :type seed: int\n");
383 if (!PyArg_ParseTuple(args,
"i:seed_set", &s)) {
393 ".. function:: noise(position, noise_basis='PERLIN_ORIGINAL')\n"
395 " Returns noise value from the noise basis at the position specified.\n"
397 " :arg position: The position to evaluate the selected noise function.\n"
399 " :return: The noise value.\n"
403 static const char *kwlist[] = {
"",
"noise_basis",
nullptr};
406 const char *noise_basis_str =
nullptr;
409 if (!PyArg_ParseTupleAndKeywords(
410 args, kw,
"O|$s:noise", (
char **)kwlist, &value, &noise_basis_str))
415 if (!noise_basis_str) {
428 return PyFloat_FromDouble(
435 M_Noise_noise_vector_doc,
436 ".. function:: noise_vector(position, noise_basis='PERLIN_ORIGINAL')\n"
438 " Returns the noise vector from the noise basis at the specified position.\n"
440 " :arg position: The position to evaluate the selected noise function.\n"
442 " :return: The noise vector.\n"
443 " :rtype: :class:`mathutils.Vector`\n");
446 static const char *kwlist[] = {
"",
"noise_basis",
nullptr};
448 float vec[3], r_vec[3];
449 const char *noise_basis_str =
nullptr;
452 if (!PyArg_ParseTupleAndKeywords(
453 args, kw,
"O|$s:noise_vector", (
char **)kwlist, &value, &noise_basis_str))
458 if (!noise_basis_str) {
462 bpy_noise_types, noise_basis_str, &noise_basis_enum,
"noise_vector") == -1)
471 noise_vector(vec[0], vec[1], vec[2], noise_basis_enum, r_vec);
478 M_Noise_turbulence_doc,
479 ".. function:: turbulence(position, octaves, hard, noise_basis='PERLIN_ORIGINAL', "
480 "amplitude_scale=0.5, frequency_scale=2.0)\n"
482 " Returns the turbulence value from the noise basis at the specified position.\n"
484 " :arg position: The position to evaluate the selected noise function.\n"
485 " :type position: :class:`mathutils.Vector`\n"
486 " :arg octaves: The number of different noise frequencies used.\n"
487 " :type octaves: int\n"
488 " :arg hard: Specifies whether returned turbulence is hard (sharp transitions) or "
489 "soft (smooth transitions).\n"
491 " :arg amplitude_scale: The amplitude scaling factor.\n"
492 " :type amplitude_scale: float\n"
493 " :arg frequency_scale: The frequency scaling factor\n"
494 " :type frequency_scale: float\n"
495 " :return: The turbulence value.\n"
499 static const char *kwlist[] = {
500 "",
"",
"",
"noise_basis",
"amplitude_scale",
"frequency_scale",
nullptr};
503 const char *noise_basis_str =
nullptr;
505 float as = 0.5f, fs = 2.0f;
507 if (!PyArg_ParseTupleAndKeywords(args,
509 "Oii|$sff:turbulence",
521 if (!noise_basis_str) {
525 bpy_noise_types, noise_basis_str, &noise_basis_enum,
"turbulence") == -1)
534 return PyFloat_FromDouble(
turb(vec[0], vec[1], vec[2], oct, hd, noise_basis_enum, as, fs));
539 M_Noise_turbulence_vector_doc,
540 ".. function:: turbulence_vector(position, octaves, hard, "
541 "noise_basis='PERLIN_ORIGINAL', amplitude_scale=0.5, frequency_scale=2.0)\n"
543 " Returns the turbulence vector from the noise basis at the specified position.\n"
545 " :arg position: The position to evaluate the selected noise function.\n"
546 " :type position: :class:`mathutils.Vector`\n"
547 " :arg octaves: The number of different noise frequencies used.\n"
548 " :type octaves: int\n"
549 " :arg hard: Specifies whether returned turbulence is hard (sharp transitions) or "
550 "soft (smooth transitions).\n"
552 " :arg amplitude_scale: The amplitude scaling factor.\n"
553 " :type amplitude_scale: float\n"
554 " :arg frequency_scale: The frequency scaling factor\n"
555 " :type frequency_scale: float\n"
556 " :return: The turbulence vector.\n"
557 " :rtype: :class:`mathutils.Vector`\n");
560 static const char *kwlist[] = {
561 "",
"",
"",
"noise_basis",
"amplitude_scale",
"frequency_scale",
nullptr};
563 float vec[3], r_vec[3];
564 const char *noise_basis_str =
nullptr;
566 float as = 0.5f, fs = 2.0f;
568 if (!PyArg_ParseTupleAndKeywords(args,
570 "Oii|$sff:turbulence_vector",
582 if (!noise_basis_str) {
586 bpy_noise_types, noise_basis_str, &noise_basis_enum,
"turbulence_vector") == -1)
595 vTurb(vec[0], vec[1], vec[2], oct, hd, noise_basis_enum, as, fs, r_vec);
604 ".. function:: fractal(position, H, lacunarity, octaves, noise_basis='PERLIN_ORIGINAL')\n"
606 " Returns the fractal Brownian motion (fBm) noise value from the noise basis at the "
607 "specified position.\n"
609 " :arg position: The position to evaluate the selected noise function.\n"
610 " :type position: :class:`mathutils.Vector`\n"
611 " :arg H: The fractal increment factor.\n"
613 " :arg lacunarity: The gap between successive frequencies.\n"
614 " :type lacunarity: float\n"
615 " :arg octaves: The number of different noise frequencies used.\n"
617 " :return: The fractal Brownian motion noise value.\n"
621 static const char *kwlist[] = {
"",
"",
"",
"",
"noise_basis",
nullptr};
624 const char *noise_basis_str =
nullptr;
628 if (!PyArg_ParseTupleAndKeywords(
629 args, kw,
"Offf|$s:fractal", (
char **)kwlist, &value, &
H, &lac, &oct, &noise_basis_str))
634 if (!noise_basis_str) {
647 return PyFloat_FromDouble(
653 M_Noise_multi_fractal_doc,
654 ".. function:: multi_fractal(position, H, lacunarity, octaves, "
655 "noise_basis='PERLIN_ORIGINAL')\n"
657 " Returns multifractal noise value from the noise basis at the specified position.\n"
659 " :arg position: The position to evaluate the selected noise function.\n"
660 " :type position: :class:`mathutils.Vector`\n"
661 " :arg H: The fractal increment factor.\n"
663 " :arg lacunarity: The gap between successive frequencies.\n"
664 " :type lacunarity: float\n"
665 " :arg octaves: The number of different noise frequencies used.\n"
667 " :return: The multifractal noise value.\n"
671 static const char *kwlist[] = {
"",
"",
"",
"",
"noise_basis",
nullptr};
674 const char *noise_basis_str =
nullptr;
678 if (!PyArg_ParseTupleAndKeywords(args,
680 "Offf|$s:multi_fractal",
691 if (!noise_basis_str) {
695 bpy_noise_types, noise_basis_str, &noise_basis_enum,
"multi_fractal") == -1)
704 return PyFloat_FromDouble(
710 M_Noise_variable_lacunarity_doc,
711 ".. function:: variable_lacunarity(position, distortion, "
712 "noise_type1='PERLIN_ORIGINAL', noise_type2='PERLIN_ORIGINAL')\n"
714 " Returns variable lacunarity noise value, a distorted variety of noise, from "
715 "noise type 1 distorted by noise type 2 at the specified position.\n"
717 " :arg position: The position to evaluate the selected noise function.\n"
718 " :type position: :class:`mathutils.Vector`\n"
719 " :arg distortion: The amount of distortion.\n"
720 " :type distortion: float\n"
721 " :arg noise_type1: Enumerator in ['BLENDER', 'PERLIN_ORIGINAL', 'PERLIN_NEW', "
722 "'VORONOI_F1', 'VORONOI_F2', "
723 "'VORONOI_F3', 'VORONOI_F4', 'VORONOI_F2F1', 'VORONOI_CRACKLE', "
725 " :type noise_type1: str\n"
726 " :arg noise_type2: Enumerator in ['BLENDER', 'PERLIN_ORIGINAL', 'PERLIN_NEW', "
727 "'VORONOI_F1', 'VORONOI_F2', "
728 "'VORONOI_F3', 'VORONOI_F4', 'VORONOI_F2F1', 'VORONOI_CRACKLE', "
730 " :type noise_type2: str\n"
731 " :return: The variable lacunarity noise value.\n"
735 static const char *kwlist[] = {
"",
"",
"noise_type1",
"noise_type2",
nullptr};
738 const char *noise_type1_str =
nullptr, *noise_type2_str =
nullptr;
742 if (!PyArg_ParseTupleAndKeywords(args,
744 "Of|$ss:variable_lacunarity",
754 if (!noise_type1_str) {
758 bpy_noise_types, noise_type1_str, &noise_type1_enum,
"variable_lacunarity") == -1)
763 if (!noise_type2_str) {
767 bpy_noise_types, noise_type2_str, &noise_type2_enum,
"variable_lacunarity") == -1)
778 vec[0], vec[1], vec[2], d, noise_type1_enum, noise_type2_enum));
783 M_Noise_hetero_terrain_doc,
784 ".. function:: hetero_terrain(position, H, lacunarity, octaves, offset, "
785 "noise_basis='PERLIN_ORIGINAL')\n"
787 " Returns the heterogeneous terrain value from the noise basis at the specified position.\n"
789 " :arg position: The position to evaluate the selected noise function.\n"
790 " :type position: :class:`mathutils.Vector`\n"
791 " :arg H: The fractal dimension of the roughest areas.\n"
793 " :arg lacunarity: The gap between successive frequencies.\n"
794 " :type lacunarity: float\n"
795 " :arg octaves: The number of different noise frequencies used.\n"
796 " :type octaves: int\n"
797 " :arg offset: The height of the terrain above 'sea level'.\n"
799 " :return: The heterogeneous terrain value.\n"
803 static const char *kwlist[] = {
"",
"",
"",
"",
"",
"noise_basis",
nullptr};
806 const char *noise_basis_str =
nullptr;
807 float H, lac, oct, ofs;
810 if (!PyArg_ParseTupleAndKeywords(args,
812 "Offff|$s:hetero_terrain",
824 if (!noise_basis_str) {
828 bpy_noise_types, noise_basis_str, &noise_basis_enum,
"hetero_terrain") == -1)
837 return PyFloat_FromDouble(
843 M_Noise_hybrid_multi_fractal_doc,
844 ".. function:: hybrid_multi_fractal(position, H, lacunarity, octaves, offset, gain, "
845 "noise_basis='PERLIN_ORIGINAL')\n"
847 " Returns hybrid multifractal value from the noise basis at the specified position.\n"
849 " :arg position: The position to evaluate the selected noise function.\n"
850 " :type position: :class:`mathutils.Vector`\n"
851 " :arg H: The fractal dimension of the roughest areas.\n"
853 " :arg lacunarity: The gap between successive frequencies.\n"
854 " :type lacunarity: float\n"
855 " :arg octaves: The number of different noise frequencies used.\n"
856 " :type octaves: int\n"
857 " :arg offset: The height of the terrain above 'sea level'.\n"
858 " :type offset: float\n"
859 " :arg gain: Scaling applied to the values.\n"
861 " :return: The hybrid multifractal value.\n"
865 static const char *kwlist[] = {
"",
"",
"",
"",
"",
"",
"noise_basis",
nullptr};
868 const char *noise_basis_str =
nullptr;
869 float H, lac, oct, ofs, gn;
872 if (!PyArg_ParseTupleAndKeywords(args,
874 "Offfff|$s:hybrid_multi_fractal",
887 if (!noise_basis_str) {
891 bpy_noise_types, noise_basis_str, &noise_basis_enum,
"hybrid_multi_fractal") == -1)
903 vec[0], vec[1], vec[2],
H, lac, oct, ofs, gn, noise_basis_enum));
908 M_Noise_ridged_multi_fractal_doc,
909 ".. function:: ridged_multi_fractal(position, H, lacunarity, octaves, offset, gain, "
910 "noise_basis='PERLIN_ORIGINAL')\n"
912 " Returns ridged multifractal value from the noise basis at the specified position.\n"
914 " :arg position: The position to evaluate the selected noise function.\n"
915 " :type position: :class:`mathutils.Vector`\n"
916 " :arg H: The fractal dimension of the roughest areas.\n"
918 " :arg lacunarity: The gap between successive frequencies.\n"
919 " :type lacunarity: float\n"
920 " :arg octaves: The number of different noise frequencies used.\n"
921 " :type octaves: int\n"
922 " :arg offset: The height of the terrain above 'sea level'.\n"
923 " :type offset: float\n"
924 " :arg gain: Scaling applied to the values.\n"
926 " :return: The ridged multifractal value.\n"
930 static const char *kwlist[] = {
"",
"",
"",
"",
"",
"",
"noise_basis",
nullptr};
933 const char *noise_basis_str =
nullptr;
934 float H, lac, oct, ofs, gn;
937 if (!PyArg_ParseTupleAndKeywords(args,
939 "Offfff|$s:ridged_multi_fractal",
952 if (!noise_basis_str) {
956 bpy_noise_types, noise_basis_str, &noise_basis_enum,
"ridged_multi_fractal") == -1)
968 vec[0], vec[1], vec[2],
H, lac, oct, ofs, gn, noise_basis_enum));
974 ".. function:: voronoi(position, distance_metric='DISTANCE', exponent=2.5)\n"
976 " Returns a list of distances to the four closest features and their locations.\n"
978 " :arg position: The position to evaluate the selected noise function.\n"
980 " :arg exponent: The exponent for Minkowski distance metric.\n"
981 " :type exponent: float\n"
982 " :return: A list of distances to the four closest features and their locations.\n"
983 " :rtype: list[list[float], list[:class:`mathutils.Vector`]]\n");
986 static const char *kwlist[] = {
"",
"distance_metric",
"exponent",
nullptr};
991 const char *metric_str =
nullptr;
998 if (!PyArg_ParseTupleAndKeywords(
999 args, kw,
"O|$sf:voronoi", (
char **)kwlist, &value, &metric_str, &me))
1015 list = PyList_New(4);
1019 for (i = 0; i < 4; i++) {
1021 PyList_SET_ITEM(list, i,
v);
1024 ret = Py_BuildValue(
"[[ffff]O]", da[0], da[1], da[2], da[3], list);
1032 ".. function:: cell(position)\n"
1034 " Returns cell noise value at the specified position.\n"
1036 " :arg position: The position to evaluate the selected noise function.\n"
1037 " :type position: :class:`mathutils.Vector`\n"
1038 " :return: The cell noise value.\n"
1039 " :rtype: float\n");
1045 if (!PyArg_ParseTuple(args,
"O:cell", &value)) {
1053 return PyFloat_FromDouble(
BLI_noise_cell(vec[0], vec[1], vec[2]));
1058 M_Noise_cell_vector_doc,
1059 ".. function:: cell_vector(position)\n"
1061 " Returns cell noise vector at the specified position.\n"
1063 " :arg position: The position to evaluate the selected noise function.\n"
1064 " :type position: :class:`mathutils.Vector`\n"
1065 " :return: The cell noise vector.\n"
1066 " :rtype: :class:`mathutils.Vector`\n");
1070 float vec[3], r_vec[3];
1072 if (!PyArg_ParseTuple(args,
"O:cell_vector", &value)) {
1084#if (defined(__GNUC__) && !defined(__clang__))
1085# pragma GCC diagnostic push
1086# pragma GCC diagnostic ignored "-Wcast-function-type"
1090 {
"seed_set", (PyCFunction)
M_Noise_seed_set, METH_VARARGS, M_Noise_seed_set_doc},
1091 {
"random", (PyCFunction)
M_Noise_random, METH_NOARGS, M_Noise_random_doc},
1092 {
"random_unit_vector",
1094 METH_VARARGS | METH_KEYWORDS,
1095 M_Noise_random_unit_vector_doc},
1098 METH_VARARGS | METH_KEYWORDS,
1099 M_Noise_random_vector_doc},
1100 {
"noise", (PyCFunction)
M_Noise_noise, METH_VARARGS | METH_KEYWORDS, M_Noise_noise_doc},
1103 METH_VARARGS | METH_KEYWORDS,
1104 M_Noise_noise_vector_doc},
1107 METH_VARARGS | METH_KEYWORDS,
1108 M_Noise_turbulence_doc},
1109 {
"turbulence_vector",
1111 METH_VARARGS | METH_KEYWORDS,
1112 M_Noise_turbulence_vector_doc},
1113 {
"fractal", (PyCFunction)
M_Noise_fractal, METH_VARARGS | METH_KEYWORDS, M_Noise_fractal_doc},
1116 METH_VARARGS | METH_KEYWORDS,
1117 M_Noise_multi_fractal_doc},
1118 {
"variable_lacunarity",
1120 METH_VARARGS | METH_KEYWORDS,
1121 M_Noise_variable_lacunarity_doc},
1124 METH_VARARGS | METH_KEYWORDS,
1125 M_Noise_hetero_terrain_doc},
1126 {
"hybrid_multi_fractal",
1128 METH_VARARGS | METH_KEYWORDS,
1129 M_Noise_hybrid_multi_fractal_doc},
1130 {
"ridged_multi_fractal",
1132 METH_VARARGS | METH_KEYWORDS,
1133 M_Noise_ridged_multi_fractal_doc},
1134 {
"voronoi", (PyCFunction)
M_Noise_voronoi, METH_VARARGS | METH_KEYWORDS, M_Noise_voronoi_doc},
1135 {
"cell", (PyCFunction)
M_Noise_cell, METH_VARARGS, M_Noise_cell_doc},
1137 {
nullptr,
nullptr, 0,
nullptr},
1140#if (defined(__GNUC__) && !defined(__clang__))
1141# pragma GCC diagnostic pop
1145 PyModuleDef_HEAD_INIT,
float normalize_vn(float *array_tar, int size)
float BLI_noise_mg_hetero_terrain(float x, float y, float z, float H, float lacunarity, float octaves, float offset, int noisebasis)
float BLI_noise_mg_multi_fractal(float x, float y, float z, float H, float lacunarity, float octaves, int noisebasis)
float BLI_noise_mg_ridged_multi_fractal(float x, float y, float z, float H, float lacunarity, float octaves, float offset, float gain, int noisebasis)
float BLI_noise_mg_variable_lacunarity(float x, float y, float z, float distortion, int nbas1, int nbas2)
float BLI_noise_cell(float x, float y, float z)
float BLI_noise_generic_noise(float noisesize, float x, float y, float z, bool hard, int noisebasis)
void BLI_noise_voronoi(float x, float y, float z, float *da, float *pa, float me, int dtype)
float BLI_noise_mg_fbm(float x, float y, float z, float H, float lacunarity, float octaves, int noisebasis)
void BLI_noise_cell_v3(float x, float y, float z, float r_ca[3])
float BLI_noise_mg_hybrid_multi_fractal(float x, float y, float z, float H, float lacunarity, float octaves, float offset, float gain, int noisebasis)
ATTR_WARN_UNUSED_RESULT const BMVert * v
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
SIMD_FORCE_INLINE const btScalar & z() const
Return the z value.
static unsigned long seed
SIMD_FORCE_INLINE btScalar norm() const
Return the norm (length) of the vector.
draw_view in_light_buf[] float
int mathutils_array_parse(float *array, int array_num_min, int array_num_max, PyObject *value, const char *error_prefix)
PyObject * Vector_CreatePyObject(const float *vec, const int vec_num, PyTypeObject *base_type)
PyObject * Vector_CreatePyObject_alloc(float *vec, const int vec_num, PyTypeObject *base_type)
static PyObject * M_Noise_noise(PyObject *, PyObject *args, PyObject *kw)
static PyObject * M_Noise_turbulence_vector(PyObject *, PyObject *args, PyObject *kw)
static float state_offset_vector[3 *3]
static PyObject * M_Noise_turbulence(PyObject *, PyObject *args, PyObject *kw)
static PyObject * M_Noise_voronoi(PyObject *, PyObject *args, PyObject *kw)
static PyMethodDef M_Noise_methods[]
#define BPY_NOISE_BASIS_ENUM_DOC
static PyObject * M_Noise_hybrid_multi_fractal(PyObject *, PyObject *args, PyObject *kw)
static void setRndSeed(int seed)
PyMODINIT_FUNC PyInit_mathutils_noise()
static PyObject * M_Noise_fractal(PyObject *, PyObject *args, PyObject *kw)
static PyObject * M_Noise_variable_lacunarity(PyObject *, PyObject *args, PyObject *kw)
static PyModuleDef M_Noise_module_def
#define DEFAULT_METRIC_TYPE
static void vTurb(float x, float y, float z, int oct, int hard, int nb, float ampscale, float freqscale, float v[3])
#define BPY_NOISE_METRIC_ENUM_DOC
static PyObject * M_Noise_random_vector(PyObject *, PyObject *args, PyObject *kw)
static PyObject * M_Noise_hetero_terrain(PyObject *, PyObject *args, PyObject *kw)
PyDoc_STRVAR(M_Noise_doc, "The Blender noise module")
static PyObject * M_Noise_random(PyObject *)
static void noise_vector(float x, float y, float z, int nb, float v[3])
#define DEFAULT_NOISE_TYPE
static PyObject * M_Noise_cell_vector(PyObject *, PyObject *args)
static float turb(float x, float y, float z, int oct, int hard, int nb, float ampscale, float freqscale)
static PyObject * M_Noise_random_unit_vector(PyObject *, PyObject *args, PyObject *kw)
static PyC_FlagSet bpy_noise_types[]
static void init_genrand(ulong s)
static PyObject * M_Noise_noise_vector(PyObject *, PyObject *args, PyObject *kw)
static PyObject * M_Noise_cell(PyObject *, PyObject *args)
static void rand_vn(float *array_tar, const int size)
static PyObject * M_Noise_multi_fractal(PyObject *, PyObject *args, PyObject *kw)
static PyObject * M_Noise_ridged_multi_fractal(PyObject *, PyObject *args, PyObject *kw)
static PyC_FlagSet bpy_noise_metrics[]
static PyObject * M_Noise_seed_set(PyObject *, PyObject *args)
int PyC_FlagSet_ValueFromID(const PyC_FlagSet *item, const char *identifier, int *r_value, const char *error_prefix)