struct

WAD::Map::Node

Inherits Struct < Value < Object

Structure of a node.

Constructors

new

Class methods

parse(io : IO, lump_size : Int) : Array(Node)

Parses a nodes list given the io and the size

Opens a nodes lump and parses it:

File.open("Path/To/Node") do |file|
  my_nodes = WAD::Map::Node.parse(file, file.size)
end
parse(filename : String | Path) : Array(Node)

Parses a nodes list given the filename

Opens a nodes lump and parses it:

my_nodes = WAD::Map::Node.parse("Path/To/Node")

Instance methods

clone

Returns a copy of self with all instance variables cloned.

initialize
left_bound_box

A bounding box consists of four short values (top, bottom, left and right) giving the upper and lower bounds of the y coordinate and the lower and upper bounds of the x coordinate (in that order).

left_bound_box=(left_bound_box : Array(Int16))

A bounding box consists of four short values (top, bottom, left and right) giving the upper and lower bounds of the y coordinate and the lower and upper bounds of the x coordinate (in that order).

left_child
left_child=(left_child : Int16)
right_bound_box

A bounding box consists of four short values (top, bottom, left and right) giving the upper and lower bounds of the y coordinate and the lower and upper bounds of the x coordinate (in that order).

right_bound_box=(right_bound_box : Array(Int16))

A bounding box consists of four short values (top, bottom, left and right) giving the upper and lower bounds of the y coordinate and the lower and upper bounds of the x coordinate (in that order).

right_child
right_child=(right_child : Int16)
x_change_to_end

Change in x from start to end of partition line.

x_change_to_end=(x_change_to_end : Int16)

Change in x from start to end of partition line.

x_coord

X coordinate of partition line start.

x_coord=(x_coord : Int16)

X coordinate of partition line start.

y_change_to_end

Change in y from start to end of partition line.

y_change_to_end=(y_change_to_end : Int16)

Change in y from start to end of partition line.

y_coord

Y coordinate of partition line start.

y_coord=(y_coord : Int16)

Y coordinate of partition line start.