struct

WritingAdditions::Map::Vertex

Inherits Struct < Value < Object

Structure of a vertex.

Constructors

new

Class methods

write(file : String | Path, vertexes : Array(::WAD::Map::Vertex)) : ::WAD::Directory

Writes a list of vertexes given an output io and the vertexes to write and returns the written directory

Writes vertexes in my_wad to a file:

my_wad = WAD.read("Path/To/Wad")
WAD::Map::Vertex.write("Path/To/vertexes.lmp", my_wad.maps["MyMap"].vertexes)
write(io : IO, vertexes : Array(::WAD::Map::Vertex)) : ::WAD::Directory

Writes a list of vertexes given an output io and the vertexes to write and returns the written directory

Writes vertexes in my_wad to a file:

my_wad = WAD.read("Path/To/Wad")
File.open("Path/To/vertexes.lmp", "w+") do |file|
  WAD::Map::Vertex.write(my_wad.maps["MyMap"].vertexes)
end

Instance methods

initialize