Blender V5.0
BPy_GetSteerableViewMapDensityF1D.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
15using namespace Freestyle;
16
18
19//------------------------INSTANCE METHODS ----------------------------------
20
22 /* Wrap. */
23 GetSteerableViewMapDensityF1D___doc__,
24 "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
25 ":class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetSteerableViewMapDensityF1D`\n"
26 "\n"
27 ".. method:: __init__(level, integration_type=IntegrationType.MEAN, sampling=2.0)\n"
28 "\n"
29 " Builds a GetSteerableViewMapDensityF1D object.\n"
30 "\n"
31 " :arg level: The level of the pyramid from which the pixel must be\n"
32 " read.\n"
33 " :type level: int\n"
34 " :arg integration_type: The integration method used to compute a single value\n"
35 " from a set of values.\n"
36 " :type integration_type: :class:`freestyle.types.IntegrationType`\n"
37 " :arg sampling: The resolution used to sample the chain: the\n"
38 " corresponding 0D function is evaluated at each sample point and\n"
39 " the result is obtained by combining the resulting values into a\n"
40 " single one, following the method specified by integration_type.\n"
41 " :type sampling: float\n"
42 "\n"
43 ".. method:: __call__(inter)\n"
44 "\n"
45 " Returns the density of the ViewMap for a given Interface1D. The\n"
46 " density of each :class:`freestyle.types.FEdge` is evaluated in the\n"
47 " proper steerable :class:`freestyle.types.ViewMap` depending on its\n"
48 " orientation.\n"
49 "\n"
50 " :arg inter: An Interface1D object.\n"
51 " :type inter: :class:`freestyle.types.Interface1D`\n"
52 " :return: The density of the ViewMap for a given Interface1D.\n"
53 " :rtype: float\n");
55 PyObject *args,
56 PyObject *kwds)
57{
58 static const char *kwlist[] = {"level", "integration_type", "sampling", nullptr};
59 PyObject *obj = nullptr;
60 int i;
61 float f = 2.0;
62
63 if (!PyArg_ParseTupleAndKeywords(
64 args, kwds, "i|O!f", (char **)kwlist, &i, &IntegrationType_Type, &obj, &f))
65 {
66 return -1;
67 }
69 self->py_uf1D_double.uf1D_double = new Functions1D::GetSteerableViewMapDensityF1D(i, t, f);
70 return 0;
71}
72
73/*-----------------------BPy_GetSteerableViewMapDensityF1D type definition ----------------------*/
74
76 /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0)
77 /*tp_name*/ "GetSteerableViewMapDensityF1D",
78 /*tp_basicsize*/ sizeof(BPy_GetSteerableViewMapDensityF1D),
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*/ GetSteerableViewMapDensityF1D___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)GetSteerableViewMapDensityF1D___init__,
112 /*tp_alloc*/ nullptr,
113 /*tp_new*/ nullptr,
114};
115
Functions taking 1D input.
IntegrationType IntegrationType_from_BPy_IntegrationType(PyObject *obj)
PyTypeObject GetSteerableViewMapDensityF1D_Type
PyDoc_STRVAR(GetSteerableViewMapDensityF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetSteerableViewMapDensityF1D`\n" "\n" ".. method:: __init__(level, integration_type=IntegrationType.MEAN, sampling=2.0)\n" "\n" " Builds a GetSteerableViewMapDensityF1D 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 of the ViewMap for a given Interface1D. The\n" " density of each :class:`freestyle.types.FEdge` is evaluated in the\n" " proper steerable :class:`freestyle.types.ViewMap` depending on its\n" " orientation.\n" "\n" " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: The density of the ViewMap for a given Interface1D.\n" " :rtype: float\n")
static int GetSteerableViewMapDensityF1D___init__(BPy_GetSteerableViewMapDensityF1D *self, PyObject *args, PyObject *kwds)
PyTypeObject IntegrationType_Type
PyTypeObject UnaryFunction1DDouble_Type
PyObject * self
inherits from class Rep
Definition AppCanvas.cpp:20
i
Definition text_draw.cc:230