ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
This commit is contained in:
@@ -49,229 +49,243 @@ extern "C" {
|
||||
|
||||
int UnaryFunction1DDouble_Init(PyObject *module)
|
||||
{
|
||||
if (module == NULL)
|
||||
return -1;
|
||||
if (module == NULL)
|
||||
return -1;
|
||||
|
||||
if (PyType_Ready(&UnaryFunction1DDouble_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&UnaryFunction1DDouble_Type);
|
||||
PyModule_AddObject(module, "UnaryFunction1DDouble", (PyObject *)&UnaryFunction1DDouble_Type);
|
||||
if (PyType_Ready(&UnaryFunction1DDouble_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&UnaryFunction1DDouble_Type);
|
||||
PyModule_AddObject(module, "UnaryFunction1DDouble", (PyObject *)&UnaryFunction1DDouble_Type);
|
||||
|
||||
if (PyType_Ready(&DensityF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&DensityF1D_Type);
|
||||
PyModule_AddObject(module, "DensityF1D", (PyObject *)&DensityF1D_Type);
|
||||
if (PyType_Ready(&DensityF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&DensityF1D_Type);
|
||||
PyModule_AddObject(module, "DensityF1D", (PyObject *)&DensityF1D_Type);
|
||||
|
||||
if (PyType_Ready(&Curvature2DAngleF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&Curvature2DAngleF1D_Type);
|
||||
PyModule_AddObject(module, "Curvature2DAngleF1D", (PyObject *)&Curvature2DAngleF1D_Type);
|
||||
if (PyType_Ready(&Curvature2DAngleF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&Curvature2DAngleF1D_Type);
|
||||
PyModule_AddObject(module, "Curvature2DAngleF1D", (PyObject *)&Curvature2DAngleF1D_Type);
|
||||
|
||||
if (PyType_Ready(&GetCompleteViewMapDensityF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&GetCompleteViewMapDensityF1D_Type);
|
||||
PyModule_AddObject(module, "GetCompleteViewMapDensityF1D", (PyObject *)&GetCompleteViewMapDensityF1D_Type);
|
||||
if (PyType_Ready(&GetCompleteViewMapDensityF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&GetCompleteViewMapDensityF1D_Type);
|
||||
PyModule_AddObject(
|
||||
module, "GetCompleteViewMapDensityF1D", (PyObject *)&GetCompleteViewMapDensityF1D_Type);
|
||||
|
||||
if (PyType_Ready(&GetDirectionalViewMapDensityF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&GetDirectionalViewMapDensityF1D_Type);
|
||||
PyModule_AddObject(module, "GetDirectionalViewMapDensityF1D", (PyObject *)&GetDirectionalViewMapDensityF1D_Type);
|
||||
if (PyType_Ready(&GetDirectionalViewMapDensityF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&GetDirectionalViewMapDensityF1D_Type);
|
||||
PyModule_AddObject(module,
|
||||
"GetDirectionalViewMapDensityF1D",
|
||||
(PyObject *)&GetDirectionalViewMapDensityF1D_Type);
|
||||
|
||||
if (PyType_Ready(&GetProjectedXF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&GetProjectedXF1D_Type);
|
||||
PyModule_AddObject(module, "GetProjectedXF1D", (PyObject *)&GetProjectedXF1D_Type);
|
||||
if (PyType_Ready(&GetProjectedXF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&GetProjectedXF1D_Type);
|
||||
PyModule_AddObject(module, "GetProjectedXF1D", (PyObject *)&GetProjectedXF1D_Type);
|
||||
|
||||
if (PyType_Ready(&GetProjectedYF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&GetProjectedYF1D_Type);
|
||||
PyModule_AddObject(module, "GetProjectedYF1D", (PyObject *)&GetProjectedYF1D_Type);
|
||||
if (PyType_Ready(&GetProjectedYF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&GetProjectedYF1D_Type);
|
||||
PyModule_AddObject(module, "GetProjectedYF1D", (PyObject *)&GetProjectedYF1D_Type);
|
||||
|
||||
if (PyType_Ready(&GetProjectedZF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&GetProjectedZF1D_Type);
|
||||
PyModule_AddObject(module, "GetProjectedZF1D", (PyObject *)&GetProjectedZF1D_Type);
|
||||
if (PyType_Ready(&GetProjectedZF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&GetProjectedZF1D_Type);
|
||||
PyModule_AddObject(module, "GetProjectedZF1D", (PyObject *)&GetProjectedZF1D_Type);
|
||||
|
||||
if (PyType_Ready(&GetSteerableViewMapDensityF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&GetSteerableViewMapDensityF1D_Type);
|
||||
PyModule_AddObject(module, "GetSteerableViewMapDensityF1D", (PyObject *)&GetSteerableViewMapDensityF1D_Type);
|
||||
if (PyType_Ready(&GetSteerableViewMapDensityF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&GetSteerableViewMapDensityF1D_Type);
|
||||
PyModule_AddObject(
|
||||
module, "GetSteerableViewMapDensityF1D", (PyObject *)&GetSteerableViewMapDensityF1D_Type);
|
||||
|
||||
if (PyType_Ready(&GetViewMapGradientNormF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&GetViewMapGradientNormF1D_Type);
|
||||
PyModule_AddObject(module, "GetViewMapGradientNormF1D", (PyObject *)&GetViewMapGradientNormF1D_Type);
|
||||
if (PyType_Ready(&GetViewMapGradientNormF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&GetViewMapGradientNormF1D_Type);
|
||||
PyModule_AddObject(
|
||||
module, "GetViewMapGradientNormF1D", (PyObject *)&GetViewMapGradientNormF1D_Type);
|
||||
|
||||
if (PyType_Ready(&GetXF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&GetXF1D_Type);
|
||||
PyModule_AddObject(module, "GetXF1D", (PyObject *)&GetXF1D_Type);
|
||||
if (PyType_Ready(&GetXF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&GetXF1D_Type);
|
||||
PyModule_AddObject(module, "GetXF1D", (PyObject *)&GetXF1D_Type);
|
||||
|
||||
if (PyType_Ready(&GetYF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&GetYF1D_Type);
|
||||
PyModule_AddObject(module, "GetYF1D", (PyObject *)&GetYF1D_Type);
|
||||
if (PyType_Ready(&GetYF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&GetYF1D_Type);
|
||||
PyModule_AddObject(module, "GetYF1D", (PyObject *)&GetYF1D_Type);
|
||||
|
||||
if (PyType_Ready(&GetZF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&GetZF1D_Type);
|
||||
PyModule_AddObject(module, "GetZF1D", (PyObject *)&GetZF1D_Type);
|
||||
if (PyType_Ready(&GetZF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&GetZF1D_Type);
|
||||
PyModule_AddObject(module, "GetZF1D", (PyObject *)&GetZF1D_Type);
|
||||
|
||||
if (PyType_Ready(&LocalAverageDepthF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&LocalAverageDepthF1D_Type);
|
||||
PyModule_AddObject(module, "LocalAverageDepthF1D", (PyObject *)&LocalAverageDepthF1D_Type);
|
||||
if (PyType_Ready(&LocalAverageDepthF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&LocalAverageDepthF1D_Type);
|
||||
PyModule_AddObject(module, "LocalAverageDepthF1D", (PyObject *)&LocalAverageDepthF1D_Type);
|
||||
|
||||
if (PyType_Ready(&ZDiscontinuityF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&ZDiscontinuityF1D_Type);
|
||||
PyModule_AddObject(module, "ZDiscontinuityF1D", (PyObject *)&ZDiscontinuityF1D_Type);
|
||||
if (PyType_Ready(&ZDiscontinuityF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&ZDiscontinuityF1D_Type);
|
||||
PyModule_AddObject(module, "ZDiscontinuityF1D", (PyObject *)&ZDiscontinuityF1D_Type);
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
//------------------------INSTANCE METHODS ----------------------------------
|
||||
|
||||
static char UnaryFunction1DDouble___doc__[] =
|
||||
"Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DDouble`\n"
|
||||
"\n"
|
||||
"Base class for unary functions (functors) that work on\n"
|
||||
":class:`Interface1D` and return a float value.\n"
|
||||
"\n"
|
||||
".. method:: __init__()\n"
|
||||
"\n"
|
||||
" Default constructor.\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type)\n"
|
||||
"\n"
|
||||
" Builds a unary 1D function using the integration method given as\n"
|
||||
" argument.\n"
|
||||
"\n"
|
||||
" :arg integration_type: An integration method.\n"
|
||||
" :type integration_type: :class:`IntegrationType`\n";
|
||||
"Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DDouble`\n"
|
||||
"\n"
|
||||
"Base class for unary functions (functors) that work on\n"
|
||||
":class:`Interface1D` and return a float value.\n"
|
||||
"\n"
|
||||
".. method:: __init__()\n"
|
||||
"\n"
|
||||
" Default constructor.\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type)\n"
|
||||
"\n"
|
||||
" Builds a unary 1D function using the integration method given as\n"
|
||||
" argument.\n"
|
||||
"\n"
|
||||
" :arg integration_type: An integration method.\n"
|
||||
" :type integration_type: :class:`IntegrationType`\n";
|
||||
|
||||
static int UnaryFunction1DDouble___init__(BPy_UnaryFunction1DDouble *self, PyObject *args, PyObject *kwds)
|
||||
static int UnaryFunction1DDouble___init__(BPy_UnaryFunction1DDouble *self,
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"integration", NULL};
|
||||
PyObject *obj = 0;
|
||||
static const char *kwlist[] = {"integration", NULL};
|
||||
PyObject *obj = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
if (!PyArg_ParseTupleAndKeywords(
|
||||
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
|
||||
if (!obj)
|
||||
self->uf1D_double = new UnaryFunction1D<double>();
|
||||
else {
|
||||
self->uf1D_double = new UnaryFunction1D<double>(IntegrationType_from_BPy_IntegrationType(obj));
|
||||
}
|
||||
if (!obj)
|
||||
self->uf1D_double = new UnaryFunction1D<double>();
|
||||
else {
|
||||
self->uf1D_double = new UnaryFunction1D<double>(IntegrationType_from_BPy_IntegrationType(obj));
|
||||
}
|
||||
|
||||
self->uf1D_double->py_uf1D = (PyObject *)self;
|
||||
self->uf1D_double->py_uf1D = (PyObject *)self;
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void UnaryFunction1DDouble___dealloc__(BPy_UnaryFunction1DDouble *self)
|
||||
{
|
||||
if (self->uf1D_double)
|
||||
delete self->uf1D_double;
|
||||
UnaryFunction1D_Type.tp_dealloc((PyObject *)self);
|
||||
if (self->uf1D_double)
|
||||
delete self->uf1D_double;
|
||||
UnaryFunction1D_Type.tp_dealloc((PyObject *)self);
|
||||
}
|
||||
|
||||
static PyObject *UnaryFunction1DDouble___repr__(BPy_UnaryFunction1DDouble *self)
|
||||
{
|
||||
return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf1D_double);
|
||||
return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf1D_double);
|
||||
}
|
||||
|
||||
static PyObject *UnaryFunction1DDouble___call__(BPy_UnaryFunction1DDouble *self, PyObject *args, PyObject *kwds)
|
||||
static PyObject *UnaryFunction1DDouble___call__(BPy_UnaryFunction1DDouble *self,
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"inter", NULL};
|
||||
PyObject *obj = 0;
|
||||
static const char *kwlist[] = {"inter", NULL};
|
||||
PyObject *obj = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj))
|
||||
return NULL;
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj))
|
||||
return NULL;
|
||||
|
||||
if (typeid(*(self->uf1D_double)) == typeid(UnaryFunction1D<double>)) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf1D_double->operator()(*(((BPy_Interface1D *) obj)->if1D)) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string class_name(Py_TYPE(self)->tp_name);
|
||||
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
return PyFloat_FromDouble(self->uf1D_double->result);
|
||||
if (typeid(*(self->uf1D_double)) == typeid(UnaryFunction1D<double>)) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf1D_double->operator()(*(((BPy_Interface1D *)obj)->if1D)) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string class_name(Py_TYPE(self)->tp_name);
|
||||
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
return PyFloat_FromDouble(self->uf1D_double->result);
|
||||
}
|
||||
|
||||
/*----------------------UnaryFunction1DDouble get/setters ----------------------------*/
|
||||
|
||||
PyDoc_STRVAR(integration_type_doc,
|
||||
"The integration method.\n"
|
||||
"\n"
|
||||
":type: :class:`IntegrationType`");
|
||||
"The integration method.\n"
|
||||
"\n"
|
||||
":type: :class:`IntegrationType`");
|
||||
|
||||
static PyObject *integration_type_get(BPy_UnaryFunction1DDouble *self, void *UNUSED(closure))
|
||||
{
|
||||
return BPy_IntegrationType_from_IntegrationType(self->uf1D_double->getIntegrationType());
|
||||
return BPy_IntegrationType_from_IntegrationType(self->uf1D_double->getIntegrationType());
|
||||
}
|
||||
|
||||
static int integration_type_set(BPy_UnaryFunction1DDouble *self, PyObject *value, void *UNUSED(closure))
|
||||
static int integration_type_set(BPy_UnaryFunction1DDouble *self,
|
||||
PyObject *value,
|
||||
void *UNUSED(closure))
|
||||
{
|
||||
if (!BPy_IntegrationType_Check(value)) {
|
||||
PyErr_SetString(PyExc_TypeError, "value must be an IntegrationType");
|
||||
return -1;
|
||||
}
|
||||
self->uf1D_double->setIntegrationType(IntegrationType_from_BPy_IntegrationType(value));
|
||||
return 0;
|
||||
if (!BPy_IntegrationType_Check(value)) {
|
||||
PyErr_SetString(PyExc_TypeError, "value must be an IntegrationType");
|
||||
return -1;
|
||||
}
|
||||
self->uf1D_double->setIntegrationType(IntegrationType_from_BPy_IntegrationType(value));
|
||||
return 0;
|
||||
}
|
||||
|
||||
static PyGetSetDef BPy_UnaryFunction1DDouble_getseters[] = {
|
||||
{(char *)"integration_type", (getter)integration_type_get, (setter)integration_type_set,
|
||||
(char *)integration_type_doc, NULL},
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
{(char *)"integration_type",
|
||||
(getter)integration_type_get,
|
||||
(setter)integration_type_set,
|
||||
(char *)integration_type_doc,
|
||||
NULL},
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
/*-----------------------BPy_UnaryFunction1DDouble type definition ------------------------------*/
|
||||
|
||||
PyTypeObject UnaryFunction1DDouble_Type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"UnaryFunction1DDouble", /* tp_name */
|
||||
sizeof(BPy_UnaryFunction1DDouble), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor)UnaryFunction1DDouble___dealloc__, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
(reprfunc)UnaryFunction1DDouble___repr__, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
(ternaryfunc)UnaryFunction1DDouble___call__, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
UnaryFunction1DDouble___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
BPy_UnaryFunction1DDouble_getseters, /* tp_getset */
|
||||
&UnaryFunction1D_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)UnaryFunction1DDouble___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction1DDouble", /* tp_name */
|
||||
sizeof(BPy_UnaryFunction1DDouble), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor)UnaryFunction1DDouble___dealloc__, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
(reprfunc)UnaryFunction1DDouble___repr__, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
(ternaryfunc)UnaryFunction1DDouble___call__, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
UnaryFunction1DDouble___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
BPy_UnaryFunction1DDouble_getseters, /* tp_getset */
|
||||
&UnaryFunction1D_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)UnaryFunction1DDouble___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -31,18 +31,18 @@ extern "C" {
|
||||
|
||||
extern PyTypeObject UnaryFunction1DDouble_Type;
|
||||
|
||||
#define BPy_UnaryFunction1DDouble_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&UnaryFunction1DDouble_Type))
|
||||
#define BPy_UnaryFunction1DDouble_Check(v) \
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&UnaryFunction1DDouble_Type))
|
||||
|
||||
/*---------------------------Python BPy_UnaryFunction1DDouble structure definition----------*/
|
||||
typedef struct {
|
||||
BPy_UnaryFunction1D py_uf1D;
|
||||
UnaryFunction1D<double> *uf1D_double;
|
||||
BPy_UnaryFunction1D py_uf1D;
|
||||
UnaryFunction1D<double> *uf1D_double;
|
||||
} BPy_UnaryFunction1DDouble;
|
||||
|
||||
/*---------------------------Python BPy_UnaryFunction1DDouble visible prototypes-----------*/
|
||||
int UnaryFunction1DDouble_Init(PyObject *module);
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -36,165 +36,176 @@ extern "C" {
|
||||
|
||||
int UnaryFunction1DEdgeNature_Init(PyObject *module)
|
||||
{
|
||||
if (module == NULL)
|
||||
return -1;
|
||||
if (module == NULL)
|
||||
return -1;
|
||||
|
||||
if (PyType_Ready(&UnaryFunction1DEdgeNature_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&UnaryFunction1DEdgeNature_Type);
|
||||
PyModule_AddObject(module, "UnaryFunction1DEdgeNature", (PyObject *)&UnaryFunction1DEdgeNature_Type);
|
||||
if (PyType_Ready(&UnaryFunction1DEdgeNature_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&UnaryFunction1DEdgeNature_Type);
|
||||
PyModule_AddObject(
|
||||
module, "UnaryFunction1DEdgeNature", (PyObject *)&UnaryFunction1DEdgeNature_Type);
|
||||
|
||||
if (PyType_Ready(&CurveNatureF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&CurveNatureF1D_Type);
|
||||
PyModule_AddObject(module, "CurveNatureF1D", (PyObject *)&CurveNatureF1D_Type);
|
||||
if (PyType_Ready(&CurveNatureF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&CurveNatureF1D_Type);
|
||||
PyModule_AddObject(module, "CurveNatureF1D", (PyObject *)&CurveNatureF1D_Type);
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
//------------------------INSTANCE METHODS ----------------------------------
|
||||
|
||||
static char UnaryFunction1DEdgeNature___doc__[] =
|
||||
"Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DEdgeNature`\n"
|
||||
"\n"
|
||||
"Base class for unary functions (functors) that work on\n"
|
||||
":class:`Interface1D` and return a :class:`Nature` object.\n"
|
||||
"\n"
|
||||
".. method:: __init__()\n"
|
||||
"\n"
|
||||
" Default constructor.\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type)\n"
|
||||
"\n"
|
||||
" Builds a unary 1D function using the integration method given as\n"
|
||||
" argument.\n"
|
||||
"\n"
|
||||
" :arg integration_type: An integration method.\n"
|
||||
" :type integration_type: :class:`IntegrationType`\n";
|
||||
"Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DEdgeNature`\n"
|
||||
"\n"
|
||||
"Base class for unary functions (functors) that work on\n"
|
||||
":class:`Interface1D` and return a :class:`Nature` object.\n"
|
||||
"\n"
|
||||
".. method:: __init__()\n"
|
||||
"\n"
|
||||
" Default constructor.\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type)\n"
|
||||
"\n"
|
||||
" Builds a unary 1D function using the integration method given as\n"
|
||||
" argument.\n"
|
||||
"\n"
|
||||
" :arg integration_type: An integration method.\n"
|
||||
" :type integration_type: :class:`IntegrationType`\n";
|
||||
|
||||
static int UnaryFunction1DEdgeNature___init__(BPy_UnaryFunction1DEdgeNature *self, PyObject *args, PyObject *kwds)
|
||||
static int UnaryFunction1DEdgeNature___init__(BPy_UnaryFunction1DEdgeNature *self,
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"integration", NULL};
|
||||
PyObject *obj = 0;
|
||||
static const char *kwlist[] = {"integration", NULL};
|
||||
PyObject *obj = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
if (!PyArg_ParseTupleAndKeywords(
|
||||
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
|
||||
if (!obj)
|
||||
self->uf1D_edgenature = new UnaryFunction1D<Nature::EdgeNature>();
|
||||
else {
|
||||
self->uf1D_edgenature = new UnaryFunction1D<Nature::EdgeNature>(IntegrationType_from_BPy_IntegrationType(obj));
|
||||
}
|
||||
if (!obj)
|
||||
self->uf1D_edgenature = new UnaryFunction1D<Nature::EdgeNature>();
|
||||
else {
|
||||
self->uf1D_edgenature = new UnaryFunction1D<Nature::EdgeNature>(
|
||||
IntegrationType_from_BPy_IntegrationType(obj));
|
||||
}
|
||||
|
||||
self->uf1D_edgenature->py_uf1D = (PyObject *)self;
|
||||
self->uf1D_edgenature->py_uf1D = (PyObject *)self;
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void UnaryFunction1DEdgeNature___dealloc__(BPy_UnaryFunction1DEdgeNature *self)
|
||||
{
|
||||
if (self->uf1D_edgenature)
|
||||
delete self->uf1D_edgenature;
|
||||
UnaryFunction1D_Type.tp_dealloc((PyObject *)self);
|
||||
if (self->uf1D_edgenature)
|
||||
delete self->uf1D_edgenature;
|
||||
UnaryFunction1D_Type.tp_dealloc((PyObject *)self);
|
||||
}
|
||||
|
||||
static PyObject *UnaryFunction1DEdgeNature___repr__(BPy_UnaryFunction1DEdgeNature *self)
|
||||
{
|
||||
return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf1D_edgenature);
|
||||
return PyUnicode_FromFormat(
|
||||
"type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf1D_edgenature);
|
||||
}
|
||||
|
||||
static PyObject *UnaryFunction1DEdgeNature___call__(BPy_UnaryFunction1DEdgeNature *self,
|
||||
PyObject *args, PyObject *kwds)
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"inter", NULL};
|
||||
PyObject *obj = 0;
|
||||
static const char *kwlist[] = {"inter", NULL};
|
||||
PyObject *obj = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj))
|
||||
return NULL;
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj))
|
||||
return NULL;
|
||||
|
||||
if (typeid(*(self->uf1D_edgenature)) == typeid(UnaryFunction1D<Nature::EdgeNature>)) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf1D_edgenature->operator()(*(((BPy_Interface1D *) obj)->if1D)) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string class_name(Py_TYPE(self)->tp_name);
|
||||
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
return BPy_Nature_from_Nature(self->uf1D_edgenature->result);
|
||||
if (typeid(*(self->uf1D_edgenature)) == typeid(UnaryFunction1D<Nature::EdgeNature>)) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf1D_edgenature->operator()(*(((BPy_Interface1D *)obj)->if1D)) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string class_name(Py_TYPE(self)->tp_name);
|
||||
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
return BPy_Nature_from_Nature(self->uf1D_edgenature->result);
|
||||
}
|
||||
|
||||
/*----------------------UnaryFunction1DEdgeNature get/setters ----------------------------*/
|
||||
|
||||
PyDoc_STRVAR(integration_type_doc,
|
||||
"The integration method.\n"
|
||||
"\n"
|
||||
":type: :class:`IntegrationType`");
|
||||
"The integration method.\n"
|
||||
"\n"
|
||||
":type: :class:`IntegrationType`");
|
||||
|
||||
static PyObject *integration_type_get(BPy_UnaryFunction1DEdgeNature *self, void *UNUSED(closure))
|
||||
{
|
||||
return BPy_IntegrationType_from_IntegrationType(self->uf1D_edgenature->getIntegrationType());
|
||||
return BPy_IntegrationType_from_IntegrationType(self->uf1D_edgenature->getIntegrationType());
|
||||
}
|
||||
|
||||
static int integration_type_set(BPy_UnaryFunction1DEdgeNature *self, PyObject *value, void *UNUSED(closure))
|
||||
static int integration_type_set(BPy_UnaryFunction1DEdgeNature *self,
|
||||
PyObject *value,
|
||||
void *UNUSED(closure))
|
||||
{
|
||||
if (!BPy_IntegrationType_Check(value)) {
|
||||
PyErr_SetString(PyExc_TypeError, "value must be an IntegrationType");
|
||||
return -1;
|
||||
}
|
||||
self->uf1D_edgenature->setIntegrationType(IntegrationType_from_BPy_IntegrationType(value));
|
||||
return 0;
|
||||
if (!BPy_IntegrationType_Check(value)) {
|
||||
PyErr_SetString(PyExc_TypeError, "value must be an IntegrationType");
|
||||
return -1;
|
||||
}
|
||||
self->uf1D_edgenature->setIntegrationType(IntegrationType_from_BPy_IntegrationType(value));
|
||||
return 0;
|
||||
}
|
||||
|
||||
static PyGetSetDef BPy_UnaryFunction1DEdgeNature_getseters[] = {
|
||||
{(char *)"integration_type", (getter)integration_type_get, (setter)integration_type_set,
|
||||
(char *)integration_type_doc, NULL},
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
{(char *)"integration_type",
|
||||
(getter)integration_type_get,
|
||||
(setter)integration_type_set,
|
||||
(char *)integration_type_doc,
|
||||
NULL},
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
/*-----------------------BPy_UnaryFunction1DEdgeNature type definition ------------------------------*/
|
||||
|
||||
PyTypeObject UnaryFunction1DEdgeNature_Type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"UnaryFunction1DEdgeNature", /* tp_name */
|
||||
sizeof(BPy_UnaryFunction1DEdgeNature), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor)UnaryFunction1DEdgeNature___dealloc__, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
(reprfunc)UnaryFunction1DEdgeNature___repr__, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
(ternaryfunc)UnaryFunction1DEdgeNature___call__, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
UnaryFunction1DEdgeNature___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
BPy_UnaryFunction1DEdgeNature_getseters, /* tp_getset */
|
||||
&UnaryFunction1D_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)UnaryFunction1DEdgeNature___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction1DEdgeNature", /* tp_name */
|
||||
sizeof(BPy_UnaryFunction1DEdgeNature), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor)UnaryFunction1DEdgeNature___dealloc__, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
(reprfunc)UnaryFunction1DEdgeNature___repr__, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
(ternaryfunc)UnaryFunction1DEdgeNature___call__, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
UnaryFunction1DEdgeNature___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
BPy_UnaryFunction1DEdgeNature_getseters, /* tp_getset */
|
||||
&UnaryFunction1D_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)UnaryFunction1DEdgeNature___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -34,18 +34,17 @@ extern "C" {
|
||||
extern PyTypeObject UnaryFunction1DEdgeNature_Type;
|
||||
|
||||
#define BPy_UnaryFunction1DEdgeNature_Check(v) \
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&UnaryFunction1DEdgeNature_Type))
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&UnaryFunction1DEdgeNature_Type))
|
||||
|
||||
/*---------------------------Python BPy_UnaryFunction1DEdgeNature structure definition----------*/
|
||||
typedef struct {
|
||||
BPy_UnaryFunction1D py_uf1D;
|
||||
UnaryFunction1D<Nature::EdgeNature> *uf1D_edgenature;
|
||||
BPy_UnaryFunction1D py_uf1D;
|
||||
UnaryFunction1D<Nature::EdgeNature> *uf1D_edgenature;
|
||||
} BPy_UnaryFunction1DEdgeNature;
|
||||
|
||||
/*---------------------------Python BPy_UnaryFunction1DEdgeNature visible prototypes-----------*/
|
||||
int UnaryFunction1DEdgeNature_Init(PyObject *module);
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -34,159 +34,168 @@ extern "C" {
|
||||
|
||||
int UnaryFunction1DFloat_Init(PyObject *module)
|
||||
{
|
||||
if (module == NULL)
|
||||
return -1;
|
||||
if (module == NULL)
|
||||
return -1;
|
||||
|
||||
if (PyType_Ready(&UnaryFunction1DFloat_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&UnaryFunction1DFloat_Type);
|
||||
PyModule_AddObject(module, "UnaryFunction1DFloat", (PyObject *)&UnaryFunction1DFloat_Type);
|
||||
if (PyType_Ready(&UnaryFunction1DFloat_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&UnaryFunction1DFloat_Type);
|
||||
PyModule_AddObject(module, "UnaryFunction1DFloat", (PyObject *)&UnaryFunction1DFloat_Type);
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
//------------------------INSTANCE METHODS ----------------------------------
|
||||
|
||||
static char UnaryFunction1DFloat___doc__[] =
|
||||
"Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DFloat`\n"
|
||||
"\n"
|
||||
"Base class for unary functions (functors) that work on\n"
|
||||
":class:`Interface1D` and return a float value.\n"
|
||||
"\n"
|
||||
".. method:: __init__()\n"
|
||||
"\n"
|
||||
" Default constructor.\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type)\n"
|
||||
"\n"
|
||||
" Builds a unary 1D function using the integration method given as\n"
|
||||
" argument.\n"
|
||||
"\n"
|
||||
" :arg integration_type: An integration method.\n"
|
||||
" :type integration_type: :class:`IntegrationType`\n";
|
||||
"Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DFloat`\n"
|
||||
"\n"
|
||||
"Base class for unary functions (functors) that work on\n"
|
||||
":class:`Interface1D` and return a float value.\n"
|
||||
"\n"
|
||||
".. method:: __init__()\n"
|
||||
"\n"
|
||||
" Default constructor.\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type)\n"
|
||||
"\n"
|
||||
" Builds a unary 1D function using the integration method given as\n"
|
||||
" argument.\n"
|
||||
"\n"
|
||||
" :arg integration_type: An integration method.\n"
|
||||
" :type integration_type: :class:`IntegrationType`\n";
|
||||
|
||||
static int UnaryFunction1DFloat___init__(BPy_UnaryFunction1DFloat *self, PyObject *args, PyObject *kwds)
|
||||
static int UnaryFunction1DFloat___init__(BPy_UnaryFunction1DFloat *self,
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"integration", NULL};
|
||||
PyObject *obj = 0;
|
||||
static const char *kwlist[] = {"integration", NULL};
|
||||
PyObject *obj = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
if (!PyArg_ParseTupleAndKeywords(
|
||||
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
|
||||
if (!obj)
|
||||
self->uf1D_float = new UnaryFunction1D<float>();
|
||||
else {
|
||||
self->uf1D_float = new UnaryFunction1D<float>(IntegrationType_from_BPy_IntegrationType(obj));
|
||||
}
|
||||
if (!obj)
|
||||
self->uf1D_float = new UnaryFunction1D<float>();
|
||||
else {
|
||||
self->uf1D_float = new UnaryFunction1D<float>(IntegrationType_from_BPy_IntegrationType(obj));
|
||||
}
|
||||
|
||||
self->uf1D_float->py_uf1D = (PyObject *)self;
|
||||
self->uf1D_float->py_uf1D = (PyObject *)self;
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void UnaryFunction1DFloat___dealloc__(BPy_UnaryFunction1DFloat *self)
|
||||
{
|
||||
if (self->uf1D_float)
|
||||
delete self->uf1D_float;
|
||||
UnaryFunction1D_Type.tp_dealloc((PyObject *)self);
|
||||
if (self->uf1D_float)
|
||||
delete self->uf1D_float;
|
||||
UnaryFunction1D_Type.tp_dealloc((PyObject *)self);
|
||||
}
|
||||
|
||||
static PyObject *UnaryFunction1DFloat___repr__(BPy_UnaryFunction1DFloat *self)
|
||||
{
|
||||
return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf1D_float);
|
||||
return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf1D_float);
|
||||
}
|
||||
|
||||
static PyObject *UnaryFunction1DFloat___call__(BPy_UnaryFunction1DFloat *self, PyObject *args, PyObject *kwds)
|
||||
static PyObject *UnaryFunction1DFloat___call__(BPy_UnaryFunction1DFloat *self,
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"inter", NULL};
|
||||
PyObject *obj = 0;
|
||||
static const char *kwlist[] = {"inter", NULL};
|
||||
PyObject *obj = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj))
|
||||
return NULL;
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj))
|
||||
return NULL;
|
||||
|
||||
if (typeid(*(self->uf1D_float)) == typeid(UnaryFunction1D<float>)) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf1D_float->operator()(*(((BPy_Interface1D *) obj)->if1D)) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string class_name(Py_TYPE(self)->tp_name);
|
||||
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
return PyFloat_FromDouble(self->uf1D_float->result);
|
||||
if (typeid(*(self->uf1D_float)) == typeid(UnaryFunction1D<float>)) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf1D_float->operator()(*(((BPy_Interface1D *)obj)->if1D)) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string class_name(Py_TYPE(self)->tp_name);
|
||||
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
return PyFloat_FromDouble(self->uf1D_float->result);
|
||||
}
|
||||
|
||||
/*----------------------UnaryFunction1DFloat get/setters ----------------------------*/
|
||||
|
||||
PyDoc_STRVAR(integration_type_doc,
|
||||
"The integration method.\n"
|
||||
"\n"
|
||||
":type: :class:`IntegrationType`");
|
||||
"The integration method.\n"
|
||||
"\n"
|
||||
":type: :class:`IntegrationType`");
|
||||
|
||||
static PyObject *integration_type_get(BPy_UnaryFunction1DFloat *self, void *UNUSED(closure))
|
||||
{
|
||||
return BPy_IntegrationType_from_IntegrationType(self->uf1D_float->getIntegrationType());
|
||||
return BPy_IntegrationType_from_IntegrationType(self->uf1D_float->getIntegrationType());
|
||||
}
|
||||
|
||||
static int integration_type_set(BPy_UnaryFunction1DFloat *self, PyObject *value, void *UNUSED(closure))
|
||||
static int integration_type_set(BPy_UnaryFunction1DFloat *self,
|
||||
PyObject *value,
|
||||
void *UNUSED(closure))
|
||||
{
|
||||
if (!BPy_IntegrationType_Check(value)) {
|
||||
PyErr_SetString(PyExc_TypeError, "value must be an IntegrationType");
|
||||
return -1;
|
||||
}
|
||||
self->uf1D_float->setIntegrationType(IntegrationType_from_BPy_IntegrationType(value));
|
||||
return 0;
|
||||
if (!BPy_IntegrationType_Check(value)) {
|
||||
PyErr_SetString(PyExc_TypeError, "value must be an IntegrationType");
|
||||
return -1;
|
||||
}
|
||||
self->uf1D_float->setIntegrationType(IntegrationType_from_BPy_IntegrationType(value));
|
||||
return 0;
|
||||
}
|
||||
|
||||
static PyGetSetDef BPy_UnaryFunction1DFloat_getseters[] = {
|
||||
{(char *)"integration_type", (getter)integration_type_get, (setter)integration_type_set,
|
||||
(char *)integration_type_doc, NULL},
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
{(char *)"integration_type",
|
||||
(getter)integration_type_get,
|
||||
(setter)integration_type_set,
|
||||
(char *)integration_type_doc,
|
||||
NULL},
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
/*-----------------------BPy_UnaryFunction1DFloat type definition ------------------------------*/
|
||||
|
||||
PyTypeObject UnaryFunction1DFloat_Type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"UnaryFunction1DFloat", /* tp_name */
|
||||
sizeof(BPy_UnaryFunction1DFloat), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor)UnaryFunction1DFloat___dealloc__, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
(reprfunc)UnaryFunction1DFloat___repr__, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
(ternaryfunc)UnaryFunction1DFloat___call__, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
UnaryFunction1DFloat___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
BPy_UnaryFunction1DFloat_getseters, /* tp_getset */
|
||||
&UnaryFunction1D_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)UnaryFunction1DFloat___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction1DFloat", /* tp_name */
|
||||
sizeof(BPy_UnaryFunction1DFloat), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor)UnaryFunction1DFloat___dealloc__, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
(reprfunc)UnaryFunction1DFloat___repr__, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
(ternaryfunc)UnaryFunction1DFloat___call__, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
UnaryFunction1DFloat___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
BPy_UnaryFunction1DFloat_getseters, /* tp_getset */
|
||||
&UnaryFunction1D_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)UnaryFunction1DFloat___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -31,18 +31,18 @@ extern "C" {
|
||||
|
||||
extern PyTypeObject UnaryFunction1DFloat_Type;
|
||||
|
||||
#define BPy_UnaryFunction1DFloat_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&UnaryFunction1DFloat_Type))
|
||||
#define BPy_UnaryFunction1DFloat_Check(v) \
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&UnaryFunction1DFloat_Type))
|
||||
|
||||
/*---------------------------Python BPy_UnaryFunction1DFloat structure definition----------*/
|
||||
typedef struct {
|
||||
BPy_UnaryFunction1D py_uf1D;
|
||||
UnaryFunction1D<float> *uf1D_float;
|
||||
BPy_UnaryFunction1D py_uf1D;
|
||||
UnaryFunction1D<float> *uf1D_float;
|
||||
} BPy_UnaryFunction1DFloat;
|
||||
|
||||
/*---------------------------Python BPy_UnaryFunction1DFloat visible prototypes-----------*/
|
||||
int UnaryFunction1DFloat_Init(PyObject *module);
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -36,164 +36,176 @@ extern "C" {
|
||||
|
||||
int UnaryFunction1DUnsigned_Init(PyObject *module)
|
||||
{
|
||||
if (module == NULL)
|
||||
return -1;
|
||||
if (module == NULL)
|
||||
return -1;
|
||||
|
||||
if (PyType_Ready(&UnaryFunction1DUnsigned_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&UnaryFunction1DUnsigned_Type);
|
||||
PyModule_AddObject(module, "UnaryFunction1DUnsigned", (PyObject *)&UnaryFunction1DUnsigned_Type);
|
||||
if (PyType_Ready(&UnaryFunction1DUnsigned_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&UnaryFunction1DUnsigned_Type);
|
||||
PyModule_AddObject(module, "UnaryFunction1DUnsigned", (PyObject *)&UnaryFunction1DUnsigned_Type);
|
||||
|
||||
if (PyType_Ready(&QuantitativeInvisibilityF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&QuantitativeInvisibilityF1D_Type);
|
||||
PyModule_AddObject(module, "QuantitativeInvisibilityF1D", (PyObject *)&QuantitativeInvisibilityF1D_Type);
|
||||
if (PyType_Ready(&QuantitativeInvisibilityF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&QuantitativeInvisibilityF1D_Type);
|
||||
PyModule_AddObject(
|
||||
module, "QuantitativeInvisibilityF1D", (PyObject *)&QuantitativeInvisibilityF1D_Type);
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
//------------------------INSTANCE METHODS ----------------------------------
|
||||
|
||||
static char UnaryFunction1DUnsigned___doc__[] =
|
||||
"Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DUnsigned`\n"
|
||||
"\n"
|
||||
"Base class for unary functions (functors) that work on\n"
|
||||
":class:`Interface1D` and return an int value.\n"
|
||||
"\n"
|
||||
".. method:: __init__()\n"
|
||||
"\n"
|
||||
" Default constructor.\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type)\n"
|
||||
"\n"
|
||||
" Builds a unary 1D function using the integration method given as\n"
|
||||
" argument.\n"
|
||||
"\n"
|
||||
" :arg integration_type: An integration method.\n"
|
||||
" :type integration_type: :class:`IntegrationType`\n";
|
||||
"Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DUnsigned`\n"
|
||||
"\n"
|
||||
"Base class for unary functions (functors) that work on\n"
|
||||
":class:`Interface1D` and return an int value.\n"
|
||||
"\n"
|
||||
".. method:: __init__()\n"
|
||||
"\n"
|
||||
" Default constructor.\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type)\n"
|
||||
"\n"
|
||||
" Builds a unary 1D function using the integration method given as\n"
|
||||
" argument.\n"
|
||||
"\n"
|
||||
" :arg integration_type: An integration method.\n"
|
||||
" :type integration_type: :class:`IntegrationType`\n";
|
||||
|
||||
static int UnaryFunction1DUnsigned___init__(BPy_UnaryFunction1DUnsigned *self, PyObject *args, PyObject *kwds)
|
||||
static int UnaryFunction1DUnsigned___init__(BPy_UnaryFunction1DUnsigned *self,
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"integration", NULL};
|
||||
PyObject *obj = 0;
|
||||
static const char *kwlist[] = {"integration", NULL};
|
||||
PyObject *obj = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
if (!PyArg_ParseTupleAndKeywords(
|
||||
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
|
||||
if (!obj)
|
||||
self->uf1D_unsigned = new UnaryFunction1D<unsigned int>();
|
||||
else {
|
||||
self->uf1D_unsigned = new UnaryFunction1D<unsigned int>(IntegrationType_from_BPy_IntegrationType(obj));
|
||||
}
|
||||
if (!obj)
|
||||
self->uf1D_unsigned = new UnaryFunction1D<unsigned int>();
|
||||
else {
|
||||
self->uf1D_unsigned = new UnaryFunction1D<unsigned int>(
|
||||
IntegrationType_from_BPy_IntegrationType(obj));
|
||||
}
|
||||
|
||||
self->uf1D_unsigned->py_uf1D = (PyObject *)self;
|
||||
self->uf1D_unsigned->py_uf1D = (PyObject *)self;
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void UnaryFunction1DUnsigned___dealloc__(BPy_UnaryFunction1DUnsigned *self)
|
||||
{
|
||||
if (self->uf1D_unsigned)
|
||||
delete self->uf1D_unsigned;
|
||||
UnaryFunction1D_Type.tp_dealloc((PyObject *)self);
|
||||
if (self->uf1D_unsigned)
|
||||
delete self->uf1D_unsigned;
|
||||
UnaryFunction1D_Type.tp_dealloc((PyObject *)self);
|
||||
}
|
||||
|
||||
static PyObject *UnaryFunction1DUnsigned___repr__(BPy_UnaryFunction1DUnsigned *self)
|
||||
{
|
||||
return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf1D_unsigned);
|
||||
return PyUnicode_FromFormat(
|
||||
"type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf1D_unsigned);
|
||||
}
|
||||
|
||||
static PyObject *UnaryFunction1DUnsigned___call__(BPy_UnaryFunction1DUnsigned *self, PyObject *args, PyObject *kwds)
|
||||
static PyObject *UnaryFunction1DUnsigned___call__(BPy_UnaryFunction1DUnsigned *self,
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"inter", NULL};
|
||||
PyObject *obj = 0;
|
||||
static const char *kwlist[] = {"inter", NULL};
|
||||
PyObject *obj = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj))
|
||||
return NULL;
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj))
|
||||
return NULL;
|
||||
|
||||
if (typeid(*(self->uf1D_unsigned)) == typeid(UnaryFunction1D<unsigned int>)) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf1D_unsigned->operator()(*(((BPy_Interface1D *) obj)->if1D)) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string class_name(Py_TYPE(self)->tp_name);
|
||||
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
return PyLong_FromLong(self->uf1D_unsigned->result);
|
||||
if (typeid(*(self->uf1D_unsigned)) == typeid(UnaryFunction1D<unsigned int>)) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf1D_unsigned->operator()(*(((BPy_Interface1D *)obj)->if1D)) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string class_name(Py_TYPE(self)->tp_name);
|
||||
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
return PyLong_FromLong(self->uf1D_unsigned->result);
|
||||
}
|
||||
|
||||
/*----------------------UnaryFunction1DUnsigned get/setters ----------------------------*/
|
||||
|
||||
PyDoc_STRVAR(integration_type_doc,
|
||||
"The integration method.\n"
|
||||
"\n"
|
||||
":type: :class:`IntegrationType`");
|
||||
"The integration method.\n"
|
||||
"\n"
|
||||
":type: :class:`IntegrationType`");
|
||||
|
||||
static PyObject *integration_type_get(BPy_UnaryFunction1DUnsigned *self, void *UNUSED(closure))
|
||||
{
|
||||
return BPy_IntegrationType_from_IntegrationType(self->uf1D_unsigned->getIntegrationType());
|
||||
return BPy_IntegrationType_from_IntegrationType(self->uf1D_unsigned->getIntegrationType());
|
||||
}
|
||||
|
||||
static int integration_type_set(BPy_UnaryFunction1DUnsigned *self, PyObject *value, void *UNUSED(closure))
|
||||
static int integration_type_set(BPy_UnaryFunction1DUnsigned *self,
|
||||
PyObject *value,
|
||||
void *UNUSED(closure))
|
||||
{
|
||||
if (!BPy_IntegrationType_Check(value)) {
|
||||
PyErr_SetString(PyExc_TypeError, "value must be an IntegrationType");
|
||||
return -1;
|
||||
}
|
||||
self->uf1D_unsigned->setIntegrationType(IntegrationType_from_BPy_IntegrationType(value));
|
||||
return 0;
|
||||
if (!BPy_IntegrationType_Check(value)) {
|
||||
PyErr_SetString(PyExc_TypeError, "value must be an IntegrationType");
|
||||
return -1;
|
||||
}
|
||||
self->uf1D_unsigned->setIntegrationType(IntegrationType_from_BPy_IntegrationType(value));
|
||||
return 0;
|
||||
}
|
||||
|
||||
static PyGetSetDef BPy_UnaryFunction1DUnsigned_getseters[] = {
|
||||
{(char *)"integration_type", (getter)integration_type_get, (setter)integration_type_set,
|
||||
(char *)integration_type_doc, NULL},
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
{(char *)"integration_type",
|
||||
(getter)integration_type_get,
|
||||
(setter)integration_type_set,
|
||||
(char *)integration_type_doc,
|
||||
NULL},
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
/*-----------------------BPy_UnaryFunction1DUnsigned type definition ------------------------------*/
|
||||
|
||||
PyTypeObject UnaryFunction1DUnsigned_Type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"UnaryFunction1DUnsigned", /* tp_name */
|
||||
sizeof(BPy_UnaryFunction1DUnsigned), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor)UnaryFunction1DUnsigned___dealloc__, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
(reprfunc)UnaryFunction1DUnsigned___repr__, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
(ternaryfunc)UnaryFunction1DUnsigned___call__, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
UnaryFunction1DUnsigned___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
BPy_UnaryFunction1DUnsigned_getseters, /* tp_getset */
|
||||
&UnaryFunction1D_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)UnaryFunction1DUnsigned___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction1DUnsigned", /* tp_name */
|
||||
sizeof(BPy_UnaryFunction1DUnsigned), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor)UnaryFunction1DUnsigned___dealloc__, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
(reprfunc)UnaryFunction1DUnsigned___repr__, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
(ternaryfunc)UnaryFunction1DUnsigned___call__, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
UnaryFunction1DUnsigned___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
BPy_UnaryFunction1DUnsigned_getseters, /* tp_getset */
|
||||
&UnaryFunction1D_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)UnaryFunction1DUnsigned___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -32,18 +32,17 @@ extern "C" {
|
||||
extern PyTypeObject UnaryFunction1DUnsigned_Type;
|
||||
|
||||
#define BPy_UnaryFunction1DUnsigned_Check(v) \
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&UnaryFunction1DUnsigned_Type))
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&UnaryFunction1DUnsigned_Type))
|
||||
|
||||
/*---------------------------Python BPy_UnaryFunction1DUnsigned structure definition----------*/
|
||||
typedef struct {
|
||||
BPy_UnaryFunction1D py_uf1D;
|
||||
UnaryFunction1D<unsigned int> *uf1D_unsigned;
|
||||
BPy_UnaryFunction1D py_uf1D;
|
||||
UnaryFunction1D<unsigned int> *uf1D_unsigned;
|
||||
} BPy_UnaryFunction1DUnsigned;
|
||||
|
||||
/*---------------------------Python BPy_UnaryFunction1DUnsigned visible prototypes-----------*/
|
||||
int UnaryFunction1DUnsigned_Init(PyObject *module);
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -37,169 +37,178 @@ extern "C" {
|
||||
|
||||
int UnaryFunction1DVec2f_Init(PyObject *module)
|
||||
{
|
||||
if (module == NULL)
|
||||
return -1;
|
||||
if (module == NULL)
|
||||
return -1;
|
||||
|
||||
if (PyType_Ready(&UnaryFunction1DVec2f_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&UnaryFunction1DVec2f_Type);
|
||||
PyModule_AddObject(module, "UnaryFunction1DVec2f", (PyObject *)&UnaryFunction1DVec2f_Type);
|
||||
if (PyType_Ready(&UnaryFunction1DVec2f_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&UnaryFunction1DVec2f_Type);
|
||||
PyModule_AddObject(module, "UnaryFunction1DVec2f", (PyObject *)&UnaryFunction1DVec2f_Type);
|
||||
|
||||
if (PyType_Ready(&Normal2DF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&Normal2DF1D_Type);
|
||||
PyModule_AddObject(module, "Normal2DF1D", (PyObject *)&Normal2DF1D_Type);
|
||||
if (PyType_Ready(&Normal2DF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&Normal2DF1D_Type);
|
||||
PyModule_AddObject(module, "Normal2DF1D", (PyObject *)&Normal2DF1D_Type);
|
||||
|
||||
if (PyType_Ready(&Orientation2DF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&Orientation2DF1D_Type);
|
||||
PyModule_AddObject(module, "Orientation2DF1D", (PyObject *)&Orientation2DF1D_Type);
|
||||
if (PyType_Ready(&Orientation2DF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&Orientation2DF1D_Type);
|
||||
PyModule_AddObject(module, "Orientation2DF1D", (PyObject *)&Orientation2DF1D_Type);
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
//------------------------INSTANCE METHODS ----------------------------------
|
||||
|
||||
static char UnaryFunction1DVec2f___doc__[] =
|
||||
"Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DVec2f`\n"
|
||||
"\n"
|
||||
"Base class for unary functions (functors) that work on\n"
|
||||
":class:`Interface1D` and return a 2D vector.\n"
|
||||
"\n"
|
||||
".. method:: __init__()\n"
|
||||
"\n"
|
||||
" Default constructor.\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type)\n"
|
||||
"\n"
|
||||
" Builds a unary 1D function using the integration method given as\n"
|
||||
" argument.\n"
|
||||
"\n"
|
||||
" :arg integration_type: An integration method.\n"
|
||||
" :type integration_type: :class:`IntegrationType`\n";
|
||||
"Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DVec2f`\n"
|
||||
"\n"
|
||||
"Base class for unary functions (functors) that work on\n"
|
||||
":class:`Interface1D` and return a 2D vector.\n"
|
||||
"\n"
|
||||
".. method:: __init__()\n"
|
||||
"\n"
|
||||
" Default constructor.\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type)\n"
|
||||
"\n"
|
||||
" Builds a unary 1D function using the integration method given as\n"
|
||||
" argument.\n"
|
||||
"\n"
|
||||
" :arg integration_type: An integration method.\n"
|
||||
" :type integration_type: :class:`IntegrationType`\n";
|
||||
|
||||
static int UnaryFunction1DVec2f___init__(BPy_UnaryFunction1DVec2f *self, PyObject *args, PyObject *kwds)
|
||||
static int UnaryFunction1DVec2f___init__(BPy_UnaryFunction1DVec2f *self,
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"integration", NULL};
|
||||
PyObject *obj = 0;
|
||||
static const char *kwlist[] = {"integration", NULL};
|
||||
PyObject *obj = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
if (!PyArg_ParseTupleAndKeywords(
|
||||
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
|
||||
if (!obj)
|
||||
self->uf1D_vec2f = new UnaryFunction1D<Vec2f>();
|
||||
else {
|
||||
self->uf1D_vec2f = new UnaryFunction1D<Vec2f>(IntegrationType_from_BPy_IntegrationType(obj));
|
||||
}
|
||||
if (!obj)
|
||||
self->uf1D_vec2f = new UnaryFunction1D<Vec2f>();
|
||||
else {
|
||||
self->uf1D_vec2f = new UnaryFunction1D<Vec2f>(IntegrationType_from_BPy_IntegrationType(obj));
|
||||
}
|
||||
|
||||
self->uf1D_vec2f->py_uf1D = (PyObject *)self;
|
||||
self->uf1D_vec2f->py_uf1D = (PyObject *)self;
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void UnaryFunction1DVec2f___dealloc__(BPy_UnaryFunction1DVec2f *self)
|
||||
{
|
||||
if (self->uf1D_vec2f)
|
||||
delete self->uf1D_vec2f;
|
||||
UnaryFunction1D_Type.tp_dealloc((PyObject *)self);
|
||||
if (self->uf1D_vec2f)
|
||||
delete self->uf1D_vec2f;
|
||||
UnaryFunction1D_Type.tp_dealloc((PyObject *)self);
|
||||
}
|
||||
|
||||
static PyObject *UnaryFunction1DVec2f___repr__(BPy_UnaryFunction1DVec2f *self)
|
||||
{
|
||||
return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf1D_vec2f);
|
||||
return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf1D_vec2f);
|
||||
}
|
||||
|
||||
static PyObject *UnaryFunction1DVec2f___call__(BPy_UnaryFunction1DVec2f *self, PyObject *args, PyObject *kwds)
|
||||
static PyObject *UnaryFunction1DVec2f___call__(BPy_UnaryFunction1DVec2f *self,
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"inter", NULL};
|
||||
PyObject *obj = 0;
|
||||
static const char *kwlist[] = {"inter", NULL};
|
||||
PyObject *obj = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj))
|
||||
return NULL;
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj))
|
||||
return NULL;
|
||||
|
||||
if (typeid(*(self->uf1D_vec2f)) == typeid(UnaryFunction1D<Vec2f>)) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf1D_vec2f->operator()(*(((BPy_Interface1D *) obj)->if1D)) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string class_name(Py_TYPE(self)->tp_name);
|
||||
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
return Vector_from_Vec2f(self->uf1D_vec2f->result);
|
||||
if (typeid(*(self->uf1D_vec2f)) == typeid(UnaryFunction1D<Vec2f>)) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf1D_vec2f->operator()(*(((BPy_Interface1D *)obj)->if1D)) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string class_name(Py_TYPE(self)->tp_name);
|
||||
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
return Vector_from_Vec2f(self->uf1D_vec2f->result);
|
||||
}
|
||||
|
||||
/*----------------------UnaryFunction1DVec2f get/setters ----------------------------*/
|
||||
|
||||
PyDoc_STRVAR(integration_type_doc,
|
||||
"The integration method.\n"
|
||||
"\n"
|
||||
":type: :class:`IntegrationType`");
|
||||
"The integration method.\n"
|
||||
"\n"
|
||||
":type: :class:`IntegrationType`");
|
||||
|
||||
static PyObject *integration_type_get(BPy_UnaryFunction1DVec2f *self, void *UNUSED(closure))
|
||||
{
|
||||
return BPy_IntegrationType_from_IntegrationType(self->uf1D_vec2f->getIntegrationType());
|
||||
return BPy_IntegrationType_from_IntegrationType(self->uf1D_vec2f->getIntegrationType());
|
||||
}
|
||||
|
||||
static int integration_type_set(BPy_UnaryFunction1DVec2f *self, PyObject *value, void *UNUSED(closure))
|
||||
static int integration_type_set(BPy_UnaryFunction1DVec2f *self,
|
||||
PyObject *value,
|
||||
void *UNUSED(closure))
|
||||
{
|
||||
if (!BPy_IntegrationType_Check(value)) {
|
||||
PyErr_SetString(PyExc_TypeError, "value must be an IntegrationType");
|
||||
return -1;
|
||||
}
|
||||
self->uf1D_vec2f->setIntegrationType(IntegrationType_from_BPy_IntegrationType(value));
|
||||
return 0;
|
||||
if (!BPy_IntegrationType_Check(value)) {
|
||||
PyErr_SetString(PyExc_TypeError, "value must be an IntegrationType");
|
||||
return -1;
|
||||
}
|
||||
self->uf1D_vec2f->setIntegrationType(IntegrationType_from_BPy_IntegrationType(value));
|
||||
return 0;
|
||||
}
|
||||
|
||||
static PyGetSetDef BPy_UnaryFunction1DVec2f_getseters[] = {
|
||||
{(char *)"integration_type", (getter)integration_type_get, (setter)integration_type_set,
|
||||
(char *)integration_type_doc, NULL},
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
{(char *)"integration_type",
|
||||
(getter)integration_type_get,
|
||||
(setter)integration_type_set,
|
||||
(char *)integration_type_doc,
|
||||
NULL},
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
/*-----------------------BPy_UnaryFunction1DVec2f type definition ------------------------------*/
|
||||
|
||||
PyTypeObject UnaryFunction1DVec2f_Type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"UnaryFunction1DVec2f", /* tp_name */
|
||||
sizeof(BPy_UnaryFunction1DVec2f), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor)UnaryFunction1DVec2f___dealloc__, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
(reprfunc)UnaryFunction1DVec2f___repr__, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
(ternaryfunc)UnaryFunction1DVec2f___call__, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
UnaryFunction1DVec2f___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
BPy_UnaryFunction1DVec2f_getseters, /* tp_getset */
|
||||
&UnaryFunction1D_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)UnaryFunction1DVec2f___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction1DVec2f", /* tp_name */
|
||||
sizeof(BPy_UnaryFunction1DVec2f), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor)UnaryFunction1DVec2f___dealloc__, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
(reprfunc)UnaryFunction1DVec2f___repr__, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
(ternaryfunc)UnaryFunction1DVec2f___call__, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
UnaryFunction1DVec2f___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
BPy_UnaryFunction1DVec2f_getseters, /* tp_getset */
|
||||
&UnaryFunction1D_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)UnaryFunction1DVec2f___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -34,18 +34,18 @@ extern "C" {
|
||||
|
||||
extern PyTypeObject UnaryFunction1DVec2f_Type;
|
||||
|
||||
#define BPy_UnaryFunction1DVec2f_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&UnaryFunction1DVec2f_Type))
|
||||
#define BPy_UnaryFunction1DVec2f_Check(v) \
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&UnaryFunction1DVec2f_Type))
|
||||
|
||||
/*---------------------------Python BPy_UnaryFunction1DVec2f structure definition----------*/
|
||||
typedef struct {
|
||||
BPy_UnaryFunction1D py_uf1D;
|
||||
UnaryFunction1D<Vec2f> *uf1D_vec2f;
|
||||
BPy_UnaryFunction1D py_uf1D;
|
||||
UnaryFunction1D<Vec2f> *uf1D_vec2f;
|
||||
} BPy_UnaryFunction1DVec2f;
|
||||
|
||||
/*---------------------------Python BPy_UnaryFunction1DVec2f visible prototypes-----------*/
|
||||
int UnaryFunction1DVec2f_Init(PyObject *module);
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -36,164 +36,173 @@ extern "C" {
|
||||
|
||||
int UnaryFunction1DVec3f_Init(PyObject *module)
|
||||
{
|
||||
if (module == NULL)
|
||||
return -1;
|
||||
if (module == NULL)
|
||||
return -1;
|
||||
|
||||
if (PyType_Ready(&UnaryFunction1DVec3f_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&UnaryFunction1DVec3f_Type);
|
||||
PyModule_AddObject(module, "UnaryFunction1DVec3f", (PyObject *)&UnaryFunction1DVec3f_Type);
|
||||
if (PyType_Ready(&UnaryFunction1DVec3f_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&UnaryFunction1DVec3f_Type);
|
||||
PyModule_AddObject(module, "UnaryFunction1DVec3f", (PyObject *)&UnaryFunction1DVec3f_Type);
|
||||
|
||||
if (PyType_Ready(&Orientation3DF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&Orientation3DF1D_Type);
|
||||
PyModule_AddObject(module, "Orientation3DF1D", (PyObject *)&Orientation3DF1D_Type);
|
||||
if (PyType_Ready(&Orientation3DF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&Orientation3DF1D_Type);
|
||||
PyModule_AddObject(module, "Orientation3DF1D", (PyObject *)&Orientation3DF1D_Type);
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
//------------------------INSTANCE METHODS ----------------------------------
|
||||
|
||||
static char UnaryFunction1DVec3f___doc__[] =
|
||||
"Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DVec3f`\n"
|
||||
"\n"
|
||||
"Base class for unary functions (functors) that work on\n"
|
||||
":class:`Interface1D` and return a 3D vector.\n"
|
||||
"\n"
|
||||
".. method:: __init__()\n"
|
||||
"\n"
|
||||
" Default constructor.\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type)\n"
|
||||
"\n"
|
||||
" Builds a unary 1D function using the integration method given as\n"
|
||||
" argument.\n"
|
||||
"\n"
|
||||
" :arg integration_type: An integration method.\n"
|
||||
" :type integration_type: :class:`IntegrationType`\n";
|
||||
"Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DVec3f`\n"
|
||||
"\n"
|
||||
"Base class for unary functions (functors) that work on\n"
|
||||
":class:`Interface1D` and return a 3D vector.\n"
|
||||
"\n"
|
||||
".. method:: __init__()\n"
|
||||
"\n"
|
||||
" Default constructor.\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type)\n"
|
||||
"\n"
|
||||
" Builds a unary 1D function using the integration method given as\n"
|
||||
" argument.\n"
|
||||
"\n"
|
||||
" :arg integration_type: An integration method.\n"
|
||||
" :type integration_type: :class:`IntegrationType`\n";
|
||||
|
||||
static int UnaryFunction1DVec3f___init__(BPy_UnaryFunction1DVec3f *self, PyObject *args, PyObject *kwds)
|
||||
static int UnaryFunction1DVec3f___init__(BPy_UnaryFunction1DVec3f *self,
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"integration", NULL};
|
||||
PyObject *obj = 0;
|
||||
static const char *kwlist[] = {"integration", NULL};
|
||||
PyObject *obj = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
if (!PyArg_ParseTupleAndKeywords(
|
||||
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
|
||||
if (!obj)
|
||||
self->uf1D_vec3f = new UnaryFunction1D<Vec3f>();
|
||||
else {
|
||||
self->uf1D_vec3f = new UnaryFunction1D<Vec3f>(IntegrationType_from_BPy_IntegrationType(obj));
|
||||
}
|
||||
if (!obj)
|
||||
self->uf1D_vec3f = new UnaryFunction1D<Vec3f>();
|
||||
else {
|
||||
self->uf1D_vec3f = new UnaryFunction1D<Vec3f>(IntegrationType_from_BPy_IntegrationType(obj));
|
||||
}
|
||||
|
||||
self->uf1D_vec3f->py_uf1D = (PyObject *)self;
|
||||
self->uf1D_vec3f->py_uf1D = (PyObject *)self;
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void UnaryFunction1DVec3f___dealloc__(BPy_UnaryFunction1DVec3f *self)
|
||||
{
|
||||
if (self->uf1D_vec3f)
|
||||
delete self->uf1D_vec3f;
|
||||
UnaryFunction1D_Type.tp_dealloc((PyObject *)self);
|
||||
if (self->uf1D_vec3f)
|
||||
delete self->uf1D_vec3f;
|
||||
UnaryFunction1D_Type.tp_dealloc((PyObject *)self);
|
||||
}
|
||||
|
||||
static PyObject *UnaryFunction1DVec3f___repr__(BPy_UnaryFunction1DVec3f *self)
|
||||
{
|
||||
return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf1D_vec3f);
|
||||
return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf1D_vec3f);
|
||||
}
|
||||
|
||||
static PyObject *UnaryFunction1DVec3f___call__(BPy_UnaryFunction1DVec3f *self, PyObject *args, PyObject *kwds)
|
||||
static PyObject *UnaryFunction1DVec3f___call__(BPy_UnaryFunction1DVec3f *self,
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"inter", NULL};
|
||||
PyObject *obj = 0;
|
||||
static const char *kwlist[] = {"inter", NULL};
|
||||
PyObject *obj = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj))
|
||||
return NULL;
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj))
|
||||
return NULL;
|
||||
|
||||
if (typeid(*(self->uf1D_vec3f)) == typeid(UnaryFunction1D<Vec3f>)) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf1D_vec3f->operator()(*(((BPy_Interface1D *) obj)->if1D)) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string class_name(Py_TYPE(self)->tp_name);
|
||||
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
return Vector_from_Vec3f(self->uf1D_vec3f->result);
|
||||
if (typeid(*(self->uf1D_vec3f)) == typeid(UnaryFunction1D<Vec3f>)) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf1D_vec3f->operator()(*(((BPy_Interface1D *)obj)->if1D)) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string class_name(Py_TYPE(self)->tp_name);
|
||||
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
return Vector_from_Vec3f(self->uf1D_vec3f->result);
|
||||
}
|
||||
|
||||
/*----------------------UnaryFunction1DVec3f get/setters ----------------------------*/
|
||||
|
||||
PyDoc_STRVAR(integration_type_doc,
|
||||
"The integration method.\n"
|
||||
"\n"
|
||||
":type: :class:`IntegrationType`");
|
||||
"The integration method.\n"
|
||||
"\n"
|
||||
":type: :class:`IntegrationType`");
|
||||
|
||||
static PyObject *integration_type_get(BPy_UnaryFunction1DVec3f *self, void *UNUSED(closure))
|
||||
{
|
||||
return BPy_IntegrationType_from_IntegrationType(self->uf1D_vec3f->getIntegrationType());
|
||||
return BPy_IntegrationType_from_IntegrationType(self->uf1D_vec3f->getIntegrationType());
|
||||
}
|
||||
|
||||
static int integration_type_set(BPy_UnaryFunction1DVec3f *self, PyObject *value, void *UNUSED(closure))
|
||||
static int integration_type_set(BPy_UnaryFunction1DVec3f *self,
|
||||
PyObject *value,
|
||||
void *UNUSED(closure))
|
||||
{
|
||||
if (!BPy_IntegrationType_Check(value)) {
|
||||
PyErr_SetString(PyExc_TypeError, "value must be an IntegrationType");
|
||||
return -1;
|
||||
}
|
||||
self->uf1D_vec3f->setIntegrationType(IntegrationType_from_BPy_IntegrationType(value));
|
||||
return 0;
|
||||
if (!BPy_IntegrationType_Check(value)) {
|
||||
PyErr_SetString(PyExc_TypeError, "value must be an IntegrationType");
|
||||
return -1;
|
||||
}
|
||||
self->uf1D_vec3f->setIntegrationType(IntegrationType_from_BPy_IntegrationType(value));
|
||||
return 0;
|
||||
}
|
||||
|
||||
static PyGetSetDef BPy_UnaryFunction1DVec3f_getseters[] = {
|
||||
{(char *)"integration_type", (getter)integration_type_get, (setter)integration_type_set,
|
||||
(char *)integration_type_doc, NULL},
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
{(char *)"integration_type",
|
||||
(getter)integration_type_get,
|
||||
(setter)integration_type_set,
|
||||
(char *)integration_type_doc,
|
||||
NULL},
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
/*-----------------------BPy_UnaryFunction1DVec3f type definition ------------------------------*/
|
||||
|
||||
PyTypeObject UnaryFunction1DVec3f_Type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"UnaryFunction1DVec3f", /* tp_name */
|
||||
sizeof(BPy_UnaryFunction1DVec3f), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor)UnaryFunction1DVec3f___dealloc__, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
(reprfunc)UnaryFunction1DVec3f___repr__, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
(ternaryfunc)UnaryFunction1DVec3f___call__, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
UnaryFunction1DVec3f___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
BPy_UnaryFunction1DVec3f_getseters, /* tp_getset */
|
||||
&UnaryFunction1D_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)UnaryFunction1DVec3f___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction1DVec3f", /* tp_name */
|
||||
sizeof(BPy_UnaryFunction1DVec3f), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor)UnaryFunction1DVec3f___dealloc__, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
(reprfunc)UnaryFunction1DVec3f___repr__, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
(ternaryfunc)UnaryFunction1DVec3f___call__, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
UnaryFunction1DVec3f___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
BPy_UnaryFunction1DVec3f_getseters, /* tp_getset */
|
||||
&UnaryFunction1D_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)UnaryFunction1DVec3f___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -34,18 +34,18 @@ extern "C" {
|
||||
|
||||
extern PyTypeObject UnaryFunction1DVec3f_Type;
|
||||
|
||||
#define BPy_UnaryFunction1DVec3f_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&UnaryFunction1DVec3f_Type))
|
||||
#define BPy_UnaryFunction1DVec3f_Check(v) \
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&UnaryFunction1DVec3f_Type))
|
||||
|
||||
/*---------------------------Python BPy_UnaryFunction1DVec3f structure definition----------*/
|
||||
typedef struct {
|
||||
BPy_UnaryFunction1D py_uf1D;
|
||||
UnaryFunction1D<Vec3f> *uf1D_vec3f;
|
||||
BPy_UnaryFunction1D py_uf1D;
|
||||
UnaryFunction1D<Vec3f> *uf1D_vec3f;
|
||||
} BPy_UnaryFunction1DVec3f;
|
||||
|
||||
/*---------------------------Python BPy_UnaryFunction1DVec3f visible prototypes-----------*/
|
||||
int UnaryFunction1DVec3f_Init(PyObject *module);
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -38,186 +38,198 @@ extern "C" {
|
||||
|
||||
int UnaryFunction1DVectorViewShape_Init(PyObject *module)
|
||||
{
|
||||
if (module == NULL)
|
||||
return -1;
|
||||
if (module == NULL)
|
||||
return -1;
|
||||
|
||||
if (PyType_Ready(&UnaryFunction1DVectorViewShape_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&UnaryFunction1DVectorViewShape_Type);
|
||||
PyModule_AddObject(module, "UnaryFunction1DVectorViewShape", (PyObject *)&UnaryFunction1DVectorViewShape_Type);
|
||||
if (PyType_Ready(&UnaryFunction1DVectorViewShape_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&UnaryFunction1DVectorViewShape_Type);
|
||||
PyModule_AddObject(
|
||||
module, "UnaryFunction1DVectorViewShape", (PyObject *)&UnaryFunction1DVectorViewShape_Type);
|
||||
|
||||
if (PyType_Ready(&GetOccludeeF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&GetOccludeeF1D_Type);
|
||||
PyModule_AddObject(module, "GetOccludeeF1D", (PyObject *)&GetOccludeeF1D_Type);
|
||||
if (PyType_Ready(&GetOccludeeF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&GetOccludeeF1D_Type);
|
||||
PyModule_AddObject(module, "GetOccludeeF1D", (PyObject *)&GetOccludeeF1D_Type);
|
||||
|
||||
if (PyType_Ready(&GetOccludersF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&GetOccludersF1D_Type);
|
||||
PyModule_AddObject(module, "GetOccludersF1D", (PyObject *)&GetOccludersF1D_Type);
|
||||
if (PyType_Ready(&GetOccludersF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&GetOccludersF1D_Type);
|
||||
PyModule_AddObject(module, "GetOccludersF1D", (PyObject *)&GetOccludersF1D_Type);
|
||||
|
||||
if (PyType_Ready(&GetShapeF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&GetShapeF1D_Type);
|
||||
PyModule_AddObject(module, "GetShapeF1D", (PyObject *)&GetShapeF1D_Type);
|
||||
if (PyType_Ready(&GetShapeF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&GetShapeF1D_Type);
|
||||
PyModule_AddObject(module, "GetShapeF1D", (PyObject *)&GetShapeF1D_Type);
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
//------------------------INSTANCE METHODS ----------------------------------
|
||||
|
||||
static char UnaryFunction1DVectorViewShape___doc__[] =
|
||||
"Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DVectorViewShape`\n"
|
||||
"\n"
|
||||
"Base class for unary functions (functors) that work on\n"
|
||||
":class:`Interface1D` and return a list of :class:`ViewShape`\n"
|
||||
"objects.\n"
|
||||
"\n"
|
||||
".. method:: __init__()\n"
|
||||
"\n"
|
||||
" Default constructor.\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type)\n"
|
||||
"\n"
|
||||
" Builds a unary 1D function using the integration method given as\n"
|
||||
" argument.\n"
|
||||
"\n"
|
||||
" :arg integration_type: An integration method.\n"
|
||||
" :type integration_type: :class:`IntegrationType`\n";
|
||||
"Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DVectorViewShape`\n"
|
||||
"\n"
|
||||
"Base class for unary functions (functors) that work on\n"
|
||||
":class:`Interface1D` and return a list of :class:`ViewShape`\n"
|
||||
"objects.\n"
|
||||
"\n"
|
||||
".. method:: __init__()\n"
|
||||
"\n"
|
||||
" Default constructor.\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type)\n"
|
||||
"\n"
|
||||
" Builds a unary 1D function using the integration method given as\n"
|
||||
" argument.\n"
|
||||
"\n"
|
||||
" :arg integration_type: An integration method.\n"
|
||||
" :type integration_type: :class:`IntegrationType`\n";
|
||||
|
||||
static int UnaryFunction1DVectorViewShape___init__(BPy_UnaryFunction1DVectorViewShape *self,
|
||||
PyObject *args, PyObject *kwds)
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"integration", NULL};
|
||||
PyObject *obj = 0;
|
||||
static const char *kwlist[] = {"integration", NULL};
|
||||
PyObject *obj = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
if (!PyArg_ParseTupleAndKeywords(
|
||||
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
|
||||
if (!obj) {
|
||||
self->uf1D_vectorviewshape = new UnaryFunction1D< std::vector<ViewShape*> >();
|
||||
}
|
||||
else {
|
||||
self->uf1D_vectorviewshape = new UnaryFunction1D< std::vector<ViewShape*> >(IntegrationType_from_BPy_IntegrationType(obj));
|
||||
}
|
||||
if (!obj) {
|
||||
self->uf1D_vectorviewshape = new UnaryFunction1D<std::vector<ViewShape *>>();
|
||||
}
|
||||
else {
|
||||
self->uf1D_vectorviewshape = new UnaryFunction1D<std::vector<ViewShape *>>(
|
||||
IntegrationType_from_BPy_IntegrationType(obj));
|
||||
}
|
||||
|
||||
self->uf1D_vectorviewshape->py_uf1D = (PyObject *)self;
|
||||
self->uf1D_vectorviewshape->py_uf1D = (PyObject *)self;
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void UnaryFunction1DVectorViewShape___dealloc__(BPy_UnaryFunction1DVectorViewShape *self)
|
||||
{
|
||||
if (self->uf1D_vectorviewshape)
|
||||
delete self->uf1D_vectorviewshape;
|
||||
UnaryFunction1D_Type.tp_dealloc((PyObject *)self);
|
||||
if (self->uf1D_vectorviewshape)
|
||||
delete self->uf1D_vectorviewshape;
|
||||
UnaryFunction1D_Type.tp_dealloc((PyObject *)self);
|
||||
}
|
||||
|
||||
static PyObject *UnaryFunction1DVectorViewShape___repr__(BPy_UnaryFunction1DVectorViewShape *self)
|
||||
{
|
||||
return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf1D_vectorviewshape);
|
||||
return PyUnicode_FromFormat(
|
||||
"type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf1D_vectorviewshape);
|
||||
}
|
||||
|
||||
static PyObject *UnaryFunction1DVectorViewShape___call__(BPy_UnaryFunction1DVectorViewShape *self,
|
||||
PyObject *args, PyObject *kwds)
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"inter", NULL};
|
||||
PyObject *obj = 0;
|
||||
static const char *kwlist[] = {"inter", NULL};
|
||||
PyObject *obj = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj))
|
||||
return NULL;
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj))
|
||||
return NULL;
|
||||
|
||||
if (typeid(*(self->uf1D_vectorviewshape)) == typeid(UnaryFunction1D< std::vector<ViewShape*> >)) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf1D_vectorviewshape->operator()(*(((BPy_Interface1D *) obj)->if1D)) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string class_name(Py_TYPE(self)->tp_name);
|
||||
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
if (typeid(*(self->uf1D_vectorviewshape)) == typeid(UnaryFunction1D<std::vector<ViewShape *>>)) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf1D_vectorviewshape->operator()(*(((BPy_Interface1D *)obj)->if1D)) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string class_name(Py_TYPE(self)->tp_name);
|
||||
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const unsigned int list_len = self->uf1D_vectorviewshape->result.size();
|
||||
PyObject *list = PyList_New(list_len);
|
||||
for (unsigned int i = 0; i < list_len; i++) {
|
||||
ViewShape *v = self->uf1D_vectorviewshape->result[i];
|
||||
PyList_SET_ITEM(list, i, v ? BPy_ViewShape_from_ViewShape(*v) : (Py_INCREF(Py_None), Py_None));
|
||||
}
|
||||
const unsigned int list_len = self->uf1D_vectorviewshape->result.size();
|
||||
PyObject *list = PyList_New(list_len);
|
||||
for (unsigned int i = 0; i < list_len; i++) {
|
||||
ViewShape *v = self->uf1D_vectorviewshape->result[i];
|
||||
PyList_SET_ITEM(list, i, v ? BPy_ViewShape_from_ViewShape(*v) : (Py_INCREF(Py_None), Py_None));
|
||||
}
|
||||
|
||||
return list;
|
||||
return list;
|
||||
}
|
||||
|
||||
/*----------------------UnaryFunction1DVectorViewShape get/setters ----------------------------*/
|
||||
|
||||
PyDoc_STRVAR(integration_type_doc,
|
||||
"The integration method.\n"
|
||||
"\n"
|
||||
":type: :class:`IntegrationType`");
|
||||
"The integration method.\n"
|
||||
"\n"
|
||||
":type: :class:`IntegrationType`");
|
||||
|
||||
static PyObject *integration_type_get(BPy_UnaryFunction1DVectorViewShape *self, void *UNUSED(closure))
|
||||
static PyObject *integration_type_get(BPy_UnaryFunction1DVectorViewShape *self,
|
||||
void *UNUSED(closure))
|
||||
{
|
||||
return BPy_IntegrationType_from_IntegrationType(self->uf1D_vectorviewshape->getIntegrationType());
|
||||
return BPy_IntegrationType_from_IntegrationType(
|
||||
self->uf1D_vectorviewshape->getIntegrationType());
|
||||
}
|
||||
|
||||
static int integration_type_set(BPy_UnaryFunction1DVectorViewShape *self, PyObject *value, void *UNUSED(closure))
|
||||
static int integration_type_set(BPy_UnaryFunction1DVectorViewShape *self,
|
||||
PyObject *value,
|
||||
void *UNUSED(closure))
|
||||
{
|
||||
if (!BPy_IntegrationType_Check(value)) {
|
||||
PyErr_SetString(PyExc_TypeError, "value must be an IntegrationType");
|
||||
return -1;
|
||||
}
|
||||
self->uf1D_vectorviewshape->setIntegrationType(IntegrationType_from_BPy_IntegrationType(value));
|
||||
return 0;
|
||||
if (!BPy_IntegrationType_Check(value)) {
|
||||
PyErr_SetString(PyExc_TypeError, "value must be an IntegrationType");
|
||||
return -1;
|
||||
}
|
||||
self->uf1D_vectorviewshape->setIntegrationType(IntegrationType_from_BPy_IntegrationType(value));
|
||||
return 0;
|
||||
}
|
||||
|
||||
static PyGetSetDef BPy_UnaryFunction1DVectorViewShape_getseters[] = {
|
||||
{(char *)"integration_type", (getter)integration_type_get, (setter)integration_type_set,
|
||||
(char *)integration_type_doc, NULL},
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
{(char *)"integration_type",
|
||||
(getter)integration_type_get,
|
||||
(setter)integration_type_set,
|
||||
(char *)integration_type_doc,
|
||||
NULL},
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
/*-----------------------BPy_UnaryFunction1DVectorViewShape type definition ------------------------------*/
|
||||
|
||||
PyTypeObject UnaryFunction1DVectorViewShape_Type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"UnaryFunction1DVectorViewShape", /* tp_name */
|
||||
sizeof(BPy_UnaryFunction1DVectorViewShape), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor)UnaryFunction1DVectorViewShape___dealloc__, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
(reprfunc)UnaryFunction1DVectorViewShape___repr__, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
(ternaryfunc)UnaryFunction1DVectorViewShape___call__, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
UnaryFunction1DVectorViewShape___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
BPy_UnaryFunction1DVectorViewShape_getseters, /* tp_getset */
|
||||
&UnaryFunction1D_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)UnaryFunction1DVectorViewShape___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction1DVectorViewShape", /* tp_name */
|
||||
sizeof(BPy_UnaryFunction1DVectorViewShape), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor)UnaryFunction1DVectorViewShape___dealloc__, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
(reprfunc)UnaryFunction1DVectorViewShape___repr__, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
(ternaryfunc)UnaryFunction1DVectorViewShape___call__, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
UnaryFunction1DVectorViewShape___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
BPy_UnaryFunction1DVectorViewShape_getseters, /* tp_getset */
|
||||
&UnaryFunction1D_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)UnaryFunction1DVectorViewShape___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -35,18 +35,17 @@ extern "C" {
|
||||
extern PyTypeObject UnaryFunction1DVectorViewShape_Type;
|
||||
|
||||
#define BPy_UnaryFunction1DVectorViewShape_Check(v) \
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&UnaryFunction1DVectorViewShape_Type))
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&UnaryFunction1DVectorViewShape_Type))
|
||||
|
||||
/*---------------------------Python BPy_UnaryFunction1DVectorViewShape structure definition----------*/
|
||||
typedef struct {
|
||||
BPy_UnaryFunction1D py_uf1D;
|
||||
UnaryFunction1D< std::vector<ViewShape*> > *uf1D_vectorviewshape;
|
||||
BPy_UnaryFunction1D py_uf1D;
|
||||
UnaryFunction1D<std::vector<ViewShape *>> *uf1D_vectorviewshape;
|
||||
} BPy_UnaryFunction1DVectorViewShape;
|
||||
|
||||
/*---------------------------Python BPy_UnaryFunction1DVectorViewShape visible prototypes-----------*/
|
||||
int UnaryFunction1DVectorViewShape_Init(PyObject *module);
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
#include "UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.h"
|
||||
#include "UnaryFunction1D_void/BPy_TimeStampF1D.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -39,174 +38,184 @@ extern "C" {
|
||||
|
||||
int UnaryFunction1DVoid_Init(PyObject *module)
|
||||
{
|
||||
if (module == NULL)
|
||||
return -1;
|
||||
if (module == NULL)
|
||||
return -1;
|
||||
|
||||
if (PyType_Ready(&UnaryFunction1DVoid_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&UnaryFunction1DVoid_Type);
|
||||
PyModule_AddObject(module, "UnaryFunction1DVoid", (PyObject *)&UnaryFunction1DVoid_Type);
|
||||
if (PyType_Ready(&UnaryFunction1DVoid_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&UnaryFunction1DVoid_Type);
|
||||
PyModule_AddObject(module, "UnaryFunction1DVoid", (PyObject *)&UnaryFunction1DVoid_Type);
|
||||
|
||||
if (PyType_Ready(&ChainingTimeStampF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&ChainingTimeStampF1D_Type);
|
||||
PyModule_AddObject(module, "ChainingTimeStampF1D", (PyObject *)&ChainingTimeStampF1D_Type);
|
||||
if (PyType_Ready(&ChainingTimeStampF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&ChainingTimeStampF1D_Type);
|
||||
PyModule_AddObject(module, "ChainingTimeStampF1D", (PyObject *)&ChainingTimeStampF1D_Type);
|
||||
|
||||
if (PyType_Ready(&IncrementChainingTimeStampF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&IncrementChainingTimeStampF1D_Type);
|
||||
PyModule_AddObject(module, "IncrementChainingTimeStampF1D", (PyObject *)&IncrementChainingTimeStampF1D_Type);
|
||||
if (PyType_Ready(&IncrementChainingTimeStampF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&IncrementChainingTimeStampF1D_Type);
|
||||
PyModule_AddObject(
|
||||
module, "IncrementChainingTimeStampF1D", (PyObject *)&IncrementChainingTimeStampF1D_Type);
|
||||
|
||||
if (PyType_Ready(&TimeStampF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&TimeStampF1D_Type);
|
||||
PyModule_AddObject(module, "TimeStampF1D", (PyObject *)&TimeStampF1D_Type);
|
||||
if (PyType_Ready(&TimeStampF1D_Type) < 0)
|
||||
return -1;
|
||||
Py_INCREF(&TimeStampF1D_Type);
|
||||
PyModule_AddObject(module, "TimeStampF1D", (PyObject *)&TimeStampF1D_Type);
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
//------------------------INSTANCE METHODS ----------------------------------
|
||||
|
||||
static char UnaryFunction1DVoid___doc__[] =
|
||||
"Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DVoid`\n"
|
||||
"\n"
|
||||
"Base class for unary functions (functors) working on\n"
|
||||
":class:`Interface1D`.\n"
|
||||
"\n"
|
||||
".. method:: __init__()\n"
|
||||
"\n"
|
||||
" Default constructor.\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type)\n"
|
||||
"\n"
|
||||
" Builds a unary 1D function using the integration method given as\n"
|
||||
" argument.\n"
|
||||
"\n"
|
||||
" :arg integration_type: An integration method.\n"
|
||||
" :type integration_type: :class:`IntegrationType`\n";
|
||||
"Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DVoid`\n"
|
||||
"\n"
|
||||
"Base class for unary functions (functors) working on\n"
|
||||
":class:`Interface1D`.\n"
|
||||
"\n"
|
||||
".. method:: __init__()\n"
|
||||
"\n"
|
||||
" Default constructor.\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type)\n"
|
||||
"\n"
|
||||
" Builds a unary 1D function using the integration method given as\n"
|
||||
" argument.\n"
|
||||
"\n"
|
||||
" :arg integration_type: An integration method.\n"
|
||||
" :type integration_type: :class:`IntegrationType`\n";
|
||||
|
||||
static int UnaryFunction1DVoid___init__(BPy_UnaryFunction1DVoid *self, PyObject *args, PyObject *kwds)
|
||||
static int UnaryFunction1DVoid___init__(BPy_UnaryFunction1DVoid *self,
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"integration", NULL};
|
||||
PyObject *obj = 0;
|
||||
static const char *kwlist[] = {"integration", NULL};
|
||||
PyObject *obj = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
if (!PyArg_ParseTupleAndKeywords(
|
||||
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
|
||||
if (!obj)
|
||||
self->uf1D_void = new UnaryFunction1D_void();
|
||||
else {
|
||||
self->uf1D_void = new UnaryFunction1D_void(IntegrationType_from_BPy_IntegrationType(obj));
|
||||
}
|
||||
if (!obj)
|
||||
self->uf1D_void = new UnaryFunction1D_void();
|
||||
else {
|
||||
self->uf1D_void = new UnaryFunction1D_void(IntegrationType_from_BPy_IntegrationType(obj));
|
||||
}
|
||||
|
||||
self->uf1D_void->py_uf1D = (PyObject *)self;
|
||||
self->uf1D_void->py_uf1D = (PyObject *)self;
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void UnaryFunction1DVoid___dealloc__(BPy_UnaryFunction1DVoid *self)
|
||||
{
|
||||
if (self->uf1D_void)
|
||||
delete self->uf1D_void;
|
||||
UnaryFunction1D_Type.tp_dealloc((PyObject *)self);
|
||||
if (self->uf1D_void)
|
||||
delete self->uf1D_void;
|
||||
UnaryFunction1D_Type.tp_dealloc((PyObject *)self);
|
||||
}
|
||||
|
||||
static PyObject *UnaryFunction1DVoid___repr__(BPy_UnaryFunction1DVoid *self)
|
||||
{
|
||||
return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf1D_void);
|
||||
return PyUnicode_FromFormat("type: %s - address: %p", Py_TYPE(self)->tp_name, self->uf1D_void);
|
||||
}
|
||||
|
||||
static PyObject *UnaryFunction1DVoid___call__(BPy_UnaryFunction1DVoid *self, PyObject *args, PyObject *kwds)
|
||||
static PyObject *UnaryFunction1DVoid___call__(BPy_UnaryFunction1DVoid *self,
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"inter", NULL};
|
||||
PyObject *obj = 0;
|
||||
static const char *kwlist[] = {"inter", NULL};
|
||||
PyObject *obj = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj))
|
||||
return NULL;
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &obj))
|
||||
return NULL;
|
||||
|
||||
if (typeid(*(self->uf1D_void)) == typeid(UnaryFunction1D_void)) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf1D_void->operator()(*(((BPy_Interface1D *) obj)->if1D)) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string class_name(Py_TYPE(self)->tp_name);
|
||||
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
Py_RETURN_NONE;
|
||||
if (typeid(*(self->uf1D_void)) == typeid(UnaryFunction1D_void)) {
|
||||
PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden");
|
||||
return NULL;
|
||||
}
|
||||
if (self->uf1D_void->operator()(*(((BPy_Interface1D *)obj)->if1D)) < 0) {
|
||||
if (!PyErr_Occurred()) {
|
||||
string class_name(Py_TYPE(self)->tp_name);
|
||||
PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str());
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
/*----------------------UnaryFunction1DVoid get/setters ----------------------------*/
|
||||
|
||||
PyDoc_STRVAR(integration_type_doc,
|
||||
"The integration method.\n"
|
||||
"\n"
|
||||
":type: :class:`IntegrationType`");
|
||||
"The integration method.\n"
|
||||
"\n"
|
||||
":type: :class:`IntegrationType`");
|
||||
|
||||
static PyObject *integration_type_get(BPy_UnaryFunction1DVoid *self, void *UNUSED(closure))
|
||||
{
|
||||
return BPy_IntegrationType_from_IntegrationType(self->uf1D_void->getIntegrationType());
|
||||
return BPy_IntegrationType_from_IntegrationType(self->uf1D_void->getIntegrationType());
|
||||
}
|
||||
|
||||
static int integration_type_set(BPy_UnaryFunction1DVoid *self, PyObject *value, void *UNUSED(closure))
|
||||
static int integration_type_set(BPy_UnaryFunction1DVoid *self,
|
||||
PyObject *value,
|
||||
void *UNUSED(closure))
|
||||
{
|
||||
if (!BPy_IntegrationType_Check(value)) {
|
||||
PyErr_SetString(PyExc_TypeError, "value must be an IntegrationType");
|
||||
return -1;
|
||||
}
|
||||
self->uf1D_void->setIntegrationType(IntegrationType_from_BPy_IntegrationType(value));
|
||||
return 0;
|
||||
if (!BPy_IntegrationType_Check(value)) {
|
||||
PyErr_SetString(PyExc_TypeError, "value must be an IntegrationType");
|
||||
return -1;
|
||||
}
|
||||
self->uf1D_void->setIntegrationType(IntegrationType_from_BPy_IntegrationType(value));
|
||||
return 0;
|
||||
}
|
||||
|
||||
static PyGetSetDef BPy_UnaryFunction1DVoid_getseters[] = {
|
||||
{(char *)"integration_type", (getter)integration_type_get, (setter)integration_type_set,
|
||||
(char *)integration_type_doc, NULL},
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
{(char *)"integration_type",
|
||||
(getter)integration_type_get,
|
||||
(setter)integration_type_set,
|
||||
(char *)integration_type_doc,
|
||||
NULL},
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
/*-----------------------BPy_UnaryFunction1DVoid type definition ------------------------------*/
|
||||
|
||||
PyTypeObject UnaryFunction1DVoid_Type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"UnaryFunction1DVoid", /* tp_name */
|
||||
sizeof(BPy_UnaryFunction1DVoid), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor)UnaryFunction1DVoid___dealloc__, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
(reprfunc)UnaryFunction1DVoid___repr__, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
(ternaryfunc)UnaryFunction1DVoid___call__, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
UnaryFunction1DVoid___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
BPy_UnaryFunction1DVoid_getseters, /* tp_getset */
|
||||
&UnaryFunction1D_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)UnaryFunction1DVoid___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
PyVarObject_HEAD_INIT(NULL, 0) "UnaryFunction1DVoid", /* tp_name */
|
||||
sizeof(BPy_UnaryFunction1DVoid), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor)UnaryFunction1DVoid___dealloc__, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
(reprfunc)UnaryFunction1DVoid___repr__, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
(ternaryfunc)UnaryFunction1DVoid___call__, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
UnaryFunction1DVoid___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
BPy_UnaryFunction1DVoid_getseters, /* tp_getset */
|
||||
&UnaryFunction1D_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)UnaryFunction1DVoid___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -31,18 +31,18 @@ extern "C" {
|
||||
|
||||
extern PyTypeObject UnaryFunction1DVoid_Type;
|
||||
|
||||
#define BPy_UnaryFunction1DVoid_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&UnaryFunction1DVoid_Type))
|
||||
#define BPy_UnaryFunction1DVoid_Check(v) \
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&UnaryFunction1DVoid_Type))
|
||||
|
||||
/*---------------------------Python BPy_UnaryFunction1DVoid structure definition----------*/
|
||||
typedef struct {
|
||||
BPy_UnaryFunction1D py_uf1D;
|
||||
UnaryFunction1D_void *uf1D_void;
|
||||
BPy_UnaryFunction1D py_uf1D;
|
||||
UnaryFunction1D_void *uf1D_void;
|
||||
} BPy_UnaryFunction1DVoid;
|
||||
|
||||
/*---------------------------Python BPy_UnaryFunction1DVoid visible prototypes-----------*/
|
||||
int UnaryFunction1DVoid_Init(PyObject *module);
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -33,84 +33,85 @@ extern "C" {
|
||||
//------------------------INSTANCE METHODS ----------------------------------
|
||||
|
||||
static char CurveNatureF1D___doc__[] =
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > :class:`freestyle.types.UnaryFunction1DEdgeNature` > :class:`CurveNatureF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type=IntegrationType.MEAN)\n"
|
||||
"\n"
|
||||
" Builds a CurveNatureF1D 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 nature of the Interface1D (silhouette, ridge, crease, and\n"
|
||||
" so on). Except if the Interface1D is a\n"
|
||||
" :class:`freestyle.types.ViewEdge`, this result might be ambiguous.\n"
|
||||
" Indeed, the Interface1D might result from the gathering of several 1D\n"
|
||||
" elements, each one being of a different nature. An integration\n"
|
||||
" method, such as the MEAN, might give, in this case, irrelevant\n"
|
||||
" results.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: The nature of the Interface1D.\n"
|
||||
" :rtype: :class:`freestyle.types.Nature`\n";
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
|
||||
":class:`freestyle.types.UnaryFunction1DEdgeNature` > :class:`CurveNatureF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type=IntegrationType.MEAN)\n"
|
||||
"\n"
|
||||
" Builds a CurveNatureF1D 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 nature of the Interface1D (silhouette, ridge, crease, and\n"
|
||||
" so on). Except if the Interface1D is a\n"
|
||||
" :class:`freestyle.types.ViewEdge`, this result might be ambiguous.\n"
|
||||
" Indeed, the Interface1D might result from the gathering of several 1D\n"
|
||||
" elements, each one being of a different nature. An integration\n"
|
||||
" method, such as the MEAN, might give, in this case, irrelevant\n"
|
||||
" results.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: The nature of the Interface1D.\n"
|
||||
" :rtype: :class:`freestyle.types.Nature`\n";
|
||||
|
||||
static int CurveNatureF1D___init__(BPy_CurveNatureF1D *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"integration_type", NULL};
|
||||
PyObject *obj = 0;
|
||||
static const char *kwlist[] = {"integration_type", NULL};
|
||||
PyObject *obj = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_edgenature.uf1D_edgenature = new Functions1D::CurveNatureF1D(t);
|
||||
return 0;
|
||||
if (!PyArg_ParseTupleAndKeywords(
|
||||
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_edgenature.uf1D_edgenature = new Functions1D::CurveNatureF1D(t);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-----------------------BPy_CurveNatureF1D type definition ------------------------------*/
|
||||
|
||||
PyTypeObject CurveNatureF1D_Type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"CurveNatureF1D", /* tp_name */
|
||||
sizeof(BPy_CurveNatureF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
CurveNatureF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DEdgeNature_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)CurveNatureF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
PyVarObject_HEAD_INIT(NULL, 0) "CurveNatureF1D", /* tp_name */
|
||||
sizeof(BPy_CurveNatureF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
CurveNatureF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DEdgeNature_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)CurveNatureF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -31,14 +31,14 @@ extern "C" {
|
||||
|
||||
extern PyTypeObject CurveNatureF1D_Type;
|
||||
|
||||
#define BPy_CurveNatureF1D_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&CurveNatureF1D_Type))
|
||||
#define BPy_CurveNatureF1D_Check(v) \
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&CurveNatureF1D_Type))
|
||||
|
||||
/*---------------------------Python BPy_CurveNatureF1D structure definition----------*/
|
||||
typedef struct {
|
||||
BPy_UnaryFunction1DEdgeNature py_uf1D_edgenature;
|
||||
BPy_UnaryFunction1DEdgeNature py_uf1D_edgenature;
|
||||
} BPy_CurveNatureF1D;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -33,78 +33,79 @@ extern "C" {
|
||||
//------------------------INSTANCE METHODS ----------------------------------
|
||||
|
||||
static char Normal2DF1D___doc__[] =
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > :class:`freestyle.types.UnaryFunction1DVec2f` > :class:`Normal2DF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type=IntegrationType.MEAN)\n"
|
||||
"\n"
|
||||
" Builds a Normal2DF1D 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 normal for the Interface1D.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: The 2D normal for the Interface1D.\n"
|
||||
" :rtype: :class:`mathutils.Vector`\n";
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
|
||||
":class:`freestyle.types.UnaryFunction1DVec2f` > :class:`Normal2DF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type=IntegrationType.MEAN)\n"
|
||||
"\n"
|
||||
" Builds a Normal2DF1D 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 normal for the Interface1D.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: The 2D normal for the Interface1D.\n"
|
||||
" :rtype: :class:`mathutils.Vector`\n";
|
||||
|
||||
static int Normal2DF1D___init__(BPy_Normal2DF1D *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"integration_type", NULL};
|
||||
PyObject *obj = 0;
|
||||
static const char *kwlist[] = {"integration_type", NULL};
|
||||
PyObject *obj = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_vec2f.uf1D_vec2f = new Functions1D::Normal2DF1D(t);
|
||||
return 0;
|
||||
if (!PyArg_ParseTupleAndKeywords(
|
||||
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_vec2f.uf1D_vec2f = new Functions1D::Normal2DF1D(t);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-----------------------BPy_Normal2DF1D type definition ------------------------------*/
|
||||
|
||||
PyTypeObject Normal2DF1D_Type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"Normal2DF1D", /* tp_name */
|
||||
sizeof(BPy_Normal2DF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
Normal2DF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DVec2f_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)Normal2DF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
PyVarObject_HEAD_INIT(NULL, 0) "Normal2DF1D", /* tp_name */
|
||||
sizeof(BPy_Normal2DF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
Normal2DF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DVec2f_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)Normal2DF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -31,14 +31,14 @@ extern "C" {
|
||||
|
||||
extern PyTypeObject Normal2DF1D_Type;
|
||||
|
||||
#define BPy_Normal2DF1D_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&Normal2DF1D_Type))
|
||||
#define BPy_Normal2DF1D_Check(v) \
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&Normal2DF1D_Type))
|
||||
|
||||
/*---------------------------Python BPy_Normal2DF1D structure definition----------*/
|
||||
typedef struct {
|
||||
BPy_UnaryFunction1DVec2f py_uf1D_vec2f;
|
||||
BPy_UnaryFunction1DVec2f py_uf1D_vec2f;
|
||||
} BPy_Normal2DF1D;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -33,78 +33,79 @@ extern "C" {
|
||||
//------------------------INSTANCE METHODS ----------------------------------
|
||||
|
||||
static char 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";
|
||||
"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";
|
||||
|
||||
static int Orientation2DF1D___init__(BPy_Orientation2DF1D *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"integration_type", NULL};
|
||||
PyObject *obj = 0;
|
||||
static const char *kwlist[] = {"integration_type", NULL};
|
||||
PyObject *obj = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_vec2f.uf1D_vec2f = new Functions1D::Orientation2DF1D(t);
|
||||
return 0;
|
||||
if (!PyArg_ParseTupleAndKeywords(
|
||||
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_vec2f.uf1D_vec2f = new Functions1D::Orientation2DF1D(t);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-----------------------BPy_Orientation2DF1D type definition ------------------------------*/
|
||||
|
||||
PyTypeObject Orientation2DF1D_Type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"Orientation2DF1D", /* tp_name */
|
||||
sizeof(BPy_Orientation2DF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
Orientation2DF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DVec2f_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)Orientation2DF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
PyVarObject_HEAD_INIT(NULL, 0) "Orientation2DF1D", /* tp_name */
|
||||
sizeof(BPy_Orientation2DF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
Orientation2DF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DVec2f_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)Orientation2DF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -31,14 +31,14 @@ extern "C" {
|
||||
|
||||
extern PyTypeObject Orientation2DF1D_Type;
|
||||
|
||||
#define BPy_Orientation2DF1D_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&Orientation2DF1D_Type))
|
||||
#define BPy_Orientation2DF1D_Check(v) \
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&Orientation2DF1D_Type))
|
||||
|
||||
/*---------------------------Python BPy_Orientation2DF1D structure definition----------*/
|
||||
typedef struct {
|
||||
BPy_UnaryFunction1DVec2f py_uf1D_vec2f;
|
||||
BPy_UnaryFunction1DVec2f py_uf1D_vec2f;
|
||||
} BPy_Orientation2DF1D;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -33,78 +33,79 @@ extern "C" {
|
||||
//------------------------INSTANCE METHODS ----------------------------------
|
||||
|
||||
static char Orientation3DF1D___doc__[] =
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > :class:`freestyle.types.UnaryFunction1DVec3f` > :class:`Orientation3DF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type=IntegrationType.MEAN)\n"
|
||||
"\n"
|
||||
" Builds an Orientation3DF1D 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 3D orientation of the Interface1D.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: The 3D orientation of the Interface1D.\n"
|
||||
" :rtype: :class:`mathutils.Vector`\n";
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
|
||||
":class:`freestyle.types.UnaryFunction1DVec3f` > :class:`Orientation3DF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type=IntegrationType.MEAN)\n"
|
||||
"\n"
|
||||
" Builds an Orientation3DF1D 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 3D orientation of the Interface1D.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: The 3D orientation of the Interface1D.\n"
|
||||
" :rtype: :class:`mathutils.Vector`\n";
|
||||
|
||||
static int Orientation3DF1D___init__(BPy_Orientation3DF1D *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"integration_type", NULL};
|
||||
PyObject *obj = 0;
|
||||
static const char *kwlist[] = {"integration_type", NULL};
|
||||
PyObject *obj = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_vec3f.uf1D_vec3f = new Functions1D::Orientation3DF1D(t);
|
||||
return 0;
|
||||
if (!PyArg_ParseTupleAndKeywords(
|
||||
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_vec3f.uf1D_vec3f = new Functions1D::Orientation3DF1D(t);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-----------------------BPy_Orientation3DF1D type definition ------------------------------*/
|
||||
|
||||
PyTypeObject Orientation3DF1D_Type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"Orientation3DF1D", /* tp_name */
|
||||
sizeof(BPy_Orientation3DF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
Orientation3DF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DVec3f_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)Orientation3DF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
PyVarObject_HEAD_INIT(NULL, 0) "Orientation3DF1D", /* tp_name */
|
||||
sizeof(BPy_Orientation3DF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
Orientation3DF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DVec3f_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)Orientation3DF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -31,14 +31,14 @@ extern "C" {
|
||||
|
||||
extern PyTypeObject Orientation3DF1D_Type;
|
||||
|
||||
#define BPy_Orientation3DF1D_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&Orientation3DF1D_Type))
|
||||
#define BPy_Orientation3DF1D_Check(v) \
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&Orientation3DF1D_Type))
|
||||
|
||||
/*---------------------------Python BPy_Orientation3DF1D structure definition----------*/
|
||||
typedef struct {
|
||||
BPy_UnaryFunction1DVec3f py_uf1D_vec3f;
|
||||
BPy_UnaryFunction1DVec3f py_uf1D_vec3f;
|
||||
} BPy_Orientation3DF1D;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -33,78 +33,80 @@ extern "C" {
|
||||
//------------------------INSTANCE METHODS ----------------------------------
|
||||
|
||||
static char 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";
|
||||
"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";
|
||||
|
||||
static int Curvature2DAngleF1D___init__(BPy_Curvature2DAngleF1D *self, PyObject *args, PyObject *kwds)
|
||||
static int Curvature2DAngleF1D___init__(BPy_Curvature2DAngleF1D *self,
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"integration_type", NULL};
|
||||
PyObject *obj = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_double.uf1D_double = new Functions1D::Curvature2DAngleF1D(t);
|
||||
return 0;
|
||||
static const char *kwlist[] = {"integration_type", NULL};
|
||||
PyObject *obj = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(
|
||||
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_double.uf1D_double = new Functions1D::Curvature2DAngleF1D(t);
|
||||
return 0;
|
||||
}
|
||||
/*-----------------------BPy_Curvature2DAngleF1D type definition ------------------------------*/
|
||||
|
||||
PyTypeObject Curvature2DAngleF1D_Type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"Curvature2DAngleF1D", /* tp_name */
|
||||
sizeof(BPy_Curvature2DAngleF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
Curvature2DAngleF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DDouble_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)Curvature2DAngleF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
PyVarObject_HEAD_INIT(NULL, 0) "Curvature2DAngleF1D", /* tp_name */
|
||||
sizeof(BPy_Curvature2DAngleF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
Curvature2DAngleF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DDouble_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)Curvature2DAngleF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -31,14 +31,14 @@ extern "C" {
|
||||
|
||||
extern PyTypeObject Curvature2DAngleF1D_Type;
|
||||
|
||||
#define BPy_Curvature2DAngleF1D_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&Curvature2DAngleF1D_Type))
|
||||
#define BPy_Curvature2DAngleF1D_Check(v) \
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&Curvature2DAngleF1D_Type))
|
||||
|
||||
/*---------------------------Python BPy_Curvature2DAngleF1D structure definition----------*/
|
||||
typedef struct {
|
||||
BPy_UnaryFunction1DDouble py_uf1D_double;
|
||||
BPy_UnaryFunction1DDouble py_uf1D_double;
|
||||
} BPy_Curvature2DAngleF1D;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -33,92 +33,93 @@ extern "C" {
|
||||
//------------------------INSTANCE METHODS ----------------------------------
|
||||
|
||||
static char DensityF1D___doc__[] =
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > :class:`freestyle.types.UnaryFunction1DDouble` > :class:`DensityF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(sigma=2.0, integration_type=IntegrationType.MEAN, sampling=2.0)\n"
|
||||
"\n"
|
||||
" Builds a DensityF1D object.\n"
|
||||
"\n"
|
||||
" :arg sigma: The sigma used in DensityF0D and determining the window size\n"
|
||||
" used in each density query.\n"
|
||||
" :type sigma: float\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"
|
||||
" :arg sampling: The resolution used to sample the chain: the\n"
|
||||
" corresponding 0D function is evaluated at each sample point and\n"
|
||||
" the result is obtained by combining the resulting values into a\n"
|
||||
" single one, following the method specified by integration_type.\n"
|
||||
" :type sampling: float\n"
|
||||
"\n"
|
||||
".. method:: __call__(inter)\n"
|
||||
"\n"
|
||||
" Returns the density evaluated for an Interface1D. The density is\n"
|
||||
" evaluated for a set of points along the Interface1D (using the\n"
|
||||
" :class:`freestyle.functions.DensityF0D` functor) with a user-defined\n"
|
||||
" sampling and then integrated into a single value using a user-defined\n"
|
||||
" integration method.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: The density evaluated for an Interface1D.\n"
|
||||
" :rtype: float\n";
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
|
||||
":class:`freestyle.types.UnaryFunction1DDouble` > :class:`DensityF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(sigma=2.0, integration_type=IntegrationType.MEAN, sampling=2.0)\n"
|
||||
"\n"
|
||||
" Builds a DensityF1D object.\n"
|
||||
"\n"
|
||||
" :arg sigma: The sigma used in DensityF0D and determining the window size\n"
|
||||
" used in each density query.\n"
|
||||
" :type sigma: float\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"
|
||||
" :arg sampling: The resolution used to sample the chain: the\n"
|
||||
" corresponding 0D function is evaluated at each sample point and\n"
|
||||
" the result is obtained by combining the resulting values into a\n"
|
||||
" single one, following the method specified by integration_type.\n"
|
||||
" :type sampling: float\n"
|
||||
"\n"
|
||||
".. method:: __call__(inter)\n"
|
||||
"\n"
|
||||
" Returns the density evaluated for an Interface1D. The density is\n"
|
||||
" evaluated for a set of points along the Interface1D (using the\n"
|
||||
" :class:`freestyle.functions.DensityF0D` functor) with a user-defined\n"
|
||||
" sampling and then integrated into a single value using a user-defined\n"
|
||||
" integration method.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: The density evaluated for an Interface1D.\n"
|
||||
" :rtype: float\n";
|
||||
|
||||
static int DensityF1D___init__(BPy_DensityF1D *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"sigma", "integration_type", "sampling", NULL};
|
||||
PyObject *obj = 0;
|
||||
double d = 2.0;
|
||||
float f = 2.0;
|
||||
static const char *kwlist[] = {"sigma", "integration_type", "sampling", NULL};
|
||||
PyObject *obj = 0;
|
||||
double d = 2.0;
|
||||
float f = 2.0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|dO!f", (char **)kwlist, &d, &IntegrationType_Type, &obj, &f))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_double.uf1D_double = new Functions1D::DensityF1D(d, t, f);
|
||||
return 0;
|
||||
if (!PyArg_ParseTupleAndKeywords(
|
||||
args, kwds, "|dO!f", (char **)kwlist, &d, &IntegrationType_Type, &obj, &f))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_double.uf1D_double = new Functions1D::DensityF1D(d, t, f);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-----------------------BPy_DensityF1D type definition ------------------------------*/
|
||||
|
||||
PyTypeObject DensityF1D_Type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"DensityF1D", /* tp_name */
|
||||
sizeof(BPy_DensityF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
DensityF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DDouble_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)DensityF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
PyVarObject_HEAD_INIT(NULL, 0) "DensityF1D", /* tp_name */
|
||||
sizeof(BPy_DensityF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
DensityF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DDouble_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)DensityF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -35,10 +35,9 @@ extern PyTypeObject DensityF1D_Type;
|
||||
|
||||
/*---------------------------Python BPy_DensityF1D structure definition----------*/
|
||||
typedef struct {
|
||||
BPy_UnaryFunction1DDouble py_uf1D_double;
|
||||
BPy_UnaryFunction1DDouble py_uf1D_double;
|
||||
} BPy_DensityF1D;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -33,94 +33,97 @@ extern "C" {
|
||||
//------------------------INSTANCE METHODS ----------------------------------
|
||||
|
||||
static char GetCompleteViewMapDensityF1D___doc__[] =
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > :class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetCompleteViewMapDensityF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(level, integration_type=IntegrationType.MEAN, sampling=2.0)\n"
|
||||
"\n"
|
||||
" Builds a GetCompleteViewMapDensityF1D object.\n"
|
||||
"\n"
|
||||
" :arg level: The level of the pyramid from which the pixel must be\n"
|
||||
" read.\n"
|
||||
" :type level: int\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"
|
||||
" :arg sampling: The resolution used to sample the chain: the\n"
|
||||
" corresponding 0D function is evaluated at each sample point and\n"
|
||||
" the result is obtained by combining the resulting values into a\n"
|
||||
" single one, following the method specified by integration_type.\n"
|
||||
" :type sampling: float\n"
|
||||
"\n"
|
||||
".. method:: __call__(inter)\n"
|
||||
"\n"
|
||||
" Returns the density evaluated for an Interface1D in the complete\n"
|
||||
" viewmap image. The density is evaluated for a set of points along the\n"
|
||||
" Interface1D (using the\n"
|
||||
" :class:`freestyle.functions.ReadCompleteViewMapPixelF0D` functor) and\n"
|
||||
" then integrated into a single value using a user-defined integration\n"
|
||||
" method.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: The density evaluated for the Interface1D in the complete\n"
|
||||
" viewmap image.\n"
|
||||
" :rtype: float\n";
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
|
||||
":class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetCompleteViewMapDensityF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(level, integration_type=IntegrationType.MEAN, sampling=2.0)\n"
|
||||
"\n"
|
||||
" Builds a GetCompleteViewMapDensityF1D object.\n"
|
||||
"\n"
|
||||
" :arg level: The level of the pyramid from which the pixel must be\n"
|
||||
" read.\n"
|
||||
" :type level: int\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"
|
||||
" :arg sampling: The resolution used to sample the chain: the\n"
|
||||
" corresponding 0D function is evaluated at each sample point and\n"
|
||||
" the result is obtained by combining the resulting values into a\n"
|
||||
" single one, following the method specified by integration_type.\n"
|
||||
" :type sampling: float\n"
|
||||
"\n"
|
||||
".. method:: __call__(inter)\n"
|
||||
"\n"
|
||||
" Returns the density evaluated for an Interface1D in the complete\n"
|
||||
" viewmap image. The density is evaluated for a set of points along the\n"
|
||||
" Interface1D (using the\n"
|
||||
" :class:`freestyle.functions.ReadCompleteViewMapPixelF0D` functor) and\n"
|
||||
" then integrated into a single value using a user-defined integration\n"
|
||||
" method.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: The density evaluated for the Interface1D in the complete\n"
|
||||
" viewmap image.\n"
|
||||
" :rtype: float\n";
|
||||
|
||||
static int GetCompleteViewMapDensityF1D___init__(BPy_GetCompleteViewMapDensityF1D *self, PyObject *args, PyObject *kwds)
|
||||
static int GetCompleteViewMapDensityF1D___init__(BPy_GetCompleteViewMapDensityF1D *self,
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"level", "integration_type", "sampling", NULL};
|
||||
PyObject *obj = 0;
|
||||
int i;
|
||||
float f = 2.0;
|
||||
static const char *kwlist[] = {"level", "integration_type", "sampling", NULL};
|
||||
PyObject *obj = 0;
|
||||
int i;
|
||||
float f = 2.0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "i|O!f", (char **)kwlist, &i, &IntegrationType_Type, &obj, &f))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_double.uf1D_double = new Functions1D::GetCompleteViewMapDensityF1D(i, t, f);
|
||||
return 0;
|
||||
if (!PyArg_ParseTupleAndKeywords(
|
||||
args, kwds, "i|O!f", (char **)kwlist, &i, &IntegrationType_Type, &obj, &f))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_double.uf1D_double = new Functions1D::GetCompleteViewMapDensityF1D(i, t, f);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-----------------------BPy_GetCompleteViewMapDensityF1D type definition ------------------------------*/
|
||||
|
||||
PyTypeObject GetCompleteViewMapDensityF1D_Type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"GetCompleteViewMapDensityF1D", /* tp_name */
|
||||
sizeof(BPy_GetCompleteViewMapDensityF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
GetCompleteViewMapDensityF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DDouble_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)GetCompleteViewMapDensityF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
PyVarObject_HEAD_INIT(NULL, 0) "GetCompleteViewMapDensityF1D", /* tp_name */
|
||||
sizeof(BPy_GetCompleteViewMapDensityF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
GetCompleteViewMapDensityF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DDouble_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)GetCompleteViewMapDensityF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -32,14 +32,13 @@ extern "C" {
|
||||
extern PyTypeObject GetCompleteViewMapDensityF1D_Type;
|
||||
|
||||
#define BPy_GetCompleteViewMapDensityF1D_Check(v) \
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&GetCompleteViewMapDensityF1D_Type))
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&GetCompleteViewMapDensityF1D_Type))
|
||||
|
||||
/*---------------------------Python BPy_GetCompleteViewMapDensityF1D structure definition----------*/
|
||||
typedef struct {
|
||||
BPy_UnaryFunction1DDouble py_uf1D_double;
|
||||
BPy_UnaryFunction1DDouble py_uf1D_double;
|
||||
} BPy_GetCompleteViewMapDensityF1D;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -33,100 +33,104 @@ extern "C" {
|
||||
//------------------------INSTANCE METHODS ----------------------------------
|
||||
|
||||
static char GetDirectionalViewMapDensityF1D___doc__[] =
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > :class:`freestyle.types.UnaryFunction1DDouble` "
|
||||
"> :class:`GetDirectionalViewMapDensityF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(orientation, level, integration_type=IntegrationType.MEAN, sampling=2.0)\n"
|
||||
"\n"
|
||||
" Builds a GetDirectionalViewMapDensityF1D object.\n"
|
||||
"\n"
|
||||
" :arg orientation: The number of the directional map we must work\n"
|
||||
" with.\n"
|
||||
" :type orientation: int\n"
|
||||
" :arg level: The level of the pyramid from which the pixel must be\n"
|
||||
" read.\n"
|
||||
" :type level: int\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"
|
||||
" :arg sampling: The resolution used to sample the chain: the\n"
|
||||
" corresponding 0D function is evaluated at each sample point and\n"
|
||||
" the result is obtained by combining the resulting values into a\n"
|
||||
" single one, following the method specified by integration_type.\n"
|
||||
" :type sampling: float\n"
|
||||
"\n"
|
||||
".. method:: __call__(inter)\n"
|
||||
"\n"
|
||||
" Returns the density evaluated for an Interface1D in of the steerable\n"
|
||||
" viewmaps image. The direction telling which Directional map to choose\n"
|
||||
" is explicitly specified by the user. The density is evaluated for a\n"
|
||||
" set of points along the Interface1D (using the\n"
|
||||
" :class:`freestyle.functions.ReadSteerableViewMapPixelF0D` functor) and\n"
|
||||
" then integrated into a single value using a user-defined integration\n"
|
||||
" method.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: the density evaluated for an Interface1D in of the\n"
|
||||
" steerable viewmaps image.\n"
|
||||
" :rtype: float\n";
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
|
||||
":class:`freestyle.types.UnaryFunction1DDouble` "
|
||||
"> :class:`GetDirectionalViewMapDensityF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(orientation, level, integration_type=IntegrationType.MEAN, "
|
||||
"sampling=2.0)\n"
|
||||
"\n"
|
||||
" Builds a GetDirectionalViewMapDensityF1D object.\n"
|
||||
"\n"
|
||||
" :arg orientation: The number of the directional map we must work\n"
|
||||
" with.\n"
|
||||
" :type orientation: int\n"
|
||||
" :arg level: The level of the pyramid from which the pixel must be\n"
|
||||
" read.\n"
|
||||
" :type level: int\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"
|
||||
" :arg sampling: The resolution used to sample the chain: the\n"
|
||||
" corresponding 0D function is evaluated at each sample point and\n"
|
||||
" the result is obtained by combining the resulting values into a\n"
|
||||
" single one, following the method specified by integration_type.\n"
|
||||
" :type sampling: float\n"
|
||||
"\n"
|
||||
".. method:: __call__(inter)\n"
|
||||
"\n"
|
||||
" Returns the density evaluated for an Interface1D in of the steerable\n"
|
||||
" viewmaps image. The direction telling which Directional map to choose\n"
|
||||
" is explicitly specified by the user. The density is evaluated for a\n"
|
||||
" set of points along the Interface1D (using the\n"
|
||||
" :class:`freestyle.functions.ReadSteerableViewMapPixelF0D` functor) and\n"
|
||||
" then integrated into a single value using a user-defined integration\n"
|
||||
" method.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: the density evaluated for an Interface1D in of the\n"
|
||||
" steerable viewmaps image.\n"
|
||||
" :rtype: float\n";
|
||||
|
||||
static int GetDirectionalViewMapDensityF1D___init__(BPy_GetDirectionalViewMapDensityF1D *self,
|
||||
PyObject *args, PyObject *kwds)
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"orientation", "level", "integration_type", "sampling", NULL};
|
||||
PyObject *obj = 0;
|
||||
unsigned int u1, u2;
|
||||
float f = 2.0;
|
||||
static const char *kwlist[] = {"orientation", "level", "integration_type", "sampling", NULL};
|
||||
PyObject *obj = 0;
|
||||
unsigned int u1, u2;
|
||||
float f = 2.0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "II|O!f", (char **)kwlist, &u1, &u2, &IntegrationType_Type, &obj, &f))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_double.uf1D_double = new Functions1D::GetDirectionalViewMapDensityF1D(u1, u2, t, f);
|
||||
return 0;
|
||||
if (!PyArg_ParseTupleAndKeywords(
|
||||
args, kwds, "II|O!f", (char **)kwlist, &u1, &u2, &IntegrationType_Type, &obj, &f))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_double.uf1D_double = new Functions1D::GetDirectionalViewMapDensityF1D(
|
||||
u1, u2, t, f);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-----------------------BPy_GetDirectionalViewMapDensityF1D type definition ------------------------------*/
|
||||
|
||||
PyTypeObject GetDirectionalViewMapDensityF1D_Type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"GetDirectionalViewMapDensityF1D", /* tp_name */
|
||||
sizeof(BPy_GetDirectionalViewMapDensityF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
GetDirectionalViewMapDensityF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DDouble_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)GetDirectionalViewMapDensityF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
PyVarObject_HEAD_INIT(NULL, 0) "GetDirectionalViewMapDensityF1D", /* tp_name */
|
||||
sizeof(BPy_GetDirectionalViewMapDensityF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
GetDirectionalViewMapDensityF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DDouble_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)GetDirectionalViewMapDensityF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -32,14 +32,13 @@ extern "C" {
|
||||
extern PyTypeObject GetDirectionalViewMapDensityF1D_Type;
|
||||
|
||||
#define BPy_GetDirectionalViewMapDensityF1D_Check(v) \
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&GetDirectionalViewMapDensityF1D_Type))
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&GetDirectionalViewMapDensityF1D_Type))
|
||||
|
||||
/*---------------------------Python BPy_GetDirectionalViewMapDensityF1D structure definition----------*/
|
||||
typedef struct {
|
||||
BPy_UnaryFunction1DDouble py_uf1D_double;
|
||||
BPy_UnaryFunction1DDouble py_uf1D_double;
|
||||
} BPy_GetDirectionalViewMapDensityF1D;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -33,78 +33,79 @@ extern "C" {
|
||||
//------------------------INSTANCE METHODS ----------------------------------
|
||||
|
||||
static char GetProjectedXF1D___doc__[] =
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > :class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetProjectedXF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type=IntegrationType.MEAN)\n"
|
||||
"\n"
|
||||
" Builds a GetProjectedXF1D 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 projected X 3D coordinate of an Interface1D.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: The projected X 3D coordinate of an Interface1D.\n"
|
||||
" :rtype: float\n";
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
|
||||
":class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetProjectedXF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type=IntegrationType.MEAN)\n"
|
||||
"\n"
|
||||
" Builds a GetProjectedXF1D 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 projected X 3D coordinate of an Interface1D.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: The projected X 3D coordinate of an Interface1D.\n"
|
||||
" :rtype: float\n";
|
||||
|
||||
static int GetProjectedXF1D___init__(BPy_GetProjectedXF1D *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"integration_type", NULL};
|
||||
PyObject *obj = 0;
|
||||
static const char *kwlist[] = {"integration_type", NULL};
|
||||
PyObject *obj = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_double.uf1D_double = new Functions1D::GetProjectedXF1D(t);
|
||||
return 0;
|
||||
if (!PyArg_ParseTupleAndKeywords(
|
||||
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_double.uf1D_double = new Functions1D::GetProjectedXF1D(t);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-----------------------BPy_GetProjectedXF1D type definition ------------------------------*/
|
||||
|
||||
PyTypeObject GetProjectedXF1D_Type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"GetProjectedXF1D", /* tp_name */
|
||||
sizeof(BPy_GetProjectedXF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
GetProjectedXF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DDouble_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)GetProjectedXF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
PyVarObject_HEAD_INIT(NULL, 0) "GetProjectedXF1D", /* tp_name */
|
||||
sizeof(BPy_GetProjectedXF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
GetProjectedXF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DDouble_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)GetProjectedXF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -31,14 +31,14 @@ extern "C" {
|
||||
|
||||
extern PyTypeObject GetProjectedXF1D_Type;
|
||||
|
||||
#define BPy_GetProjectedXF1D_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&GetProjectedXF1D_Type))
|
||||
#define BPy_GetProjectedXF1D_Check(v) \
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&GetProjectedXF1D_Type))
|
||||
|
||||
/*---------------------------Python BPy_GetProjectedXF1D structure definition----------*/
|
||||
typedef struct {
|
||||
BPy_UnaryFunction1DDouble py_uf1D_double;
|
||||
BPy_UnaryFunction1DDouble py_uf1D_double;
|
||||
} BPy_GetProjectedXF1D;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -33,78 +33,79 @@ extern "C" {
|
||||
//------------------------INSTANCE METHODS ----------------------------------
|
||||
|
||||
static char GetProjectedYF1D___doc__[] =
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > :class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetProjectedYF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type=IntegrationType.MEAN)\n"
|
||||
"\n"
|
||||
" Builds a GetProjectedYF1D 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 projected Y 3D coordinate of an Interface1D.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: The projected Y 3D coordinate of an Interface1D.\n"
|
||||
" :rtype: float\n";
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
|
||||
":class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetProjectedYF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type=IntegrationType.MEAN)\n"
|
||||
"\n"
|
||||
" Builds a GetProjectedYF1D 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 projected Y 3D coordinate of an Interface1D.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: The projected Y 3D coordinate of an Interface1D.\n"
|
||||
" :rtype: float\n";
|
||||
|
||||
static int GetProjectedYF1D___init__(BPy_GetProjectedYF1D *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"integration_type", NULL};
|
||||
PyObject *obj = 0;
|
||||
static const char *kwlist[] = {"integration_type", NULL};
|
||||
PyObject *obj = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_double.uf1D_double = new Functions1D::GetProjectedYF1D(t);
|
||||
return 0;
|
||||
if (!PyArg_ParseTupleAndKeywords(
|
||||
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_double.uf1D_double = new Functions1D::GetProjectedYF1D(t);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-----------------------BPy_GetProjectedYF1D type definition ------------------------------*/
|
||||
|
||||
PyTypeObject GetProjectedYF1D_Type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"GetProjectedYF1D", /* tp_name */
|
||||
sizeof(BPy_GetProjectedYF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
GetProjectedYF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DDouble_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)GetProjectedYF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
PyVarObject_HEAD_INIT(NULL, 0) "GetProjectedYF1D", /* tp_name */
|
||||
sizeof(BPy_GetProjectedYF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
GetProjectedYF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DDouble_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)GetProjectedYF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -31,14 +31,14 @@ extern "C" {
|
||||
|
||||
extern PyTypeObject GetProjectedYF1D_Type;
|
||||
|
||||
#define BPy_GetProjectedYF1D_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&GetProjectedYF1D_Type))
|
||||
#define BPy_GetProjectedYF1D_Check(v) \
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&GetProjectedYF1D_Type))
|
||||
|
||||
/*---------------------------Python BPy_GetProjectedYF1D structure definition----------*/
|
||||
typedef struct {
|
||||
BPy_UnaryFunction1DDouble py_uf1D_double;
|
||||
BPy_UnaryFunction1DDouble py_uf1D_double;
|
||||
} BPy_GetProjectedYF1D;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -33,78 +33,79 @@ extern "C" {
|
||||
//------------------------INSTANCE METHODS ----------------------------------
|
||||
|
||||
static char GetProjectedZF1D___doc__[] =
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > :class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetProjectedZF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type=IntegrationType.MEAN)\n"
|
||||
"\n"
|
||||
" Builds a GetProjectedZF1D 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 projected Z 3D coordinate of an Interface1D.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: The projected Z 3D coordinate of an Interface1D.\n"
|
||||
" :rtype: float\n";
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
|
||||
":class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetProjectedZF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type=IntegrationType.MEAN)\n"
|
||||
"\n"
|
||||
" Builds a GetProjectedZF1D 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 projected Z 3D coordinate of an Interface1D.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: The projected Z 3D coordinate of an Interface1D.\n"
|
||||
" :rtype: float\n";
|
||||
|
||||
static int GetProjectedZF1D___init__(BPy_GetProjectedZF1D *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"integration_type", NULL};
|
||||
PyObject *obj = 0;
|
||||
static const char *kwlist[] = {"integration_type", NULL};
|
||||
PyObject *obj = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_double.uf1D_double = new Functions1D::GetProjectedZF1D(t);
|
||||
return 0;
|
||||
if (!PyArg_ParseTupleAndKeywords(
|
||||
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_double.uf1D_double = new Functions1D::GetProjectedZF1D(t);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-----------------------BPy_GetProjectedZF1D type definition ------------------------------*/
|
||||
|
||||
PyTypeObject GetProjectedZF1D_Type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"GetProjectedZF1D", /* tp_name */
|
||||
sizeof(BPy_GetProjectedZF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
GetProjectedZF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DDouble_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)GetProjectedZF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
PyVarObject_HEAD_INIT(NULL, 0) "GetProjectedZF1D", /* tp_name */
|
||||
sizeof(BPy_GetProjectedZF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
GetProjectedZF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DDouble_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)GetProjectedZF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -31,14 +31,14 @@ extern "C" {
|
||||
|
||||
extern PyTypeObject GetProjectedZF1D_Type;
|
||||
|
||||
#define BPy_GetProjectedZF1D_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&GetProjectedZF1D_Type))
|
||||
#define BPy_GetProjectedZF1D_Check(v) \
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&GetProjectedZF1D_Type))
|
||||
|
||||
/*---------------------------Python BPy_GetProjectedZF1D structure definition----------*/
|
||||
typedef struct {
|
||||
BPy_UnaryFunction1DDouble py_uf1D_double;
|
||||
BPy_UnaryFunction1DDouble py_uf1D_double;
|
||||
} BPy_GetProjectedZF1D;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -33,92 +33,94 @@ extern "C" {
|
||||
//------------------------INSTANCE METHODS ----------------------------------
|
||||
|
||||
static char GetSteerableViewMapDensityF1D___doc__[] =
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > :class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetSteerableViewMapDensityF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(level, integration_type=IntegrationType.MEAN, sampling=2.0)\n"
|
||||
"\n"
|
||||
" Builds a GetSteerableViewMapDensityF1D object.\n"
|
||||
"\n"
|
||||
" :arg level: The level of the pyramid from which the pixel must be\n"
|
||||
" read.\n"
|
||||
" :type level: int\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"
|
||||
" :arg sampling: The resolution used to sample the chain: the\n"
|
||||
" corresponding 0D function is evaluated at each sample point and\n"
|
||||
" the result is obtained by combining the resulting values into a\n"
|
||||
" single one, following the method specified by integration_type.\n"
|
||||
" :type sampling: float\n"
|
||||
"\n"
|
||||
".. method:: __call__(inter)\n"
|
||||
"\n"
|
||||
" Returns the density of the ViewMap for a given Interface1D. The\n"
|
||||
" density of each :class:`freestyle.types.FEdge` is evaluated in the\n"
|
||||
" proper steerable :class:`freestyle.types.ViewMap` depending on its\n"
|
||||
" orientation.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: The density of the ViewMap for a given Interface1D.\n"
|
||||
" :rtype: float\n";
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
|
||||
":class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetSteerableViewMapDensityF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(level, integration_type=IntegrationType.MEAN, sampling=2.0)\n"
|
||||
"\n"
|
||||
" Builds a GetSteerableViewMapDensityF1D object.\n"
|
||||
"\n"
|
||||
" :arg level: The level of the pyramid from which the pixel must be\n"
|
||||
" read.\n"
|
||||
" :type level: int\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"
|
||||
" :arg sampling: The resolution used to sample the chain: the\n"
|
||||
" corresponding 0D function is evaluated at each sample point and\n"
|
||||
" the result is obtained by combining the resulting values into a\n"
|
||||
" single one, following the method specified by integration_type.\n"
|
||||
" :type sampling: float\n"
|
||||
"\n"
|
||||
".. method:: __call__(inter)\n"
|
||||
"\n"
|
||||
" Returns the density of the ViewMap for a given Interface1D. The\n"
|
||||
" density of each :class:`freestyle.types.FEdge` is evaluated in the\n"
|
||||
" proper steerable :class:`freestyle.types.ViewMap` depending on its\n"
|
||||
" orientation.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: The density of the ViewMap for a given Interface1D.\n"
|
||||
" :rtype: float\n";
|
||||
|
||||
static int GetSteerableViewMapDensityF1D___init__(BPy_GetSteerableViewMapDensityF1D *self,
|
||||
PyObject *args, PyObject *kwds)
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"level", "integration_type", "sampling", NULL};
|
||||
PyObject *obj = 0;
|
||||
int i;
|
||||
float f = 2.0;
|
||||
static const char *kwlist[] = {"level", "integration_type", "sampling", NULL};
|
||||
PyObject *obj = 0;
|
||||
int i;
|
||||
float f = 2.0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "i|O!f", (char **)kwlist, &i, &IntegrationType_Type, &obj, &f))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_double.uf1D_double = new Functions1D::GetSteerableViewMapDensityF1D(i, t, f);
|
||||
return 0;
|
||||
if (!PyArg_ParseTupleAndKeywords(
|
||||
args, kwds, "i|O!f", (char **)kwlist, &i, &IntegrationType_Type, &obj, &f))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_double.uf1D_double = new Functions1D::GetSteerableViewMapDensityF1D(i, t, f);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-----------------------BPy_GetSteerableViewMapDensityF1D type definition ------------------------------*/
|
||||
|
||||
PyTypeObject GetSteerableViewMapDensityF1D_Type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"GetSteerableViewMapDensityF1D", /* tp_name */
|
||||
sizeof(BPy_GetSteerableViewMapDensityF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
GetSteerableViewMapDensityF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DDouble_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)GetSteerableViewMapDensityF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
PyVarObject_HEAD_INIT(NULL, 0) "GetSteerableViewMapDensityF1D", /* tp_name */
|
||||
sizeof(BPy_GetSteerableViewMapDensityF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
GetSteerableViewMapDensityF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DDouble_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)GetSteerableViewMapDensityF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -32,13 +32,12 @@ extern "C" {
|
||||
extern PyTypeObject GetSteerableViewMapDensityF1D_Type;
|
||||
|
||||
#define BPy_GetSteerableViewMapDensityF1D_Check(v) \
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&GetSteerableViewMapDensityF1D_Type))
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&GetSteerableViewMapDensityF1D_Type))
|
||||
/*---------------------------Python BPy_GetSteerableViewMapDensityF1D structure definition----------*/
|
||||
typedef struct {
|
||||
BPy_UnaryFunction1DDouble py_uf1D_double;
|
||||
BPy_UnaryFunction1DDouble py_uf1D_double;
|
||||
} BPy_GetSteerableViewMapDensityF1D;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -33,91 +33,94 @@ extern "C" {
|
||||
//------------------------INSTANCE METHODS ----------------------------------
|
||||
|
||||
static char GetViewMapGradientNormF1D___doc__[] =
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > :class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetViewMapGradientNormF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(level, integration_type=IntegrationType.MEAN, sampling=2.0)\n"
|
||||
"\n"
|
||||
" Builds a GetViewMapGradientNormF1D object.\n"
|
||||
"\n"
|
||||
" :arg level: The level of the pyramid from which the pixel must be\n"
|
||||
" read.\n"
|
||||
" :type level: int\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"
|
||||
" :arg sampling: The resolution used to sample the chain: the\n"
|
||||
" corresponding 0D function is evaluated at each sample point and\n"
|
||||
" the result is obtained by combining the resulting values into a\n"
|
||||
" single one, following the method specified by integration_type.\n"
|
||||
" :type sampling: float\n"
|
||||
"\n"
|
||||
".. method:: __call__(inter)\n"
|
||||
"\n"
|
||||
" Returns the density of the ViewMap for a given Interface1D. The\n"
|
||||
" density of each :class:`freestyle.types.FEdge` is evaluated in the\n"
|
||||
" proper steerable :class:`freestyle.types.ViewMap` depending on its\n"
|
||||
" orientation.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: The density of the ViewMap for a given Interface1D.\n"
|
||||
" :rtype: float\n";
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
|
||||
":class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetViewMapGradientNormF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(level, integration_type=IntegrationType.MEAN, sampling=2.0)\n"
|
||||
"\n"
|
||||
" Builds a GetViewMapGradientNormF1D object.\n"
|
||||
"\n"
|
||||
" :arg level: The level of the pyramid from which the pixel must be\n"
|
||||
" read.\n"
|
||||
" :type level: int\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"
|
||||
" :arg sampling: The resolution used to sample the chain: the\n"
|
||||
" corresponding 0D function is evaluated at each sample point and\n"
|
||||
" the result is obtained by combining the resulting values into a\n"
|
||||
" single one, following the method specified by integration_type.\n"
|
||||
" :type sampling: float\n"
|
||||
"\n"
|
||||
".. method:: __call__(inter)\n"
|
||||
"\n"
|
||||
" Returns the density of the ViewMap for a given Interface1D. The\n"
|
||||
" density of each :class:`freestyle.types.FEdge` is evaluated in the\n"
|
||||
" proper steerable :class:`freestyle.types.ViewMap` depending on its\n"
|
||||
" orientation.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: The density of the ViewMap for a given Interface1D.\n"
|
||||
" :rtype: float\n";
|
||||
|
||||
static int GetViewMapGradientNormF1D___init__(BPy_GetViewMapGradientNormF1D *self, PyObject *args, PyObject *kwds)
|
||||
static int GetViewMapGradientNormF1D___init__(BPy_GetViewMapGradientNormF1D *self,
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"level", "integration_type", "sampling", NULL};
|
||||
PyObject *obj = 0;
|
||||
int i;
|
||||
float f = 2.0;
|
||||
static const char *kwlist[] = {"level", "integration_type", "sampling", NULL};
|
||||
PyObject *obj = 0;
|
||||
int i;
|
||||
float f = 2.0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "i|O!f", (char **)kwlist, &i, &IntegrationType_Type, &obj, &f))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_double.uf1D_double = new Functions1D::GetViewMapGradientNormF1D(i, t, f);
|
||||
return 0;
|
||||
if (!PyArg_ParseTupleAndKeywords(
|
||||
args, kwds, "i|O!f", (char **)kwlist, &i, &IntegrationType_Type, &obj, &f))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_double.uf1D_double = new Functions1D::GetViewMapGradientNormF1D(i, t, f);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-----------------------BPy_GetViewMapGradientNormF1D type definition ------------------------------*/
|
||||
|
||||
PyTypeObject GetViewMapGradientNormF1D_Type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"GetViewMapGradientNormF1D", /* tp_name */
|
||||
sizeof(BPy_GetViewMapGradientNormF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
GetViewMapGradientNormF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DDouble_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)GetViewMapGradientNormF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
PyVarObject_HEAD_INIT(NULL, 0) "GetViewMapGradientNormF1D", /* tp_name */
|
||||
sizeof(BPy_GetViewMapGradientNormF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
GetViewMapGradientNormF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DDouble_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)GetViewMapGradientNormF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -32,15 +32,14 @@ extern "C" {
|
||||
extern PyTypeObject GetViewMapGradientNormF1D_Type;
|
||||
|
||||
#define BPy_GetViewMapGradientNormF1D_Check(v) \
|
||||
(((PyObject *)v)->ob_type == PyObject_IsInstance((PyObject *)v, \
|
||||
(PyObject *)&GetViewMapGradientNormF1D_Type))
|
||||
(((PyObject *)v)->ob_type == \
|
||||
PyObject_IsInstance((PyObject *)v, (PyObject *)&GetViewMapGradientNormF1D_Type))
|
||||
|
||||
/*---------------------------Python BPy_GetViewMapGradientNormF1D structure definition----------*/
|
||||
typedef struct {
|
||||
BPy_UnaryFunction1DDouble py_uf1D_double;
|
||||
BPy_UnaryFunction1DDouble py_uf1D_double;
|
||||
} BPy_GetViewMapGradientNormF1D;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -33,78 +33,79 @@ extern "C" {
|
||||
//------------------------INSTANCE METHODS ----------------------------------
|
||||
|
||||
static char GetXF1D___doc__[] =
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > :class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetXF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type=IntegrationType.MEAN)\n"
|
||||
"\n"
|
||||
" Builds a GetXF1D 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 X 3D coordinate of an Interface1D.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: The X 3D coordinate of the Interface1D.\n"
|
||||
" :rtype: float\n";
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
|
||||
":class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetXF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type=IntegrationType.MEAN)\n"
|
||||
"\n"
|
||||
" Builds a GetXF1D 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 X 3D coordinate of an Interface1D.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: The X 3D coordinate of the Interface1D.\n"
|
||||
" :rtype: float\n";
|
||||
|
||||
static int GetXF1D___init__(BPy_GetXF1D *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"integration_type", NULL};
|
||||
PyObject *obj = 0;
|
||||
static const char *kwlist[] = {"integration_type", NULL};
|
||||
PyObject *obj = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_double.uf1D_double = new Functions1D::GetXF1D(t);
|
||||
return 0;
|
||||
if (!PyArg_ParseTupleAndKeywords(
|
||||
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_double.uf1D_double = new Functions1D::GetXF1D(t);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-----------------------BPy_GetXF1D type definition ------------------------------*/
|
||||
|
||||
PyTypeObject GetXF1D_Type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"GetXF1D", /* tp_name */
|
||||
sizeof(BPy_GetXF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
GetXF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DDouble_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)GetXF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
PyVarObject_HEAD_INIT(NULL, 0) "GetXF1D", /* tp_name */
|
||||
sizeof(BPy_GetXF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
GetXF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DDouble_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)GetXF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -35,10 +35,9 @@ extern PyTypeObject GetXF1D_Type;
|
||||
|
||||
/*---------------------------Python BPy_GetXF1D structure definition----------*/
|
||||
typedef struct {
|
||||
BPy_UnaryFunction1DDouble py_uf1D_double;
|
||||
BPy_UnaryFunction1DDouble py_uf1D_double;
|
||||
} BPy_GetXF1D;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -33,77 +33,78 @@ extern "C" {
|
||||
//------------------------INSTANCE METHODS ----------------------------------
|
||||
|
||||
static char GetYF1D___doc__[] =
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > :class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetYF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type=IntegrationType.MEAN)\n"
|
||||
"\n"
|
||||
" Builds a GetYF1D 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 Y 3D coordinate of an Interface1D.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: The Y 3D coordinate of the Interface1D.\n"
|
||||
" :rtype: float\n";
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
|
||||
":class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetYF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type=IntegrationType.MEAN)\n"
|
||||
"\n"
|
||||
" Builds a GetYF1D 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 Y 3D coordinate of an Interface1D.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: The Y 3D coordinate of the Interface1D.\n"
|
||||
" :rtype: float\n";
|
||||
|
||||
static int GetYF1D___init__(BPy_GetYF1D *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"integration_type", NULL};
|
||||
PyObject *obj = 0;
|
||||
static const char *kwlist[] = {"integration_type", NULL};
|
||||
PyObject *obj = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_double.uf1D_double = new Functions1D::GetYF1D(t);
|
||||
return 0;
|
||||
if (!PyArg_ParseTupleAndKeywords(
|
||||
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_double.uf1D_double = new Functions1D::GetYF1D(t);
|
||||
return 0;
|
||||
}
|
||||
/*-----------------------BPy_GetYF1D type definition ------------------------------*/
|
||||
|
||||
PyTypeObject GetYF1D_Type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"GetYF1D", /* tp_name */
|
||||
sizeof(BPy_GetYF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
GetYF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DDouble_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)GetYF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
PyVarObject_HEAD_INIT(NULL, 0) "GetYF1D", /* tp_name */
|
||||
sizeof(BPy_GetYF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
GetYF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DDouble_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)GetYF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -35,10 +35,9 @@ extern PyTypeObject GetYF1D_Type;
|
||||
|
||||
/*---------------------------Python BPy_GetYF1D structure definition----------*/
|
||||
typedef struct {
|
||||
BPy_UnaryFunction1DDouble py_uf1D_double;
|
||||
BPy_UnaryFunction1DDouble py_uf1D_double;
|
||||
} BPy_GetYF1D;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -33,78 +33,79 @@ extern "C" {
|
||||
//------------------------INSTANCE METHODS ----------------------------------
|
||||
|
||||
static char GetZF1D___doc__[] =
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > :class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetZF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type=IntegrationType.MEAN)\n"
|
||||
"\n"
|
||||
" Builds a GetZF1D 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 Z 3D coordinate of an Interface1D.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: The Z 3D coordinate of the Interface1D.\n"
|
||||
" :rtype: float\n";
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
|
||||
":class:`freestyle.types.UnaryFunction1DDouble` > :class:`GetZF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type=IntegrationType.MEAN)\n"
|
||||
"\n"
|
||||
" Builds a GetZF1D 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 Z 3D coordinate of an Interface1D.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: The Z 3D coordinate of the Interface1D.\n"
|
||||
" :rtype: float\n";
|
||||
|
||||
static int GetZF1D___init__(BPy_GetZF1D *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"integration_type", NULL};
|
||||
PyObject *obj = 0;
|
||||
static const char *kwlist[] = {"integration_type", NULL};
|
||||
PyObject *obj = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_double.uf1D_double = new Functions1D::GetZF1D(t);
|
||||
return 0;
|
||||
if (!PyArg_ParseTupleAndKeywords(
|
||||
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_double.uf1D_double = new Functions1D::GetZF1D(t);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-----------------------BPy_GetZF1D type definition ------------------------------*/
|
||||
|
||||
PyTypeObject GetZF1D_Type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"GetZF1D", /* tp_name */
|
||||
sizeof(BPy_GetZF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
GetZF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DDouble_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)GetZF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
PyVarObject_HEAD_INIT(NULL, 0) "GetZF1D", /* tp_name */
|
||||
sizeof(BPy_GetZF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
GetZF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DDouble_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)GetZF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -35,10 +35,9 @@ extern PyTypeObject GetZF1D_Type;
|
||||
|
||||
/*---------------------------Python BPy_GetZF1D structure definition----------*/
|
||||
typedef struct {
|
||||
BPy_UnaryFunction1DDouble py_uf1D_double;
|
||||
BPy_UnaryFunction1DDouble py_uf1D_double;
|
||||
} BPy_GetZF1D;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -33,86 +33,89 @@ extern "C" {
|
||||
//------------------------INSTANCE METHODS ----------------------------------
|
||||
|
||||
static char LocalAverageDepthF1D___doc__[] =
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > :class:`freestyle.types.UnaryFunction1DDouble` > :class:`LocalAverageDepthF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(sigma, integration_type=IntegrationType.MEAN)\n"
|
||||
"\n"
|
||||
" Builds a LocalAverageDepthF1D object.\n"
|
||||
"\n"
|
||||
" :arg sigma: The sigma used in DensityF0D and determining the window\n"
|
||||
" size used in each density query.\n"
|
||||
" :type sigma: float\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 average depth evaluated for an Interface1D. The average\n"
|
||||
" depth is evaluated for a set of points along the Interface1D (using\n"
|
||||
" the :class:`freestyle.functions.LocalAverageDepthF0D` functor) with a\n"
|
||||
" user-defined sampling and then integrated into a single value using a\n"
|
||||
" user-defined integration method.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: The average depth evaluated for the Interface1D.\n"
|
||||
" :rtype: float\n";
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
|
||||
":class:`freestyle.types.UnaryFunction1DDouble` > :class:`LocalAverageDepthF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(sigma, integration_type=IntegrationType.MEAN)\n"
|
||||
"\n"
|
||||
" Builds a LocalAverageDepthF1D object.\n"
|
||||
"\n"
|
||||
" :arg sigma: The sigma used in DensityF0D and determining the window\n"
|
||||
" size used in each density query.\n"
|
||||
" :type sigma: float\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 average depth evaluated for an Interface1D. The average\n"
|
||||
" depth is evaluated for a set of points along the Interface1D (using\n"
|
||||
" the :class:`freestyle.functions.LocalAverageDepthF0D` functor) with a\n"
|
||||
" user-defined sampling and then integrated into a single value using a\n"
|
||||
" user-defined integration method.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: The average depth evaluated for the Interface1D.\n"
|
||||
" :rtype: float\n";
|
||||
|
||||
static int LocalAverageDepthF1D___init__(BPy_LocalAverageDepthF1D *self, PyObject *args, PyObject *kwds)
|
||||
static int LocalAverageDepthF1D___init__(BPy_LocalAverageDepthF1D *self,
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"sigma", "integration_type", NULL};
|
||||
PyObject *obj = 0;
|
||||
double d;
|
||||
static const char *kwlist[] = {"sigma", "integration_type", NULL};
|
||||
PyObject *obj = 0;
|
||||
double d;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "d|O!", (char **)kwlist, &d, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_double.uf1D_double = new Functions1D::LocalAverageDepthF1D(d, t);
|
||||
return 0;
|
||||
if (!PyArg_ParseTupleAndKeywords(
|
||||
args, kwds, "d|O!", (char **)kwlist, &d, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_double.uf1D_double = new Functions1D::LocalAverageDepthF1D(d, t);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-----------------------BPy_LocalAverageDepthF1D type definition ------------------------------*/
|
||||
|
||||
PyTypeObject LocalAverageDepthF1D_Type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"LocalAverageDepthF1D", /* tp_name */
|
||||
sizeof(BPy_LocalAverageDepthF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
LocalAverageDepthF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DDouble_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)LocalAverageDepthF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
PyVarObject_HEAD_INIT(NULL, 0) "LocalAverageDepthF1D", /* tp_name */
|
||||
sizeof(BPy_LocalAverageDepthF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
LocalAverageDepthF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DDouble_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)LocalAverageDepthF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -31,14 +31,14 @@ extern "C" {
|
||||
|
||||
extern PyTypeObject LocalAverageDepthF1D_Type;
|
||||
|
||||
#define BPy_LocalAverageDepthF1D_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&LocalAverageDepthF1D_Type))
|
||||
#define BPy_LocalAverageDepthF1D_Check(v) \
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&LocalAverageDepthF1D_Type))
|
||||
|
||||
/*---------------------------Python BPy_LocalAverageDepthF1D structure definition----------*/
|
||||
typedef struct {
|
||||
BPy_UnaryFunction1DDouble py_uf1D_double;
|
||||
BPy_UnaryFunction1DDouble py_uf1D_double;
|
||||
} BPy_LocalAverageDepthF1D;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -33,82 +33,83 @@ extern "C" {
|
||||
//------------------------INSTANCE METHODS ----------------------------------
|
||||
|
||||
static char ZDiscontinuityF1D___doc__[] =
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > :class:`freestyle.types.UnaryFunction1DDouble` > :class:`ZDiscontinuityF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type=IntegrationType.MEAN)\n"
|
||||
"\n"
|
||||
" Builds a ZDiscontinuityF1D 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 a real value giving the distance between an Interface1D\n"
|
||||
" and the shape that lies behind (occludee). This distance is\n"
|
||||
" evaluated in the camera space and normalized between 0 and 1.\n"
|
||||
" Therefore, if no object is occluded by the shape to which the\n"
|
||||
" Interface1D belongs to, 1 is returned.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: The normalized distance between the Interface1D and the occludee.\n"
|
||||
" :rtype: float\n";
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
|
||||
":class:`freestyle.types.UnaryFunction1DDouble` > :class:`ZDiscontinuityF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type=IntegrationType.MEAN)\n"
|
||||
"\n"
|
||||
" Builds a ZDiscontinuityF1D 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 a real value giving the distance between an Interface1D\n"
|
||||
" and the shape that lies behind (occludee). This distance is\n"
|
||||
" evaluated in the camera space and normalized between 0 and 1.\n"
|
||||
" Therefore, if no object is occluded by the shape to which the\n"
|
||||
" Interface1D belongs to, 1 is returned.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: The normalized distance between the Interface1D and the occludee.\n"
|
||||
" :rtype: float\n";
|
||||
|
||||
static int ZDiscontinuityF1D___init__(BPy_ZDiscontinuityF1D *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"integration_type", NULL};
|
||||
PyObject *obj = 0;
|
||||
static const char *kwlist[] = {"integration_type", NULL};
|
||||
PyObject *obj = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_double.uf1D_double = new Functions1D::ZDiscontinuityF1D(t);
|
||||
return 0;
|
||||
if (!PyArg_ParseTupleAndKeywords(
|
||||
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_double.uf1D_double = new Functions1D::ZDiscontinuityF1D(t);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-----------------------BPy_ZDiscontinuityF1D type definition ------------------------------*/
|
||||
|
||||
PyTypeObject ZDiscontinuityF1D_Type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"ZDiscontinuityF1D", /* tp_name */
|
||||
sizeof(BPy_ZDiscontinuityF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
ZDiscontinuityF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DDouble_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)ZDiscontinuityF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
PyVarObject_HEAD_INIT(NULL, 0) "ZDiscontinuityF1D", /* tp_name */
|
||||
sizeof(BPy_ZDiscontinuityF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
ZDiscontinuityF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DDouble_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)ZDiscontinuityF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -31,14 +31,14 @@ extern "C" {
|
||||
|
||||
extern PyTypeObject ZDiscontinuityF1D_Type;
|
||||
|
||||
#define BPy_ZDiscontinuityF1D_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&ZDiscontinuityF1D_Type))
|
||||
#define BPy_ZDiscontinuityF1D_Check(v) \
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&ZDiscontinuityF1D_Type))
|
||||
|
||||
/*---------------------------Python BPy_ZDiscontinuityF1D structure definition----------*/
|
||||
typedef struct {
|
||||
BPy_UnaryFunction1DDouble py_uf1D_double;
|
||||
BPy_UnaryFunction1DDouble py_uf1D_double;
|
||||
} BPy_ZDiscontinuityF1D;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -33,82 +33,85 @@ extern "C" {
|
||||
//------------------------INSTANCE METHODS ----------------------------------
|
||||
|
||||
static char QuantitativeInvisibilityF1D___doc__[] =
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > :class:`freestyle.types.UnaryFunction1DUnsigned` > :class:`QuantitativeInvisibilityF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type=IntegrationType.MEAN)\n"
|
||||
"\n"
|
||||
" Builds a QuantitativeInvisibilityF1D 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 Quantitative Invisibility of an Interface1D element. If\n"
|
||||
" the Interface1D is a :class:`freestyle.types.ViewEdge`, then there is\n"
|
||||
" no ambiguity concerning the result. But, if the Interface1D results\n"
|
||||
" of a chaining (chain, stroke), then it might be made of several 1D\n"
|
||||
" elements of different Quantitative Invisibilities.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: The Quantitative Invisibility of the Interface1D.\n"
|
||||
" :rtype: int\n";
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
|
||||
":class:`freestyle.types.UnaryFunction1DUnsigned` > :class:`QuantitativeInvisibilityF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__(integration_type=IntegrationType.MEAN)\n"
|
||||
"\n"
|
||||
" Builds a QuantitativeInvisibilityF1D 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 Quantitative Invisibility of an Interface1D element. If\n"
|
||||
" the Interface1D is a :class:`freestyle.types.ViewEdge`, then there is\n"
|
||||
" no ambiguity concerning the result. But, if the Interface1D results\n"
|
||||
" of a chaining (chain, stroke), then it might be made of several 1D\n"
|
||||
" elements of different Quantitative Invisibilities.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: The Quantitative Invisibility of the Interface1D.\n"
|
||||
" :rtype: int\n";
|
||||
|
||||
static int QuantitativeInvisibilityF1D___init__(BPy_QuantitativeInvisibilityF1D *self, PyObject *args, PyObject *kwds)
|
||||
static int QuantitativeInvisibilityF1D___init__(BPy_QuantitativeInvisibilityF1D *self,
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {"integration_type", NULL};
|
||||
PyObject *obj = 0;
|
||||
static const char *kwlist[] = {"integration_type", NULL};
|
||||
PyObject *obj = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_unsigned.uf1D_unsigned = new Functions1D::QuantitativeInvisibilityF1D(t);
|
||||
return 0;
|
||||
if (!PyArg_ParseTupleAndKeywords(
|
||||
args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
|
||||
return -1;
|
||||
IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
|
||||
self->py_uf1D_unsigned.uf1D_unsigned = new Functions1D::QuantitativeInvisibilityF1D(t);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-----------------------BPy_QuantitativeInvisibilityF1D type definition ------------------------------*/
|
||||
|
||||
PyTypeObject QuantitativeInvisibilityF1D_Type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"QuantitativeInvisibilityF1D", /* tp_name */
|
||||
sizeof(BPy_QuantitativeInvisibilityF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
QuantitativeInvisibilityF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DUnsigned_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)QuantitativeInvisibilityF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
PyVarObject_HEAD_INIT(NULL, 0) "QuantitativeInvisibilityF1D", /* tp_name */
|
||||
sizeof(BPy_QuantitativeInvisibilityF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
QuantitativeInvisibilityF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DUnsigned_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)QuantitativeInvisibilityF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -32,14 +32,13 @@ extern "C" {
|
||||
extern PyTypeObject QuantitativeInvisibilityF1D_Type;
|
||||
|
||||
#define BPy_QuantitativeInvisibilityF1D_Check(v) \
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&QuantitativeInvisibilityF1D_Type))
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&QuantitativeInvisibilityF1D_Type))
|
||||
|
||||
/*---------------------------Python BPy_QuantitativeInvisibilityF1D structure definition----------*/
|
||||
typedef struct {
|
||||
BPy_UnaryFunction1DUnsigned py_uf1D_unsigned;
|
||||
BPy_UnaryFunction1DUnsigned py_uf1D_unsigned;
|
||||
} BPy_QuantitativeInvisibilityF1D;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -33,72 +33,72 @@ extern "C" {
|
||||
//------------------------INSTANCE METHODS ----------------------------------
|
||||
|
||||
static char GetOccludeeF1D___doc__[] =
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > :class:`freestyle.types.UnaryFunction1DVectorViewShape` > :class:`GetOccludeeF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__()\n"
|
||||
"\n"
|
||||
" Builds a GetOccludeeF1D object.\n"
|
||||
"\n"
|
||||
".. method:: __call__(inter)\n"
|
||||
"\n"
|
||||
" Returns a list of occluded shapes covered by this Interface1D.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: A list of occluded shapes covered by the Interface1D.\n"
|
||||
" :rtype: list of :class:`freestyle.types.ViewShape` objects\n";
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
|
||||
":class:`freestyle.types.UnaryFunction1DVectorViewShape` > :class:`GetOccludeeF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__()\n"
|
||||
"\n"
|
||||
" Builds a GetOccludeeF1D object.\n"
|
||||
"\n"
|
||||
".. method:: __call__(inter)\n"
|
||||
"\n"
|
||||
" Returns a list of occluded shapes covered by this Interface1D.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: A list of occluded shapes covered by the Interface1D.\n"
|
||||
" :rtype: list of :class:`freestyle.types.ViewShape` objects\n";
|
||||
|
||||
static int GetOccludeeF1D___init__(BPy_GetOccludeeF1D *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {NULL};
|
||||
static const char *kwlist[] = {NULL};
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
|
||||
return -1;
|
||||
self->py_uf1D_vectorviewshape.uf1D_vectorviewshape = new Functions1D::GetOccludeeF1D();
|
||||
return 0;
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
|
||||
return -1;
|
||||
self->py_uf1D_vectorviewshape.uf1D_vectorviewshape = new Functions1D::GetOccludeeF1D();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-----------------------BPy_GetOccludeeF1D type definition ------------------------------*/
|
||||
|
||||
PyTypeObject GetOccludeeF1D_Type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"GetOccludeeF1D", /* tp_name */
|
||||
sizeof(BPy_GetOccludeeF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
GetOccludeeF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DVectorViewShape_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)GetOccludeeF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
PyVarObject_HEAD_INIT(NULL, 0) "GetOccludeeF1D", /* tp_name */
|
||||
sizeof(BPy_GetOccludeeF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
GetOccludeeF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DVectorViewShape_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)GetOccludeeF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -31,14 +31,14 @@ extern "C" {
|
||||
|
||||
extern PyTypeObject GetOccludeeF1D_Type;
|
||||
|
||||
#define BPy_GetOccludeeF1D_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&GetOccludeeF1D_Type))
|
||||
#define BPy_GetOccludeeF1D_Check(v) \
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&GetOccludeeF1D_Type))
|
||||
|
||||
/*---------------------------Python BPy_GetOccludeeF1D structure definition----------*/
|
||||
typedef struct {
|
||||
BPy_UnaryFunction1DVectorViewShape py_uf1D_vectorviewshape;
|
||||
BPy_UnaryFunction1DVectorViewShape py_uf1D_vectorviewshape;
|
||||
} BPy_GetOccludeeF1D;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -33,72 +33,72 @@ extern "C" {
|
||||
//------------------------INSTANCE METHODS ----------------------------------
|
||||
|
||||
static char GetOccludersF1D___doc__[] =
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > :class:`freestyle.types.UnaryFunction1DVectorViewShape` > :class:`GetOccludersF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__()\n"
|
||||
"\n"
|
||||
" Builds a GetOccludersF1D object.\n"
|
||||
"\n"
|
||||
".. method:: __call__(inter)\n"
|
||||
"\n"
|
||||
" Returns a list of occluding shapes that cover this Interface1D.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: A list of occluding shapes that cover the Interface1D.\n"
|
||||
" :rtype: list of :class:`freestyle.types.ViewShape` objects\n";
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
|
||||
":class:`freestyle.types.UnaryFunction1DVectorViewShape` > :class:`GetOccludersF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__()\n"
|
||||
"\n"
|
||||
" Builds a GetOccludersF1D object.\n"
|
||||
"\n"
|
||||
".. method:: __call__(inter)\n"
|
||||
"\n"
|
||||
" Returns a list of occluding shapes that cover this Interface1D.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: A list of occluding shapes that cover the Interface1D.\n"
|
||||
" :rtype: list of :class:`freestyle.types.ViewShape` objects\n";
|
||||
|
||||
static int GetOccludersF1D___init__(BPy_GetOccludersF1D *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {NULL};
|
||||
static const char *kwlist[] = {NULL};
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
|
||||
return -1;
|
||||
self->py_uf1D_vectorviewshape.uf1D_vectorviewshape = new Functions1D::GetOccludersF1D();
|
||||
return 0;
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
|
||||
return -1;
|
||||
self->py_uf1D_vectorviewshape.uf1D_vectorviewshape = new Functions1D::GetOccludersF1D();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-----------------------BPy_GetOccludersF1D type definition ------------------------------*/
|
||||
|
||||
PyTypeObject GetOccludersF1D_Type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"GetOccludersF1D", /* tp_name */
|
||||
sizeof(BPy_GetOccludersF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
GetOccludersF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DVectorViewShape_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)GetOccludersF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
PyVarObject_HEAD_INIT(NULL, 0) "GetOccludersF1D", /* tp_name */
|
||||
sizeof(BPy_GetOccludersF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
GetOccludersF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DVectorViewShape_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)GetOccludersF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -31,14 +31,14 @@ extern "C" {
|
||||
|
||||
extern PyTypeObject GetOccludersF1D_Type;
|
||||
|
||||
#define BPy_GetOccludersF1D_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&GetOccludersF1D_Type))
|
||||
#define BPy_GetOccludersF1D_Check(v) \
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&GetOccludersF1D_Type))
|
||||
|
||||
/*---------------------------Python BPy_GetOccludersF1D structure definition----------*/
|
||||
typedef struct {
|
||||
BPy_UnaryFunction1DVectorViewShape py_uf1D_vectorviewshape;
|
||||
BPy_UnaryFunction1DVectorViewShape py_uf1D_vectorviewshape;
|
||||
} BPy_GetOccludersF1D;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -33,72 +33,72 @@ extern "C" {
|
||||
//------------------------INSTANCE METHODS ----------------------------------
|
||||
|
||||
static char GetShapeF1D___doc__[] =
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > :class:`freestyle.types.UnaryFunction1DVectorViewShape` > :class:`GetShapeF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__()\n"
|
||||
"\n"
|
||||
" Builds a GetShapeF1D object.\n"
|
||||
"\n"
|
||||
".. method:: __call__(inter)\n"
|
||||
"\n"
|
||||
" Returns a list of shapes covered by this Interface1D.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: A list of shapes covered by the Interface1D.\n"
|
||||
" :rtype: list of :class:`freestyle.types.ViewShape` objects\n";
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
|
||||
":class:`freestyle.types.UnaryFunction1DVectorViewShape` > :class:`GetShapeF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__()\n"
|
||||
"\n"
|
||||
" Builds a GetShapeF1D object.\n"
|
||||
"\n"
|
||||
".. method:: __call__(inter)\n"
|
||||
"\n"
|
||||
" Returns a list of shapes covered by this Interface1D.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n"
|
||||
" :return: A list of shapes covered by the Interface1D.\n"
|
||||
" :rtype: list of :class:`freestyle.types.ViewShape` objects\n";
|
||||
|
||||
static int GetShapeF1D___init__(BPy_GetShapeF1D *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {NULL};
|
||||
static const char *kwlist[] = {NULL};
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
|
||||
return -1;
|
||||
self->py_uf1D_vectorviewshape.uf1D_vectorviewshape = new Functions1D::GetShapeF1D();
|
||||
return 0;
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
|
||||
return -1;
|
||||
self->py_uf1D_vectorviewshape.uf1D_vectorviewshape = new Functions1D::GetShapeF1D();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-----------------------BPy_GetShapeF1D type definition ------------------------------*/
|
||||
|
||||
PyTypeObject GetShapeF1D_Type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"GetShapeF1D", /* tp_name */
|
||||
sizeof(BPy_GetShapeF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
GetShapeF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DVectorViewShape_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)GetShapeF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
PyVarObject_HEAD_INIT(NULL, 0) "GetShapeF1D", /* tp_name */
|
||||
sizeof(BPy_GetShapeF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
GetShapeF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DVectorViewShape_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)GetShapeF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -31,14 +31,14 @@ extern "C" {
|
||||
|
||||
extern PyTypeObject GetShapeF1D_Type;
|
||||
|
||||
#define BPy_GetShapeF1D_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&GetShapeF1D_Type))
|
||||
#define BPy_GetShapeF1D_Check(v) \
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&GetShapeF1D_Type))
|
||||
|
||||
/*---------------------------Python BPy_GetShapeF1D structure definition----------*/
|
||||
typedef struct {
|
||||
BPy_UnaryFunction1DVectorViewShape py_uf1D_vectorviewshape;
|
||||
BPy_UnaryFunction1DVectorViewShape py_uf1D_vectorviewshape;
|
||||
} BPy_GetShapeF1D;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -33,70 +33,72 @@ extern "C" {
|
||||
//------------------------INSTANCE METHODS ----------------------------------
|
||||
|
||||
static char ChainingTimeStampF1D___doc__[] =
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > :class:`freestyle.types.UnaryFunction1DVoid` > :class:`ChainingTimeStampF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__()\n"
|
||||
"\n"
|
||||
" Builds a ChainingTimeStampF1D object.\n"
|
||||
"\n"
|
||||
".. method:: __call__(inter)\n"
|
||||
"\n"
|
||||
" Sets the chaining time stamp of the Interface1D.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n";
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
|
||||
":class:`freestyle.types.UnaryFunction1DVoid` > :class:`ChainingTimeStampF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__()\n"
|
||||
"\n"
|
||||
" Builds a ChainingTimeStampF1D object.\n"
|
||||
"\n"
|
||||
".. method:: __call__(inter)\n"
|
||||
"\n"
|
||||
" Sets the chaining time stamp of the Interface1D.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n";
|
||||
|
||||
static int ChainingTimeStampF1D___init__(BPy_ChainingTimeStampF1D *self, PyObject *args, PyObject *kwds)
|
||||
static int ChainingTimeStampF1D___init__(BPy_ChainingTimeStampF1D *self,
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {NULL};
|
||||
static const char *kwlist[] = {NULL};
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
|
||||
return -1;
|
||||
self->py_uf1D_void.uf1D_void = new Functions1D::ChainingTimeStampF1D();
|
||||
return 0;
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
|
||||
return -1;
|
||||
self->py_uf1D_void.uf1D_void = new Functions1D::ChainingTimeStampF1D();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-----------------------BPy_ChainingTimeStampF1D type definition ------------------------------*/
|
||||
|
||||
PyTypeObject ChainingTimeStampF1D_Type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"ChainingTimeStampF1D", /* tp_name */
|
||||
sizeof(BPy_ChainingTimeStampF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
ChainingTimeStampF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DVoid_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)ChainingTimeStampF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
PyVarObject_HEAD_INIT(NULL, 0) "ChainingTimeStampF1D", /* tp_name */
|
||||
sizeof(BPy_ChainingTimeStampF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
ChainingTimeStampF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DVoid_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)ChainingTimeStampF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -31,14 +31,14 @@ extern "C" {
|
||||
|
||||
extern PyTypeObject ChainingTimeStampF1D_Type;
|
||||
|
||||
#define BPy_ChainingTimeStampF1D_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&ChainingTimeStampF1D_Type))
|
||||
#define BPy_ChainingTimeStampF1D_Check(v) \
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&ChainingTimeStampF1D_Type))
|
||||
|
||||
/*---------------------------Python BPy_ChainingTimeStampF1D structure definition----------*/
|
||||
typedef struct {
|
||||
BPy_UnaryFunction1DVoid py_uf1D_void;
|
||||
BPy_UnaryFunction1DVoid py_uf1D_void;
|
||||
} BPy_ChainingTimeStampF1D;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -33,71 +33,72 @@ extern "C" {
|
||||
//------------------------INSTANCE METHODS ----------------------------------
|
||||
|
||||
static char IncrementChainingTimeStampF1D___doc__[] =
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > :class:`freestyle.types.UnaryFunction1DVoid` > :class:`IncrementChainingTimeStampF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__()\n"
|
||||
"\n"
|
||||
" Builds an IncrementChainingTimeStampF1D object.\n"
|
||||
"\n"
|
||||
".. method:: __call__(inter)\n"
|
||||
"\n"
|
||||
" Increments the chaining time stamp of the Interface1D.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n";
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
|
||||
":class:`freestyle.types.UnaryFunction1DVoid` > :class:`IncrementChainingTimeStampF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__()\n"
|
||||
"\n"
|
||||
" Builds an IncrementChainingTimeStampF1D object.\n"
|
||||
"\n"
|
||||
".. method:: __call__(inter)\n"
|
||||
"\n"
|
||||
" Increments the chaining time stamp of the Interface1D.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n";
|
||||
|
||||
static int IncrementChainingTimeStampF1D___init__(BPy_IncrementChainingTimeStampF1D *self,
|
||||
PyObject *args, PyObject *kwds)
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {NULL};
|
||||
static const char *kwlist[] = {NULL};
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
|
||||
return -1;
|
||||
self->py_uf1D_void.uf1D_void = new Functions1D::IncrementChainingTimeStampF1D();
|
||||
return 0;
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
|
||||
return -1;
|
||||
self->py_uf1D_void.uf1D_void = new Functions1D::IncrementChainingTimeStampF1D();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-----------------------BPy_IncrementChainingTimeStampF1D type definition ------------------------------*/
|
||||
|
||||
PyTypeObject IncrementChainingTimeStampF1D_Type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"IncrementChainingTimeStampF1D", /* tp_name */
|
||||
sizeof(BPy_IncrementChainingTimeStampF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
IncrementChainingTimeStampF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DVoid_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)IncrementChainingTimeStampF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
PyVarObject_HEAD_INIT(NULL, 0) "IncrementChainingTimeStampF1D", /* tp_name */
|
||||
sizeof(BPy_IncrementChainingTimeStampF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
IncrementChainingTimeStampF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DVoid_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)IncrementChainingTimeStampF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -32,14 +32,13 @@ extern "C" {
|
||||
extern PyTypeObject IncrementChainingTimeStampF1D_Type;
|
||||
|
||||
#define BPy_IncrementChainingTimeStampF1D_Check(v) \
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&IncrementChainingTimeStampF1D_Type))
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&IncrementChainingTimeStampF1D_Type))
|
||||
|
||||
/*---------------------------Python BPy_IncrementChainingTimeStampF1D structure definition----------*/
|
||||
typedef struct {
|
||||
BPy_UnaryFunction1DVoid py_uf1D_void;
|
||||
BPy_UnaryFunction1DVoid py_uf1D_void;
|
||||
} BPy_IncrementChainingTimeStampF1D;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -33,70 +33,70 @@ extern "C" {
|
||||
//------------------------INSTANCE METHODS ----------------------------------
|
||||
|
||||
static char TimeStampF1D___doc__[] =
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > :class:`freestyle.types.UnaryFunction1DVoid` > :class:`TimeStampF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__()\n"
|
||||
"\n"
|
||||
" Builds a TimeStampF1D object.\n"
|
||||
"\n"
|
||||
".. method:: __call__(inter)\n"
|
||||
"\n"
|
||||
" Returns the time stamp of the Interface1D.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n";
|
||||
"Class hierarchy: :class:`freestyle.types.UnaryFunction1D` > "
|
||||
":class:`freestyle.types.UnaryFunction1DVoid` > :class:`TimeStampF1D`\n"
|
||||
"\n"
|
||||
".. method:: __init__()\n"
|
||||
"\n"
|
||||
" Builds a TimeStampF1D object.\n"
|
||||
"\n"
|
||||
".. method:: __call__(inter)\n"
|
||||
"\n"
|
||||
" Returns the time stamp of the Interface1D.\n"
|
||||
"\n"
|
||||
" :arg inter: An Interface1D object.\n"
|
||||
" :type inter: :class:`freestyle.types.Interface1D`\n";
|
||||
|
||||
static int TimeStampF1D___init__(BPy_TimeStampF1D *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
static const char *kwlist[] = {NULL};
|
||||
static const char *kwlist[] = {NULL};
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
|
||||
return -1;
|
||||
self->py_uf1D_void.uf1D_void = new Functions1D::TimeStampF1D();
|
||||
return 0;
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist))
|
||||
return -1;
|
||||
self->py_uf1D_void.uf1D_void = new Functions1D::TimeStampF1D();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*-----------------------BPy_TimeStampF1D type definition ------------------------------*/
|
||||
|
||||
PyTypeObject TimeStampF1D_Type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"TimeStampF1D", /* tp_name */
|
||||
sizeof(BPy_TimeStampF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
TimeStampF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DVoid_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)TimeStampF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
PyVarObject_HEAD_INIT(NULL, 0) "TimeStampF1D", /* tp_name */
|
||||
sizeof(BPy_TimeStampF1D), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
0, /* tp_reserved */
|
||||
0, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_sequence */
|
||||
0, /* tp_as_mapping */
|
||||
0, /* tp_hash */
|
||||
0, /* tp_call */
|
||||
0, /* tp_str */
|
||||
0, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||
TimeStampF1D___doc__, /* tp_doc */
|
||||
0, /* tp_traverse */
|
||||
0, /* tp_clear */
|
||||
0, /* tp_richcompare */
|
||||
0, /* tp_weaklistoffset */
|
||||
0, /* tp_iter */
|
||||
0, /* tp_iternext */
|
||||
0, /* tp_methods */
|
||||
0, /* tp_members */
|
||||
0, /* tp_getset */
|
||||
&UnaryFunction1DVoid_Type, /* tp_base */
|
||||
0, /* tp_dict */
|
||||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)TimeStampF1D___init__, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
0, /* tp_new */
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -31,14 +31,14 @@ extern "C" {
|
||||
|
||||
extern PyTypeObject TimeStampF1D_Type;
|
||||
|
||||
#define BPy_TimeStampF1D_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&TimeStampF1D_Type))
|
||||
#define BPy_TimeStampF1D_Check(v) \
|
||||
(PyObject_IsInstance((PyObject *)v, (PyObject *)&TimeStampF1D_Type))
|
||||
|
||||
/*---------------------------Python BPy_TimeStampF1D structure definition----------*/
|
||||
typedef struct {
|
||||
BPy_UnaryFunction1DVoid py_uf1D_void;
|
||||
BPy_UnaryFunction1DVoid py_uf1D_void;
|
||||
} BPy_TimeStampF1D;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user