66 lines
1.9 KiB
Java
66 lines
1.9 KiB
Java
/*
|
|
VobSet.java
|
|
*
|
|
* Copyright (c) 2001, Ted Nelson and Tuomas Lukka
|
|
*
|
|
* You may use and distribute under the terms of either the GNU Lesser
|
|
* General Public License, either version 2 of the license or,
|
|
* at your choice, any later version. Alternatively, you may use and
|
|
* distribute under the terms of the XPL.
|
|
*
|
|
* See the LICENSE.lgpl and LICENSE.xpl files for the specific terms of
|
|
* the licenses.
|
|
*
|
|
* This software is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the README
|
|
* file for more details.
|
|
*
|
|
*/
|
|
/*
|
|
* Written by Benjamin Fallenstein
|
|
*/
|
|
package org.gzigzag;
|
|
import java.util.*;
|
|
import java.awt.*;
|
|
|
|
/** A VobSet.
|
|
* This extends Vob in order to get interpolated. XXX is this right?
|
|
*/
|
|
|
|
public class VobSet extends Vob {
|
|
public static final String rcsid = "$Id: VobSet.java,v 1.1 2001/01/20 08:56:19 bfallenstein Exp $";
|
|
|
|
public static final boolean dbg = true;
|
|
private static final void p(String s) { if(dbg) System.out.println(s); }
|
|
private static final void pa(String s) { System.out.println(s); }
|
|
|
|
public VobStore store;
|
|
|
|
public ZZCell applitude;
|
|
public static ZZCell getApplitude(Vob vob) { return null; }
|
|
|
|
public void add(Vob vob, int vx, int vy, int vd) {
|
|
store.add(vob, vx+x, vy+y, vd+d, this);
|
|
}
|
|
|
|
public void add(Connection c, Vob from, Vob to) {
|
|
store.add(c, from, to, this);
|
|
}
|
|
|
|
/** Add a vob as a connection, i.e. in the middle between two other vobs.
|
|
* XXX how?
|
|
*/
|
|
public void add(Vob vob, Vob from, Vob to) {
|
|
}
|
|
|
|
public void add(Decoration d) {
|
|
store.add(d);
|
|
}
|
|
|
|
public int getX(Vob v) { return v.x - x; }
|
|
public int getY(Vob v) { return v.y - y; }
|
|
public int getD(Vob v) { return v.d - d; }
|
|
public int[] getCoords(Vob v) { return new int[] { v.x-x, v.y-y, v.d-d }; }
|
|
|
|
} |