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.
Class Method Summary collapse
-
.new(xsize, ysize = 1, zsize = 1)
Create a new table without pre-initialization of the contents.
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.
-
#resize(xsize, ysize = 1, zsize = 1)
Resize the table.
Instance Attribute Details
#dim ⇒ Integer (readonly)
Returns Dimension of the table (1D, 2D, 3D).
1403 1404 1405 |
# File 'LiteRGSS.rb.yard.rb', line 1403 def dim @dim end |
#xsize ⇒ Integer (readonly)
Returns number of row in the table.
1397 1398 1399 |
# File 'LiteRGSS.rb.yard.rb', line 1397 def xsize @xsize end |
#ysize ⇒ Integer (readonly)
Returns number of cols in the table.
1399 1400 1401 |
# File 'LiteRGSS.rb.yard.rb', line 1399 def ysize @ysize end |
#zsize ⇒ Integer (readonly)
Returns number of 2D table in the table.
1401 1402 1403 |
# File 'LiteRGSS.rb.yard.rb', line 1401 def zsize @zsize end |
Class Method Details
.new(xsize, ysize = 1, zsize = 1)
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
1364 1365 1366 |
# File 'LiteRGSS.rb.yard.rb', line 1364 def self.new(xsize, ysize = 1, zsize = 1) end |
Instance Method Details
#[](x, y = 0, z = 0) ⇒ Integer?
Access to a value of the table
1372 1373 1374 |
# File 'LiteRGSS.rb.yard.rb', line 1372 def [](x, y = 0, z = 0) end |
#[]=(x, y, z, value)
Change a value in the table
1378 1379 1380 |
# File 'LiteRGSS.rb.yard.rb', line 1378 def []=(x, value) end |
#fill(value)
Fill the whole table with a specific value
1414 1415 1416 |
# File 'LiteRGSS.rb.yard.rb', line 1414 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
1409 1410 1411 |
# File 'LiteRGSS.rb.yard.rb', line 1409 def resize(xsize, ysize = 1, zsize = 1) end |