Blender V5.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
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 " :param level: The level of the pyramid from which the pixel must be\n"
33 " read.\n"
34 " :type level: int\n"
35 " :param 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 " :param 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 " :param inter1: The first Interface1D object.\n"
50 " :type inter1: :class:`freestyle.types.Interface1D`\n"
51 " :param 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(args,
65 kwds,
66 "i" /* `level` */
67 "|" /* Optional arguments. */
68 "O!" /* `integration_type` */
69 "f" /* `sampling` */
70 ":__init__",
71 (char **)kwlist,
72 &i,
74 &obj,
75 &f))
76 {
77 return -1;
78 }
81 return 0;
82}
83
84/*-----------------------BPy_ViewMapGradientNormBP1D type definition ----------------------------*/
85
87 /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0)
88 /*tp_name*/ "ViewMapGradientNormBP1D",
89 /*tp_basicsize*/ sizeof(BPy_ViewMapGradientNormBP1D),
90 /*tp_itemsize*/ 0,
91 /*tp_dealloc*/ nullptr,
92 /*tp_vectorcall_offset*/ 0,
93 /*tp_getattr*/ nullptr,
94 /*tp_setattr*/ nullptr,
95 /*tp_as_async*/ nullptr,
96 /*tp_repr*/ nullptr,
97 /*tp_as_number*/ nullptr,
98 /*tp_as_sequence*/ nullptr,
99 /*tp_as_mapping*/ nullptr,
100 /*tp_hash*/ nullptr,
101 /*tp_call*/ nullptr,
102 /*tp_str*/ nullptr,
103 /*tp_getattro*/ nullptr,
104 /*tp_setattro*/ nullptr,
105 /*tp_as_buffer*/ nullptr,
106 /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
107 /*tp_doc*/ ViewMapGradientNormBP1D___doc__,
108 /*tp_traverse*/ nullptr,
109 /*tp_clear*/ nullptr,
110 /*tp_richcompare*/ nullptr,
111 /*tp_weaklistoffset*/ 0,
112 /*tp_iter*/ nullptr,
113 /*tp_iternext*/ nullptr,
114 /*tp_methods*/ nullptr,
115 /*tp_members*/ nullptr,
116 /*tp_getset*/ nullptr,
117 /*tp_base*/ &BinaryPredicate1D_Type,
118 /*tp_dict*/ nullptr,
119 /*tp_descr_get*/ nullptr,
120 /*tp_descr_set*/ nullptr,
121 /*tp_dictoffset*/ 0,
122 /*tp_init*/ (initproc)ViewMapGradientNormBP1D___init__,
123 /*tp_alloc*/ nullptr,
124 /*tp_new*/ nullptr,
125};
126
PyTypeObject BinaryPredicate1D_Type
IntegrationType IntegrationType_from_BPy_IntegrationType(PyObject *obj)
PyDoc_STRVAR(FalseBP1D___doc__, "Class hierarchy: :class:`freestyle.types.BinaryPredicate1D` > :class:`FalseBP1D`\n" "\n" ".. method:: __call__(inter1, inter2)\n" "\n" " Always returns false.\n" "\n" " :param inter1: The first Interface1D object.\n" " :type inter1: :class:`freestyle.types.Interface1D`\n" " :param inter2: The second Interface1D object.\n" " :type inter2: :class:`freestyle.types.Interface1D`\n" " :return: False.\n" " :rtype: bool\n")
PyTypeObject IntegrationType_Type
static int ViewMapGradientNormBP1D___init__(BPy_ViewMapGradientNormBP1D *self, PyObject *args, PyObject *kwds)
PyTypeObject ViewMapGradientNormBP1D_Type
inherits from class Rep
Definition AppCanvas.cpp:20
PyObject_HEAD Freestyle::BinaryPredicate1D * bp1D