Array3 |
A three-dimensonal array.
Array3 | A three-dimensonal array. |
Functions | |
Array3 | Initializes a three-dimensional array to match the given width, height and depth. |
Properties | |
width | Indicates the width (columns). |
width | @private |
height | Indicates the height (rows). |
height | @private |
depth | Indicates the depth (layers). |
depth | @private |
Functions | |
fill | Writes a given value into each cell of the three-dimensional array. |
get | Reads a value from a given x/y/z index. |
set | Writes a value into a cell at the given x/y/z index. |
resize | Resizes the array to match the given width, height and depth. |
getLayer | Copies the data from a given depth (layer) into a two-dimensional array. |
getRow | Extracts a row from a given y index and depth (layer). |
getCol | Extracts a colum from a given index and depth (layer). |
contains | @inheritDoc |
clear | @inheritDoc |
getIterator | @inheritDoc |
Properties | |
size | @inheritDoc |
Functions | |
isEmpty | @inheritDoc |
toArray | @inheritDoc |
toString | Prints out a string representing the current object. |
dump | Prints out all elements (for debug/demo purposes). |
public function get( x: int, y: int, z: int ):*
Reads a value from a given x/y/z index. No boundary check is done, so you have to make sure that the input coordinates do not exceed the width, height or depth of the three-dimensional array.
x | The x index (column). |
y | The y index (row). * @param z The z index (layer). |
The value at the given x/y/z index.
public function set( x: int, y: int, z: int, obj: * ):void
Writes a value into a cell at the given x/y/z index. No boundary check is done, so you have to make sure that the input coordinates do not exceed the width, height or depth of the two-dimensional array.
x | The x index (column). |
y | The y index (row). |
z | The z index (layer). |
obj | The item to be written into the cell. |
public function resize( w: int, h: int, d: int ):void
Resizes the array to match the given width, height and depth. If the new size is smaller than the existing size, values are lost because of truncation, otherwise all values are preserved.
w | The new width (cols). |
h | The new height (rows). * @param d The new depth (layers). |
Initializes a three-dimensional array to match the given width, height and depth.
public function Array3( w: int, h: int, d: int )
Indicates the width (columns).
public function get width():int
Indicates the height (rows).
public function get height():int
Indicates the depth (layers).
public function get depth():int
Writes a given value into each cell of the three-dimensional array.
public function fill( obj: * ):void
Reads a value from a given x/y/z index.
public function get( x: int, y: int, z: int ):*
Writes a value into a cell at the given x/y/z index.
public function set( x: int, y: int, z: int, obj: * ):void
Resizes the array to match the given width, height and depth.
public function resize( w: int, h: int, d: int ):void
Copies the data from a given depth (layer) into a two-dimensional array.
public function getLayer( z: int ):Array2
Extracts a row from a given y index and depth (layer).
public function getRow( z: int, y: int ):Array
Extracts a colum from a given index and depth (layer).
public function getCol( z: int, x: int ):Array
@inheritDoc
public function contains( obj: * ):Boolean
@inheritDoc
public function clear():void
@inheritDoc
public function getIterator():Iterator
@inheritDoc
public function get size():int
@inheritDoc
public function isEmpty():Boolean
@inheritDoc
public function toArray():Array
Prints out a string representing the current object.
public function toString():String
Prints out all elements (for debug/demo purposes).
public function dump():String