struct

WAD::Map::Seg

Inherits Struct < Value < Object

Structure of a seg.

Constructors

new

Class methods

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

Parses a segs list given the io and the size

Opens a segs lump and parses it:

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

Parses a segs list given the filename

Opens a segs lump and parses it:

my_segs = WAD::Map::Seg.parse("Path/To/Seg")

Instance methods

angle

Angle, full circle is -32768 to 32767.

angle=(angle : Int16)

Angle, full circle is -32768 to 32767.

clone

Returns a copy of self with all instance variables cloned.

direction

Direction, 0 (same as linedef) or 1 (opposite of linedef).

direction=(direction : Int16)

Direction, 0 (same as linedef) or 1 (opposite of linedef).

end_vertex_num
end_vertex_num=(end_vertex_num : Int16)
initialize
linedef_num
linedef_num=(linedef_num : Int16)
offset

Offset, distance along linedef to start of seg.

offset=(offset : Int16)

Offset, distance along linedef to start of seg.

start_vertex_num
start_vertex_num=(start_vertex_num : Int16)