struct WAD::Map::Node

Overview

Structure of a node.

Defined in:

wa-cr/wad/wad-data/map.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new #

Class Method Detail

def self.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

def self.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 Method Detail

def clone #

Returns a copy of self with all instance variables cloned.


def initialize #

def 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).


def 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).


def left_child : Int16 #

def left_child=(left_child : Int16) #

def 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).


def 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).


def right_child : Int16 #

def right_child=(right_child : Int16) #

def x_change_to_end : Int16 #

Change in x from start to end of partition line.


def x_change_to_end=(x_change_to_end : Int16) #

Change in x from start to end of partition line.


def x_coord : Int16 #

X coordinate of partition line start.


def x_coord=(x_coord : Int16) #

X coordinate of partition line start.


def y_change_to_end : Int16 #

Change in y from start to end of partition line.


def y_change_to_end=(y_change_to_end : Int16) #

Change in y from start to end of partition line.


def y_coord : Int16 #

Y coordinate of partition line start.


def y_coord=(y_coord : Int16) #

Y coordinate of partition line start.