I'm using a Processing library to build my project in Java. I use a function that returns me an object of type PShape (which I don't have access to source).
I need to make this object of type Shape (a class I designed that extends PShape).
How can I make that?
Basically I have:
PShape pShape = loadShape(filename);
Where loadShape is a function I don't have access to source code.
I want to somehow do:
class Shape extends PShape {...}
and then
Shape shape = (Shape) loadShape(filename);
But it won't work, once loadShape() will give me a PShape, not a Shape
How can I make loadShape returns a Shape?
Thank you