Blender  V2.93
BPy_Length2DBP1D.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 
21 #include "BPy_Length2DBP1D.h"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 using namespace Freestyle;
28 
30 
31 //------------------------INSTANCE METHODS ----------------------------------
32 
33 static char Length2DBP1D___doc__[] =
34  "Class hierarchy: :class:`freestyle.types.BinaryPredicate1D` > :class:`Length2DBP1D`\n"
35  "\n"
36  ".. method:: __call__(inter1, inter2)\n"
37  "\n"
38  " Returns true if the 2D length of inter1 is less than the 2D length\n"
39  " of inter2.\n"
40  "\n"
41  " :arg inter1: The first Interface1D object.\n"
42  " :type inter1: :class:`freestyle.types.Interface1D`\n"
43  " :arg inter2: The second Interface1D object.\n"
44  " :type inter2: :class:`freestyle.types.Interface1D`\n"
45  " :return: True or false.\n"
46  " :rtype: bool\n";
47 
48 static int Length2DBP1D___init__(BPy_Length2DBP1D *self, PyObject *args, PyObject *kwds)
49 {
50  static const char *kwlist[] = {nullptr};
51 
52  if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
53  return -1;
54  }
55  self->py_bp1D.bp1D = new Predicates1D::Length2DBP1D();
56  return 0;
57 }
58 
59 /*-----------------------BPy_Length2DBP1D type definition ------------------------------*/
60 
61 PyTypeObject Length2DBP1D_Type = {
62  PyVarObject_HEAD_INIT(nullptr, 0) "Length2DBP1D", /* tp_name */
63  sizeof(BPy_Length2DBP1D), /* tp_basicsize */
64  0, /* tp_itemsize */
65  nullptr, /* tp_dealloc */
66  0, /* tp_vectorcall_offset */
67  nullptr, /* tp_getattr */
68  nullptr, /* tp_setattr */
69  nullptr, /* tp_reserved */
70  nullptr, /* tp_repr */
71  nullptr, /* tp_as_number */
72  nullptr, /* tp_as_sequence */
73  nullptr, /* tp_as_mapping */
74  nullptr, /* tp_hash */
75  nullptr, /* tp_call */
76  nullptr, /* tp_str */
77  nullptr, /* tp_getattro */
78  nullptr, /* tp_setattro */
79  nullptr, /* tp_as_buffer */
80  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
81  Length2DBP1D___doc__, /* tp_doc */
82  nullptr, /* tp_traverse */
83  nullptr, /* tp_clear */
84  nullptr, /* tp_richcompare */
85  0, /* tp_weaklistoffset */
86  nullptr, /* tp_iter */
87  nullptr, /* tp_iternext */
88  nullptr, /* tp_methods */
89  nullptr, /* tp_members */
90  nullptr, /* tp_getset */
91  &BinaryPredicate1D_Type, /* tp_base */
92  nullptr, /* tp_dict */
93  nullptr, /* tp_descr_get */
94  nullptr, /* tp_descr_set */
95  0, /* tp_dictoffset */
96  (initproc)Length2DBP1D___init__, /* tp_init */
97  nullptr, /* tp_alloc */
98  nullptr, /* tp_new */
99 };
100 
102 
103 #ifdef __cplusplus
104 }
105 #endif
PyTypeObject BinaryPredicate1D_Type
PyTypeObject Length2DBP1D_Type
static int Length2DBP1D___init__(BPy_Length2DBP1D *self, PyObject *args, PyObject *kwds)
static char Length2DBP1D___doc__[]
inherits from class Rep
Definition: AppCanvas.cpp:32