Added Index as attribute of all voronoi objects for easier debugging

This commit is contained in:
Markus Lampert
2020-09-08 23:27:19 -07:00
committed by sliptonic
parent e3adbc0bf9
commit 3a50f84ba4
6 changed files with 48 additions and 6 deletions

View File

@@ -111,6 +111,14 @@ VoronoiCell* getVoronoiCellFromPy(const VoronoiCellPy *c, PyObject *args = 0) {
return self;
}
Py::Int VoronoiCellPy::getIndex(void) const {
VoronoiCell *c = getVoronoiCellPtr();
if (c->isBound()) {
return Py::Int(c->dia->index(c->ptr));
}
return Py::Int(-1);
}
Py::Long VoronoiCellPy::getColor(void) const {
VoronoiCell *c = getVoronoiCellPtr();
if (c->isBound()) {