heading = forwardDirection + rotationDegrees (was Re: How can we
deal with Message rot?)
Bert Freudenberg
bert at freudenbergs.de
Wed Dec 27 14:14:12 UTC 2006
On Dec 27, 2006, at 6:36 , Jerome Peace wrote:
> more details of the heading etc. confusion
> can be found mantis
>
> http://bugs.impara.de/view.php?id=5674
>
> 0005674: Why doesn't heading = forwardDirection +
> rotationDegrees for all morphs all the time?
As far as I know, rotation and animation (that is, LOGO-style turtle
semantics) is only seriously used in Etoys. For most other UI users
it's merely a gimmick, so you would not need to worry about backwards
compatibility too much. Etoys uses a very small set of messages
(manifest in the Player class). As long as you ensure this small
protocol does not break, Etoys should be fine.
Now, Player is very careful to always figure out the "right" morph to
apply rotations to, depending on whether it wants to be "flexed" (in
a TransformMorph) or if it handles rotation itself etc. This is why
you see inconsistent behavior in the individual morph classes - in
Etoys they are not used directly, but through the Player, and this is
why your equation does not hold for each individual morph. I think
you would have to eliminate TransformMorph completely, which might
complicate other Morphs - until now, that "ugly" transformation stuff
was factored out.
- Bert -
More information about the Squeak-dev
mailing list
|