Blender V4.3
BPy_GetViewMapGradientNormF1D.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 GetViewMapGradientNormF1D___doc__,
28 "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
29 ":class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetViewMapGradientNormF1D`\n"
30 "\n"
31 ".. method:: __init__(level, integration_type=IntegrationType.MEAN, sampling=2.0)\n"
32 "\n"
33 " Builds a GetViewMapGradientNormF1D 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 of the ViewMap for a given Interface1D. The\n"
50 " density of each :class:`freestyle.types.FEdge` is evaluated in the\n"
51 " proper steerable :class:`freestyle.types.ViewMap` depending on its\n"
52 " orientation.\n"
53 "\n"
54 " :arg inter: An Interface1D object.\n"
55 " :type inter: :class:`freestyle.types.Interface1D`\n"
56 " :return: The density of the ViewMap for a given Interface1D.\n"
57 " :rtype: float\n");
58
60 PyObject *args,
61 PyObject *kwds)
62{
63 static const char *kwlist[] = {"level", "integration_type", "sampling", nullptr};
64 PyObject *obj = nullptr;
65 int i;
66 float f = 2.0;
67
68 if (!PyArg_ParseTupleAndKeywords(
69 args, kwds, "i|O!f", (char **)kwlist, &i, &IntegrationType_Type, &obj, &f))
70 {
71 return -1;
72 }
74 self->py_uf1D_double.uf1D_double = new Functions1D::GetViewMapGradientNormF1D(i, t, f);
75 return 0;
76}
77
78/*-----------------------BPy_GetViewMapGradientNormF1D type definition --------------------------*/
79
81 /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0)
82 /*tp_name*/ "GetViewMapGradientNormF1D",
83 /*tp_basicsize*/ sizeof(BPy_GetViewMapGradientNormF1D),
84 /*tp_itemsize*/ 0,
85 /*tp_dealloc*/ nullptr,
86 /*tp_vectorcall_offset*/ 0,
87 /*tp_getattr*/ nullptr,
88 /*tp_setattr*/ nullptr,
89 /*tp_as_async*/ nullptr,
90 /*tp_repr*/ nullptr,
91 /*tp_as_number*/ nullptr,
92 /*tp_as_sequence*/ nullptr,
93 /*tp_as_mapping*/ nullptr,
94 /*tp_hash*/ nullptr,
95 /*tp_call*/ nullptr,
96 /*tp_str*/ nullptr,
97 /*tp_getattro*/ nullptr,
98 /*tp_setattro*/ nullptr,
99 /*tp_as_buffer*/ nullptr,
100 /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
101 /*tp_doc*/ GetViewMapGradientNormF1D___doc__,
102 /*tp_traverse*/ nullptr,
103 /*tp_clear*/ nullptr,
104 /*tp_richcompare*/ nullptr,
105 /*tp_weaklistoffset*/ 0,
106 /*tp_iter*/ nullptr,
107 /*tp_iternext*/ nullptr,
108 /*tp_methods*/ nullptr,
109 /*tp_members*/ nullptr,
110 /*tp_getset*/ nullptr,
111 /*tp_base*/ &UnaryFunction1DDouble_Type,
112 /*tp_dict*/ nullptr,
113 /*tp_descr_get*/ nullptr,
114 /*tp_descr_set*/ nullptr,
115 /*tp_dictoffset*/ 0,
116 /*tp_init*/ (initproc)GetViewMapGradientNormF1D___init__,
117 /*tp_alloc*/ nullptr,
118 /*tp_new*/ nullptr,
119};
120
122
123#ifdef __cplusplus
124}
125#endif
Functions taking 1D input.
IntegrationType IntegrationType_from_BPy_IntegrationType(PyObject *obj)
PyTypeObject GetViewMapGradientNormF1D_Type
PyDoc_STRVAR(GetViewMapGradientNormF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetViewMapGradientNormF1D`\n" "\n" ".. method:: __init__(level, integration_type=IntegrationType.MEAN, sampling=2.0)\n" "\n" " Builds a GetViewMapGradientNormF1D 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 GetViewMapGradientNormF1D___init__(BPy_GetViewMapGradientNormF1D *self, PyObject *args, PyObject *kwds)
PyTypeObject IntegrationType_Type
PyTypeObject UnaryFunction1DDouble_Type
PyObject * self
inherits from class Rep
Definition AppCanvas.cpp:20