Blender V5.0
BPy_ViewMapGradientNormBP1D.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
11#include "../BPy_Convert.h"
13
14using namespace Freestyle;
15
17
18//------------------------INSTANCE METHODS ----------------------------------
19
20// ViewMapGradientNormBP1D(int level, IntegrationType iType=MEAN, float sampling=2.0)
21
23 /* Wrap. */
24 ViewMapGradientNormBP1D___doc__,
25 "Class hierarchy: :class:`freestyle.types.BinaryPredicate1D` > "
26 ":class:`ViewMapGradientNormBP1D`\n"
27 "\n"
28 ".. method:: __init__(level, integration_type=IntegrationType.MEAN, sampling=2.0)\n"
29 "\n"
30 " Builds a ViewMapGradientNormBP1D object.\n"
31 "\n"
32 " :arg level: The level of the pyramid from which the pixel must be\n"
33 " read.\n"
34 " :type level: int\n"
35 " :arg integration_type: The integration method used to compute a single value\n"
36 " from a set of values.\n"
37 " :type integration_type: :class:`freestyle.types.IntegrationType`\n"
38 " :arg sampling: The resolution used to sample the chain:\n"
39 " GetViewMapGradientNormF0D is evaluated at each sample point and\n"
40 " the result is obtained by combining the resulting values into a\n"
41 " single one, following the method specified by integration_type.\n"
42 " :type sampling: float\n"
43 "\n"
44 ".. method:: __call__(inter1, inter2)\n"
45 "\n"
46 " Returns true if the evaluation of the Gradient norm Function is\n"
47 " higher for inter1 than for inter2.\n"
48 "\n"
49 " :arg inter1: The first Interface1D object.\n"
50 " :type inter1: :class:`freestyle.types.Interface1D`\n"
51 " :arg inter2: The second Interface1D object.\n"
52 " :type inter2: :class:`freestyle.types.Interface1D`\n"
53 " :return: True or false.\n"
54 " :rtype: bool\n");
56 PyObject *args,
57 PyObject *kwds)
58{
59 static const char *kwlist[] = {"level", "integration_type", "sampling", nullptr};
60 PyObject *obj = nullptr;
61 int i;
62 float f = 2.0;
63
64 if (!PyArg_ParseTupleAndKeywords(
65 args, kwds, "i|O!f", (char **)kwlist, &i, &IntegrationType_Type, &obj, &f))
66 {
67 return -1;
68 }
70 self->py_bp1D.bp1D = new Predicates1D::ViewMapGradientNormBP1D(i, t, f);
71 return 0;
72}
73
74/*-----------------------BPy_ViewMapGradientNormBP1D type definition ----------------------------*/
75
77 /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0)
78 /*tp_name*/ "ViewMapGradientNormBP1D",
79 /*tp_basicsize*/ sizeof(BPy_ViewMapGradientNormBP1D),
80 /*tp_itemsize*/ 0,
81 /*tp_dealloc*/ nullptr,
82 /*tp_vectorcall_offset*/ 0,
83 /*tp_getattr*/ nullptr,
84 /*tp_setattr*/ nullptr,
85 /*tp_as_async*/ nullptr,
86 /*tp_repr*/ nullptr,
87 /*tp_as_number*/ nullptr,
88 /*tp_as_sequence*/ nullptr,
89 /*tp_as_mapping*/ nullptr,
90 /*tp_hash*/ nullptr,
91 /*tp_call*/ nullptr,
92 /*tp_str*/ nullptr,
93 /*tp_getattro*/ nullptr,
94 /*tp_setattro*/ nullptr,
95 /*tp_as_buffer*/ nullptr,
96 /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
97 /*tp_doc*/ ViewMapGradientNormBP1D___doc__,
98 /*tp_traverse*/ nullptr,
99 /*tp_clear*/ nullptr,
100 /*tp_richcompare*/ nullptr,
101 /*tp_weaklistoffset*/ 0,
102 /*tp_iter*/ nullptr,
103 /*tp_iternext*/ nullptr,
104 /*tp_methods*/ nullptr,
105 /*tp_members*/ nullptr,
106 /*tp_getset*/ nullptr,
107 /*tp_base*/ &BinaryPredicate1D_Type,
108 /*tp_dict*/ nullptr,
109 /*tp_descr_get*/ nullptr,
110 /*tp_descr_set*/ nullptr,
111 /*tp_dictoffset*/ 0,
112 /*tp_init*/ (initproc)ViewMapGradientNormBP1D___init__,
113 /*tp_alloc*/ nullptr,
114 /*tp_new*/ nullptr,
115};
116
PyTypeObject BinaryPredicate1D_Type
IntegrationType IntegrationType_from_BPy_IntegrationType(PyObject *obj)
PyTypeObject IntegrationType_Type
static int ViewMapGradientNormBP1D___init__(BPy_ViewMapGradientNormBP1D *self, PyObject *args, PyObject *kwds)
PyTypeObject ViewMapGradientNormBP1D_Type
PyDoc_STRVAR(ViewMapGradientNormBP1D___doc__, "Class hierarchy: :class:`freestyle.types.BinaryPredicate1D` > " ":class:`ViewMapGradientNormBP1D`\n" "\n" ".. method:: __init__(level, integration_type=IntegrationType.MEAN, sampling=2.0)\n" "\n" " Builds a ViewMapGradientNormBP1D 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:\n" " GetViewMapGradientNormF0D 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__(inter1, inter2)\n" "\n" " Returns true if the evaluation of the Gradient norm Function is\n" " higher for inter1 than for inter2.\n" "\n" " :arg inter1: The first Interface1D object.\n" " :type inter1: :class:`freestyle.types.Interface1D`\n" " :arg inter2: The second Interface1D object.\n" " :type inter2: :class:`freestyle.types.Interface1D`\n" " :return: True or false.\n" " :rtype: bool\n")
PyObject * self
inherits from class Rep
Definition AppCanvas.cpp:20
i
Definition text_draw.cc:230