Blender V4.3
BPy_LocalAverageDepthF1D.cpp
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2004-2023 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 LocalAverageDepthF1D___doc__,
28 "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
29 ":class:`freestyle.types.UnaryFunction1DDouble` > :class:`LocalAverageDepthF1D`\n"
30 "\n"
31 ".. method:: __init__(sigma, integration_type=IntegrationType.MEAN)\n"
32 "\n"
33 " Builds a LocalAverageDepthF1D object.\n"
34 "\n"
35 " :arg sigma: The sigma used in DensityF0D and determining the window\n"
36 " size used in each density query.\n"
37 " :type sigma: float\n"
38 " :arg integration_type: The integration method used to compute a single value\n"
39 " from a set of values.\n"
40 " :type integration_type: :class:`freestyle.types.IntegrationType`\n"
41 "\n"
42 ".. method:: __call__(inter)\n"
43 "\n"
44 " Returns the average depth evaluated for an Interface1D. The average\n"
45 " depth is evaluated for a set of points along the Interface1D (using\n"
46 " the :class:`freestyle.functions.LocalAverageDepthF0D` functor) with a\n"
47 " user-defined sampling and then integrated into a single value using a\n"
48 " user-defined integration method.\n"
49 "\n"
50 " :arg inter: An Interface1D object.\n"
51 " :type inter: :class:`freestyle.types.Interface1D`\n"
52 " :return: The average depth evaluated for the Interface1D.\n"
53 " :rtype: float\n");
54
56 PyObject *args,
57 PyObject *kwds)
58{
59 static const char *kwlist[] = {"sigma", "integration_type", nullptr};
60 PyObject *obj = nullptr;
61 double d;
62
63 if (!PyArg_ParseTupleAndKeywords(
64 args, kwds, "d|O!", (char **)kwlist, &d, &IntegrationType_Type, &obj))
65 {
66 return -1;
67 }
69 self->py_uf1D_double.uf1D_double = new Functions1D::LocalAverageDepthF1D(d, t);
70 return 0;
71}
72
73/*-----------------------BPy_LocalAverageDepthF1D type definition ------------------------------*/
74
76 /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0)
77 /*tp_name*/ "LocalAverageDepthF1D",
78 /*tp_basicsize*/ sizeof(BPy_LocalAverageDepthF1D),
79 /*tp_itemsize*/ 0,
80 /*tp_dealloc*/ nullptr,
81 /*tp_vectorcall_offset*/ 0,
82 /*tp_getattr*/ nullptr,
83 /*tp_setattr*/ nullptr,
84 /*tp_as_async*/ nullptr,
85 /*tp_repr*/ nullptr,
86 /*tp_as_number*/ nullptr,
87 /*tp_as_sequence*/ nullptr,
88 /*tp_as_mapping*/ nullptr,
89 /*tp_hash*/ nullptr,
90 /*tp_call*/ nullptr,
91 /*tp_str*/ nullptr,
92 /*tp_getattro*/ nullptr,
93 /*tp_setattro*/ nullptr,
94 /*tp_as_buffer*/ nullptr,
95 /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
96 /*tp_doc*/ LocalAverageDepthF1D___doc__,
97 /*tp_traverse*/ nullptr,
98 /*tp_clear*/ nullptr,
99 /*tp_richcompare*/ nullptr,
100 /*tp_weaklistoffset*/ 0,
101 /*tp_iter*/ nullptr,
102 /*tp_iternext*/ nullptr,
103 /*tp_methods*/ nullptr,
104 /*tp_members*/ nullptr,
105 /*tp_getset*/ nullptr,
106 /*tp_base*/ &UnaryFunction1DDouble_Type,
107 /*tp_dict*/ nullptr,
108 /*tp_descr_get*/ nullptr,
109 /*tp_descr_set*/ nullptr,
110 /*tp_dictoffset*/ 0,
111 /*tp_init*/ (initproc)LocalAverageDepthF1D___init__,
112 /*tp_alloc*/ nullptr,
113 /*tp_new*/ nullptr,
114};
115
117
118#ifdef __cplusplus
119}
120#endif
Functions taking 1D input.
IntegrationType IntegrationType_from_BPy_IntegrationType(PyObject *obj)
PyTypeObject IntegrationType_Type
PyDoc_STRVAR(LocalAverageDepthF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DDouble` > :class:`LocalAverageDepthF1D`\n" "\n" ".. method:: __init__(sigma, integration_type=IntegrationType.MEAN)\n" "\n" " Builds a LocalAverageDepthF1D object.\n" "\n" " :arg sigma: The sigma used in DensityF0D and determining the window\n" " size used in each density query.\n" " :type sigma: float\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 the average depth evaluated for an Interface1D. The average\n" " depth is evaluated for a set of points along the Interface1D (using\n" " the :class:`freestyle.functions.LocalAverageDepthF0D` functor) with a\n" " user-defined sampling and then integrated into a single value using a\n" " user-defined integration method.\n" "\n" " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: The average depth evaluated for the Interface1D.\n" " :rtype: float\n")
static int LocalAverageDepthF1D___init__(BPy_LocalAverageDepthF1D *self, PyObject *args, PyObject *kwds)
PyTypeObject LocalAverageDepthF1D_Type
PyTypeObject UnaryFunction1DDouble_Type
PyObject * self
inherits from class Rep
Definition AppCanvas.cpp:20