gzz-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gzz] Abstract Colorable Vob


From: Benja Fallenstein
Subject: Re: [gzz] Abstract Colorable Vob
Date: Mon, 17 Mar 2003 09:46:57 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030311 Debian/1.2.1-10

Tuomas Lukka wrote:
May we want to do this: The prototype vob has a list of solid colors, but we want to have *different* ones on the final vob?

May we want to do this: The prototype vob has a list of solid colors, and we want to have *those and additional others* on the final vob?

I do not see a use case for the first, but can imagine one for the second.

Umm, actually I do see: if you want to change the default background
color, i.e. the one without any cursor/clone/... colors. That's a color
that needs to be replaced.

This is what we have been calling the "background" color, not a "solid" color that I was refering to...

Let's say we have lots of clones, shown as yellow, but few accursed cells, shown as blue, in a scene. Now we could write:

   if(isClone)
       vob = clonePrototype; // yellow solid
   else
       vob = normalPrototype; // no solids

   if(isAccursed)
       vob = vob.cloneColorAdded(Color.blue);

I couldn't use cloneColorReplaced() now without overwriting the color from the prototype.


I'd rather see this as
        if(isClone) {
                replaceColors = false;
                vob = cloneProto;
        } else {
                replaceColors = true;
                vob = normalProto;
        }

        ...

Could you write this out? I don't understand it.

I see where you going, but I'm not yet sure that cloneColorReplaced() is really a good idea-- so far, it seems to me that even with prototypes, cloneColorAdded() works better.

You said that you think cloneColorAdded() is like addToX(float), but I think that this is different because a) you know what 'x' you start with ('no colors'-- or else you have strange behavior anyway, for the nodes rendered without changing the colors), and b) the usual pattern actually *does* make you 'add' things (if(a) add(A); if(b) add(B); etc.).

What color is the vob if there's no solid colors?

The background color.

This would work if there were another attribute for the color
if there's no solid colors...

If there isn't, what color is the vob if there are no solid colors? :-)

- Benja





reply via email to

[Prev in Thread] Current Thread [Next in Thread]