Blender  V2.93
BPy_QuantitativeInvisibilityUP1D.cpp
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 using namespace Freestyle;
28 
30 
31 //------------------------INSTANCE METHODS ----------------------------------
32 
34  "Class hierarchy: :class:`freestyle.types.UnaryPredicate1D` > "
35  ":class:`QuantitativeInvisibilityUP1D`\n"
36  "\n"
37  ".. method:: __init__(qi=0)\n"
38  "\n"
39  " Builds a QuantitativeInvisibilityUP1D object.\n"
40  "\n"
41  " :arg qi: The Quantitative Invisibility you want the Interface1D to\n"
42  " have.\n"
43  " :type qi: int\n"
44  "\n"
45  ".. method:: __call__(inter)\n"
46  "\n"
47  " Returns true if the Quantitative Invisibility evaluated at an\n"
48  " Interface1D, using the\n"
49  " :class:`freestyle.functions.QuantitativeInvisibilityF1D` functor,\n"
50  " equals a certain user-defined value.\n"
51  "\n"
52  " :arg inter: An Interface1D object.\n"
53  " :type inter: :class:`freestyle.types.Interface1D`\n"
54  " :return: True if Quantitative Invisibility equals a user-defined\n"
55  " value.\n"
56  " :rtype: bool\n";
57 
59  PyObject *args,
60  PyObject *kwds)
61 {
62  static const char *kwlist[] = {"qi", nullptr};
63  int i = 0;
64 
65  if (!PyArg_ParseTupleAndKeywords(args, kwds, "|i", (char **)kwlist, &i)) {
66  return -1;
67  }
68  self->py_up1D.up1D = new Predicates1D::QuantitativeInvisibilityUP1D(i);
69  return 0;
70 }
71 
72 /*-----------------------BPy_QuantitativeInvisibilityUP1D type definition -----------------------*/
73 
75  PyVarObject_HEAD_INIT(nullptr, 0) "QuantitativeInvisibilityUP1D", /* tp_name */
76  sizeof(BPy_QuantitativeInvisibilityUP1D), /* tp_basicsize */
77  0, /* tp_itemsize */
78  nullptr, /* tp_dealloc */
79  0, /* tp_vectorcall_offset */
80  nullptr, /* tp_getattr */
81  nullptr, /* tp_setattr */
82  nullptr, /* tp_reserved */
83  nullptr, /* tp_repr */
84  nullptr, /* tp_as_number */
85  nullptr, /* tp_as_sequence */
86  nullptr, /* tp_as_mapping */
87  nullptr, /* tp_hash */
88  nullptr, /* tp_call */
89  nullptr, /* tp_str */
90  nullptr, /* tp_getattro */
91  nullptr, /* tp_setattro */
92  nullptr, /* tp_as_buffer */
93  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
95  nullptr, /* tp_traverse */
96  nullptr, /* tp_clear */
97  nullptr, /* tp_richcompare */
98  0, /* tp_weaklistoffset */
99  nullptr, /* tp_iter */
100  nullptr, /* tp_iternext */
101  nullptr, /* tp_methods */
102  nullptr, /* tp_members */
103  nullptr, /* tp_getset */
104  &UnaryPredicate1D_Type, /* tp_base */
105  nullptr, /* tp_dict */
106  nullptr, /* tp_descr_get */
107  nullptr, /* tp_descr_set */
108  0, /* tp_dictoffset */
109  (initproc)QuantitativeInvisibilityUP1D___init__, /* tp_init */
110  nullptr, /* tp_alloc */
111  nullptr, /* tp_new */
112 };
113 
115 
116 #ifdef __cplusplus
117 }
118 #endif
static int QuantitativeInvisibilityUP1D___init__(BPy_QuantitativeInvisibilityUP1D *self, PyObject *args, PyObject *kwds)
PyTypeObject QuantitativeInvisibilityUP1D_Type
static char QuantitativeInvisibilityUP1D___doc__[]
PyTypeObject UnaryPredicate1D_Type
inherits from class Rep
Definition: AppCanvas.cpp:32