Method: Mittsu::Matrix4#apply_to_vector3_array
- Defined in:
- lib/mittsu/math/matrix4.rb
#apply_to_vector3_array(array, offset = 0, length = array.length) ⇒ Object
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 |
# File 'lib/mittsu/math/matrix4.rb', line 277 def apply_to_vector3_array(array, offset = 0, length = array.length) v1 = Mittsu::Vector3.new i = 0 j = offset while i < length v1.x = array[j].to_f v1.y = array[j + 1].to_f v1.z = array[j + 2].to_f v1.apply_matrix4(self) array[j] = v1.x array[j + 1] = v1.y array[j + 2] = v1.z i += 3 j += 3 end array end |