128 |
} |
} |
129 |
} |
} |
130 |
|
|
|
/** Set a map from keys of this vobcoorder to keys of the |
|
|
* one being interpolated to this. |
|
|
* Useful for specifying e.g. buoy interpolation. |
|
|
*/ |
|
|
public void setKeyMap(Map m) { |
|
|
keymap = m; |
|
|
} |
|
|
|
|
131 |
/** Map a key to a key of the other interpolating |
/** Map a key to a key of the other interpolating |
132 |
* vobmatcher. |
* vobmatcher. |
133 |
*/ |
*/ |
138 |
return o; |
return o; |
139 |
} |
} |
140 |
|
|
141 |
public int[] interpList(VobMatcher other0) { |
public int[] interpList(VobMatcher other0, boolean towardsOther) { |
142 |
DefaultVobMatcher other = (DefaultVobMatcher)other0; |
DefaultVobMatcher other = (DefaultVobMatcher)other0; |
143 |
int[] interpList = new int[maxcs+1]; |
int[] interpList = new int[maxcs+1]; |
144 |
if(dbg) pa("interplist: "+interpList[0]); |
if(dbg) pa("interplist: "+interpList[0]); |
154 |
// XXX assumes that parent is set already |
// XXX assumes that parent is set already |
155 |
int other_parent = interpList[k.parent]; |
int other_parent = interpList[k.parent]; |
156 |
|
|
157 |
// KLUDGE! |
Object mappedKey = k.key; |
|
Object mappedKey ; |
|
|
if(other == this) |
|
|
mappedKey = k.key; |
|
|
else |
|
|
mappedKey = mapkey(k.key); |
|
158 |
Key other_key = new Key(mappedKey, other_parent); |
Key other_key = new Key(mappedKey, other_parent); |
159 |
interpList[i] = other.getCSByKeyObject(other_key); |
interpList[i] = other.getCSByKeyObject(other_key); |
160 |
|
|