A
Andrew Thompson
I have been trying, unsuccessfully over the last few days,
to create a custom AffineTransfrom that creates the effect
of seeing a flat surface at an angle, a 'perspective view'.
My efforts so far have been abysmal. I tried extending
AffineTransform
and overriding the transform(Point2D,Point2D) method, but is was
not getting called.. I went on to override every single transform()
method I could find, but *none* of them are getting called.
Questions.
1) Is it possible to create a perspective view of an object using
just (the inbuilt transforms) shear, scale, translate..?
(I'm thinking 'no'.)
2) Is an AffineTransform the way to go with this, or am I missing
how they are supposed to be used?
3) Does anybody have an insight into why my overridden methods
were not getting called? (Yes, yes. I know a code example could
help here, but I am hoping there is something I missed that another
person has solved previously.)
to create a custom AffineTransfrom that creates the effect
of seeing a flat surface at an angle, a 'perspective view'.
My efforts so far have been abysmal. I tried extending
AffineTransform
and overriding the transform(Point2D,Point2D) method, but is was
not getting called.. I went on to override every single transform()
method I could find, but *none* of them are getting called.
Questions.
1) Is it possible to create a perspective view of an object using
just (the inbuilt transforms) shear, scale, translate..?
(I'm thinking 'no'.)
2) Is an AffineTransform the way to go with this, or am I missing
how they are supposed to be used?
3) Does anybody have an insight into why my overridden methods
were not getting called? (Yes, yes. I know a code example could
help here, but I am hoping there is something I missed that another
person has solved previously.)