fenfire-dev
[Top][All Lists]
Advanced

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

[Fenfire-dev] Libvob interpolation BUG


From: Benja Fallenstein
Subject: [Fenfire-dev] Libvob interpolation BUG
Date: Wed, 18 Feb 2004 16:25:39 +0200
User-agent: Mozilla Thunderbird 0.5 (X11/20040209)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

- -- Tuomas, can you look at this?

below is a program that shows a Libvob interpolation bug: run it as a
demo and press 'spacebar,' and it moves two little boxes left and right
and shows strange behavior, including but not limited to:

- - not showing one box during interpolation
- - not showing either box during interpolation
- - flickering
- - long black line appearing diagonally across the window

Sometimes it works right, too. Just press spacebar a few more times, and
wait till the animation is complete before pressing again. :)

We (Matti and me) believe the problem is that pointwise interpolation is
used and there's a bug in there. But we don't know what bug.

If you set showBug = 0 in the code, it constructs the scene so that
pointwise interpolation is not used, and alas, the bug doesn't show. [*]

- - Benja

[*] That's why the variable is named that way. [**]

[**] I added this node to annoy Matti, who thinks I'm saying too many
things that are clear already [***] :-)

[***] Matti's probably right.


8<--------8<--------8<--------8<--------8<--------8<--------

import vob, java
from org.nongnu import libvob

rect = libvob.vobs.RectBgVob(java.awt.Color.white, 1, java.awt.Color.black)

showBug = 1

class Scene:
~    def __init__(self):
~        self.state = 0

~    def scene(self, vs):
~        vs.put(background((.8, .4, .9)))

~        x,y = vs.size.getWidth()/2, vs.size.getHeight()/2
~        matchingParent = 0

~        if not self.state:
~            center = vs.coords.translate(matchingParent, x, y)
~            if showBug:
~                node2  = vs.coords.translate(center, 100, 0)
~            else:
~                node2  = vs.coords.translate(matchingParent, x+100, y)

~            vs.matcher.add(0, center, "A")
~            vs.matcher.add(0, node2,  "B")
~        else:
~            center = vs.coords.translate(matchingParent, x, y)
~            if showBug:
~                node2  = vs.coords.translate(center, -100, 0)
~            else:
~                node2  = vs.coords.translate(matchingParent, x-100, y)

~            vs.matcher.add(0, center, "B")
~            vs.matcher.add(0, node2,  "A")

~        for cs in [center, node2]:
~            NODE = vs.orthoBoxCS(cs, "NODE", 0, -25, -10, 1, 1, 50, 20)
~            vs.map.put(rect, NODE)


~    def key(self, k):
~        if k == ' ':
~            self.state = not self.state
~            libvob.AbstractUpdateManager.chg()

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAM3XjUvR5J6wSKPMRAhtMAKCYJFe1whHMn3FnMIWURhWQl01N3wCdHHp3
1OOGvFKJ+6nJlCbOQD5aPls=
=7umY
-----END PGP SIGNATURE-----




reply via email to

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