[Cuis-dev] Question on Morphic coordinates and transforms
Thierry Goubier
thierry.goubier at gmail.com
Sun Dec 22 08:01:43 PST 2019
Hi Ken,
thanks, I noticed that coordinates are local to the morph origin.
But I see code where they are local to the owner origin (and hence the
reason for Morph>>#externalize, Morph>>#internalize); this also shows
up in the event processing (where you have all those methods with an
additional parameter, #localPoint:) and in
Morph>>#containsPoint:event: where you have a call to #internalize:...
Or is that the Morphic API does not properly isolate the programmer
from the specifics of the coordinate system used? The API should take
care of all the internalize/externalize, right?
At the moment, I'm writing quite a lot of code where I have to
remember to add all those externalize / internalize calls all over the
place. And I have the feeling I should not have to do that.
Thierry
Le dim. 22 déc. 2019 à 16:48, <ken.dickey at whidbey.com> a écrit :
>
> On 2019-12-22 07:16, Thierry Goubier via Cuis-dev wrote:
> > Dear Cuis-er,
> >
> > I'm finding the Cuis Morphic coordinate system interesting, and I want
> > a suggestion: what code convention do you use to remember your points
> > are:
> > - in the world coordinate system,
> > - in the owner coordinate system,
> > - in the morph instance coordinate system
> > - in another referential than the three above (the owner owner
> > coordinate system, for example) ?
> >
> > Regards,
> >
> > Thierry
>
> SImple.
>
> All morph coordinate locations are relative to their container.
>
> FYI,
> -KenD
More information about the Cuis-dev
mailing list