Blender V4.5
BPy_Curvature2DAngleF1D.cpp
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2004-2022 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 Curvature2DAngleF1D___doc__,
24 "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
25 ":class:`freestyle.types.UnaryFunction1DDouble` > :class:`Curvature2DAngleF1D`\n"
26 "\n"
27 ".. method:: __init__(integration_type=IntegrationType.MEAN)\n"
28 "\n"
29 " Builds a Curvature2DAngleF1D object.\n"
30 "\n"
31 " :arg integration_type: The integration method used to compute a single value\n"
32 " from a set of values.\n"
33 " :type integration_type: :class:`freestyle.types.IntegrationType`\n"
34 "\n"
35 ".. method:: __call__(inter)\n"
36 "\n"
37 " Returns the 2D curvature as an angle for an Interface1D.\n"
38 "\n"
39 " :arg inter: An Interface1D object.\n"
40 " :type inter: :class:`freestyle.types.Interface1D`\n"
41 " :return: The 2D curvature as an angle.\n"
42 " :rtype: float\n");
43
45 PyObject *args,
46 PyObject *kwds)
47{
48 static const char *kwlist[] = {"integration_type", nullptr};
49 PyObject *obj = nullptr;
50
51 if (!PyArg_ParseTupleAndKeywords(
52 args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
53 {
54 return -1;
55 }
57 self->py_uf1D_double.uf1D_double = new Functions1D::Curvature2DAngleF1D(t);
58 return 0;
59}
60/*-----------------------BPy_Curvature2DAngleF1D type definition ------------------------------*/
61
63 /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0)
64 /*tp_name*/ "Curvature2DAngleF1D",
65 /*tp_basicsize*/ sizeof(BPy_Curvature2DAngleF1D),
66 /*tp_itemsize*/ 0,
67 /*tp_dealloc*/ nullptr,
68 /*tp_vectorcall_offset*/ 0,
69 /*tp_getattr*/ nullptr,
70 /*tp_setattr*/ nullptr,
71 /*tp_as_async*/ nullptr,
72 /*tp_repr*/ nullptr,
73 /*tp_as_number*/ nullptr,
74 /*tp_as_sequence*/ nullptr,
75 /*tp_as_mapping*/ nullptr,
76 /*tp_hash*/ nullptr,
77 /*tp_call*/ nullptr,
78 /*tp_str*/ nullptr,
79 /*tp_getattro*/ nullptr,
80 /*tp_setattro*/ nullptr,
81 /*tp_as_buffer*/ nullptr,
82 /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
83 /*tp_doc*/ Curvature2DAngleF1D___doc__,
84 /*tp_traverse*/ nullptr,
85 /*tp_clear*/ nullptr,
86 /*tp_richcompare*/ nullptr,
87 /*tp_weaklistoffset*/ 0,
88 /*tp_iter*/ nullptr,
89 /*tp_iternext*/ nullptr,
90 /*tp_methods*/ nullptr,
91 /*tp_members*/ nullptr,
92 /*tp_getset*/ nullptr,
93 /*tp_base*/ &UnaryFunction1DDouble_Type,
94 /*tp_dict*/ nullptr,
95 /*tp_descr_get*/ nullptr,
96 /*tp_descr_set*/ nullptr,
97 /*tp_dictoffset*/ 0,
98 /*tp_init*/ (initproc)Curvature2DAngleF1D___init__,
99 /*tp_alloc*/ nullptr,
100 /*tp_new*/ nullptr,
101};
102
IntegrationType IntegrationType_from_BPy_IntegrationType(PyObject *obj)
PyDoc_STRVAR(Curvature2DAngleF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DDouble` > :class:`Curvature2DAngleF1D`\n" "\n" ".. method:: __init__(integration_type=IntegrationType.MEAN)\n" "\n" " Builds a Curvature2DAngleF1D object.\n" "\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" "\n" ".. method:: __call__(inter)\n" "\n" " Returns the 2D curvature as an angle for an Interface1D.\n" "\n" " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: The 2D curvature as an angle.\n" " :rtype: float\n")
PyTypeObject Curvature2DAngleF1D_Type
static int Curvature2DAngleF1D___init__(BPy_Curvature2DAngleF1D *self, PyObject *args, PyObject *kwds)
PyTypeObject IntegrationType_Type
PyTypeObject UnaryFunction1DDouble_Type
Functions taking 1D input.
PyObject * self
inherits from class Rep
Definition AppCanvas.cpp:20