Class: Table32
Overview
Class that store a 3D array of value coded with 32bits (signed)
Instance Attribute Summary collapse
-
#dim ⇒ Integer
readonly
Dimension of the table (1D, 2D, 3D).
-
#xsize ⇒ Integer
readonly
Number of row in the table.
-
#ysize ⇒ Integer
readonly
Number of cols in the table.
-
#zsize ⇒ Integer
readonly
Number of 2D table in the table.
Instance Method Summary collapse
-
#[](x, y = 0, z = 0) ⇒ Integer?
Access to a value of the table.
-
#[]=(x, y, z, value)
Change a value in the table.
-
#fill(value)
Fill the whole table with a specific value.
-
#initialize(xsize, ysize = 1, zsize = 1) ⇒ Table32
constructor
Create a new table without pre-initialization of the contents.
-
#resize(xsize, ysize = 1, zsize = 1)
Resize the table.
Constructor Details
#initialize(xsize, ysize = 1, zsize = 1) ⇒ Table32
Never call initialize from the Ruby code other than using Table.new. It'll create memory if you call initialize from Ruby, use #resize instead.
Create a new table without pre-initialization of the contents
1371 1372 1373 |
# File 'LiteRGSS.rb.yard.rb', line 1371 def initialize(xsize, ysize = 1, zsize = 1) end |
Instance Attribute Details
#dim ⇒ Integer (readonly)
Returns Dimension of the table (1D, 2D, 3D).
1410 1411 1412 |
# File 'LiteRGSS.rb.yard.rb', line 1410 def dim @dim end |
#xsize ⇒ Integer (readonly)
Returns number of row in the table.
1404 1405 1406 |
# File 'LiteRGSS.rb.yard.rb', line 1404 def xsize @xsize end |
#ysize ⇒ Integer (readonly)
Returns number of cols in the table.
1406 1407 1408 |
# File 'LiteRGSS.rb.yard.rb', line 1406 def ysize @ysize end |
#zsize ⇒ Integer (readonly)
Returns number of 2D table in the table.
1408 1409 1410 |
# File 'LiteRGSS.rb.yard.rb', line 1408 def zsize @zsize end |
Instance Method Details
#[](x, y = 0, z = 0) ⇒ Integer?
Access to a value of the table
1379 1380 1381 |
# File 'LiteRGSS.rb.yard.rb', line 1379 def [](x, y = 0, z = 0) end |
#[]=(x, y, z, value)
Change a value in the table
1385 1386 1387 |
# File 'LiteRGSS.rb.yard.rb', line 1385 def []=(x, value) end |
#fill(value)
Fill the whole table with a specific value
1421 1422 1423 |
# File 'LiteRGSS.rb.yard.rb', line 1421 def fill(value) end |
#resize(xsize, ysize = 1, zsize = 1)
Some value may be undeterminated if the new size is bigger than the old size
Resize the table
1416 1417 1418 |
# File 'LiteRGSS.rb.yard.rb', line 1416 def resize(xsize, ysize = 1, zsize = 1) end |