9 #include "../BPy_Convert.h"
10 #include "../BPy_Id.h"
11 #include "../BPy_Nature.h"
12 #include "../BPy_ViewShape.h"
13 #include "../Interface0D/BPy_ViewVertex.h"
14 #include "../Interface1D/BPy_FEdge.h"
15 #include "../Interface1D/BPy_ViewEdge.h"
29 "Class hierarchy: :class:`Interface1D` > :class:`ViewEdge`\n"
31 "Class defining a ViewEdge. A ViewEdge in an edge of the image graph.\n"
32 "it connects two :class:`ViewVertex` objects. It is made by connecting\n"
35 ".. method:: __init__()\n"
36 " __init__(brother)\n"
38 " Builds a :class:`ViewEdge` using the default constructor or the copy constructor.\n"
40 " :arg brother: A ViewEdge object.\n"
41 " :type brother: :class:`ViewEdge`");
45 static const char *kwlist[] = {
"brother",
nullptr};
46 PyObject *brother =
nullptr;
48 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"|O!", (
char **)kwlist, &
ViewEdge_Type, &brother)) {
57 self->py_if1D.if1D =
self->ve;
58 self->py_if1D.borrowed =
false;
63 ".. method:: update_fedges()\n"
65 " Sets Viewedge to this for all embedded fedges.\n");
69 self->ve->UpdateFEdges();
77 ViewEdge_update_fedges_doc},
78 {
nullptr,
nullptr, 0,
nullptr},
84 "The first ViewVertex.\n"
86 ":type: :class:`ViewVertex`");
109 "The second ViewVertex.\n"
111 ":type: :class:`ViewVertex`");
132 "The first FEdge that constitutes this ViewEdge.\n"
134 ":type: :class:`FEdge`");
138 FEdge *fe =
self->ve->fedgeA();
150 self->ve->setFEdgeA(((
BPy_FEdge *)value)->fe);
155 "The last FEdge that constitutes this ViewEdge.\n"
157 ":type: :class:`FEdge`");
161 FEdge *fe =
self->ve->fedgeB();
173 self->ve->setFEdgeB(((
BPy_FEdge *)value)->fe);
178 "The ViewShape to which this ViewEdge belongs to.\n"
180 ":type: :class:`ViewShape`");
201 "The shape that is occluded by the ViewShape to which this ViewEdge\n"
202 "belongs to. If no object is occluded, this property is set to None.\n"
204 ":type: :class:`ViewShape`");
225 "True if this ViewEdge forms a closed loop.\n"
235 "The Id of this ViewEdge.\n"
237 ":type: :class:`Id`");
248 PyErr_SetString(PyExc_TypeError,
"value must be an Id");
251 self->ve->setId(*(((
BPy_Id *)value)->
id));
256 "The nature of this ViewEdge.\n"
258 ":type: :class:`Nature`");
268 PyErr_SetString(PyExc_TypeError,
"value must be a Nature");
271 self->ve->setNature(PyLong_AsLong((PyObject *)&((
BPy_Nature *)value)->i));
276 "The quantitative invisibility.\n"
282 return PyLong_FromLong(
self->ve->qi());
289 if ((qi = PyLong_AsLong(value)) == -1 && PyErr_Occurred()) {
297 "The time stamp of this ViewEdge.\n"
303 return PyLong_FromLong(
self->ve->getChainingTimeStamp());
312 if ((timestamp = PyLong_AsLong(value)) == -1 && PyErr_Occurred()) {
315 self->ve->setChainingTimeStamp(timestamp);
323 ViewEdge_first_viewvertex_doc,
328 ViewEdge_last_viewvertex_doc,
333 ViewEdge_first_fedge_doc,
338 ViewEdge_last_fedge_doc,
343 ViewEdge_viewshape_doc,
348 ViewEdge_occludee_doc,
353 ViewEdge_is_closed_doc,
362 {
"chaining_time_stamp",
365 ViewEdge_chaining_time_stamp_doc,
367 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
373 PyVarObject_HEAD_INIT(
nullptr, 0)
"ViewEdge",
391 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
PyObject * PyBool_from_bool(bool b)
PyObject * BPy_ViewShape_from_ViewShape(ViewShape &vs)
PyObject * Any_BPy_FEdge_from_FEdge(FEdge &fe)
PyObject * BPy_Id_from_Id(Id &id)
PyObject * BPy_Nature_from_Nature(unsigned short n)
PyObject * Any_BPy_ViewVertex_from_ViewVertex(ViewVertex &vv)
#define BPy_FEdge_Check(v)
PyTypeObject Interface1D_Type
#define BPy_Nature_Check(v)
static PyObject * ViewEdge_last_fedge_get(BPy_ViewEdge *self, void *UNUSED(closure))
static PyObject * ViewEdge_first_fedge_get(BPy_ViewEdge *self, void *UNUSED(closure))
static int ViewEdge_last_viewvertex_set(BPy_ViewEdge *self, PyObject *value, void *UNUSED(closure))
static PyGetSetDef BPy_ViewEdge_getseters[]
static PyObject * ViewEdge_update_fedges(BPy_ViewEdge *self)
static int ViewEdge_qi_set(BPy_ViewEdge *self, PyObject *value, void *UNUSED(closure))
static PyObject * ViewEdge_id_get(BPy_ViewEdge *self, void *UNUSED(closure))
static PyObject * ViewEdge_first_viewvertex_get(BPy_ViewEdge *self, void *UNUSED(closure))
static int ViewEdge_chaining_time_stamp_set(BPy_ViewEdge *self, PyObject *value, void *UNUSED(closure))
static PyObject * ViewEdge_nature_get(BPy_ViewEdge *self, void *UNUSED(closure))
static PyObject * ViewEdge_viewshape_get(BPy_ViewEdge *self, void *UNUSED(closure))
static PyObject * ViewEdge_qi_get(BPy_ViewEdge *self, void *UNUSED(closure))
static int ViewEdge_last_fedge_set(BPy_ViewEdge *self, PyObject *value, void *UNUSED(closure))
static PyObject * ViewEdge_is_closed_get(BPy_ViewEdge *self, void *UNUSED(closure))
static int ViewEdge_occludee_set(BPy_ViewEdge *self, PyObject *value, void *UNUSED(closure))
static int ViewEdge_init(BPy_ViewEdge *self, PyObject *args, PyObject *kwds)
static int ViewEdge_id_set(BPy_ViewEdge *self, PyObject *value, void *UNUSED(closure))
static PyObject * ViewEdge_occludee_get(BPy_ViewEdge *self, void *UNUSED(closure))
static PyObject * ViewEdge_last_viewvertex_get(BPy_ViewEdge *self, void *UNUSED(closure))
static PyMethodDef BPy_ViewEdge_methods[]
static int ViewEdge_first_viewvertex_set(BPy_ViewEdge *self, PyObject *value, void *UNUSED(closure))
static int ViewEdge_nature_set(BPy_ViewEdge *self, PyObject *value, void *UNUSED(closure))
PyDoc_STRVAR(ViewEdge_doc, "Class hierarchy: :class:`Interface1D` > :class:`ViewEdge`\n" "\n" "Class defining a ViewEdge. A ViewEdge in an edge of the image graph.\n" "it connects two :class:`ViewVertex` objects. It is made by connecting\n" "a set of FEdges.\n" "\n" ".. method:: __init__()\n" " __init__(brother)\n" "\n" " Builds a :class:`ViewEdge` using the default constructor or the copy constructor.\n" "\n" " :arg brother: A ViewEdge object.\n" " :type brother: :class:`ViewEdge`")
static int ViewEdge_first_fedge_set(BPy_ViewEdge *self, PyObject *value, void *UNUSED(closure))
static PyObject * ViewEdge_chaining_time_stamp_get(BPy_ViewEdge *self, void *UNUSED(closure))
static int ViewEdge_viewshape_set(BPy_ViewEdge *self, PyObject *value, void *UNUSED(closure))
PyTypeObject ViewEdge_Type
#define BPy_ViewShape_Check(v)
#define BPy_ViewVertex_Check(v)
ATTR_WARN_UNUSED_RESULT const BMVert * v