36 #include "../generic/py_capi_utils.h"
90 #define MATRIX_A 0x9908b0dfUL
91 #define UMASK 0x80000000UL
92 #define LMASK 0x7fffffffUL
93 #define MIXBITS(u, v) (((u)&UMASK) | ((v)&LMASK))
94 #define TWIST(u, v) ((MIXBITS(u, v) >> 1) ^ ((v)&1UL ? MATRIX_A : 0UL))
106 state[0] = s & 0xffffffffUL;
107 for (j = 1; j <
N; j++) {
113 state[j] &= 0xffffffffUL;
121 const float range = 32;
143 for (j =
N -
M + 1; --j; p++) {
144 *p = p[
M] ^
TWIST(p[0], p[1]);
147 for (j =
M; --j; p++) {
148 *p = p[
M -
N] ^
TWIST(p[0], p[1]);
178 y ^= (
y << 7) & 0x9d2c5680UL;
179 y ^= (
y << 15) & 0xefc60000UL;
182 return (
float)
y / 4294967296.0f;
189 #define BPY_NOISE_BASIS_ENUM_DOC \
190 " :arg noise_basis: Enumerator in ['BLENDER', 'PERLIN_ORIGINAL', 'PERLIN_NEW', " \
191 "'VORONOI_F1', 'VORONOI_F2', " \
192 "'VORONOI_F3', 'VORONOI_F4', 'VORONOI_F2F1', 'VORONOI_CRACKLE', " \
194 " :type noise_basis: string\n"
196 #define BPY_NOISE_METRIC_ENUM_DOC \
197 " :arg distance_metric: Enumerator in ['DISTANCE', 'DISTANCE_SQUARED', 'MANHATTAN', " \
199 "'MINKOVSKY', 'MINKOVSKY_HALF', 'MINKOVSKY_FOUR'].\n" \
200 " :type distance_metric: string\n"
203 #define DEFAULT_NOISE_TYPE TEX_STDPERLIN
220 #define DEFAULT_METRIC_TYPE TEX_DISTANCE
236 float *array_pt = array_tar + (
size - 1);
239 *(array_pt--) = 2.0f *
frand() - 1.0f;
248 for (
int j = 0; j < 3; j++) {
257 float x,
float y,
float z,
int oct,
int hard,
int nb,
float ampscale,
float freqscale)
266 for (i = 1; i < oct; i++) {
301 for (i = 1; i < oct; i++) {
326 ".. function:: random()\n"
328 " Returns a random number in the range [0, 1).\n"
330 " :return: The random number.\n"
334 return PyFloat_FromDouble(
frand());
338 ".. function:: random_unit_vector(size=3)\n"
340 " Returns a unit vector with random entries.\n"
342 " :arg size: The size of the vector to be produced, in the range [2, 4].\n"
344 " :return: The random unit vector.\n"
345 " :rtype: :class:`mathutils.Vector`\n");
348 static const char *kwlist[] = {
"size",
NULL};
349 float vec[4] = {0.0f, 0.0f, 0.0f, 0.0f};
353 if (!PyArg_ParseTupleAndKeywords(args, kw,
"|$i:random_unit_vector", (
char **)kwlist, &
size)) {
358 PyErr_SetString(PyExc_ValueError,
"Vector(): invalid size");
362 while (
norm == 0.0f ||
norm > 1.0f) {
371 ".. function:: random_vector(size=3)\n"
373 " Returns a vector with random entries in the range (-1, 1).\n"
375 " :arg size: The size of the vector to be produced.\n"
377 " :return: The random vector.\n"
378 " :rtype: :class:`mathutils.Vector`\n");
381 static const char *kwlist[] = {
"size",
NULL};
385 if (!PyArg_ParseTupleAndKeywords(args, kw,
"|$i:random_vector", (
char **)kwlist, &
size)) {
390 PyErr_SetString(PyExc_ValueError,
"Vector(): invalid size");
394 vec = PyMem_New(
float,
size);
402 ".. function:: seed_set(seed)\n"
404 " Sets the random seed used for random_unit_vector, and random.\n"
406 " :arg seed: Seed used for the random generator.\n"
407 " When seed is zero, the current time will be used instead.\n"
408 " :type seed: int\n");
412 if (!PyArg_ParseTuple(args,
"i:seed_set", &s)) {
420 ".. function:: noise(position, noise_basis='PERLIN_ORIGINAL')\n"
422 " Returns noise value from the noise basis at the position specified.\n"
424 " :arg position: The position to evaluate the selected noise function.\n"
426 " :return: The noise value.\n"
430 static const char *kwlist[] = {
"",
"noise_basis",
NULL};
433 const char *noise_basis_str =
NULL;
436 if (!PyArg_ParseTupleAndKeywords(
437 args, kw,
"O|$s:noise", (
char **)kwlist, &value, &noise_basis_str)) {
441 if (!noise_basis_str) {
453 return PyFloat_FromDouble(
459 ".. function:: noise_vector(position, noise_basis='PERLIN_ORIGINAL')\n"
461 " Returns the noise vector from the noise basis at the specified position.\n"
463 " :arg position: The position to evaluate the selected noise function.\n"
465 " :return: The noise vector.\n"
466 " :rtype: :class:`mathutils.Vector`\n");
469 static const char *kwlist[] = {
"",
"noise_basis",
NULL};
471 float vec[3], r_vec[3];
472 const char *noise_basis_str =
NULL;
475 if (!PyArg_ParseTupleAndKeywords(
476 args, kw,
"O|$s:noise_vector", (
char **)kwlist, &value, &noise_basis_str)) {
480 if (!noise_basis_str) {
484 bpy_noise_types, noise_basis_str, &noise_basis_enum,
"noise_vector") == -1) {
492 noise_vector(vec[0], vec[1], vec[2], noise_basis_enum, r_vec);
498 ".. function:: turbulence(position, octaves, hard, noise_basis='PERLIN_ORIGINAL', "
499 "amplitude_scale=0.5, frequency_scale=2.0)\n"
501 " Returns the turbulence value from the noise basis at the specified position.\n"
503 " :arg position: The position to evaluate the selected noise function.\n"
504 " :type position: :class:`mathutils.Vector`\n"
505 " :arg octaves: The number of different noise frequencies used.\n"
506 " :type octaves: int\n"
507 " :arg hard: Specifies whether returned turbulence is hard (sharp transitions) or "
508 "soft (smooth transitions).\n"
510 " :arg amplitude_scale: The amplitude scaling factor.\n"
511 " :type amplitude_scale: float\n"
512 " :arg frequency_scale: The frequency scaling factor\n"
513 " :type frequency_scale: float\n"
514 " :return: The turbulence value.\n"
518 static const char *kwlist[] = {
519 "",
"",
"",
"noise_basis",
"amplitude_scale",
"frequency_scale",
NULL};
522 const char *noise_basis_str =
NULL;
524 float as = 0.5f, fs = 2.0f;
526 if (!PyArg_ParseTupleAndKeywords(args,
528 "Oii|$sff:turbulence",
539 if (!noise_basis_str) {
543 bpy_noise_types, noise_basis_str, &noise_basis_enum,
"turbulence") == -1) {
551 return PyFloat_FromDouble(
turb(vec[0], vec[1], vec[2], oct, hd, noise_basis_enum, as, fs));
555 ".. function:: turbulence_vector(position, octaves, hard, "
556 "noise_basis='PERLIN_ORIGINAL', amplitude_scale=0.5, frequency_scale=2.0)\n"
558 " Returns the turbulence vector from the noise basis at the specified position.\n"
560 " :arg position: The position to evaluate the selected noise function.\n"
561 " :type position: :class:`mathutils.Vector`\n"
562 " :arg octaves: The number of different noise frequencies used.\n"
563 " :type octaves: int\n"
564 " :arg hard: Specifies whether returned turbulence is hard (sharp transitions) or "
565 "soft (smooth transitions).\n"
567 " :arg amplitude_scale: The amplitude scaling factor.\n"
568 " :type amplitude_scale: float\n"
569 " :arg frequency_scale: The frequency scaling factor\n"
570 " :type frequency_scale: float\n"
571 " :return: The turbulence vector.\n"
572 " :rtype: :class:`mathutils.Vector`\n");
575 static const char *kwlist[] = {
576 "",
"",
"",
"noise_basis",
"amplitude_scale",
"frequency_scale",
NULL};
578 float vec[3], r_vec[3];
579 const char *noise_basis_str =
NULL;
581 float as = 0.5f, fs = 2.0f;
583 if (!PyArg_ParseTupleAndKeywords(args,
585 "Oii|$sff:turbulence_vector",
596 if (!noise_basis_str) {
600 bpy_noise_types, noise_basis_str, &noise_basis_enum,
"turbulence_vector") == -1) {
608 vTurb(vec[0], vec[1], vec[2], oct, hd, noise_basis_enum, as, fs, r_vec);
616 ".. function:: fractal(position, H, lacunarity, octaves, noise_basis='PERLIN_ORIGINAL')\n"
618 " Returns the fractal Brownian motion (fBm) noise value from the noise basis at the "
619 "specified position.\n"
621 " :arg position: The position to evaluate the selected noise function.\n"
622 " :type position: :class:`mathutils.Vector`\n"
623 " :arg H: The fractal increment factor.\n"
625 " :arg lacunarity: The gap between successive frequencies.\n"
626 " :type lacunarity: float\n"
627 " :arg octaves: The number of different noise frequencies used.\n"
629 " :return: The fractal Brownian motion noise value.\n"
633 static const char *kwlist[] = {
"",
"",
"",
"",
"noise_basis",
NULL};
636 const char *noise_basis_str =
NULL;
640 if (!PyArg_ParseTupleAndKeywords(args,
652 if (!noise_basis_str) {
656 bpy_noise_types, noise_basis_str, &noise_basis_enum,
"fractal") == -1) {
664 return PyFloat_FromDouble(
669 M_Noise_multi_fractal_doc,
670 ".. function:: multi_fractal(position, H, lacunarity, octaves, "
671 "noise_basis='PERLIN_ORIGINAL')\n"
673 " Returns multifractal noise value from the noise basis at the specified position.\n"
675 " :arg position: The position to evaluate the selected noise function.\n"
676 " :type position: :class:`mathutils.Vector`\n"
677 " :arg H: The fractal increment factor.\n"
679 " :arg lacunarity: The gap between successive frequencies.\n"
680 " :type lacunarity: float\n"
681 " :arg octaves: The number of different noise frequencies used.\n"
683 " :return: The multifractal noise value.\n"
687 static const char *kwlist[] = {
"",
"",
"",
"",
"noise_basis",
NULL};
690 const char *noise_basis_str =
NULL;
694 if (!PyArg_ParseTupleAndKeywords(args,
696 "Offf|$s:multi_fractal",
706 if (!noise_basis_str) {
710 bpy_noise_types, noise_basis_str, &noise_basis_enum,
"multi_fractal") == -1) {
718 return PyFloat_FromDouble(
723 ".. function:: variable_lacunarity(position, distortion, "
724 "noise_type1='PERLIN_ORIGINAL', noise_type2='PERLIN_ORIGINAL')\n"
726 " Returns variable lacunarity noise value, a distorted variety of noise, from "
727 "noise type 1 distorted by noise type 2 at the specified position.\n"
729 " :arg position: The position to evaluate the selected noise function.\n"
730 " :type position: :class:`mathutils.Vector`\n"
731 " :arg distortion: The amount of distortion.\n"
732 " :type distortion: float\n"
733 " :arg noise_type1: Enumerator in ['BLENDER', 'PERLIN_ORIGINAL', 'PERLIN_NEW', "
734 "'VORONOI_F1', 'VORONOI_F2', "
735 "'VORONOI_F3', 'VORONOI_F4', 'VORONOI_F2F1', 'VORONOI_CRACKLE', "
737 " :type noise_type1: string\n"
738 " :arg noise_type2: Enumerator in ['BLENDER', 'PERLIN_ORIGINAL', 'PERLIN_NEW', "
739 "'VORONOI_F1', 'VORONOI_F2', "
740 "'VORONOI_F3', 'VORONOI_F4', 'VORONOI_F2F1', 'VORONOI_CRACKLE', "
742 " :type noise_type2: string\n"
743 " :return: The variable lacunarity noise value.\n"
747 static const char *kwlist[] = {
"",
"",
"noise_type1",
"noise_type2",
NULL};
750 const char *noise_type1_str =
NULL, *noise_type2_str =
NULL;
754 if (!PyArg_ParseTupleAndKeywords(args,
756 "Of|$ss:variable_lacunarity",
765 if (!noise_type1_str) {
769 bpy_noise_types, noise_type1_str, &noise_type1_enum,
"variable_lacunarity") == -1) {
773 if (!noise_type2_str) {
777 bpy_noise_types, noise_type2_str, &noise_type2_enum,
"variable_lacunarity") == -1) {
787 vec[0], vec[1], vec[2], d, noise_type1_enum, noise_type2_enum));
791 M_Noise_hetero_terrain_doc,
792 ".. function:: hetero_terrain(position, H, lacunarity, octaves, offset, "
793 "noise_basis='PERLIN_ORIGINAL')\n"
795 " Returns the heterogeneous terrain value from the noise basis at the specified position.\n"
797 " :arg position: The position to evaluate the selected noise function.\n"
798 " :type position: :class:`mathutils.Vector`\n"
799 " :arg H: The fractal dimension of the roughest areas.\n"
801 " :arg lacunarity: The gap between successive frequencies.\n"
802 " :type lacunarity: float\n"
803 " :arg octaves: The number of different noise frequencies used.\n"
804 " :type octaves: int\n"
805 " :arg offset: The height of the terrain above 'sea level'.\n"
807 " :return: The heterogeneous terrain value.\n"
811 static const char *kwlist[] = {
"",
"",
"",
"",
"",
"noise_basis",
NULL};
814 const char *noise_basis_str =
NULL;
815 float H, lac, oct, ofs;
818 if (!PyArg_ParseTupleAndKeywords(args,
820 "Offff|$s:hetero_terrain",
831 if (!noise_basis_str) {
835 bpy_noise_types, noise_basis_str, &noise_basis_enum,
"hetero_terrain") == -1) {
843 return PyFloat_FromDouble(
848 M_Noise_hybrid_multi_fractal_doc,
849 ".. function:: hybrid_multi_fractal(position, H, lacunarity, octaves, offset, gain, "
850 "noise_basis='PERLIN_ORIGINAL')\n"
852 " Returns hybrid multifractal value from the noise basis at the specified position.\n"
854 " :arg position: The position to evaluate the selected noise function.\n"
855 " :type position: :class:`mathutils.Vector`\n"
856 " :arg H: The fractal dimension of the roughest areas.\n"
858 " :arg lacunarity: The gap between successive frequencies.\n"
859 " :type lacunarity: float\n"
860 " :arg octaves: The number of different noise frequencies used.\n"
861 " :type octaves: int\n"
862 " :arg offset: The height of the terrain above 'sea level'.\n"
863 " :type offset: float\n"
864 " :arg gain: Scaling applied to the values.\n"
866 " :return: The hybrid multifractal value.\n"
870 static const char *kwlist[] = {
"",
"",
"",
"",
"",
"",
"noise_basis",
NULL};
873 const char *noise_basis_str =
NULL;
874 float H, lac, oct, ofs, gn;
877 if (!PyArg_ParseTupleAndKeywords(args,
879 "Offfff|$s:hybrid_multi_fractal",
891 if (!noise_basis_str) {
895 bpy_noise_types, noise_basis_str, &noise_basis_enum,
"hybrid_multi_fractal") ==
906 vec[0], vec[1], vec[2],
H, lac, oct, ofs, gn, noise_basis_enum));
910 M_Noise_ridged_multi_fractal_doc,
911 ".. function:: ridged_multi_fractal(position, H, lacunarity, octaves, offset, gain, "
912 "noise_basis='PERLIN_ORIGINAL')\n"
914 " Returns ridged multifractal value from the noise basis at the specified position.\n"
916 " :arg position: The position to evaluate the selected noise function.\n"
917 " :type position: :class:`mathutils.Vector`\n"
918 " :arg H: The fractal dimension of the roughest areas.\n"
920 " :arg lacunarity: The gap between successive frequencies.\n"
921 " :type lacunarity: float\n"
922 " :arg octaves: The number of different noise frequencies used.\n"
923 " :type octaves: int\n"
924 " :arg offset: The height of the terrain above 'sea level'.\n"
925 " :type offset: float\n"
926 " :arg gain: Scaling applied to the values.\n"
928 " :return: The ridged multifractal value.\n"
932 static const char *kwlist[] = {
"",
"",
"",
"",
"",
"",
"noise_basis",
NULL};
935 const char *noise_basis_str =
NULL;
936 float H, lac, oct, ofs, gn;
939 if (!PyArg_ParseTupleAndKeywords(args,
941 "Offfff|$s:ridged_multi_fractal",
953 if (!noise_basis_str) {
957 bpy_noise_types, noise_basis_str, &noise_basis_enum,
"ridged_multi_fractal") ==
968 vec[0], vec[1], vec[2],
H, lac, oct, ofs, gn, noise_basis_enum));
972 ".. function:: voronoi(position, distance_metric='DISTANCE', exponent=2.5)\n"
974 " Returns a list of distances to the four closest features and their locations.\n"
976 " :arg position: The position to evaluate the selected noise function.\n"
978 " :arg exponent: The exponent for Minkowski distance metric.\n"
979 " :type exponent: float\n"
980 " :return: A list of distances to the four closest features and their locations.\n"
981 " :rtype: list of four floats, list of four :class:`mathutils.Vector` types\n");
984 static const char *kwlist[] = {
"",
"distance_metric",
"exponent",
NULL};
989 const char *metric_str =
NULL;
996 if (!PyArg_ParseTupleAndKeywords(
997 args, kw,
"O|$sf:voronoi", (
char **)kwlist, &value, &metric_str, &me)) {
1012 list = PyList_New(4);
1016 for (i = 0; i < 4; i++) {
1018 PyList_SET_ITEM(list, i,
v);
1021 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");
1035 static PyObject *M_Noise_cell(PyObject *
UNUSED(
self), PyObject *args)
1040 if (!PyArg_ParseTuple(args,
"O:cell", &value)) {
1048 return PyFloat_FromDouble(
BLI_noise_cell(vec[0], vec[1], vec[2]));
1052 ".. function:: cell_vector(position)\n"
1054 " Returns cell noise vector at the specified position.\n"
1056 " :arg position: The position to evaluate the selected noise function.\n"
1057 " :type position: :class:`mathutils.Vector`\n"
1058 " :return: The cell noise vector.\n"
1059 " :rtype: :class:`mathutils.Vector`\n");
1060 static PyObject *M_Noise_cell_vector(PyObject *
UNUSED(
self), PyObject *args)
1063 float vec[3], r_vec[3];
1065 if (!PyArg_ParseTuple(args,
"O:cell_vector", &value)) {
1077 static PyMethodDef M_Noise_methods[] = {
1078 {
"seed_set", (PyCFunction)
M_Noise_seed_set, METH_VARARGS, M_Noise_seed_set_doc},
1079 {
"random", (PyCFunction)
M_Noise_random, METH_NOARGS, M_Noise_random_doc},
1080 {
"random_unit_vector",
1082 METH_VARARGS | METH_KEYWORDS,
1083 M_Noise_random_unit_vector_doc},
1086 METH_VARARGS | METH_KEYWORDS,
1087 M_Noise_random_vector_doc},
1088 {
"noise", (PyCFunction)
M_Noise_noise, METH_VARARGS | METH_KEYWORDS, M_Noise_noise_doc},
1091 METH_VARARGS | METH_KEYWORDS,
1092 M_Noise_noise_vector_doc},
1095 METH_VARARGS | METH_KEYWORDS,
1096 M_Noise_turbulence_doc},
1097 {
"turbulence_vector",
1099 METH_VARARGS | METH_KEYWORDS,
1100 M_Noise_turbulence_vector_doc},
1101 {
"fractal", (PyCFunction)
M_Noise_fractal, METH_VARARGS | METH_KEYWORDS, M_Noise_fractal_doc},
1104 METH_VARARGS | METH_KEYWORDS,
1105 M_Noise_multi_fractal_doc},
1106 {
"variable_lacunarity",
1108 METH_VARARGS | METH_KEYWORDS,
1109 M_Noise_variable_lacunarity_doc},
1112 METH_VARARGS | METH_KEYWORDS,
1113 M_Noise_hetero_terrain_doc},
1114 {
"hybrid_multi_fractal",
1116 METH_VARARGS | METH_KEYWORDS,
1117 M_Noise_hybrid_multi_fractal_doc},
1118 {
"ridged_multi_fractal",
1120 METH_VARARGS | METH_KEYWORDS,
1121 M_Noise_ridged_multi_fractal_doc},
1122 {
"voronoi", (PyCFunction)
M_Noise_voronoi, METH_VARARGS | METH_KEYWORDS, M_Noise_voronoi_doc},
1123 {
"cell", (PyCFunction)M_Noise_cell, METH_VARARGS, M_Noise_cell_doc},
1124 {
"cell_vector", (PyCFunction)M_Noise_cell_vector, METH_VARARGS, M_Noise_cell_vector_doc},
1128 static struct PyModuleDef M_Noise_module_def = {
1129 PyModuleDef_HEAD_INIT,
1143 PyObject *submodule = PyModule_Create(&M_Noise_module_def);
typedef float(TangentPoint)[2]
float normalize_vn(float *array_tar, const 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)
#define TEX_MINKOVSKY_FOUR
#define TEX_DISTANCE_SQUARED
#define TEX_MINKOVSKY_HALF
#define TEX_VORONOI_CRACKLE
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble z
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble t
ATTR_WARN_UNUSED_RESULT const BMVert * v
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
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_min, int array_max, PyObject *value, const char *error_prefix)
PyObject * Vector_CreatePyObject_alloc(float *vec, const int size, PyTypeObject *base_type)
PyObject * Vector_CreatePyObject(const float *vec, const int size, PyTypeObject *base_type)
static PyObject * M_Noise_turbulence_vector(PyObject *UNUSED(self), PyObject *args, PyObject *kw)
static float state_offset_vector[3 *3]
static PyObject * M_Noise_hetero_terrain(PyObject *UNUSED(self), PyObject *args, PyObject *kw)
#define BPY_NOISE_BASIS_ENUM_DOC
static void setRndSeed(int seed)
static PyObject * M_Noise_voronoi(PyObject *UNUSED(self), PyObject *args, PyObject *kw)
#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
PyDoc_STRVAR(M_Noise_doc, "The Blender noise module")
static PyObject * M_Noise_random_unit_vector(PyObject *UNUSED(self), PyObject *args, PyObject *kw)
static void next_state(void)
static PyObject * M_Noise_fractal(PyObject *UNUSED(self), PyObject *args, PyObject *kw)
static PyObject * M_Noise_ridged_multi_fractal(PyObject *UNUSED(self), PyObject *args, PyObject *kw)
static PyObject * M_Noise_random_vector(PyObject *UNUSED(self), PyObject *args, PyObject *kw)
static PyObject * M_Noise_turbulence(PyObject *UNUSED(self), PyObject *args, PyObject *kw)
static PyObject * M_Noise_multi_fractal(PyObject *UNUSED(self), PyObject *args, PyObject *kw)
static PyObject * M_Noise_random(PyObject *UNUSED(self))
static void noise_vector(float x, float y, float z, int nb, float v[3])
static PyObject * M_Noise_noise(PyObject *UNUSED(self), PyObject *args, PyObject *kw)
#define DEFAULT_NOISE_TYPE
static PyObject * M_Noise_hybrid_multi_fractal(PyObject *UNUSED(self), PyObject *args, PyObject *kw)
static float turb(float x, float y, float z, int oct, int hard, int nb, float ampscale, float freqscale)
static PyC_FlagSet bpy_noise_types[]
static PyObject * M_Noise_seed_set(PyObject *UNUSED(self), PyObject *args)
static void init_genrand(ulong s)
static void rand_vn(float *array_tar, const int size)
static PyObject * M_Noise_noise_vector(PyObject *UNUSED(self), PyObject *args, PyObject *kw)
static PyObject * M_Noise_variable_lacunarity(PyObject *UNUSED(self), PyObject *args, PyObject *kw)
static PyC_FlagSet bpy_noise_metrics[]
PyMODINIT_FUNC PyInit_mathutils_noise(void)
int PyC_FlagSet_ValueFromID(PyC_FlagSet *item, const char *identifier, int *r_value, const char *error_prefix)