23 #include "../BPy_Convert.h"
24 #include "../BPy_Id.h"
25 #include "../BPy_Nature.h"
26 #include "../BPy_ViewShape.h"
27 #include "../Interface0D/BPy_ViewVertex.h"
28 #include "../Interface1D/BPy_FEdge.h"
29 #include "../Interface1D/BPy_ViewEdge.h"
43 "Class hierarchy: :class:`Interface1D` > :class:`ViewEdge`\n"
45 "Class defining a ViewEdge. A ViewEdge in an edge of the image graph.\n"
46 "it connects two :class:`ViewVertex` objects. It is made by connecting\n"
49 ".. method:: __init__()\n"
50 " __init__(brother)\n"
52 " Builds a :class:`ViewEdge` using the default constructor or the copy constructor.\n"
54 " :arg brother: A ViewEdge object.\n"
55 " :type brother: :class:`ViewEdge`");
59 static const char *kwlist[] = {
"brother",
nullptr};
60 PyObject *brother =
nullptr;
62 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"|O!", (
char **)kwlist, &
ViewEdge_Type, &brother)) {
71 self->py_if1D.if1D =
self->ve;
72 self->py_if1D.borrowed =
false;
77 ".. method:: update_fedges()\n"
79 " Sets Viewedge to this for all embedded fedges.\n");
83 self->ve->UpdateFEdges();
91 ViewEdge_update_fedges_doc},
92 {
nullptr,
nullptr, 0,
nullptr},
98 "The first ViewVertex.\n"
100 ":type: :class:`ViewVertex`");
123 "The second ViewVertex.\n"
125 ":type: :class:`ViewVertex`");
146 "The first FEdge that constitutes this ViewEdge.\n"
148 ":type: :class:`FEdge`");
152 FEdge *fe =
self->ve->fedgeA();
164 self->ve->setFEdgeA(((
BPy_FEdge *)value)->fe);
169 "The last FEdge that constitutes this ViewEdge.\n"
171 ":type: :class:`FEdge`");
175 FEdge *fe =
self->ve->fedgeB();
187 self->ve->setFEdgeB(((
BPy_FEdge *)value)->fe);
192 "The ViewShape to which this ViewEdge belongs to.\n"
194 ":type: :class:`ViewShape`");
215 "The shape that is occluded by the ViewShape to which this ViewEdge\n"
216 "belongs to. If no object is occluded, this property is set to None.\n"
218 ":type: :class:`ViewShape`");
239 "True if this ViewEdge forms a closed loop.\n"
249 "The Id of this ViewEdge.\n"
251 ":type: :class:`Id`");
262 PyErr_SetString(PyExc_TypeError,
"value must be an Id");
265 self->ve->setId(*(((
BPy_Id *)value)->
id));
270 "The nature of this ViewEdge.\n"
272 ":type: :class:`Nature`");
282 PyErr_SetString(PyExc_TypeError,
"value must be a Nature");
285 self->ve->setNature(PyLong_AsLong((PyObject *)&((
BPy_Nature *)value)->i));
290 "The quantitative invisibility.\n"
296 return PyLong_FromLong(
self->ve->qi());
303 if ((qi = PyLong_AsLong(value)) == -1 && PyErr_Occurred()) {
311 "The time stamp of this ViewEdge.\n"
317 return PyLong_FromLong(
self->ve->getChainingTimeStamp());
326 if ((timestamp = PyLong_AsLong(value)) == -1 && PyErr_Occurred()) {
329 self->ve->setChainingTimeStamp(timestamp);
337 ViewEdge_first_viewvertex_doc,
342 ViewEdge_last_viewvertex_doc,
347 ViewEdge_first_fedge_doc,
352 ViewEdge_last_fedge_doc,
357 ViewEdge_viewshape_doc,
362 ViewEdge_occludee_doc,
367 ViewEdge_is_closed_doc,
376 {
"chaining_time_stamp",
379 ViewEdge_chaining_time_stamp_doc,
381 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
387 PyVarObject_HEAD_INIT(
nullptr, 0)
"ViewEdge",
405 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