module Glitch3d::Duplication
Public Class Methods
alter_faces(faces_objects_array, vertex_objects_array)
click to toggle source
# File lib/glitch3d/strategies/duplication.rb, line 9 def alter_faces(faces_objects_array, vertex_objects_array) faces_objects_array end
alter_vertices(vertices_objects_array)
click to toggle source
# File lib/glitch3d/strategies/duplication.rb, line 5 def alter_vertices(vertices_objects_array) shuffle_vertices(vertices_objects_array) end
shuffle_vertices(array)
click to toggle source
# File lib/glitch3d/strategies/duplication.rb, line 13 def shuffle_vertices(array) rand(3..10).times do rand_index1 = rand(0..array.size - 1) rand_index2 = rand(0..array.size - 1) array[rand_index1], array[rand_index2] = array[rand_index2], array[rand_index1] end array end