<%= @walls.faces.collect{|f| f.vertices.collect{|v| @walls.vertices.index(v)}}.flatten.join(' ') %>
<% offset = 0 @walls.windows.each do |w| %> <%= w.faces.collect{|f| f.vertices.collect{|v| w.vertices.index(v) + offset}}.flatten.join(' ') %> <% offset += w.vertices.length ; end %>
<%= area_mesh.faces.collect { |f| v = f.vertices.collect { |v| area_mesh.vertices.index(v) } t = f.texcoord.collect { |t| area_mesh.texcoord.index(t) } [v[0],t[0],v[1],t[1],v[2],t[2]] }.flatten.join(' ') %>