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