Packageorg.openzoom.flash.utils
Classpublic final class MortonOrder

Utility class for doing computations with the Morton-order (Z-order) which is a space-filling curve. For example, the Morton-order is used by Deep Zoom for laying out tiles in collections. Creates beautiful fractal layouts.

See also

http://en.wikipedia.org/wiki/Z-order_(curve)
http://msdn.microsoft.com/en-us/library/cc645077(VS.95).aspx#Collections
http://graphics.stanford.edu/~seander/bithacks.html#InterleaveTableObvious


Public Methods
 MethodDefined by
  
getPosition(value:uint):Point
[static] Returns the position (column, row) for a given Morton number.
MortonOrder
  
getValue(column:int, row:int):uint
[static] Returns Morton number for the given position (column, row).
MortonOrder
Method detail
getPosition()method
public static function getPosition(value:uint):Point

Returns the position (column, row) for a given Morton number.

Parameters
value:uint — Morton number (Z-order)

Returns
Point — Position of the Morton number in space (column, row)
getValue()method 
public static function getValue(column:int, row:int):uint

Returns Morton number for the given position (column, row).

Parameters
column:int — Column of the position
 
row:int — Row of the position

Returns
uint — Morton number for the given coordinates.