Canvas>>render:

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Canvas>>render:

Stéphane Ducasse
Hi

I have the impression that we could remove this method and friends since it definition on FormCanvas is

render: anObject
        "Do some 3D operations with the object if possible"
        ^self asBalloonCanvas render: anObject

But BalloonCanvas does not implement render:

and
Canvas>>render: anObject
        "Do some 3D operations with the object if possible"

is a nop.

Stef
Reply | Threaded
Open this post in threaded view
|

Re: Canvas>>render:

Igor Stasenko
it looks like a double-dispatch pattern, same as draw/drawOn: .
Its of course completely useless unless you have objects capable of rendering.

Also, i'm not sure that crossing 2D -> 3D could be done so easily and
painless as this method proposing..
and i'm not sure that mixing them is a good idea:
 - original canvas operating at bitmap level
 - 3d canvas operating at triangle/mesh level(s)


On 7 February 2011 22:36, Stéphane Ducasse <[hidden email]> wrote:

> Hi
>
> I have the impression that we could remove this method and friends since it definition on FormCanvas is
>
> render: anObject
>        "Do some 3D operations with the object if possible"
>        ^self asBalloonCanvas render: anObject
>
> But BalloonCanvas does not implement render:
>
> and
> Canvas>>render: anObject
>        "Do some 3D operations with the object if possible"
>
> is a nop.
>
> Stef
>



--
Best regards,
Igor Stasenko AKA sig.

Reply | Threaded
Open this post in threaded view
|

Re: Canvas>>render:

Stéphane Ducasse
Yes this was my impression too.

Stef

On Feb 8, 2011, at 12:47 AM, Igor Stasenko wrote:

> it looks like a double-dispatch pattern, same as draw/drawOn: .
> Its of course completely useless unless you have objects capable of rendering.
>
> Also, i'm not sure that crossing 2D -> 3D could be done so easily and
> painless as this method proposing..
> and i'm not sure that mixing them is a good idea:
> - original canvas operating at bitmap level
> - 3d canvas operating at triangle/mesh level(s)
>
>
> On 7 February 2011 22:36, Stéphane Ducasse <[hidden email]> wrote:
>> Hi
>>
>> I have the impression that we could remove this method and friends since it definition on FormCanvas is
>>
>> render: anObject
>>       "Do some 3D operations with the object if possible"
>>       ^self asBalloonCanvas render: anObject
>>
>> But BalloonCanvas does not implement render:
>>
>> and
>> Canvas>>render: anObject
>>       "Do some 3D operations with the object if possible"
>>
>> is a nop.
>>
>> Stef
>>
>
>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>