Sha256: aeb6637286ee0d282b3843e59f736f5600ed7b6fcb561e8b3d3475d30603c625

Contents?: true

Size: 572 Bytes

Versions: 2

Compression:

Stored size: 572 Bytes

Contents

module Ray
  class Vertex
    # Important settings
    @vertex_type_id = 0

    include Ray::PP

    def x; pos.x; end
    def y; pos.y; end

    def x=(val); self.pos = [val, y]; end
    def y=(val); self.pos = [x, val]; end

    def tex_x; tex.x; end
    def tex_y; tex.y; end

    def tex_x=(val); self.tex = [val, tex_y]; end
    def tex_y=(val); self.tex = [tex_x, val]; end

    def pretty_print(q)
      pretty_print_attributes q, ["pos", "col", "tex"]
    end

    alias color  col
    alias color= col=

    alias position  pos
    alias position= pos=
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ray-0.2.1 lib/ray/vertex.rb
ray-0.2.0 lib/ray/vertex.rb