gzz.vob
Interface VobMatcher

gzz.vob.VobScene gzz.vob.VobMap gzz.vob.VobCoorder gzz.vob.VobMatcher gzz.vob.Vob ../../../Gzz_Frontend_Vobs.gen.html#vobscene_overall vobscene_overall_small
public interface VobMatcher

An interface for matching coordinate systems between different vobscenes.


Method Summary
 int add(int into, int cs, java.lang.Object key)
           
 int add(int cs, java.lang.Object key)
          Add key to a cs, and return the cs.
 int getCS(int parent, java.lang.Object key)
          Return the index of the coordinate system that was added into the given parent with the given key.
 int getCS(java.lang.Object key)
          Return the index of the coordinate system that was added with the given key.
 java.lang.Object getKey(int cs)
           
 int getParent(int cs)
          Get the matcher parent of the given coordinate system.
 int[] interpList(VobMatcher other, boolean towardsOther)
          Return, for each coordinate system of this matcher, an integer giving the coordinate system of the other matcher that system should move to.
 boolean isAncestor(int cs, int ancestor)
          Whether calling getParent(cs) recursively (at least one time!) would eventually return parent.
 

Method Detail

add

public int add(int cs,
               java.lang.Object key)
Add key to a cs, and return the cs. Used in idiom like
cs = vs.matcher.add(vs.coords.affineCoordsys(...), "Foo")
 

Returns:
cs, for the above idiom.

add

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

getCS

public int getCS(java.lang.Object key)
Return the index of the coordinate system that was added with the given key.

Returns:
The index of the coordinate system, or -1 if none.

getCS

public int getCS(int parent,
                 java.lang.Object key)
Return the index of the coordinate system that was added into the given parent with the given key.

Returns:
The index of the coordinate system, or -1 if none.

getParent

public int getParent(int cs)
Get the matcher parent of the given coordinate system.


isAncestor

public boolean isAncestor(int cs,
                          int ancestor)
Whether calling getParent(cs) recursively (at least one time!) would eventually return parent. I.e. the coordinate system itself is not its own ancestor.


getKey

public java.lang.Object getKey(int cs)

interpList

public int[] interpList(VobMatcher other,
                        boolean towardsOther)
Return, for each coordinate system of this matcher, an integer giving the coordinate system of the other matcher that system should move to. A number smaller than zero means that the the coordsys should not be interpolated.

Parameters:
other - The other vobmatcher; the interp list is constructed between this and the other matcher.
towardsOther - Whether we are interpolating towards or away from the `other` parameter. This has effect when key mappings are used, but currently no official API is provided for setting them;
See Also:
DefaultVobMap