Blender V4.3
BPy_GetCompleteViewMapDensityF1D.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 GetCompleteViewMapDensityF1D___doc__,
28 "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
29 ":class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetCompleteViewMapDensityF1D`\n"
30 "\n"
31 ".. method:: __init__(level, integration_type=IntegrationType.MEAN, sampling=2.0)\n"
32 "\n"
33 " Builds a GetCompleteViewMapDensityF1D object.\n"
34 "\n"
35 " :arg level: The level of the pyramid from which the pixel must be\n"
36 " read.\n"
37 " :type level: int\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 " :arg sampling: The resolution used to sample the chain: the\n"
42 " corresponding 0D function is evaluated at each sample point and\n"
43 " the result is obtained by combining the resulting values into a\n"
44 " single one, following the method specified by integration_type.\n"
45 " :type sampling: float\n"
46 "\n"
47 ".. method:: __call__(inter)\n"
48 "\n"
49 " Returns the density evaluated for an Interface1D in the complete\n"
50 " viewmap image. The density is evaluated for a set of points along the\n"
51 " Interface1D (using the\n"
52 " :class:`freestyle.functions.ReadCompleteViewMapPixelF0D` functor) and\n"
53 " then integrated into a single value using a user-defined integration\n"
54 " method.\n"
55 "\n"
56 " :arg inter: An Interface1D object.\n"
57 " :type inter: :class:`freestyle.types.Interface1D`\n"
58 " :return: The density evaluated for the Interface1D in the complete\n"
59 " viewmap image.\n"
60 " :rtype: float\n");
61
63 PyObject *args,
64 PyObject *kwds)
65{
66 static const char *kwlist[] = {"level", "integration_type", "sampling", nullptr};
67 PyObject *obj = nullptr;
68 int i;
69 float f = 2.0;
70
71 if (!PyArg_ParseTupleAndKeywords(
72 args, kwds, "i|O!f", (char **)kwlist, &i, &IntegrationType_Type, &obj, &f))
73 {
74 return -1;
75 }
77 self->py_uf1D_double.uf1D_double = new Functions1D::GetCompleteViewMapDensityF1D(i, t, f);
78 return 0;
79}
80
81/*-----------------------BPy_GetCompleteViewMapDensityF1D type definition -----------------------*/
82
84 /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0)
85 /*tp_name*/ "GetCompleteViewMapDensityF1D",
86 /*tp_basicsize*/ sizeof(BPy_GetCompleteViewMapDensityF1D),
87 /*tp_itemsize*/ 0,
88 /*tp_dealloc*/ nullptr,
89 /*tp_vectorcall_offset*/ 0,
90 /*tp_getattr*/ nullptr,
91 /*tp_setattr*/ nullptr,
92 /*tp_as_async*/ nullptr,
93 /*tp_repr*/ nullptr,
94 /*tp_as_number*/ nullptr,
95 /*tp_as_sequence*/ nullptr,
96 /*tp_as_mapping*/ nullptr,
97 /*tp_hash*/ nullptr,
98 /*tp_call*/ nullptr,
99 /*tp_str*/ nullptr,
100 /*tp_getattro*/ nullptr,
101 /*tp_setattro*/ nullptr,
102 /*tp_as_buffer*/ nullptr,
103 /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
104 /*tp_doc*/ GetCompleteViewMapDensityF1D___doc__,
105 /*tp_traverse*/ nullptr,
106 /*tp_clear*/ nullptr,
107 /*tp_richcompare*/ nullptr,
108 /*tp_weaklistoffset*/ 0,
109 /*tp_iter*/ nullptr,
110 /*tp_iternext*/ nullptr,
111 /*tp_methods*/ nullptr,
112 /*tp_members*/ nullptr,
113 /*tp_getset*/ nullptr,
114 /*tp_base*/ &UnaryFunction1DDouble_Type,
115 /*tp_dict*/ nullptr,
116 /*tp_descr_get*/ nullptr,
117 /*tp_descr_set*/ nullptr,
118 /*tp_dictoffset*/ 0,
119 /*tp_init*/ (initproc)GetCompleteViewMapDensityF1D___init__,
120 /*tp_alloc*/ nullptr,
121 /*tp_new*/ nullptr,
122};
123
125
126#ifdef __cplusplus
127}
128#endif
Functions taking 1D input.
IntegrationType IntegrationType_from_BPy_IntegrationType(PyObject *obj)
static int GetCompleteViewMapDensityF1D___init__(BPy_GetCompleteViewMapDensityF1D *self, PyObject *args, PyObject *kwds)
PyTypeObject GetCompleteViewMapDensityF1D_Type
PyDoc_STRVAR(GetCompleteViewMapDensityF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetCompleteViewMapDensityF1D`\n" "\n" ".. method:: __init__(level, integration_type=IntegrationType.MEAN, sampling=2.0)\n" "\n" " Builds a GetCompleteViewMapDensityF1D object.\n" "\n" " :arg level: The level of the pyramid from which the pixel must be\n" " read.\n" " :type level: int\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" " :arg sampling: The resolution used to sample the chain: the\n" " corresponding 0D function is evaluated at each sample point and\n" " the result is obtained by combining the resulting values into a\n" " single one, following the method specified by integration_type.\n" " :type sampling: float\n" "\n" ".. method:: __call__(inter)\n" "\n" " Returns the density evaluated for an Interface1D in the complete\n" " viewmap image. The density is evaluated for a set of points along the\n" " Interface1D (using the\n" " :class:`freestyle.functions.ReadCompleteViewMapPixelF0D` functor) and\n" " then integrated into a single value using a user-defined integration\n" " method.\n" "\n" " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: The density evaluated for the Interface1D in the complete\n" " viewmap image.\n" " :rtype: float\n")
PyTypeObject IntegrationType_Type
PyTypeObject UnaryFunction1DDouble_Type
PyObject * self
inherits from class Rep
Definition AppCanvas.cpp:20