com.partnersoft.v3x.apps.MapBrowser
Class PackedSheetCoord

java.lang.Object
  extended by com.partnersoft.v3x.apps.MapBrowser.PackedSheetCoord

public class PackedSheetCoord
extends java.lang.Object

Not an object actually, but a way to represent sheet coordinates as longs. Each must fit in a short.


Field Summary
static long bitblankS
           
static long bitblankX
           
static long bitblankY
           
static long bitblankZ
           
static long bitmaskS
           
static long bitmaskX
           
static long bitmaskY
           
static long bitmaskZ
           
 
Constructor Summary
PackedSheetCoord()
           
 
Method Summary
static long createCoord(int scale, int x, int y)
          Creates a packed SheetCoord from the given scale, x, y.
static long createCoord(int scale, int x, int y, int z)
          Creates a packed SheetCoord from the given scale, x, y, and z.
static int extractScale(long packedCoord)
          Returns the scale coord.
static int extractX(long packedCoord)
          Returns the x coord.
static int extractY(long packedCoord)
          Returns the y coord.
static int extractZ(long packedCoord)
          Returns the z coord.
static java.lang.String getPath(long packedCoord)
          Converts a packed tile coord to a path.
static void main(java.lang.String[] argv)
           
static long setScale(long packedCoord, int newScale)
          Sets the scale coord.
static long setX(long packedCoord, int newX)
          Sets the x coord.
static long setY(long packedCoord, int newY)
          Sets the y coord.
static long setZ(long packedCoord, int newZ)
          Sets the z coord.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bitmaskS

public static final long bitmaskS
See Also:
Constant Field Values

bitmaskX

public static final long bitmaskX
See Also:
Constant Field Values

bitmaskY

public static final long bitmaskY
See Also:
Constant Field Values

bitmaskZ

public static final long bitmaskZ
See Also:
Constant Field Values

bitblankS

public static final long bitblankS
See Also:
Constant Field Values

bitblankX

public static final long bitblankX
See Also:
Constant Field Values

bitblankY

public static final long bitblankY
See Also:
Constant Field Values

bitblankZ

public static final long bitblankZ
See Also:
Constant Field Values
Constructor Detail

PackedSheetCoord

public PackedSheetCoord()
Method Detail

createCoord

public static long createCoord(int scale,
                               int x,
                               int y,
                               int z)
Creates a packed SheetCoord from the given scale, x, y, and z.


createCoord

public static long createCoord(int scale,
                               int x,
                               int y)
Creates a packed SheetCoord from the given scale, x, y.


extractScale

public static int extractScale(long packedCoord)
Returns the scale coord.


extractX

public static int extractX(long packedCoord)
Returns the x coord.


extractY

public static int extractY(long packedCoord)
Returns the y coord.


extractZ

public static int extractZ(long packedCoord)
Returns the z coord.


setScale

public static long setScale(long packedCoord,
                            int newScale)
Sets the scale coord.


setX

public static long setX(long packedCoord,
                        int newX)
Sets the x coord.


setY

public static long setY(long packedCoord,
                        int newY)
Sets the y coord.


setZ

public static long setZ(long packedCoord,
                        int newZ)
Sets the z coord.


getPath

public static java.lang.String getPath(long packedCoord)
Converts a packed tile coord to a path. Currently ignores Z.


main

public static void main(java.lang.String[] argv)