23 #include "../BPy_Convert.h"
24 #include "../BPy_Nature.h"
25 #include "../Interface1D/BPy_ViewEdge.h"
38 "Class hierarchy: :class:`Interface0D` > :class:`ViewVertex`\n"
40 "Class to define a view vertex. A view vertex is a feature vertex\n"
41 "corresponding to a point of the image graph, where the characteristics\n"
42 "of an edge (e.g., nature and visibility) might change. A\n"
43 ":class:`ViewVertex` can be of two kinds: A :class:`TVertex` when it\n"
44 "corresponds to the intersection between two ViewEdges or a\n"
45 ":class:`NonTVertex` when it corresponds to a vertex of the initial\n"
46 "input mesh (it is the case for vertices such as corners for example).\n"
47 "Thus, this class can be specialized into two classes, the\n"
48 ":class:`TVertex` class and the :class:`NonTVertex` class.");
52 PyErr_SetString(PyExc_TypeError,
"cannot instantiate abstract class");
57 ".. method:: edges_begin()\n"
59 " Returns an iterator over the ViewEdges that goes to or comes from\n"
60 " this ViewVertex pointing to the first ViewEdge of the list. The\n"
61 " orientedViewEdgeIterator allows to iterate in CCW order over these\n"
62 " ViewEdges and to get the orientation for each ViewEdge\n"
63 " (incoming/outgoing).\n"
65 " :return: An orientedViewEdgeIterator pointing to the first ViewEdge.\n"
66 " :rtype: :class:`orientedViewEdgeIterator`");
75 ".. method:: edges_end()\n"
77 " Returns an orientedViewEdgeIterator over the ViewEdges around this\n"
78 " ViewVertex, pointing after the last ViewEdge.\n"
80 " :return: An orientedViewEdgeIterator pointing after the last ViewEdge.\n"
81 " :rtype: :class:`orientedViewEdgeIterator`");
89 PyErr_SetString(PyExc_NotImplementedError,
"edges_end method currently disabled");
95 ".. method:: edges_iterator(edge)\n"
97 " Returns an orientedViewEdgeIterator pointing to the ViewEdge given\n"
100 " :arg edge: A ViewEdge object.\n"
101 " :type edge: :class:`ViewEdge`\n"
102 " :return: An orientedViewEdgeIterator pointing to the given ViewEdge.\n"
103 " :rtype: :class:`orientedViewEdgeIterator`");
107 static const char *kwlist[] = {
"edge",
nullptr};
110 if (PyArg_ParseTupleAndKeywords(args, kwds,
"O!", (
char **)kwlist, &
ViewEdge_Type, &py_ve)) {
123 METH_VARARGS | METH_KEYWORDS,
124 ViewVertex_edges_iterator_doc},
125 {
nullptr,
nullptr, 0,
nullptr},
131 "The nature of this ViewVertex.\n"
133 ":type: :class:`Nature`");
138 if (PyErr_Occurred()) {
147 PyErr_SetString(PyExc_TypeError,
"value must be a Nature");
150 self->vv->setNature(PyLong_AsLong((PyObject *)&((
BPy_Nature *)value)->i));
158 ViewVertex_nature_doc,
160 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
165 PyVarObject_HEAD_INIT(
nullptr, 0)
"ViewVertex",
183 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