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: A noise basis string.\n" \
150 " :type noise_basis: Literal['BLENDER', 'PERLIN_ORIGINAL', 'PERLIN_NEW', " \
151 "'VORONOI_F1', 'VORONOI_F2', " \
152 "'VORONOI_F3', 'VORONOI_F4', 'VORONOI_F2F1', 'VORONOI_CRACKLE', " \
155#define BPY_NOISE_METRIC_ENUM_DOC \
156 " :arg distance_metric: A distance metric string.\n" \
157 " :type distance_metric: Literal['DISTANCE', 'DISTANCE_SQUARED', 'MANHATTAN', " \
159 "'MINKOVSKY', 'MINKOVSKY_HALF', 'MINKOVSKY_FOUR'].\n"
162#define DEFAULT_NOISE_TYPE TEX_STDPERLIN
179#define DEFAULT_METRIC_TYPE TEX_DISTANCE
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++) {
284 ".. function:: random()\n"
286 " Returns a random number in the range [0, 1).\n"
288 " :return: The random number.\n"
292 return PyFloat_FromDouble(
frand());
297 M_Noise_random_unit_vector_doc,
298 ".. function:: random_unit_vector(*, size=3)\n"
300 " Returns a unit vector with random entries.\n"
302 " :arg size: The size of the vector to be produced, in the range [2, 4].\n"
304 " :return: The random unit vector.\n"
305 " :rtype: :class:`mathutils.Vector`\n");
308 static const char *kwlist[] = {
"size",
nullptr};
309 float vec[4] = {0.0f, 0.0f, 0.0f, 0.0f};
313 if (!PyArg_ParseTupleAndKeywords(args, kw,
"|$i:random_unit_vector", (
char **)kwlist, &vec_num))
318 if (vec_num > 4 || vec_num < 2) {
319 PyErr_SetString(PyExc_ValueError,
"Vector(): invalid size");
323 while (
norm == 0.0f ||
norm > 1.0f) {
333 M_Noise_random_vector_doc,
334 ".. function:: random_vector(*, size=3)\n"
336 " Returns a vector with random entries in the range (-1, 1).\n"
338 " :arg size: The size of the vector to be produced.\n"
340 " :return: The random vector.\n"
341 " :rtype: :class:`mathutils.Vector`\n");
344 static const char *kwlist[] = {
"size",
nullptr};
345 float *vec =
nullptr;
348 if (!PyArg_ParseTupleAndKeywords(args, kw,
"|$i:random_vector", (
char **)kwlist, &vec_num)) {
353 PyErr_SetString(PyExc_ValueError,
"Vector(): invalid size");
357 vec = PyMem_New(
float, vec_num);
366 M_Noise_seed_set_doc,
367 ".. function:: seed_set(seed, /)\n"
369 " Sets the random seed used for random_unit_vector, and random.\n"
371 " :arg seed: Seed used for the random generator.\n"
372 " When seed is zero, the current time will be used instead.\n"
373 " :type seed: int\n");
377 if (!PyArg_ParseTuple(args,
"i:seed_set", &s)) {
387 ".. function:: noise(position, /, *, noise_basis='PERLIN_ORIGINAL')\n"
389 " Returns noise value from the noise basis at the position specified.\n"
391 " :arg position: The position to evaluate the selected noise function.\n"
393 " :return: The noise value.\n"
397 static const char *kwlist[] = {
"",
"noise_basis",
nullptr};
400 const char *noise_basis_str =
nullptr;
403 if (!PyArg_ParseTupleAndKeywords(
404 args, kw,
"O|$s:noise", (
char **)kwlist, &value, &noise_basis_str))
409 if (!noise_basis_str) {
422 return PyFloat_FromDouble(
429 M_Noise_noise_vector_doc,
430 ".. function:: noise_vector(position, /, *, noise_basis='PERLIN_ORIGINAL')\n"
432 " Returns the noise vector from the noise basis at the specified position.\n"
434 " :arg position: The position to evaluate the selected noise function.\n"
436 " :return: The noise vector.\n"
437 " :rtype: :class:`mathutils.Vector`\n");
440 static const char *kwlist[] = {
"",
"noise_basis",
nullptr};
442 float vec[3], r_vec[3];
443 const char *noise_basis_str =
nullptr;
446 if (!PyArg_ParseTupleAndKeywords(
447 args, kw,
"O|$s:noise_vector", (
char **)kwlist, &value, &noise_basis_str))
452 if (!noise_basis_str) {
456 bpy_noise_types, noise_basis_str, &noise_basis_enum,
"noise_vector") == -1)
465 noise_vector(vec[0], vec[1], vec[2], noise_basis_enum, r_vec);
472 M_Noise_turbulence_doc,
473 ".. function:: turbulence(position, octaves, hard, /, *, "
474 "noise_basis='PERLIN_ORIGINAL', amplitude_scale=0.5, frequency_scale=2.0)\n"
476 " Returns the turbulence value from the noise basis at the specified position.\n"
478 " :arg position: The position to evaluate the selected noise function.\n"
479 " :type position: :class:`mathutils.Vector`\n"
480 " :arg octaves: The number of different noise frequencies used.\n"
481 " :type octaves: int\n"
482 " :arg hard: Specifies whether returned turbulence is hard (sharp transitions) or "
483 "soft (smooth transitions).\n"
485 " :arg amplitude_scale: The amplitude scaling factor.\n"
486 " :type amplitude_scale: float\n"
487 " :arg frequency_scale: The frequency scaling factor\n"
488 " :type frequency_scale: float\n"
489 " :return: The turbulence value.\n"
493 static const char *kwlist[] = {
494 "",
"",
"",
"noise_basis",
"amplitude_scale",
"frequency_scale",
nullptr};
497 const char *noise_basis_str =
nullptr;
499 float as = 0.5f, fs = 2.0f;
501 if (!PyArg_ParseTupleAndKeywords(args,
503 "Oii|$sff:turbulence",
515 if (!noise_basis_str) {
519 bpy_noise_types, noise_basis_str, &noise_basis_enum,
"turbulence") == -1)
528 return PyFloat_FromDouble(
turb(vec[0], vec[1], vec[2], oct, hd, noise_basis_enum, as, fs));
533 M_Noise_turbulence_vector_doc,
534 ".. function:: turbulence_vector(position, octaves, hard, /, *, "
535 "noise_basis='PERLIN_ORIGINAL', amplitude_scale=0.5, frequency_scale=2.0)\n"
537 " Returns the turbulence vector from the noise basis at the specified position.\n"
539 " :arg position: The position to evaluate the selected noise function.\n"
540 " :type position: :class:`mathutils.Vector`\n"
541 " :arg octaves: The number of different noise frequencies used.\n"
542 " :type octaves: int\n"
543 " :arg hard: Specifies whether returned turbulence is hard (sharp transitions) or "
544 "soft (smooth transitions).\n"
546 " :arg amplitude_scale: The amplitude scaling factor.\n"
547 " :type amplitude_scale: float\n"
548 " :arg frequency_scale: The frequency scaling factor\n"
549 " :type frequency_scale: float\n"
550 " :return: The turbulence vector.\n"
551 " :rtype: :class:`mathutils.Vector`\n");
554 static const char *kwlist[] = {
555 "",
"",
"",
"noise_basis",
"amplitude_scale",
"frequency_scale",
nullptr};
557 float vec[3], r_vec[3];
558 const char *noise_basis_str =
nullptr;
560 float as = 0.5f, fs = 2.0f;
562 if (!PyArg_ParseTupleAndKeywords(args,
564 "Oii|$sff:turbulence_vector",
576 if (!noise_basis_str) {
580 bpy_noise_types, noise_basis_str, &noise_basis_enum,
"turbulence_vector") == -1)
589 vTurb(vec[0], vec[1], vec[2], oct, hd, noise_basis_enum, as, fs, r_vec);
598 ".. function:: fractal(position, H, lacunarity, octaves, /, *, "
599 "noise_basis='PERLIN_ORIGINAL')\n"
601 " Returns the fractal Brownian motion (fBm) noise value from the noise basis at the "
602 "specified position.\n"
604 " :arg position: The position to evaluate the selected noise function.\n"
605 " :type position: :class:`mathutils.Vector`\n"
606 " :arg H: The fractal increment factor.\n"
608 " :arg lacunarity: The gap between successive frequencies.\n"
609 " :type lacunarity: float\n"
610 " :arg octaves: The number of different noise frequencies used.\n"
612 " :return: The fractal Brownian motion noise value.\n"
616 static const char *kwlist[] = {
"",
"",
"",
"",
"noise_basis",
nullptr};
619 const char *noise_basis_str =
nullptr;
623 if (!PyArg_ParseTupleAndKeywords(
624 args, kw,
"Offf|$s:fractal", (
char **)kwlist, &value, &
H, &lac, &oct, &noise_basis_str))
629 if (!noise_basis_str) {
642 return PyFloat_FromDouble(
648 M_Noise_multi_fractal_doc,
649 ".. function:: multi_fractal(position, H, lacunarity, octaves, /, *, "
650 "noise_basis='PERLIN_ORIGINAL')\n"
652 " Returns multifractal noise value from the noise basis at the specified position.\n"
654 " :arg position: The position to evaluate the selected noise function.\n"
655 " :type position: :class:`mathutils.Vector`\n"
656 " :arg H: The fractal increment factor.\n"
658 " :arg lacunarity: The gap between successive frequencies.\n"
659 " :type lacunarity: float\n"
660 " :arg octaves: The number of different noise frequencies used.\n"
662 " :return: The multifractal noise value.\n"
666 static const char *kwlist[] = {
"",
"",
"",
"",
"noise_basis",
nullptr};
669 const char *noise_basis_str =
nullptr;
673 if (!PyArg_ParseTupleAndKeywords(args,
675 "Offf|$s:multi_fractal",
686 if (!noise_basis_str) {
690 bpy_noise_types, noise_basis_str, &noise_basis_enum,
"multi_fractal") == -1)
699 return PyFloat_FromDouble(
705 M_Noise_variable_lacunarity_doc,
706 ".. function:: variable_lacunarity(position, distortion, /, *, "
707 "noise_type1='PERLIN_ORIGINAL', noise_type2='PERLIN_ORIGINAL')\n"
709 " Returns variable lacunarity noise value, a distorted variety of noise, from "
710 "noise type 1 distorted by noise type 2 at the specified position.\n"
712 " :arg position: The position to evaluate the selected noise function.\n"
713 " :type position: :class:`mathutils.Vector`\n"
714 " :arg distortion: The amount of distortion.\n"
715 " :type distortion: float\n"
716 " :arg noise_type1: A noise type string.\n"
717 " :type noise_type1: Literal['BLENDER', 'PERLIN_ORIGINAL', 'PERLIN_NEW', "
718 "'VORONOI_F1', 'VORONOI_F2', "
719 "'VORONOI_F3', 'VORONOI_F4', 'VORONOI_F2F1', 'VORONOI_CRACKLE', "
721 " :arg noise_type2: A noise type string.\n"
722 " :type noise_type2: Literal['BLENDER', 'PERLIN_ORIGINAL', 'PERLIN_NEW', "
723 "'VORONOI_F1', 'VORONOI_F2', "
724 "'VORONOI_F3', 'VORONOI_F4', 'VORONOI_F2F1', 'VORONOI_CRACKLE', "
726 " :return: The variable lacunarity noise value.\n"
730 static const char *kwlist[] = {
"",
"",
"noise_type1",
"noise_type2",
nullptr};
733 const char *noise_type1_str =
nullptr, *noise_type2_str =
nullptr;
737 if (!PyArg_ParseTupleAndKeywords(args,
739 "Of|$ss:variable_lacunarity",
749 if (!noise_type1_str) {
753 bpy_noise_types, noise_type1_str, &noise_type1_enum,
"variable_lacunarity") == -1)
758 if (!noise_type2_str) {
762 bpy_noise_types, noise_type2_str, &noise_type2_enum,
"variable_lacunarity") == -1)
773 vec[0], vec[1], vec[2], d, noise_type1_enum, noise_type2_enum));
778 M_Noise_hetero_terrain_doc,
779 ".. function:: hetero_terrain(position, H, lacunarity, octaves, offset, /, *, "
780 "noise_basis='PERLIN_ORIGINAL')\n"
782 " Returns the heterogeneous terrain value from the noise basis at the specified position.\n"
784 " :arg position: The position to evaluate the selected noise function.\n"
785 " :type position: :class:`mathutils.Vector`\n"
786 " :arg H: The fractal dimension of the roughest areas.\n"
788 " :arg lacunarity: The gap between successive frequencies.\n"
789 " :type lacunarity: float\n"
790 " :arg octaves: The number of different noise frequencies used.\n"
791 " :type octaves: int\n"
792 " :arg offset: The height of the terrain above 'sea level'.\n"
794 " :return: The heterogeneous terrain value.\n"
798 static const char *kwlist[] = {
"",
"",
"",
"",
"",
"noise_basis",
nullptr};
801 const char *noise_basis_str =
nullptr;
802 float H, lac, oct, ofs;
805 if (!PyArg_ParseTupleAndKeywords(args,
807 "Offff|$s:hetero_terrain",
819 if (!noise_basis_str) {
823 bpy_noise_types, noise_basis_str, &noise_basis_enum,
"hetero_terrain") == -1)
832 return PyFloat_FromDouble(
838 M_Noise_hybrid_multi_fractal_doc,
839 ".. function:: hybrid_multi_fractal(position, H, lacunarity, octaves, offset, gain, /, *, "
840 "noise_basis='PERLIN_ORIGINAL')\n"
842 " Returns hybrid multifractal value from the noise basis at the specified position.\n"
844 " :arg position: The position to evaluate the selected noise function.\n"
845 " :type position: :class:`mathutils.Vector`\n"
846 " :arg H: The fractal dimension of the roughest areas.\n"
848 " :arg lacunarity: The gap between successive frequencies.\n"
849 " :type lacunarity: float\n"
850 " :arg octaves: The number of different noise frequencies used.\n"
851 " :type octaves: int\n"
852 " :arg offset: The height of the terrain above 'sea level'.\n"
853 " :type offset: float\n"
854 " :arg gain: Scaling applied to the values.\n"
856 " :return: The hybrid multifractal value.\n"
860 static const char *kwlist[] = {
"",
"",
"",
"",
"",
"",
"noise_basis",
nullptr};
863 const char *noise_basis_str =
nullptr;
864 float H, lac, oct, ofs, gn;
867 if (!PyArg_ParseTupleAndKeywords(args,
869 "Offfff|$s:hybrid_multi_fractal",
882 if (!noise_basis_str) {
886 bpy_noise_types, noise_basis_str, &noise_basis_enum,
"hybrid_multi_fractal") == -1)
898 vec[0], vec[1], vec[2],
H, lac, oct, ofs, gn, noise_basis_enum));
903 M_Noise_ridged_multi_fractal_doc,
904 ".. function:: ridged_multi_fractal(position, H, lacunarity, octaves, offset, gain, /, *, "
905 "noise_basis='PERLIN_ORIGINAL')\n"
907 " Returns ridged multifractal value from the noise basis at the specified position.\n"
909 " :arg position: The position to evaluate the selected noise function.\n"
910 " :type position: :class:`mathutils.Vector`\n"
911 " :arg H: The fractal dimension of the roughest areas.\n"
913 " :arg lacunarity: The gap between successive frequencies.\n"
914 " :type lacunarity: float\n"
915 " :arg octaves: The number of different noise frequencies used.\n"
916 " :type octaves: int\n"
917 " :arg offset: The height of the terrain above 'sea level'.\n"
918 " :type offset: float\n"
919 " :arg gain: Scaling applied to the values.\n"
921 " :return: The ridged multifractal value.\n"
925 static const char *kwlist[] = {
"",
"",
"",
"",
"",
"",
"noise_basis",
nullptr};
928 const char *noise_basis_str =
nullptr;
929 float H, lac, oct, ofs, gn;
932 if (!PyArg_ParseTupleAndKeywords(args,
934 "Offfff|$s:ridged_multi_fractal",
947 if (!noise_basis_str) {
951 bpy_noise_types, noise_basis_str, &noise_basis_enum,
"ridged_multi_fractal") == -1)
963 vec[0], vec[1], vec[2],
H, lac, oct, ofs, gn, noise_basis_enum));
969 ".. function:: voronoi(position, /, *, distance_metric='DISTANCE', exponent=2.5)\n"
971 " Returns a list of distances to the four closest features and their locations.\n"
973 " :arg position: The position to evaluate the selected noise function.\n"
975 " :arg exponent: The exponent for Minkowski distance metric.\n"
976 " :type exponent: float\n"
977 " :return: A list of distances to the four closest features and their locations.\n"
978 " :rtype: list[list[float] | list[:class:`mathutils.Vector`]]\n");
981 static const char *kwlist[] = {
"",
"distance_metric",
"exponent",
nullptr};
986 const char *metric_str =
nullptr;
993 if (!PyArg_ParseTupleAndKeywords(
994 args, kw,
"O|$sf:voronoi", (
char **)kwlist, &value, &metric_str, &me))
1010 list = PyList_New(4);
1014 for (
i = 0;
i < 4;
i++) {
1016 PyList_SET_ITEM(list,
i,
v);
1019 ret = Py_BuildValue(
"[[ffff]O]", da[0], da[1], da[2], da[3], list);
1027 ".. function:: cell(position, /)\n"
1029 " Returns cell noise value at the specified position.\n"
1031 " :arg position: The position to evaluate the selected noise function.\n"
1032 " :type position: :class:`mathutils.Vector`\n"
1033 " :return: The cell noise value.\n"
1034 " :rtype: float\n");
1040 if (!PyArg_ParseTuple(args,
"O:cell", &value)) {
1048 return PyFloat_FromDouble(
BLI_noise_cell(vec[0], vec[1], vec[2]));
1053 M_Noise_cell_vector_doc,
1054 ".. function:: cell_vector(position, /)\n"
1056 " Returns cell noise vector at the specified position.\n"
1058 " :arg position: The position to evaluate the selected noise function.\n"
1059 " :type position: :class:`mathutils.Vector`\n"
1060 " :return: The cell noise vector.\n"
1061 " :rtype: :class:`mathutils.Vector`\n");
1065 float vec[3], r_vec[3];
1067 if (!PyArg_ParseTuple(args,
"O:cell_vector", &value)) {
1081# pragma clang diagnostic push
1082# pragma clang diagnostic ignored "-Wcast-function-type"
1084# pragma GCC diagnostic push
1085# 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},
1142# pragma clang diagnostic pop
1144# pragma GCC diagnostic pop
1151 "The Blender noise module.");
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.
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[]
PyDoc_STRVAR(M_Noise_random_doc, ".. function:: random()\n" "\n" " Returns a random number in the range [0, 1).\n" "\n" " :return: The random number.\n" " :rtype: float\n")
#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)
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)