Blender  V3.3
BPy_GetCompleteViewMapDensityF1D.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
8 
9 #include "../../../stroke/AdvancedFunctions1D.h"
10 #include "../../BPy_Convert.h"
11 #include "../../BPy_IntegrationType.h"
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 using namespace Freestyle;
18 
20 
21 //------------------------INSTANCE METHODS ----------------------------------
22 
24  "Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
25  ":class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetCompleteViewMapDensityF1D`\n"
26  "\n"
27  ".. method:: __init__(level, integration_type=IntegrationType.MEAN, sampling=2.0)\n"
28  "\n"
29  " Builds a GetCompleteViewMapDensityF1D object.\n"
30  "\n"
31  " :arg level: The level of the pyramid from which the pixel must be\n"
32  " read.\n"
33  " :type level: int\n"
34  " :arg integration_type: The integration method used to compute a single value\n"
35  " from a set of values.\n"
36  " :type integration_type: :class:`freestyle.types.IntegrationType`\n"
37  " :arg sampling: The resolution used to sample the chain: the\n"
38  " corresponding 0D function is evaluated at each sample point and\n"
39  " the result is obtained by combining the resulting values into a\n"
40  " single one, following the method specified by integration_type.\n"
41  " :type sampling: float\n"
42  "\n"
43  ".. method:: __call__(inter)\n"
44  "\n"
45  " Returns the density evaluated for an Interface1D in the complete\n"
46  " viewmap image. The density is evaluated for a set of points along the\n"
47  " Interface1D (using the\n"
48  " :class:`freestyle.functions.ReadCompleteViewMapPixelF0D` functor) and\n"
49  " then integrated into a single value using a user-defined integration\n"
50  " method.\n"
51  "\n"
52  " :arg inter: An Interface1D object.\n"
53  " :type inter: :class:`freestyle.types.Interface1D`\n"
54  " :return: The density evaluated for the Interface1D in the complete\n"
55  " viewmap image.\n"
56  " :rtype: float\n";
57 
59  PyObject *args,
60  PyObject *kwds)
61 {
62  static const char *kwlist[] = {"level", "integration_type", "sampling", nullptr};
63  PyObject *obj = nullptr;
64  int i;
65  float f = 2.0;
66 
67  if (!PyArg_ParseTupleAndKeywords(
68  args, kwds, "i|O!f", (char **)kwlist, &i, &IntegrationType_Type, &obj, &f)) {
69  return -1;
70  }
72  self->py_uf1D_double.uf1D_double = new Functions1D::GetCompleteViewMapDensityF1D(i, t, f);
73  return 0;
74 }
75 
76 /*-----------------------BPy_GetCompleteViewMapDensityF1D type definition -----------------------*/
77 
79  PyVarObject_HEAD_INIT(nullptr, 0) "GetCompleteViewMapDensityF1D", /* tp_name */
80  sizeof(BPy_GetCompleteViewMapDensityF1D), /* tp_basicsize */
81  0, /* tp_itemsize */
82  nullptr, /* tp_dealloc */
83  0, /* tp_vectorcall_offset */
84  nullptr, /* tp_getattr */
85  nullptr, /* tp_setattr */
86  nullptr, /* tp_reserved */
87  nullptr, /* tp_repr */
88  nullptr, /* tp_as_number */
89  nullptr, /* tp_as_sequence */
90  nullptr, /* tp_as_mapping */
91  nullptr, /* tp_hash */
92  nullptr, /* tp_call */
93  nullptr, /* tp_str */
94  nullptr, /* tp_getattro */
95  nullptr, /* tp_setattro */
96  nullptr, /* tp_as_buffer */
97  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
99  nullptr, /* tp_traverse */
100  nullptr, /* tp_clear */
101  nullptr, /* tp_richcompare */
102  0, /* tp_weaklistoffset */
103  nullptr, /* tp_iter */
104  nullptr, /* tp_iternext */
105  nullptr, /* tp_methods */
106  nullptr, /* tp_members */
107  nullptr, /* tp_getset */
108  &UnaryFunction1DDouble_Type, /* tp_base */
109  nullptr, /* tp_dict */
110  nullptr, /* tp_descr_get */
111  nullptr, /* tp_descr_set */
112  0, /* tp_dictoffset */
113  (initproc)GetCompleteViewMapDensityF1D___init__, /* tp_init */
114  nullptr, /* tp_alloc */
115  nullptr, /* tp_new */
116 };
117 
119 
120 #ifdef __cplusplus
121 }
122 #endif
IntegrationType IntegrationType_from_BPy_IntegrationType(PyObject *obj)
static int GetCompleteViewMapDensityF1D___init__(BPy_GetCompleteViewMapDensityF1D *self, PyObject *args, PyObject *kwds)
PyTypeObject GetCompleteViewMapDensityF1D_Type
static char GetCompleteViewMapDensityF1D___doc__[]
PyTypeObject IntegrationType_Type
PyTypeObject UnaryFunction1DDouble_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:18