Sha256: 9d869968bc13aaaf5401ba4a9ff626ba1e748395043e936579edd2d0bb9cd2b4
Contents?: true
Size: 794 Bytes
Versions: 8
Compression:
Stored size: 794 Bytes
Contents
require "stringio" require_relative "ply_object" module Vamp module Ply class Cube < PlyObject def initialize(file, number = 31) super() @file = file @number = number add_vertex(1, 1, 1) add_vertex(-1, 1, 1) add_vertex(1, -1, 1) add_vertex(1, 1, -1) add_vertex(1, -1, -1) add_vertex(-1, -1, 1) add_vertex(-1, 1, -1) add_vertex(-1, -1, -1) add_polygon(0, 1, 5, 2) add_polygon(0, 1, 6, 3) add_polygon(0, 3, 4, 2) add_polygon(2, 5, 7, 4) add_polygon(1, 6, 7, 5) add_polygon(3, 6, 7, 4) end end end end if __FILE__ == $0 # get root directory of this gem creator = Vamp::Ply::Cube.new(File.join("vampire.txt")) puts creator end
Version data entries
8 entries across 8 versions & 1 rubygems