gzz-dev
[Top][All Lists]
Advanced

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

[Gzz] View2D enhancing.


From: Matti Katila
Subject: [Gzz] View2D enhancing.
Date: Tue, 8 Jul 2003 01:19:02 +0300 (EEST)

Hi boys and girls,


I run into problems with View2D. I would like to make it use faster way 
to change scene i.e., through setParams. As you already know we have more 
than one main node with FenPDF. I have made a simple interface to change 
scene's parameters but it doesn't work because no one keeps track of all 
possible coordinate systems since recursive view2ds can be just one 
instance in the whole view. 

So can we add a new parameter to View2D?

    public abstract void render(VobScene vs, 
-               Object plane,
+               Object plane, Object key,
                int matchingParent,
                    int box2screen, int box2plane
                        );


With this change and simple helper class:


/** Very simple util to save integer in map.
 */
public class CoordsysCache {
    private Map coords = new WeakHashMap(10);
    public void set(Object key, int cs) {
        coords.put(key, new Integer(cs));
    }
    
    public int get(Object key) {
        return ((Integer)coords.get(key)).intValue();
    }
}


We could use setParams easily and make things faster.


   -Matti





reply via email to

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