/// <summary> /// Transform the vectors in the given array and put the result in another array. /// </summary> /// <param name="vectors">An array of vectors to transform.</param> /// <param name="transformation">The transformation.</param> /// <param name="result">An array of vectors to put the transformation results in (should be empty).</param> public static void TransformArray(Vector4FArrayList vectors, Matrix4F transformation, Vector4FArrayList result) { for (int i = 0; i < vectors.Count; i++) { result.Add(transformation * vectors[i]); } }
public static Vector4FArrayList CreateRandomVector4FArray(int count, IFloatRandomNumberGenerator r) { Vector4FArrayList result = new Vector4FArrayList(count); for (int i = 0; i < count; i++) { result.Add(new Vector4F(r.NextFloat(), r.NextFloat(), r.NextFloat(), r.NextFloat())); } return(result); }