9 #include "../BPy_Convert.h"
10 #include "../BPy_Nature.h"
11 #include "../Interface1D/BPy_ViewEdge.h"
24 "Class hierarchy: :class:`Interface0D` > :class:`ViewVertex`\n"
26 "Class to define a view vertex. A view vertex is a feature vertex\n"
27 "corresponding to a point of the image graph, where the characteristics\n"
28 "of an edge (e.g., nature and visibility) might change. A\n"
29 ":class:`ViewVertex` can be of two kinds: A :class:`TVertex` when it\n"
30 "corresponds to the intersection between two ViewEdges or a\n"
31 ":class:`NonTVertex` when it corresponds to a vertex of the initial\n"
32 "input mesh (it is the case for vertices such as corners for example).\n"
33 "Thus, this class can be specialized into two classes, the\n"
34 ":class:`TVertex` class and the :class:`NonTVertex` class.");
38 PyErr_SetString(PyExc_TypeError,
"cannot instantiate abstract class");
43 ".. method:: edges_begin()\n"
45 " Returns an iterator over the ViewEdges that goes to or comes from\n"
46 " this ViewVertex pointing to the first ViewEdge of the list. The\n"
47 " orientedViewEdgeIterator allows to iterate in CCW order over these\n"
48 " ViewEdges and to get the orientation for each ViewEdge\n"
49 " (incoming/outgoing).\n"
51 " :return: An orientedViewEdgeIterator pointing to the first ViewEdge.\n"
52 " :rtype: :class:`orientedViewEdgeIterator`");
61 ".. method:: edges_end()\n"
63 " Returns an orientedViewEdgeIterator over the ViewEdges around this\n"
64 " ViewVertex, pointing after the last ViewEdge.\n"
66 " :return: An orientedViewEdgeIterator pointing after the last ViewEdge.\n"
67 " :rtype: :class:`orientedViewEdgeIterator`");
75 PyErr_SetString(PyExc_NotImplementedError,
"edges_end method currently disabled");
81 ".. method:: edges_iterator(edge)\n"
83 " Returns an orientedViewEdgeIterator pointing to the ViewEdge given\n"
86 " :arg edge: A ViewEdge object.\n"
87 " :type edge: :class:`ViewEdge`\n"
88 " :return: An orientedViewEdgeIterator pointing to the given ViewEdge.\n"
89 " :rtype: :class:`orientedViewEdgeIterator`");
93 static const char *kwlist[] = {
"edge",
nullptr};
96 if (PyArg_ParseTupleAndKeywords(args, kwds,
"O!", (
char **)kwlist, &
ViewEdge_Type, &py_ve)) {
109 METH_VARARGS | METH_KEYWORDS,
110 ViewVertex_edges_iterator_doc},
111 {
nullptr,
nullptr, 0,
nullptr},
117 "The nature of this ViewVertex.\n"
119 ":type: :class:`Nature`");
124 if (PyErr_Occurred()) {
133 PyErr_SetString(PyExc_TypeError,
"value must be a Nature");
136 self->vv->setNature(PyLong_AsLong((PyObject *)&((
BPy_Nature *)value)->i));
144 ViewVertex_nature_doc,
146 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
151 PyVarObject_HEAD_INIT(
nullptr, 0)
"ViewVertex",
169 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
PyObject * BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator(ViewVertexInternal::orientedViewEdgeIterator &ove_it, bool reversed)
PyObject * BPy_Nature_from_Nature(unsigned short n)
PyTypeObject Interface0D_Type
#define BPy_Nature_Check(v)
PyTypeObject ViewEdge_Type
static PyMethodDef BPy_ViewVertex_methods[]
PyDoc_STRVAR(ViewVertex_doc, "Class hierarchy: :class:`Interface0D` > :class:`ViewVertex`\n" "\n" "Class to define a view vertex. A view vertex is a feature vertex\n" "corresponding to a point of the image graph, where the characteristics\n" "of an edge (e.g., nature and visibility) might change. A\n" ":class:`ViewVertex` can be of two kinds: A :class:`TVertex` when it\n" "corresponds to the intersection between two ViewEdges or a\n" ":class:`NonTVertex` when it corresponds to a vertex of the initial\n" "input mesh (it is the case for vertices such as corners for example).\n" "Thus, this class can be specialized into two classes, the\n" ":class:`TVertex` class and the :class:`NonTVertex` class.")
static int ViewVertex_init(BPy_ViewVertex *, PyObject *, PyObject *)
static PyObject * ViewVertex_nature_get(BPy_ViewVertex *self, void *UNUSED(closure))
PyTypeObject ViewVertex_Type
static int ViewVertex_nature_set(BPy_ViewVertex *self, PyObject *value, void *UNUSED(closure))
static PyObject * ViewVertex_edges_begin(BPy_ViewVertex *self)
static PyGetSetDef BPy_ViewVertex_getseters[]
static PyObject * ViewVertex_edges_end(BPy_ViewVertex *)
static PyObject * ViewVertex_edges_iterator(BPy_ViewVertex *self, PyObject *args, PyObject *kwds)
unsigned short VertexNature