Blender V5.0
BPy_LocalAverageDepthF0D.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
8
10
12
13using namespace Freestyle;
14
16
17//------------------------INSTANCE METHODS ----------------------------------
18
20 /* Wrap. */
21 LocalAverageDepthF0D___doc__,
22 "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > "
23 ":class:`freestyle.types.UnaryFunction0DDouble` > :class:`LocalAverageDepthF0D`\n"
24 "\n"
25 ".. method:: __init__(mask_size=5.0)\n"
26 "\n"
27 " Builds a LocalAverageDepthF0D object.\n"
28 "\n"
29 " :arg mask_size: The size of the mask.\n"
30 " :type mask_size: float\n"
31 "\n"
32 ".. method:: __call__(it)\n"
33 "\n"
34 " Returns the average depth around the\n"
35 " :class:`freestyle.types.Interface0D` pointed by the\n"
36 " Interface0DIterator. The result is obtained by querying the depth\n"
37 " buffer on a window around that point.\n"
38 "\n"
39 " :arg it: An Interface0DIterator object.\n"
40 " :type it: :class:`freestyle.types.Interface0DIterator`\n"
41 " :return: The average depth around the pointed Interface0D.\n"
42 " :rtype: float\n");
44 PyObject *args,
45 PyObject *kwds)
46{
47 static const char *kwlist[] = {"mask_size", nullptr};
48 double d = 5.0;
49
50 if (!PyArg_ParseTupleAndKeywords(args, kwds, "|d", (char **)kwlist, &d)) {
51 return -1;
52 }
53 self->py_uf0D_double.uf0D_double = new Functions0D::LocalAverageDepthF0D(d);
54 self->py_uf0D_double.uf0D_double->py_uf0D = (PyObject *)self;
55 return 0;
56}
57
58/*-----------------------BPy_LocalAverageDepthF0D type definition ------------------------------*/
59
61 /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0)
62 /*tp_name*/ "LocalAverageDepthF0D",
63 /*tp_basicsize*/ sizeof(BPy_LocalAverageDepthF0D),
64 /*tp_itemsize*/ 0,
65 /*tp_dealloc*/ nullptr,
66 /*tp_vectorcall_offset*/ 0,
67 /*tp_getattr*/ nullptr,
68 /*tp_setattr*/ nullptr,
69 /*tp_as_async*/ nullptr,
70 /*tp_repr*/ nullptr,
71 /*tp_as_number*/ nullptr,
72 /*tp_as_sequence*/ nullptr,
73 /*tp_as_mapping*/ nullptr,
74 /*tp_hash*/ nullptr,
75 /*tp_call*/ nullptr,
76 /*tp_str*/ nullptr,
77 /*tp_getattro*/ nullptr,
78 /*tp_setattro*/ nullptr,
79 /*tp_as_buffer*/ nullptr,
80 /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
81 /*tp_doc*/ LocalAverageDepthF0D___doc__,
82 /*tp_traverse*/ nullptr,
83 /*tp_clear*/ nullptr,
84 /*tp_richcompare*/ nullptr,
85 /*tp_weaklistoffset*/ 0,
86 /*tp_iter*/ nullptr,
87 /*tp_iternext*/ nullptr,
88 /*tp_methods*/ nullptr,
89 /*tp_members*/ nullptr,
90 /*tp_getset*/ nullptr,
91 /*tp_base*/ &UnaryFunction0DDouble_Type,
92 /*tp_dict*/ nullptr,
93 /*tp_descr_get*/ nullptr,
94 /*tp_descr_set*/ nullptr,
95 /*tp_dictoffset*/ 0,
96 /*tp_init*/ (initproc)LocalAverageDepthF0D___init__,
97 /*tp_alloc*/ nullptr,
98 /*tp_new*/ nullptr,
99};
100
Functions taking 0D input.
PyTypeObject LocalAverageDepthF0D_Type
static int LocalAverageDepthF0D___init__(BPy_LocalAverageDepthF0D *self, PyObject *args, PyObject *kwds)
PyDoc_STRVAR(LocalAverageDepthF0D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > " ":class:`freestyle.types.UnaryFunction0DDouble` > :class:`LocalAverageDepthF0D`\n" "\n" ".. method:: __init__(mask_size=5.0)\n" "\n" " Builds a LocalAverageDepthF0D object.\n" "\n" " :arg mask_size: The size of the mask.\n" " :type mask_size: float\n" "\n" ".. method:: __call__(it)\n" "\n" " Returns the average depth around the\n" " :class:`freestyle.types.Interface0D` pointed by the\n" " Interface0DIterator. The result is obtained by querying the depth\n" " buffer on a window around that point.\n" "\n" " :arg it: An Interface0DIterator object.\n" " :type it: :class:`freestyle.types.Interface0DIterator`\n" " :return: The average depth around the pointed Interface0D.\n" " :rtype: float\n")
PyTypeObject UnaryFunction0DDouble_Type
PyObject * self
inherits from class Rep
Definition AppCanvas.cpp:20