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