org.fenfire.loom
Class LoomVobMatcher

java.lang.Object
  |
  +--org.fenfire.loom.LoomVobMatcher

public class LoomVobMatcher
extends java.lang.Object

A VobMatcher that knows about Loom-like connections.


Field Summary
protected  int[] cs1
           
protected  int[] cs2
           
static boolean dbg
           
protected  int focus
           
protected  java.lang.Object[] key
           
protected  VobMatcher m
           
protected  int maxCS
           
protected  int nextFocus
           
protected  int size
           
protected  int[] treedir
          if positive, link is cs1 --> cs2 in the tree
 
Constructor Summary
LoomVobMatcher()
           
 
Method Summary
 int add(int into, int cs, java.lang.Object key)
           
 int add(int cs, java.lang.Object key)
           
protected  void ensureSize(int want)
           
 int getCS(int parent, java.lang.Object key)
           
 int getCS(java.lang.Object key)
           
 int getFocus()
           
 java.lang.Object getKey(int cs)
           
 int getLink(int from, int dir, java.lang.Object childKey, java.lang.Object linkKey)
           
 int getLinkDirTo(int cs)
           
 java.lang.Object getLinkKeyTo(int cs)
           
 int getLinkParent(int cs)
           
 int getParent(int cs)
           
 int[] interpList(VobMatcher other, boolean towardsOther)
           
 boolean isAncestor(int cs, int ancestor)
           
 void link(int parent, int dir, int child, java.lang.Object linkKey)
          Indicate that two coordinate systems are linked in a way indicated by key.
protected  VobMatcher makeMatcher()
           
 void setFocus(int focus)
           
 void setNextFocus(int nextFocus)
           
protected  void traverse(int parent, int cs, VobMatcher into)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dbg

public static boolean dbg

m

protected VobMatcher m

size

protected int size

cs1

protected int[] cs1

key

protected java.lang.Object[] key

cs2

protected int[] cs2

treedir

protected int[] treedir
if positive, link is cs1 --> cs2 in the tree


focus

protected int focus

nextFocus

protected int nextFocus

maxCS

protected int maxCS
Constructor Detail

LoomVobMatcher

public LoomVobMatcher()
Method Detail

setFocus

public void setFocus(int focus)

getFocus

public int getFocus()

link

public void link(int parent,
                 int dir,
                 int child,
                 java.lang.Object linkKey)
Indicate that two coordinate systems are linked in a way indicated by key. The connections must form an acyclic graph. If it's not, you'll get an infinite loop!


setNextFocus

public void setNextFocus(int nextFocus)

getLink

public int getLink(int from,
                   int dir,
                   java.lang.Object childKey,
                   java.lang.Object linkKey)

getLinkParent

public int getLinkParent(int cs)

getLinkKeyTo

public java.lang.Object getLinkKeyTo(int cs)

getLinkDirTo

public int getLinkDirTo(int cs)

traverse

protected void traverse(int parent,
                        int cs,
                        VobMatcher into)

makeMatcher

protected VobMatcher makeMatcher()

add

public int add(int cs,
               java.lang.Object key)

add

public int add(int into,
               int cs,
               java.lang.Object key)

getCS

public int getCS(java.lang.Object key)

getCS

public int getCS(int parent,
                 java.lang.Object key)

getParent

public int getParent(int cs)

isAncestor

public boolean isAncestor(int cs,
                          int ancestor)

getKey

public java.lang.Object getKey(int cs)

interpList

public int[] interpList(VobMatcher other,
                        boolean towardsOther)

ensureSize

protected final void ensureSize(int want)