Blender V5.0
BPy_GetDirectionalViewMapDensityF1D.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
8
10
12#include "../../BPy_Convert.h"
14
15#include "BLI_sys_types.h"
16
17using namespace Freestyle;
18
20
21//------------------------INSTANCE METHODS ----------------------------------
22
24 /* Wrap. */
25 GetDirectionalViewMapDensityF1D___doc__,
26 "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
27 ":class:`freestyle.types.UnaryFunction1DDouble` "
28 "> :class:`GetDirectionalViewMapDensityF1D`\n"
29 "\n"
30 ".. method:: __init__(orientation, level, integration_type=IntegrationType.MEAN, "
31 "sampling=2.0)\n"
32 "\n"
33 " Builds a GetDirectionalViewMapDensityF1D object.\n"
34 "\n"
35 " :arg orientation: The number of the directional map we must work\n"
36 " with.\n"
37 " :type orientation: int\n"
38 " :arg level: The level of the pyramid from which the pixel must be\n"
39 " read.\n"
40 " :type level: int\n"
41 " :arg integration_type: The integration method used to compute a single value\n"
42 " from a set of values.\n"
43 " :type integration_type: :class:`freestyle.types.IntegrationType`\n"
44 " :arg sampling: The resolution used to sample the chain: the\n"
45 " corresponding 0D function is evaluated at each sample point and\n"
46 " the result is obtained by combining the resulting values into a\n"
47 " single one, following the method specified by integration_type.\n"
48 " :type sampling: float\n"
49 "\n"
50 ".. method:: __call__(inter)\n"
51 "\n"
52 " Returns the density evaluated for an Interface1D in of the steerable\n"
53 " viewmaps image. The direction telling which Directional map to choose\n"
54 " is explicitly specified by the user. The density is evaluated for a\n"
55 " set of points along the Interface1D (using the\n"
56 " :class:`freestyle.functions.ReadSteerableViewMapPixelF0D` functor) and\n"
57 " then integrated into a single value using a user-defined integration\n"
58 " method.\n"
59 "\n"
60 " :arg inter: An Interface1D object.\n"
61 " :type inter: :class:`freestyle.types.Interface1D`\n"
62 " :return: the density evaluated for an Interface1D in of the\n"
63 " steerable viewmaps image.\n"
64 " :rtype: float\n");
66 PyObject *args,
67 PyObject *kwds)
68{
69 static const char *kwlist[] = {"orientation", "level", "integration_type", "sampling", nullptr};
70 PyObject *obj = nullptr;
71 uint u1, u2;
72 float f = 2.0;
73
74 if (!PyArg_ParseTupleAndKeywords(
75 args, kwds, "II|O!f", (char **)kwlist, &u1, &u2, &IntegrationType_Type, &obj, &f))
76 {
77 return -1;
78 }
80 self->py_uf1D_double.uf1D_double = new Functions1D::GetDirectionalViewMapDensityF1D(
81 u1, u2, t, f);
82 return 0;
83}
84
85/*-----------------------BPy_GetDirectionalViewMapDensityF1D type definition --------------------*/
86
88 /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0)
89 /*tp_name*/ "GetDirectionalViewMapDensityF1D",
90 /*tp_basicsize*/ sizeof(BPy_GetDirectionalViewMapDensityF1D),
91 /*tp_itemsize*/ 0,
92 /*tp_dealloc*/ nullptr,
93 /*tp_vectorcall_offset*/ 0,
94 /*tp_getattr*/ nullptr,
95 /*tp_setattr*/ nullptr,
96 /*tp_as_async*/ nullptr,
97 /*tp_repr*/ nullptr,
98 /*tp_as_number*/ nullptr,
99 /*tp_as_sequence*/ nullptr,
100 /*tp_as_mapping*/ nullptr,
101 /*tp_hash*/ nullptr,
102 /*tp_call*/ nullptr,
103 /*tp_str*/ nullptr,
104 /*tp_getattro*/ nullptr,
105 /*tp_setattro*/ nullptr,
106 /*tp_as_buffer*/ nullptr,
107 /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
108 /*tp_doc*/ GetDirectionalViewMapDensityF1D___doc__,
109 /*tp_traverse*/ nullptr,
110 /*tp_clear*/ nullptr,
111 /*tp_richcompare*/ nullptr,
112 /*tp_weaklistoffset*/ 0,
113 /*tp_iter*/ nullptr,
114 /*tp_iternext*/ nullptr,
115 /*tp_methods*/ nullptr,
116 /*tp_members*/ nullptr,
117 /*tp_getset*/ nullptr,
118 /*tp_base*/ &UnaryFunction1DDouble_Type,
119 /*tp_dict*/ nullptr,
120 /*tp_descr_get*/ nullptr,
121 /*tp_descr_set*/ nullptr,
122 /*tp_dictoffset*/ 0,
123 /*tp_init*/ (initproc)GetDirectionalViewMapDensityF1D___init__,
124 /*tp_alloc*/ nullptr,
125 /*tp_new*/ nullptr,
126};
127
Functions taking 1D input.
unsigned int uint
IntegrationType IntegrationType_from_BPy_IntegrationType(PyObject *obj)
PyTypeObject GetDirectionalViewMapDensityF1D_Type
PyDoc_STRVAR(GetDirectionalViewMapDensityF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DDouble` " "> :class:`GetDirectionalViewMapDensityF1D`\n" "\n" ".. method:: __init__(orientation, level, integration_type=IntegrationType.MEAN, " "sampling=2.0)\n" "\n" " Builds a GetDirectionalViewMapDensityF1D object.\n" "\n" " :arg orientation: The number of the directional map we must work\n" " with.\n" " :type orientation: int\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 of the steerable\n" " viewmaps image. The direction telling which Directional map to choose\n" " is explicitly specified by the user. The density is evaluated for a\n" " set of points along the Interface1D (using the\n" " :class:`freestyle.functions.ReadSteerableViewMapPixelF0D` 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 an Interface1D in of the\n" " steerable viewmaps image.\n" " :rtype: float\n")
static int GetDirectionalViewMapDensityF1D___init__(BPy_GetDirectionalViewMapDensityF1D *self, PyObject *args, PyObject *kwds)
PyTypeObject IntegrationType_Type
PyTypeObject UnaryFunction1DDouble_Type
PyObject * self
inherits from class Rep
Definition AppCanvas.cpp:20