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