Unified voronoi indices for python to be of type long

This commit is contained in:
Markus Lampert
2020-09-29 12:54:57 -07:00
committed by sliptonic
parent d29b2dcd3f
commit 68fecf9a90
6 changed files with 18 additions and 18 deletions

View File

@@ -20,19 +20,19 @@
<Documentation>
<UserDocu>Internal id of the element.</UserDocu>
</Documentation>
<Parameter Name="Index" Type="Int"/>
<Parameter Name="Index" Type="Long"/>
</Attribute>
<Attribute Name="Color" ReadOnly="false">
<Documentation>
<UserDocu>Assigned color of the receiver.</UserDocu>
</Documentation>
<Parameter Name="Color" Type="Int"/>
<Parameter Name="Color" Type="Long"/>
</Attribute>
<Attribute Name="SourceIndex" ReadOnly="true">
<Documentation>
<UserDocu>Returns the index of the cell's source</UserDocu>
</Documentation>
<Parameter Name="SourceIndex" Type="Int"/>
<Parameter Name="SourceIndex" Type="Long"/>
</Attribute>
<Attribute Name="SourceCategory" ReadOnly="true">
<Documentation>

View File

@@ -111,12 +111,12 @@ VoronoiCell* getVoronoiCellFromPy(const VoronoiCellPy *c, PyObject *args = 0) {
return self;
}
Py::Int VoronoiCellPy::getIndex(void) const {
Py::Long VoronoiCellPy::getIndex(void) const {
VoronoiCell *c = getVoronoiCellPtr();
if (c->isBound()) {
return Py::Int(c->dia->index(c->ptr));
return Py::Long(c->dia->index(c->ptr));
}
return Py::Int(-1);
return Py::Long(-1);
}
Py::Long VoronoiCellPy::getColor(void) const {
@@ -131,10 +131,10 @@ void VoronoiCellPy::setColor(Py::Long color) {
getCellFromPy(this)->color(int(color) & Voronoi::ColorMask);
}
Py::Int VoronoiCellPy::getSourceIndex(void) const
Py::Long VoronoiCellPy::getSourceIndex(void) const
{
VoronoiCell *c = getVoronoiCellFromPy(this);
return Py::Int(c->ptr->source_index());
return Py::Long(c->ptr->source_index());
}
Py::Int VoronoiCellPy::getSourceCategory(void) const

View File

@@ -20,13 +20,13 @@
<Documentation>
<UserDocu>Internal id of the element.</UserDocu>
</Documentation>
<Parameter Name="Index" Type="Int"/>
<Parameter Name="Index" Type="Long"/>
</Attribute>
<Attribute Name="Color" ReadOnly="false">
<Documentation>
<UserDocu>Assigned color of the receiver.</UserDocu>
</Documentation>
<Parameter Name="Color" Type="Int"/>
<Parameter Name="Color" Type="Long"/>
</Attribute>
<Attribute Name="Cell" ReadOnly="true">
<Documentation>

View File

@@ -130,12 +130,12 @@ VoronoiEdge* getVoronoiEdgeFromPy(const VoronoiEdgePy *e, PyObject *args = 0) {
return self;
}
Py::Int VoronoiEdgePy::getIndex(void) const {
Py::Long VoronoiEdgePy::getIndex(void) const {
VoronoiEdge *e = getVoronoiEdgePtr();
if (e->isBound()) {
return Py::Int(e->dia->index(e->ptr));
return Py::Long(e->dia->index(e->ptr));
}
return Py::Int(-1);
return Py::Long(-1);
}
Py::Long VoronoiEdgePy::getColor(void) const {

View File

@@ -20,13 +20,13 @@
<Documentation>
<UserDocu>Internal id of the element.</UserDocu>
</Documentation>
<Parameter Name="Index" Type="Int"/>
<Parameter Name="Index" Type="Long"/>
</Attribute>
<Attribute Name="Color" ReadOnly="false">
<Documentation>
<UserDocu>Assigned color of the receiver.</UserDocu>
</Documentation>
<Parameter Name="Color" Type="Int"/>
<Parameter Name="Color" Type="Long"/>
</Attribute>
<Attribute Name="X" ReadOnly="true">
<Documentation>

View File

@@ -113,12 +113,12 @@ VoronoiVertex* getVoronoiVertexFromPy(const VoronoiVertexPy *v, PyObject *args =
}
Py::Int VoronoiVertexPy::getIndex(void) const {
Py::Long VoronoiVertexPy::getIndex(void) const {
VoronoiVertex *v = getVoronoiVertexPtr();
if (v->isBound()) {
return Py::Int(v->dia->index(v->ptr));
return Py::Long(v->dia->index(v->ptr));
}
return Py::Int(-1);
return Py::Long(-1);
}
Py::Long VoronoiVertexPy::getColor(void) const {