コード例 #1
0
 static public void FromVtArray(VtInt64Array input, ref long[] output)
 {
     if (output.Length != input.size())
     {
         output = UsdIo.ArrayAllocator.Malloc <long>(input.size());
     }
     unsafe
     {
         fixed(long *p = output)
         {
             input.CopyToArray((IntPtr)p);
         }
     }
 }
コード例 #2
0
 // Convenience API: generates garbage, do not use when performance matters.
 static public long[] FromVtArray(VtInt64Array input)
 {
     long[] output = UsdIo.ArrayAllocator.Malloc <long>(input.size());
     FromVtArray(input, ref output);
     return(output);
 }