Blender V4.3
BPy_ZDiscontinuityF1D.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#include "../../BPy_Convert.h"
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19using namespace Freestyle;
20
22
23//------------------------INSTANCE METHODS ----------------------------------
24
26 /* Wrap. */
27 ZDiscontinuityF1D___doc__,
28 "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
29 ":class:`freestyle.types.UnaryFunction1DDouble` > :class:`ZDiscontinuityF1D`\n"
30 "\n"
31 ".. method:: __init__(integration_type=IntegrationType.MEAN)\n"
32 "\n"
33 " Builds a ZDiscontinuityF1D object.\n"
34 "\n"
35 " :arg integration_type: The integration method used to compute a single value\n"
36 " from a set of values.\n"
37 " :type integration_type: :class:`freestyle.types.IntegrationType`\n"
38 "\n"
39 ".. method:: __call__(inter)\n"
40 "\n"
41 " Returns a real value giving the distance between an Interface1D\n"
42 " and the shape that lies behind (occludee). This distance is\n"
43 " evaluated in the camera space and normalized between 0 and 1.\n"
44 " Therefore, if no object is occluded by the shape to which the\n"
45 " Interface1D belongs to, 1 is returned.\n"
46 "\n"
47 " :arg inter: An Interface1D object.\n"
48 " :type inter: :class:`freestyle.types.Interface1D`\n"
49 " :return: The normalized distance between the Interface1D and the occludee.\n"
50 " :rtype: float\n");
51
52static int ZDiscontinuityF1D___init__(BPy_ZDiscontinuityF1D *self, PyObject *args, PyObject *kwds)
53{
54 static const char *kwlist[] = {"integration_type", nullptr};
55 PyObject *obj = nullptr;
56
57 if (!PyArg_ParseTupleAndKeywords(
58 args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
59 {
60 return -1;
61 }
63 self->py_uf1D_double.uf1D_double = new Functions1D::ZDiscontinuityF1D(t);
64 return 0;
65}
66
67/*-----------------------BPy_ZDiscontinuityF1D type definition ------------------------------*/
68
69PyTypeObject ZDiscontinuityF1D_Type = {
70 /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0)
71 /*tp_name*/ "ZDiscontinuityF1D",
72 /*tp_basicsize*/ sizeof(BPy_ZDiscontinuityF1D),
73 /*tp_itemsize*/ 0,
74 /*tp_dealloc*/ nullptr,
75 /*tp_vectorcall_offset*/ 0,
76 /*tp_getattr*/ nullptr,
77 /*tp_setattr*/ nullptr,
78 /*tp_as_async*/ nullptr,
79 /*tp_repr*/ nullptr,
80 /*tp_as_number*/ nullptr,
81 /*tp_as_sequence*/ nullptr,
82 /*tp_as_mapping*/ nullptr,
83 /*tp_hash*/ nullptr,
84 /*tp_call*/ nullptr,
85 /*tp_str*/ nullptr,
86 /*tp_getattro*/ nullptr,
87 /*tp_setattro*/ nullptr,
88 /*tp_as_buffer*/ nullptr,
89 /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
90 /*tp_doc*/ ZDiscontinuityF1D___doc__,
91 /*tp_traverse*/ nullptr,
92 /*tp_clear*/ nullptr,
93 /*tp_richcompare*/ nullptr,
94 /*tp_weaklistoffset*/ 0,
95 /*tp_iter*/ nullptr,
96 /*tp_iternext*/ nullptr,
97 /*tp_methods*/ nullptr,
98 /*tp_members*/ nullptr,
99 /*tp_getset*/ nullptr,
100 /*tp_base*/ &UnaryFunction1DDouble_Type,
101 /*tp_dict*/ nullptr,
102 /*tp_descr_get*/ nullptr,
103 /*tp_descr_set*/ nullptr,
104 /*tp_dictoffset*/ 0,
105 /*tp_init*/ (initproc)ZDiscontinuityF1D___init__,
106 /*tp_alloc*/ nullptr,
107 /*tp_new*/ nullptr,
108};
109
111
112#ifdef __cplusplus
113}
114#endif
IntegrationType IntegrationType_from_BPy_IntegrationType(PyObject *obj)
PyTypeObject IntegrationType_Type
PyTypeObject UnaryFunction1DDouble_Type
static int ZDiscontinuityF1D___init__(BPy_ZDiscontinuityF1D *self, PyObject *args, PyObject *kwds)
PyDoc_STRVAR(ZDiscontinuityF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DDouble` > :class:`ZDiscontinuityF1D`\n" "\n" ".. method:: __init__(integration_type=IntegrationType.MEAN)\n" "\n" " Builds a ZDiscontinuityF1D object.\n" "\n" " :arg integration_type: The integration method used to compute a single value\n" " from a set of values.\n" " :type integration_type: :class:`freestyle.types.IntegrationType`\n" "\n" ".. method:: __call__(inter)\n" "\n" " Returns a real value giving the distance between an Interface1D\n" " and the shape that lies behind (occludee). This distance is\n" " evaluated in the camera space and normalized between 0 and 1.\n" " Therefore, if no object is occluded by the shape to which the\n" " Interface1D belongs to, 1 is returned.\n" "\n" " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: The normalized distance between the Interface1D and the occludee.\n" " :rtype: float\n")
PyTypeObject ZDiscontinuityF1D_Type
Functions taking 1D input.
PyObject * self
inherits from class Rep
Definition AppCanvas.cpp:20