17#ifndef MATH_STANDALONE
25 "The Blender interpolate module");
29#ifndef MATH_STANDALONE
33 M_Interpolate_poly_3d_calc_doc,
34 ".. function:: poly_3d_calc(veclist, pt)\n"
36 " Calculate barycentric weights for a point on a polygon.\n"
38 " :arg veclist: Sequence of 3D positions.\n"
39 " :type veclist: Sequence[Sequence[float]]\n"
40 " :arg pt: 2D or 3D position."
41 " :type pt: Sequence[float]"
42 " :return: list of per-vector weights.\n"
43 " :rtype: list[float]\n");
53 if (!PyArg_ParseTuple(args,
"OO:poly_3d_calc", &veclist, &point)) {
58 fp, 2, 3 |
MU_ARRAY_ZERO, point,
"pt must be a 2-3 dimensional vector") == -1)
69 float *weights =
static_cast<float *
>(
MEM_mallocN(
sizeof(
float) *
len, __func__));
74 for (i = 0; i <
len; i++) {
75 PyList_SET_ITEM(
ret, i, PyFloat_FromDouble(weights[i]));
92#ifndef MATH_STANDALONE
96 M_Interpolate_poly_3d_calc_doc},
98 {
nullptr,
nullptr, 0,
nullptr},
102 PyModuleDef_HEAD_INIT,
103 "mathutils.interpolate",
void interp_weights_poly_v3(float w[], float v[][3], int n, const float co[3])
Read Guarded memory(de)allocation.
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Gabor Generate Gabor noise Gradient Generate interpolated color and intensity values based on the input vector Magic Generate a psychedelic color texture Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a point
draw_view in_light_buf[] float
void *(* MEM_mallocN)(size_t len, const char *str)
void MEM_freeN(void *vmemh)
int mathutils_array_parse(float *array, int array_num_min, int array_num_max, PyObject *value, const char *error_prefix)
int mathutils_array_parse_alloc_v(float **array, int array_dim, PyObject *value, const char *error_prefix)
PyDoc_STRVAR(M_Interpolate_doc, "The Blender interpolate module")
static PyMethodDef M_Interpolate_methods[]
PyMODINIT_FUNC PyInit_mathutils_interpolate()
static PyObject * M_Interpolate_poly_3d_calc(PyObject *, PyObject *args)
static PyModuleDef M_Interpolate_module_def