Blender V4.3
BPy_DensityF0D.cpp
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2004-2022 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#include "BPy_DensityF0D.h"
10
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17using namespace Freestyle;
18
20
21//------------------------INSTANCE METHODS ----------------------------------
22
24 /* Wrap. */
25 DensityF0D___doc__,
26 "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > "
27 ":class:`freestyle.types.UnaryFunction0DDouble` > :class:`DensityF0D`\n"
28 "\n"
29 ".. method:: __init__(sigma=2.0)\n"
30 "\n"
31 " Builds a DensityF0D object.\n"
32 "\n"
33 " :arg sigma: The gaussian sigma value indicating the X value for\n"
34 " which the gaussian function is 0.5. It leads to the window size\n"
35 " value (the larger, the smoother).\n"
36 " :type sigma: float\n"
37 "\n"
38 ".. method:: __call__(it)\n"
39 "\n"
40 " Returns the density of the (result) image evaluated at the\n"
41 " :class:`freestyle.types.Interface0D` pointed by the\n"
42 " Interface0DIterator. This density is evaluated using a pixels square\n"
43 " window around the evaluation point and integrating these values using\n"
44 " a gaussian.\n"
45 "\n"
46 " :arg it: An Interface0DIterator object.\n"
47 " :type it: :class:`freestyle.types.Interface0DIterator`\n"
48 " :return: The density of the image evaluated at the pointed\n"
49 " Interface0D.\n"
50 " :rtype: float\n");
51
52static int DensityF0D___init__(BPy_DensityF0D *self, PyObject *args, PyObject *kwds)
53{
54 static const char *kwlist[] = {"sigma", nullptr};
55 double d = 2;
56
57 if (!PyArg_ParseTupleAndKeywords(args, kwds, "|d", (char **)kwlist, &d)) {
58 return -1;
59 }
60 self->py_uf0D_double.uf0D_double = new Functions0D::DensityF0D(d);
61 self->py_uf0D_double.uf0D_double->py_uf0D = (PyObject *)self;
62 return 0;
63}
64
65/*-----------------------BPy_DensityF0D type definition ------------------------------*/
66
67PyTypeObject DensityF0D_Type = {
68 /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0)
69 /*tp_name*/ "DensityF0D",
70 /*tp_basicsize*/ sizeof(BPy_DensityF0D),
71 /*tp_itemsize*/ 0,
72 /*tp_dealloc*/ nullptr,
73 /*tp_vectorcall_offset*/ 0,
74 /*tp_getattr*/ nullptr,
75 /*tp_setattr*/ nullptr,
76 /*tp_as_async*/ nullptr,
77 /*tp_repr*/ nullptr,
78 /*tp_as_number*/ nullptr,
79 /*tp_as_sequence*/ nullptr,
80 /*tp_as_mapping*/ nullptr,
81 /*tp_hash*/ nullptr,
82 /*tp_call*/ nullptr,
83 /*tp_str*/ nullptr,
84 /*tp_getattro*/ nullptr,
85 /*tp_setattro*/ nullptr,
86 /*tp_as_buffer*/ nullptr,
87 /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
88 /*tp_doc*/ DensityF0D___doc__,
89 /*tp_traverse*/ nullptr,
90 /*tp_clear*/ nullptr,
91 /*tp_richcompare*/ nullptr,
92 /*tp_weaklistoffset*/ 0,
93 /*tp_iter*/ nullptr,
94 /*tp_iternext*/ nullptr,
95 /*tp_methods*/ nullptr,
96 /*tp_members*/ nullptr,
97 /*tp_getset*/ nullptr,
98 /*tp_base*/ &UnaryFunction0DDouble_Type,
99 /*tp_dict*/ nullptr,
100 /*tp_descr_get*/ nullptr,
101 /*tp_descr_set*/ nullptr,
102 /*tp_dictoffset*/ 0,
103 /*tp_init*/ (initproc)DensityF0D___init__,
104 /*tp_alloc*/ nullptr,
105 /*tp_new*/ nullptr,
106};
107
109
110#ifdef __cplusplus
111}
112#endif
Functions taking 0D input.
static int DensityF0D___init__(BPy_DensityF0D *self, PyObject *args, PyObject *kwds)
PyDoc_STRVAR(DensityF0D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > " ":class:`freestyle.types.UnaryFunction0DDouble` > :class:`DensityF0D`\n" "\n" ".. method:: __init__(sigma=2.0)\n" "\n" " Builds a DensityF0D object.\n" "\n" " :arg sigma: The gaussian sigma value indicating the X value for\n" " which the gaussian function is 0.5. It leads to the window size\n" " value (the larger, the smoother).\n" " :type sigma: float\n" "\n" ".. method:: __call__(it)\n" "\n" " Returns the density of the (result) image evaluated at the\n" " :class:`freestyle.types.Interface0D` pointed by the\n" " Interface0DIterator. This density is evaluated using a pixels square\n" " window around the evaluation point and integrating these values using\n" " a gaussian.\n" "\n" " :arg it: An Interface0DIterator object.\n" " :type it: :class:`freestyle.types.Interface0DIterator`\n" " :return: The density of the image evaluated at the pointed\n" " Interface0D.\n" " :rtype: float\n")
PyTypeObject DensityF0D_Type
PyTypeObject UnaryFunction0DDouble_Type
PyObject * self
inherits from class Rep
Definition AppCanvas.cpp:20