Class: RBGLox::MeshQuad
Overview
Quad Mesh Class
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
-
#initialize(x = 1.0, y = 1.0) ⇒ MeshQuad
constructor
Constructor.
Methods inherited from Mesh
Methods inherited from Resource
Constructor Details
#initialize(x = 1.0, y = 1.0) ⇒ MeshQuad
Constructor
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/rbglox/meshquad.rb', line 4 def initialize(x=1.0, y=1.0) verts = [ -x, -y, 0.0, x, -y, 0.0, x, y, 0.0, -x, y, 0.0 ] texs = [ 0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 0.0, 1.0 ] norms = [ 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0 ] tris = [ 3, 2, 1, 3, 1, 0 ] super verts, texs, norms, tris end |