Example #1
0
 /// <summary>
 /// converts the DynamicBuffer<Float3BufferElement> to an Float3BufferElement Arrary
 /// </summary>
 /// <returns></returns>
 public static Float3BufferElement[] ToArray(DynamicBuffer <Float3BufferElement> buffer)
 {
     Float3BufferElement[] arr = new Float3BufferElement[buffer.Length];
     for (int i = 0; i < buffer.Length; i++)
     {
         arr[i] = buffer[i];
     }
     return(arr);
 }
Example #2
0
 /// <summary>
 /// converts a float3[] into a Float3BufferElement[]
 /// </summary>
 /// <param name="arr"></param>
 /// <returns></returns>
 public static                     Float3BufferElement[] ToFloat3BufferElementArray(float3[] arr)
 {
     Float3BufferElement[] tmp = new Float3BufferElement[arr.Length];
     for (int i = 0; i < arr.Length; i++)
     {
         tmp[i] = new Float3BufferElement {
             Value = arr[i]
         }
     }
     ;
     return(tmp);
 }