Blender  V2.93
BPy_CurveNatureF1D.cpp
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
21 #include "BPy_CurveNatureF1D.h"
22 
23 #include "../../../view_map/Functions1D.h"
24 #include "../../BPy_Convert.h"
25 #include "../../BPy_IntegrationType.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 using namespace Freestyle;
32 
34 
35 //------------------------INSTANCE METHODS ----------------------------------
36 
37 static char CurveNatureF1D___doc__[] =
38  "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
39  ":class:`freestyle.types.UnaryFunction1DEdgeNature` > :class:`CurveNatureF1D`\n"
40  "\n"
41  ".. method:: __init__(integration_type=IntegrationType.MEAN)\n"
42  "\n"
43  " Builds a CurveNatureF1D object.\n"
44  "\n"
45  " :arg integration_type: The integration method used to compute a single value\n"
46  " from a set of values.\n"
47  " :type integration_type: :class:`freestyle.types.IntegrationType`\n"
48  "\n"
49  ".. method:: __call__(inter)\n"
50  "\n"
51  " Returns the nature of the Interface1D (silhouette, ridge, crease, and\n"
52  " so on). Except if the Interface1D is a\n"
53  " :class:`freestyle.types.ViewEdge`, this result might be ambiguous.\n"
54  " Indeed, the Interface1D might result from the gathering of several 1D\n"
55  " elements, each one being of a different nature. An integration\n"
56  " method, such as the MEAN, might give, in this case, irrelevant\n"
57  " results.\n"
58  "\n"
59  " :arg inter: An Interface1D object.\n"
60  " :type inter: :class:`freestyle.types.Interface1D`\n"
61  " :return: The nature of the Interface1D.\n"
62  " :rtype: :class:`freestyle.types.Nature`\n";
63 
64 static int CurveNatureF1D___init__(BPy_CurveNatureF1D *self, PyObject *args, PyObject *kwds)
65 {
66  static const char *kwlist[] = {"integration_type", nullptr};
67  PyObject *obj = nullptr;
68 
69  if (!PyArg_ParseTupleAndKeywords(
70  args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
71  return -1;
72  }
74  self->py_uf1D_edgenature.uf1D_edgenature = new Functions1D::CurveNatureF1D(t);
75  return 0;
76 }
77 
78 /*-----------------------BPy_CurveNatureF1D type definition ------------------------------*/
79 
80 PyTypeObject CurveNatureF1D_Type = {
81  PyVarObject_HEAD_INIT(nullptr, 0) "CurveNatureF1D", /* tp_name */
82  sizeof(BPy_CurveNatureF1D), /* tp_basicsize */
83  0, /* tp_itemsize */
84  nullptr, /* tp_dealloc */
85  0, /* tp_vectorcall_offset */
86  nullptr, /* tp_getattr */
87  nullptr, /* tp_setattr */
88  nullptr, /* tp_reserved */
89  nullptr, /* tp_repr */
90  nullptr, /* tp_as_number */
91  nullptr, /* tp_as_sequence */
92  nullptr, /* tp_as_mapping */
93  nullptr, /* tp_hash */
94  nullptr, /* tp_call */
95  nullptr, /* tp_str */
96  nullptr, /* tp_getattro */
97  nullptr, /* tp_setattro */
98  nullptr, /* tp_as_buffer */
99  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
100  CurveNatureF1D___doc__, /* tp_doc */
101  nullptr, /* tp_traverse */
102  nullptr, /* tp_clear */
103  nullptr, /* tp_richcompare */
104  0, /* tp_weaklistoffset */
105  nullptr, /* tp_iter */
106  nullptr, /* tp_iternext */
107  nullptr, /* tp_methods */
108  nullptr, /* tp_members */
109  nullptr, /* tp_getset */
110  &UnaryFunction1DEdgeNature_Type, /* tp_base */
111  nullptr, /* tp_dict */
112  nullptr, /* tp_descr_get */
113  nullptr, /* tp_descr_set */
114  0, /* tp_dictoffset */
115  (initproc)CurveNatureF1D___init__, /* tp_init */
116  nullptr, /* tp_alloc */
117  nullptr, /* tp_new */
118 };
119 
121 
122 #ifdef __cplusplus
123 }
124 #endif
IntegrationType IntegrationType_from_BPy_IntegrationType(PyObject *obj)
static int CurveNatureF1D___init__(BPy_CurveNatureF1D *self, PyObject *args, PyObject *kwds)
static char CurveNatureF1D___doc__[]
PyTypeObject CurveNatureF1D_Type
PyTypeObject IntegrationType_Type
PyTypeObject UnaryFunction1DEdgeNature_Type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble t
inherits from class Rep
Definition: AppCanvas.cpp:32