Blender  V2.93
BPy_ZDiscontinuityF0D.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_ZDiscontinuityF0D.h"
22 
23 #include "../../../view_map/Functions0D.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 using namespace Freestyle;
30 
32 
33 //------------------------INSTANCE METHODS ----------------------------------
34 
36  "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > "
37  ":class:`freestyle.types.UnaryFunction0DDouble` > :class:`ZDiscontinuityF0D`\n"
38  "\n"
39  ".. method:: __init__()\n"
40  "\n"
41  " Builds a ZDiscontinuityF0D object.\n"
42  "\n"
43  ".. method:: __call__(it)\n"
44  "\n"
45  " Returns a real value giving the distance between the\n"
46  " :class:`freestyle.types.Interface0D` pointed by the\n"
47  " Interface0DIterator and the shape that lies behind (occludee). This\n"
48  " distance is evaluated in the camera space and normalized between 0 and\n"
49  " 1. Therefore, if no object is occluded by the shape to which the\n"
50  " Interface0D belongs to, 1 is returned.\n"
51  "\n"
52  " :arg it: An Interface0DIterator object.\n"
53  " :type it: :class:`freestyle.types.Interface0DIterator`\n"
54  " :return: The normalized distance between the pointed Interface0D\n"
55  " and the occludee.\n"
56  " :rtype: float\n";
57 
58 static int ZDiscontinuityF0D___init__(BPy_ZDiscontinuityF0D *self, PyObject *args, PyObject *kwds)
59 {
60  static const char *kwlist[] = {nullptr};
61 
62  if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
63  return -1;
64  }
65  self->py_uf0D_double.uf0D_double = new Functions0D::ZDiscontinuityF0D();
66  self->py_uf0D_double.uf0D_double->py_uf0D = (PyObject *)self;
67  return 0;
68 }
69 
70 /*-----------------------BPy_ZDiscontinuityF0D type definition ------------------------------*/
71 
72 PyTypeObject ZDiscontinuityF0D_Type = {
73  PyVarObject_HEAD_INIT(nullptr, 0) "ZDiscontinuityF0D", /* tp_name */
74  sizeof(BPy_ZDiscontinuityF0D), /* tp_basicsize */
75  0, /* tp_itemsize */
76  nullptr, /* tp_dealloc */
77  0, /* tp_vectorcall_offset */
78  nullptr, /* tp_getattr */
79  nullptr, /* tp_setattr */
80  nullptr, /* tp_reserved */
81  nullptr, /* tp_repr */
82  nullptr, /* tp_as_number */
83  nullptr, /* tp_as_sequence */
84  nullptr, /* tp_as_mapping */
85  nullptr, /* tp_hash */
86  nullptr, /* tp_call */
87  nullptr, /* tp_str */
88  nullptr, /* tp_getattro */
89  nullptr, /* tp_setattro */
90  nullptr, /* tp_as_buffer */
91  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
92  ZDiscontinuityF0D___doc__, /* tp_doc */
93  nullptr, /* tp_traverse */
94  nullptr, /* tp_clear */
95  nullptr, /* tp_richcompare */
96  0, /* tp_weaklistoffset */
97  nullptr, /* tp_iter */
98  nullptr, /* tp_iternext */
99  nullptr, /* tp_methods */
100  nullptr, /* tp_members */
101  nullptr, /* tp_getset */
102  &UnaryFunction0DDouble_Type, /* tp_base */
103  nullptr, /* tp_dict */
104  nullptr, /* tp_descr_get */
105  nullptr, /* tp_descr_set */
106  0, /* tp_dictoffset */
107  (initproc)ZDiscontinuityF0D___init__, /* tp_init */
108  nullptr, /* tp_alloc */
109  nullptr, /* tp_new */
110 };
111 
113 
114 #ifdef __cplusplus
115 }
116 #endif
PyTypeObject UnaryFunction0DDouble_Type
static char ZDiscontinuityF0D___doc__[]
static int ZDiscontinuityF0D___init__(BPy_ZDiscontinuityF0D *self, PyObject *args, PyObject *kwds)
PyTypeObject ZDiscontinuityF0D_Type
inherits from class Rep
Definition: AppCanvas.cpp:32