2 |
Vob.java |
Vob.java |
3 |
* |
* |
4 |
* Copyright (c) 2000-2001, Ted Nelson and Tuomas Lukka |
* Copyright (c) 2000-2001, Ted Nelson and Tuomas Lukka |
5 |
|
* Copyright (c) 2003 Tuomas Lukka |
6 |
* |
* |
7 |
* This file is part of Gzz. |
* This file is part of Libvob. |
8 |
* |
* |
9 |
* Gzz is free software; you can redistribute it and/or modify it under |
* Libvob is free software; you can redistribute it and/or modify it under |
10 |
* the terms of the GNU Lesser General Public License as published by |
* the terms of the GNU Lesser General Public License as published by |
11 |
* the Free Software Foundation; either version 2 of the License, or |
* the Free Software Foundation; either version 2 of the License, or |
12 |
* (at your option) any later version. |
* (at your option) any later version. |
13 |
* |
* |
14 |
* Gzz is distributed in the hope that it will be useful, but WITHOUT |
* Libvob is distributed in the hope that it will be useful, but WITHOUT |
15 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
16 |
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General |
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General |
17 |
* Public License for more details. |
* Public License for more details. |
18 |
* |
* |
19 |
* You should have received a copy of the GNU Lesser General |
* You should have received a copy of the GNU Lesser General |
20 |
* Public License along with Gzz; if not, write to the Free |
* Public License along with Libvob; if not, write to the Free |
21 |
* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
22 |
* MA 02111-1307 USA |
* MA 02111-1307 USA |
23 |
* |
* |
46 |
* @see VobCoorder |
* @see VobCoorder |
47 |
*/ |
*/ |
48 |
|
|
49 |
public abstract class Vob { |
public interface Vob { |
50 |
public static final String rcsid = "$Id$"; |
String rcsid = "$Id$"; |
51 |
public static boolean dbg = false; |
|
52 |
private static void pa(String s) { System.err.println(s); } |
boolean intersect(int x, int y, RenderInfo info1, RenderInfo info2) ; |
|
|
|
|
public Vob() { |
|
|
} |
|
|
|
|
|
public boolean intersect(int x, int y, RenderInfo info1, |
|
|
RenderInfo info2) { |
|
|
return false; |
|
|
} |
|
53 |
|
|
54 |
/** Renders this vob at the given screen coordinates and in given size. |
/** Renders this vob at the given screen coordinates and in given size. |
55 |
* @param g The graphics context to draw into |
* @param g The graphics context to draw into |
66 |
* @see VobPlacer#put(Vob vob, int depth, int x, int y, int w, int h) |
* @see VobPlacer#put(Vob vob, int depth, int x, int y, int w, int h) |
67 |
* @see RenderInfo |
* @see RenderInfo |
68 |
*/ |
*/ |
69 |
abstract public void render(Graphics g, |
void render(Graphics g, boolean fast, RenderInfo info1, RenderInfo info2) ; |
|
boolean fast, |
|
|
RenderInfo info1, |
|
|
RenderInfo info2 |
|
|
) ; |
|
|
|
|
|
private final void render(Graphics g, |
|
|
boolean fast, |
|
|
boolean foo, |
|
|
RenderInfo info1, |
|
|
RenderInfo info2) { } |
|
|
|
|
|
public final int addToListGL( |
|
|
int[] list, int curs, int coordsys1, |
|
|
int coordsys2) { |
|
|
throw new Error(); |
|
|
} |
|
70 |
|
|
71 |
/** For OpenGL: Add the current vob to the given display list, using |
/** For OpenGL: Add the current vob to the given display list, using |
72 |
* the given coordinate systems. |
* the given coordinate systems. |
74 |
* call vs.put for the components, for "real" GL Vobs, |
* call vs.put for the components, for "real" GL Vobs, |
75 |
* this will return the GL index. |
* this will return the GL index. |
76 |
*/ |
*/ |
77 |
public int putGL(VobScene vs) { |
int putGL(VobScene vs) ; |
78 |
throw new Error("Wrong # coordsys: 0 for " + this); |
int putGL(VobScene vs, int cs1) ; |
79 |
} |
int putGL(VobScene vs, int cs1, int cs2) ; |
80 |
public int putGL(VobScene vs, int cs1) { |
int putGL(VobScene vs, int cs1, int cs2, int cs3) ; |
|
throw new Error("Wrong # coordsys: 1 for " + this); |
|
|
} |
|
|
public int putGL(VobScene vs, int cs1, int cs2) { |
|
|
throw new Error("Wrong # coordsys: 2 for " + this); |
|
|
} |
|
|
public int putGL(VobScene vs, int cs1, int cs2, int cs3) { |
|
|
throw new Error("Wrong # coordsys: 3 for " + this); |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public final int addToListGL(GraphicsAPI.RenderingSurface win, |
|
|
int[] list, int curs, int coordsys1, |
|
|
int coordsys2) { |
|
|
throw new Error(); |
|
|
} |
|
81 |
|
|
82 |
/** An interface which provides information about the current |
/** An interface which provides information about the current |
83 |
* rendering context. |
* rendering context. |