Blender V4.3
BPy_Orientation2DF1D.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
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 Orientation2DF1D___doc__,
28 "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
29 ":class:`freestyle.types.UnaryFunction1DVec2f` > :class:`Orientation2DF1D`\n"
30 "\n"
31 ".. method:: __init__(integration_type=IntegrationType.MEAN)\n"
32 "\n"
33 " Builds an Orientation2DF1D object.\n"
34 "\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 "\n"
39 ".. method:: __call__(inter)\n"
40 "\n"
41 " Returns the 2D orientation of the Interface1D.\n"
42 "\n"
43 " :arg inter: An Interface1D object.\n"
44 " :type inter: :class:`freestyle.types.Interface1D`\n"
45 " :return: The 2D orientation of the Interface1D.\n"
46 " :rtype: :class:`mathutils.Vector`\n");
47
48static int Orientation2DF1D___init__(BPy_Orientation2DF1D *self, PyObject *args, PyObject *kwds)
49{
50 static const char *kwlist[] = {"integration_type", nullptr};
51 PyObject *obj = nullptr;
52
53 if (!PyArg_ParseTupleAndKeywords(
54 args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
55 {
56 return -1;
57 }
59 self->py_uf1D_vec2f.uf1D_vec2f = new Functions1D::Orientation2DF1D(t);
60 return 0;
61}
62
63/*-----------------------BPy_Orientation2DF1D type definition ------------------------------*/
64
65PyTypeObject Orientation2DF1D_Type = {
66 /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0)
67 /*tp_name*/ "Orientation2DF1D",
68 /*tp_basicsize*/ sizeof(BPy_Orientation2DF1D),
69 /*tp_itemsize*/ 0,
70 /*tp_dealloc*/ nullptr,
71 /*tp_vectorcall_offset*/ 0,
72 /*tp_getattr*/ nullptr,
73 /*tp_setattr*/ nullptr,
74 /*tp_as_async*/ nullptr,
75 /*tp_repr*/ nullptr,
76 /*tp_as_number*/ nullptr,
77 /*tp_as_sequence*/ nullptr,
78 /*tp_as_mapping*/ nullptr,
79 /*tp_hash*/ nullptr,
80 /*tp_call*/ nullptr,
81 /*tp_str*/ nullptr,
82 /*tp_getattro*/ nullptr,
83 /*tp_setattro*/ nullptr,
84 /*tp_as_buffer*/ nullptr,
85 /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
86 /*tp_doc*/ Orientation2DF1D___doc__,
87 /*tp_traverse*/ nullptr,
88 /*tp_clear*/ nullptr,
89 /*tp_richcompare*/ nullptr,
90 /*tp_weaklistoffset*/ 0,
91 /*tp_iter*/ nullptr,
92 /*tp_iternext*/ nullptr,
93 /*tp_methods*/ nullptr,
94 /*tp_members*/ nullptr,
95 /*tp_getset*/ nullptr,
96 /*tp_base*/ &UnaryFunction1DVec2f_Type,
97 /*tp_dict*/ nullptr,
98 /*tp_descr_get*/ nullptr,
99 /*tp_descr_set*/ nullptr,
100 /*tp_dictoffset*/ 0,
101 /*tp_init*/ (initproc)Orientation2DF1D___init__,
102 /*tp_alloc*/ nullptr,
103 /*tp_new*/ nullptr,
104};
105
107
108#ifdef __cplusplus
109}
110#endif
IntegrationType IntegrationType_from_BPy_IntegrationType(PyObject *obj)
PyTypeObject IntegrationType_Type
PyTypeObject Orientation2DF1D_Type
static int Orientation2DF1D___init__(BPy_Orientation2DF1D *self, PyObject *args, PyObject *kwds)
PyDoc_STRVAR(Orientation2DF1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > " ":class:`freestyle.types.UnaryFunction1DVec2f` > :class:`Orientation2DF1D`\n" "\n" ".. method:: __init__(integration_type=IntegrationType.MEAN)\n" "\n" " Builds an Orientation2DF1D 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 orientation of the Interface1D.\n" "\n" " :arg inter: An Interface1D object.\n" " :type inter: :class:`freestyle.types.Interface1D`\n" " :return: The 2D orientation of the Interface1D.\n" " :rtype: :class:`mathutils.Vector`\n")
PyTypeObject UnaryFunction1DVec2f_Type
Functions taking 1D input.
PyObject * self
inherits from class Rep
Definition AppCanvas.cpp:20