22 #include "../generic/py_capi_utils.h"
48 #define MATRIX_A 0x9908b0dfUL
49 #define UMASK 0x80000000UL
50 #define LMASK 0x7fffffffUL
51 #define MIXBITS(u, v) (((u)&UMASK) | ((v)&LMASK))
52 #define TWIST(u, v) ((MIXBITS(u, v) >> 1) ^ ((v)&1UL ? MATRIX_A : 0UL))
64 state[0] = s & 0xffffffffUL;
65 for (j = 1; j <
N; j++) {
71 state[j] &= 0xffffffffUL;
79 const float range = 32;
100 for (j =
N -
M + 1; --j; p++) {
101 *p = p[
M] ^
TWIST(p[0], p[1]);
104 for (j =
M; --j; p++) {
105 *p = p[
M -
N] ^
TWIST(p[0], p[1]);
135 y ^= (
y << 7) & 0x9d2c5680UL;
136 y ^= (
y << 15) & 0xefc60000UL;
139 return (
float)
y / 4294967296.0f;
146 #define BPY_NOISE_BASIS_ENUM_DOC \
147 " :arg noise_basis: Enumerator in ['BLENDER', 'PERLIN_ORIGINAL', 'PERLIN_NEW', " \
148 "'VORONOI_F1', 'VORONOI_F2', " \
149 "'VORONOI_F3', 'VORONOI_F4', 'VORONOI_F2F1', 'VORONOI_CRACKLE', " \
151 " :type noise_basis: string\n"
153 #define BPY_NOISE_METRIC_ENUM_DOC \
154 " :arg distance_metric: Enumerator in ['DISTANCE', 'DISTANCE_SQUARED', 'MANHATTAN', " \
156 "'MINKOVSKY', 'MINKOVSKY_HALF', 'MINKOVSKY_FOUR'].\n" \
157 " :type distance_metric: string\n"
160 #define DEFAULT_NOISE_TYPE TEX_STDPERLIN
177 #define DEFAULT_METRIC_TYPE TEX_DISTANCE
193 float *array_pt = array_tar + (
size - 1);
196 *(array_pt--) = 2.0f *
frand() - 1.0f;
205 for (
int j = 0; j < 3; j++) {
214 float x,
float y,
float z,
int oct,
int hard,
int nb,
float ampscale,
float freqscale)
223 for (i = 1; i < oct; i++) {
258 for (i = 1; i < oct; i++) {
283 ".. function:: random()\n"
285 " Returns a random number in the range [0, 1).\n"
287 " :return: The random number.\n"
291 return PyFloat_FromDouble(
frand());
295 ".. function:: random_unit_vector(size=3)\n"
297 " Returns a unit vector with random entries.\n"
299 " :arg size: The size of the vector to be produced, in the range [2, 4].\n"
301 " :return: The random unit vector.\n"
302 " :rtype: :class:`mathutils.Vector`\n");
305 static const char *kwlist[] = {
"size",
NULL};
306 float vec[4] = {0.0f, 0.0f, 0.0f, 0.0f};
310 if (!PyArg_ParseTupleAndKeywords(
311 args, kw,
"|$i:random_unit_vector", (
char **)kwlist, &vec_num)) {
315 if (vec_num > 4 || vec_num < 2) {
316 PyErr_SetString(PyExc_ValueError,
"Vector(): invalid size");
320 while (
norm == 0.0f ||
norm > 1.0f) {
329 ".. function:: random_vector(size=3)\n"
331 " Returns a vector with random entries in the range (-1, 1).\n"
333 " :arg size: The size of the vector to be produced.\n"
335 " :return: The random vector.\n"
336 " :rtype: :class:`mathutils.Vector`\n");
339 static const char *kwlist[] = {
"size",
NULL};
343 if (!PyArg_ParseTupleAndKeywords(args, kw,
"|$i:random_vector", (
char **)kwlist, &vec_num)) {
348 PyErr_SetString(PyExc_ValueError,
"Vector(): invalid size");
352 vec = PyMem_New(
float, vec_num);
360 ".. function:: seed_set(seed)\n"
362 " Sets the random seed used for random_unit_vector, and random.\n"
364 " :arg seed: Seed used for the random generator.\n"
365 " When seed is zero, the current time will be used instead.\n"
366 " :type seed: int\n");
370 if (!PyArg_ParseTuple(args,
"i:seed_set", &s)) {
378 ".. function:: noise(position, noise_basis='PERLIN_ORIGINAL')\n"
380 " Returns noise value from the noise basis at the position specified.\n"
382 " :arg position: The position to evaluate the selected noise function.\n"
384 " :return: The noise value.\n"
388 static const char *kwlist[] = {
"",
"noise_basis",
NULL};
391 const char *noise_basis_str =
NULL;
394 if (!PyArg_ParseTupleAndKeywords(
395 args, kw,
"O|$s:noise", (
char **)kwlist, &value, &noise_basis_str)) {
399 if (!noise_basis_str) {
411 return PyFloat_FromDouble(
417 ".. function:: noise_vector(position, noise_basis='PERLIN_ORIGINAL')\n"
419 " Returns the noise vector from the noise basis at the specified position.\n"
421 " :arg position: The position to evaluate the selected noise function.\n"
423 " :return: The noise vector.\n"
424 " :rtype: :class:`mathutils.Vector`\n");
427 static const char *kwlist[] = {
"",
"noise_basis",
NULL};
429 float vec[3], r_vec[3];
430 const char *noise_basis_str =
NULL;
433 if (!PyArg_ParseTupleAndKeywords(
434 args, kw,
"O|$s:noise_vector", (
char **)kwlist, &value, &noise_basis_str)) {
438 if (!noise_basis_str) {
442 bpy_noise_types, noise_basis_str, &noise_basis_enum,
"noise_vector") == -1) {
450 noise_vector(vec[0], vec[1], vec[2], noise_basis_enum, r_vec);
456 ".. function:: turbulence(position, octaves, hard, noise_basis='PERLIN_ORIGINAL', "
457 "amplitude_scale=0.5, frequency_scale=2.0)\n"
459 " Returns the turbulence value from the noise basis at the specified position.\n"
461 " :arg position: The position to evaluate the selected noise function.\n"
462 " :type position: :class:`mathutils.Vector`\n"
463 " :arg octaves: The number of different noise frequencies used.\n"
464 " :type octaves: int\n"
465 " :arg hard: Specifies whether returned turbulence is hard (sharp transitions) or "
466 "soft (smooth transitions).\n"
468 " :arg amplitude_scale: The amplitude scaling factor.\n"
469 " :type amplitude_scale: float\n"
470 " :arg frequency_scale: The frequency scaling factor\n"
471 " :type frequency_scale: float\n"
472 " :return: The turbulence value.\n"
476 static const char *kwlist[] = {
477 "",
"",
"",
"noise_basis",
"amplitude_scale",
"frequency_scale",
NULL};
480 const char *noise_basis_str =
NULL;
482 float as = 0.5f, fs = 2.0f;
484 if (!PyArg_ParseTupleAndKeywords(args,
486 "Oii|$sff:turbulence",
497 if (!noise_basis_str) {
501 bpy_noise_types, noise_basis_str, &noise_basis_enum,
"turbulence") == -1) {
509 return PyFloat_FromDouble(
turb(vec[0], vec[1], vec[2], oct, hd, noise_basis_enum, as, fs));
513 ".. function:: turbulence_vector(position, octaves, hard, "
514 "noise_basis='PERLIN_ORIGINAL', amplitude_scale=0.5, frequency_scale=2.0)\n"
516 " Returns the turbulence vector from the noise basis at the specified position.\n"
518 " :arg position: The position to evaluate the selected noise function.\n"
519 " :type position: :class:`mathutils.Vector`\n"
520 " :arg octaves: The number of different noise frequencies used.\n"
521 " :type octaves: int\n"
522 " :arg hard: Specifies whether returned turbulence is hard (sharp transitions) or "
523 "soft (smooth transitions).\n"
525 " :arg amplitude_scale: The amplitude scaling factor.\n"
526 " :type amplitude_scale: float\n"
527 " :arg frequency_scale: The frequency scaling factor\n"
528 " :type frequency_scale: float\n"
529 " :return: The turbulence vector.\n"
530 " :rtype: :class:`mathutils.Vector`\n");
533 static const char *kwlist[] = {
534 "",
"",
"",
"noise_basis",
"amplitude_scale",
"frequency_scale",
NULL};
536 float vec[3], r_vec[3];
537 const char *noise_basis_str =
NULL;
539 float as = 0.5f, fs = 2.0f;
541 if (!PyArg_ParseTupleAndKeywords(args,
543 "Oii|$sff:turbulence_vector",
554 if (!noise_basis_str) {
558 bpy_noise_types, noise_basis_str, &noise_basis_enum,
"turbulence_vector") == -1) {
566 vTurb(vec[0], vec[1], vec[2], oct, hd, noise_basis_enum, as, fs, r_vec);
574 ".. function:: fractal(position, H, lacunarity, octaves, noise_basis='PERLIN_ORIGINAL')\n"
576 " Returns the fractal Brownian motion (fBm) noise value from the noise basis at the "
577 "specified position.\n"
579 " :arg position: The position to evaluate the selected noise function.\n"
580 " :type position: :class:`mathutils.Vector`\n"
581 " :arg H: The fractal increment factor.\n"
583 " :arg lacunarity: The gap between successive frequencies.\n"
584 " :type lacunarity: float\n"
585 " :arg octaves: The number of different noise frequencies used.\n"
587 " :return: The fractal Brownian motion noise value.\n"
591 static const char *kwlist[] = {
"",
"",
"",
"",
"noise_basis",
NULL};
594 const char *noise_basis_str =
NULL;
598 if (!PyArg_ParseTupleAndKeywords(args,
610 if (!noise_basis_str) {
614 bpy_noise_types, noise_basis_str, &noise_basis_enum,
"fractal") == -1) {
622 return PyFloat_FromDouble(
627 M_Noise_multi_fractal_doc,
628 ".. function:: multi_fractal(position, H, lacunarity, octaves, "
629 "noise_basis='PERLIN_ORIGINAL')\n"
631 " Returns multifractal noise value from the noise basis at the specified position.\n"
633 " :arg position: The position to evaluate the selected noise function.\n"
634 " :type position: :class:`mathutils.Vector`\n"
635 " :arg H: The fractal increment factor.\n"
637 " :arg lacunarity: The gap between successive frequencies.\n"
638 " :type lacunarity: float\n"
639 " :arg octaves: The number of different noise frequencies used.\n"
641 " :return: The multifractal noise value.\n"
645 static const char *kwlist[] = {
"",
"",
"",
"",
"noise_basis",
NULL};
648 const char *noise_basis_str =
NULL;
652 if (!PyArg_ParseTupleAndKeywords(args,
654 "Offf|$s:multi_fractal",
664 if (!noise_basis_str) {
668 bpy_noise_types, noise_basis_str, &noise_basis_enum,
"multi_fractal") == -1) {
676 return PyFloat_FromDouble(
681 ".. function:: variable_lacunarity(position, distortion, "
682 "noise_type1='PERLIN_ORIGINAL', noise_type2='PERLIN_ORIGINAL')\n"
684 " Returns variable lacunarity noise value, a distorted variety of noise, from "
685 "noise type 1 distorted by noise type 2 at the specified position.\n"
687 " :arg position: The position to evaluate the selected noise function.\n"
688 " :type position: :class:`mathutils.Vector`\n"
689 " :arg distortion: The amount of distortion.\n"
690 " :type distortion: float\n"
691 " :arg noise_type1: Enumerator in ['BLENDER', 'PERLIN_ORIGINAL', 'PERLIN_NEW', "
692 "'VORONOI_F1', 'VORONOI_F2', "
693 "'VORONOI_F3', 'VORONOI_F4', 'VORONOI_F2F1', 'VORONOI_CRACKLE', "
695 " :type noise_type1: string\n"
696 " :arg noise_type2: Enumerator in ['BLENDER', 'PERLIN_ORIGINAL', 'PERLIN_NEW', "
697 "'VORONOI_F1', 'VORONOI_F2', "
698 "'VORONOI_F3', 'VORONOI_F4', 'VORONOI_F2F1', 'VORONOI_CRACKLE', "
700 " :type noise_type2: string\n"
701 " :return: The variable lacunarity noise value.\n"
705 static const char *kwlist[] = {
"",
"",
"noise_type1",
"noise_type2",
NULL};
708 const char *noise_type1_str =
NULL, *noise_type2_str =
NULL;
712 if (!PyArg_ParseTupleAndKeywords(args,
714 "Of|$ss:variable_lacunarity",
723 if (!noise_type1_str) {
727 bpy_noise_types, noise_type1_str, &noise_type1_enum,
"variable_lacunarity") == -1) {
731 if (!noise_type2_str) {
735 bpy_noise_types, noise_type2_str, &noise_type2_enum,
"variable_lacunarity") == -1) {
745 vec[0], vec[1], vec[2], d, noise_type1_enum, noise_type2_enum));
749 M_Noise_hetero_terrain_doc,
750 ".. function:: hetero_terrain(position, H, lacunarity, octaves, offset, "
751 "noise_basis='PERLIN_ORIGINAL')\n"
753 " Returns the heterogeneous terrain value from the noise basis at the specified position.\n"
755 " :arg position: The position to evaluate the selected noise function.\n"
756 " :type position: :class:`mathutils.Vector`\n"
757 " :arg H: The fractal dimension of the roughest areas.\n"
759 " :arg lacunarity: The gap between successive frequencies.\n"
760 " :type lacunarity: float\n"
761 " :arg octaves: The number of different noise frequencies used.\n"
762 " :type octaves: int\n"
763 " :arg offset: The height of the terrain above 'sea level'.\n"
765 " :return: The heterogeneous terrain value.\n"
769 static const char *kwlist[] = {
"",
"",
"",
"",
"",
"noise_basis",
NULL};
772 const char *noise_basis_str =
NULL;
773 float H, lac, oct, ofs;
776 if (!PyArg_ParseTupleAndKeywords(args,
778 "Offff|$s:hetero_terrain",
789 if (!noise_basis_str) {
793 bpy_noise_types, noise_basis_str, &noise_basis_enum,
"hetero_terrain") == -1) {
801 return PyFloat_FromDouble(
806 M_Noise_hybrid_multi_fractal_doc,
807 ".. function:: hybrid_multi_fractal(position, H, lacunarity, octaves, offset, gain, "
808 "noise_basis='PERLIN_ORIGINAL')\n"
810 " Returns hybrid multifractal value from the noise basis at the specified position.\n"
812 " :arg position: The position to evaluate the selected noise function.\n"
813 " :type position: :class:`mathutils.Vector`\n"
814 " :arg H: The fractal dimension of the roughest areas.\n"
816 " :arg lacunarity: The gap between successive frequencies.\n"
817 " :type lacunarity: float\n"
818 " :arg octaves: The number of different noise frequencies used.\n"
819 " :type octaves: int\n"
820 " :arg offset: The height of the terrain above 'sea level'.\n"
821 " :type offset: float\n"
822 " :arg gain: Scaling applied to the values.\n"
824 " :return: The hybrid multifractal value.\n"
828 static const char *kwlist[] = {
"",
"",
"",
"",
"",
"",
"noise_basis",
NULL};
831 const char *noise_basis_str =
NULL;
832 float H, lac, oct, ofs, gn;
835 if (!PyArg_ParseTupleAndKeywords(args,
837 "Offfff|$s:hybrid_multi_fractal",
849 if (!noise_basis_str) {
853 bpy_noise_types, noise_basis_str, &noise_basis_enum,
"hybrid_multi_fractal") ==
864 vec[0], vec[1], vec[2],
H, lac, oct, ofs, gn, noise_basis_enum));
868 M_Noise_ridged_multi_fractal_doc,
869 ".. function:: ridged_multi_fractal(position, H, lacunarity, octaves, offset, gain, "
870 "noise_basis='PERLIN_ORIGINAL')\n"
872 " Returns ridged multifractal value from the noise basis at the specified position.\n"
874 " :arg position: The position to evaluate the selected noise function.\n"
875 " :type position: :class:`mathutils.Vector`\n"
876 " :arg H: The fractal dimension of the roughest areas.\n"
878 " :arg lacunarity: The gap between successive frequencies.\n"
879 " :type lacunarity: float\n"
880 " :arg octaves: The number of different noise frequencies used.\n"
881 " :type octaves: int\n"
882 " :arg offset: The height of the terrain above 'sea level'.\n"
883 " :type offset: float\n"
884 " :arg gain: Scaling applied to the values.\n"
886 " :return: The ridged multifractal value.\n"
890 static const char *kwlist[] = {
"",
"",
"",
"",
"",
"",
"noise_basis",
NULL};
893 const char *noise_basis_str =
NULL;
894 float H, lac, oct, ofs, gn;
897 if (!PyArg_ParseTupleAndKeywords(args,
899 "Offfff|$s:ridged_multi_fractal",
911 if (!noise_basis_str) {
915 bpy_noise_types, noise_basis_str, &noise_basis_enum,
"ridged_multi_fractal") ==
926 vec[0], vec[1], vec[2],
H, lac, oct, ofs, gn, noise_basis_enum));
930 ".. function:: voronoi(position, distance_metric='DISTANCE', exponent=2.5)\n"
932 " Returns a list of distances to the four closest features and their locations.\n"
934 " :arg position: The position to evaluate the selected noise function.\n"
936 " :arg exponent: The exponent for Minkowski distance metric.\n"
937 " :type exponent: float\n"
938 " :return: A list of distances to the four closest features and their locations.\n"
939 " :rtype: list of four floats, list of four :class:`mathutils.Vector` types\n");
942 static const char *kwlist[] = {
"",
"distance_metric",
"exponent",
NULL};
947 const char *metric_str =
NULL;
954 if (!PyArg_ParseTupleAndKeywords(
955 args, kw,
"O|$sf:voronoi", (
char **)kwlist, &value, &metric_str, &me)) {
970 list = PyList_New(4);
974 for (i = 0; i < 4; i++) {
976 PyList_SET_ITEM(list, i,
v);
979 ret = Py_BuildValue(
"[[ffff]O]", da[0], da[1], da[2], da[3], list);
985 ".. function:: cell(position)\n"
987 " Returns cell noise value at the specified position.\n"
989 " :arg position: The position to evaluate the selected noise function.\n"
990 " :type position: :class:`mathutils.Vector`\n"
991 " :return: The cell noise value.\n"
993 static PyObject *M_Noise_cell(PyObject *
UNUSED(
self), PyObject *args)
998 if (!PyArg_ParseTuple(args,
"O:cell", &value)) {
1006 return PyFloat_FromDouble(
BLI_noise_cell(vec[0], vec[1], vec[2]));
1010 ".. function:: cell_vector(position)\n"
1012 " Returns cell noise vector at the specified position.\n"
1014 " :arg position: The position to evaluate the selected noise function.\n"
1015 " :type position: :class:`mathutils.Vector`\n"
1016 " :return: The cell noise vector.\n"
1017 " :rtype: :class:`mathutils.Vector`\n");
1018 static PyObject *M_Noise_cell_vector(PyObject *
UNUSED(
self), PyObject *args)
1021 float vec[3], r_vec[3];
1023 if (!PyArg_ParseTuple(args,
"O:cell_vector", &value)) {
1035 static PyMethodDef M_Noise_methods[] = {
1036 {
"seed_set", (PyCFunction)
M_Noise_seed_set, METH_VARARGS, M_Noise_seed_set_doc},
1037 {
"random", (PyCFunction)
M_Noise_random, METH_NOARGS, M_Noise_random_doc},
1038 {
"random_unit_vector",
1040 METH_VARARGS | METH_KEYWORDS,
1041 M_Noise_random_unit_vector_doc},
1044 METH_VARARGS | METH_KEYWORDS,
1045 M_Noise_random_vector_doc},
1046 {
"noise", (PyCFunction)
M_Noise_noise, METH_VARARGS | METH_KEYWORDS, M_Noise_noise_doc},
1049 METH_VARARGS | METH_KEYWORDS,
1050 M_Noise_noise_vector_doc},
1053 METH_VARARGS | METH_KEYWORDS,
1054 M_Noise_turbulence_doc},
1055 {
"turbulence_vector",
1057 METH_VARARGS | METH_KEYWORDS,
1058 M_Noise_turbulence_vector_doc},
1059 {
"fractal", (PyCFunction)
M_Noise_fractal, METH_VARARGS | METH_KEYWORDS, M_Noise_fractal_doc},
1062 METH_VARARGS | METH_KEYWORDS,
1063 M_Noise_multi_fractal_doc},
1064 {
"variable_lacunarity",
1066 METH_VARARGS | METH_KEYWORDS,
1067 M_Noise_variable_lacunarity_doc},
1070 METH_VARARGS | METH_KEYWORDS,
1071 M_Noise_hetero_terrain_doc},
1072 {
"hybrid_multi_fractal",
1074 METH_VARARGS | METH_KEYWORDS,
1075 M_Noise_hybrid_multi_fractal_doc},
1076 {
"ridged_multi_fractal",
1078 METH_VARARGS | METH_KEYWORDS,
1079 M_Noise_ridged_multi_fractal_doc},
1080 {
"voronoi", (PyCFunction)
M_Noise_voronoi, METH_VARARGS | METH_KEYWORDS, M_Noise_voronoi_doc},
1081 {
"cell", (PyCFunction)M_Noise_cell, METH_VARARGS, M_Noise_cell_doc},
1082 {
"cell_vector", (PyCFunction)M_Noise_cell_vector, METH_VARARGS, M_Noise_cell_vector_doc},
1086 static struct PyModuleDef M_Noise_module_def = {
1087 PyModuleDef_HEAD_INIT,
1101 PyObject *submodule = PyModule_Create(&M_Noise_module_def);
typedef float(TangentPoint)[2]
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)
#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_num_min, int array_num_max, PyObject *value, const char *error_prefix)
PyObject * Vector_CreatePyObject_alloc(float *vec, const int vec_num, PyTypeObject *base_type)
PyObject * Vector_CreatePyObject(const float *vec, const int vec_num, 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)
static const pxr::TfToken out("out", pxr::TfToken::Immortal)
int PyC_FlagSet_ValueFromID(const PyC_FlagSet *item, const char *identifier, int *r_value, const char *error_prefix)