Hi all,
I’m working on a sketch where a Cell
class needs to inherit both from Toxiclibs’ VerletParticle()
and Hemesh WB_Point()
. Ideally I would like the Cell object to share specific attributes from the two libraries (WB_Point connected by VerletSprings).
Is that possible in Python mode ?
With other Processing libraries I used to write something like this:
class Cell(VerletParticle2D, Locatable):
def __init__(self, x, y):
super(Cell, self).__init__(x, y)
self.isActive = False
def getLocation(self):
return PVector(self.x(), self.y())
but this time, class Cell(VerletParticle2D, WB_Point)
returns the following error:
processing.app.SketchException: TypeError: Error when calling the metaclass bases no multiple inheritance for Java classes: toxi.physics2d.VerletParticle2D and wblut.geom.WB_Point
at jycessing.mode.run.SketchRunner.convertPythonSketchError(SketchRunner.java:242)
at jycessing.mode.run.SketchRunner.lambda$2(SketchRunner.java:119)
at java.lang.Thread.run(Thread.java:748)
Is there a way to get around this error ?