anderm18 / GaiNNs

5 stars 1 forks source link

CirclesAndEllipses #42

Open SabreBirdOne opened 2 years ago

SabreBirdOne commented 2 years ago

One thing I noticed when working on the copy constructor of Dragable class, if I were to stretch a Circle in the environment, realistically it becomes an Ellipse. Yet, those changes aren’t reflected in the internal state of the object - specifically the myShapeName field.

So I ended up pasting Circles after copying from Ellipses (internally they are still "circles"). This may happen vice versa. So I’m opening this new issue.

Comment: Honestly subtype polymorphism could have helped us so much here.

SabreBirdOne commented 2 years ago

Also, just how exactly does the team want ellipses to transform back into Circles? The only difference between circles and ellipses are their radiusX and radiusY fields: if radiusX equals radiusY, the Dragable is a circle, else the Dragable is an Ellipse. Users can turn circles into ellipses easily, but since the data are floating points, the user needs impractically high precision to get radiusX to equal radiusY and trigger the change from ellipse to circle.