Blender V4.3
BPy_DensityLowerThanUP1D.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
10
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17using namespace Freestyle;
18
20
21//------------------------INSTANCE METHODS ----------------------------------
22
24 /* Wrap. */
25 DensityLowerThanUP1D___doc__,
26 "Class hierarchy: :class:`freestyle.types.UnaryPredicate1D` > :class:`DensityLowerThanUP1D`\n"
27 "\n"
28 ".. method:: __init__(threshold, sigma=2.0)\n"
29 "\n"
30 " Builds a DensityLowerThanUP1D object.\n"
31 "\n"
32 " :arg threshold: The value of the threshold density. Any Interface1D\n"
33 " having a density lower than this threshold will match.\n"
34 " :type threshold: float\n"
35 " :arg sigma: The sigma value defining the density evaluation window\n"
36 " size used in the :class:`freestyle.functions.DensityF0D` functor.\n"
37 " :type sigma: float\n"
38 "\n"
39 ".. method:: __call__(inter)\n"
40 "\n"
41 " Returns true if the density evaluated for the Interface1D is less\n"
42 " than a user-defined density value.\n"
43 "\n"
44 " :arg inter: An Interface1D object.\n"
45 " :type inter: :class:`freestyle.types.Interface1D`\n"
46 " :return: True if the density is lower than a threshold.\n"
47 " :rtype: bool\n");
48
50 PyObject *args,
51 PyObject *kwds)
52{
53 static const char *kwlist[] = {"threshold", "sigma", nullptr};
54 double d1, d2 = 2.0;
55
56 if (!PyArg_ParseTupleAndKeywords(args, kwds, "d|d", (char **)kwlist, &d1, &d2)) {
57 return -1;
58 }
59 self->py_up1D.up1D = new Predicates1D::DensityLowerThanUP1D(d1, d2);
60 return 0;
61}
62
63/*-----------------------BPy_DensityLowerThanUP1D type definition ------------------------------*/
64
66 /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0)
67 /*tp_name*/ "DensityLowerThanUP1D",
68 /*tp_basicsize*/ sizeof(BPy_DensityLowerThanUP1D),
69 /*tp_itemsize*/ 0,
70 /*tp_dealloc*/ nullptr,
71 /*tp_vectorcall_offset*/ 0,
72 /*tp_getattr*/ nullptr,
73 /*tp_setattr*/ nullptr,
74 /*tp_as_async*/ nullptr,
75 /*tp_repr*/ nullptr,
76 /*tp_as_number*/ nullptr,
77 /*tp_as_sequence*/ nullptr,
78 /*tp_as_mapping*/ nullptr,
79 /*tp_hash*/ nullptr,
80 /*tp_call*/ nullptr,
81 /*tp_str*/ nullptr,
82 /*tp_getattro*/ nullptr,
83 /*tp_setattro*/ nullptr,
84 /*tp_as_buffer*/ nullptr,
85 /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
86 /*tp_doc*/ DensityLowerThanUP1D___doc__,
87 /*tp_traverse*/ nullptr,
88 /*tp_clear*/ nullptr,
89 /*tp_richcompare*/ nullptr,
90 /*tp_weaklistoffset*/ 0,
91 /*tp_iter*/ nullptr,
92 /*tp_iternext*/ nullptr,
93 /*tp_methods*/ nullptr,
94 /*tp_members*/ nullptr,
95 /*tp_getset*/ nullptr,
96 /*tp_base*/ &UnaryPredicate1D_Type,
97 /*tp_dict*/ nullptr,
98 /*tp_descr_get*/ nullptr,
99 /*tp_descr_set*/ nullptr,
100 /*tp_dictoffset*/ 0,
101 /*tp_init*/ (initproc)DensityLowerThanUP1D___init__,
102 /*tp_alloc*/ nullptr,
103 /*tp_new*/ nullptr,
104};
105
107
108#ifdef __cplusplus
109}
110#endif
Class gathering stroke creation algorithms.
PyTypeObject DensityLowerThanUP1D_Type
static int DensityLowerThanUP1D___init__(BPy_DensityLowerThanUP1D *self, PyObject *args, PyObject *kwds)
PyDoc_STRVAR(DensityLowerThanUP1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryPredicate1D` > :class:`DensityLowerThanUP1D`\n" "\n" ".. method:: __init__(threshold, sigma=2.0)\n" "\n" " Builds a DensityLowerThanUP1D object.\n" "\n" " :arg threshold: The value of the threshold density. Any Interface1D\n" " having a density lower than this threshold will match.\n" " :type threshold: float\n" " :arg sigma: The sigma value defining the density evaluation window\n" " size used in the :class:`freestyle.functions.DensityF0D` functor.\n" " :type sigma: float\n" "\n" ".. method:: __call__(inter)\n" "\n" " Returns true if the density evaluated for the Interface1D is less\n" " than a user-defined density value.\n" "\n" " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: True if the density is lower than a threshold.\n" " :rtype: bool\n")
PyTypeObject UnaryPredicate1D_Type
PyObject * self
inherits from class Rep
Definition AppCanvas.cpp:20