/[fenfire]/fenfire/org/fenfire/spanimages/gl/PaperMaker.java
ViewVC logotype

Diff of /fenfire/org/fenfire/spanimages/gl/PaperMaker.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by tjl, Mon Jun 23 12:30:42 2003 UTC revision 1.3 by tjl, Sat Nov 8 19:45:09 2003 UTC
# Line 28  package org.fenfire.spanimages.gl; Line 28  package org.fenfire.spanimages.gl;
28  import java.io.File;  import java.io.File;
29  import org.nongnu.libvob.gl.*;  import org.nongnu.libvob.gl.*;
30  import org.nongnu.libvob.memory.*;  import org.nongnu.libvob.memory.*;
31    import org.fenfire.functional.PureFunction;
32    import org.fenfire.util.Pair;
33    
34  public interface PaperMaker {  /** A function that, given a singleimage and a texgen,
35      Paper makePaper(SingleImage img, float[] texgen);   * return a org.nongnu.libvob.gl.Paper.
36     * Because this is a dyadic function, the makePaper() call
37     * is also provided separately. The calls
38     *
39     *      c = paperMaker.makePaper(a, b);
40     *
41     * and
42     *      c = (Paper) paperMaker.f(new Pair(a,b));
43     *
44     * are equivalent.
45     * <p>
46     * The different implementations of this class can choose
47     * to use different ways to filter the texture, different
48     * backgrounds (using libpaper) etc.
49     */
50    public abstract class  PaperMaker implements PureFunction {
51    
52        /** Make a Paper object which contains the texture
53         * in the given SingleImage, with the given texgen.
54         */
55        public abstract Paper makePaper(SingleImage img, float[] texgen);
56    
57        public Object f(Object o) {
58            Pair p = (Pair)o;
59            return makePaper((SingleImage)p.first, (float[])p.second);
60        }
61  }  }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26