static public List <UnityEngine.Vector4> ListFromVtArray(VtVec4fArray input) { var output = UsdIo.ArrayAllocator.Malloc <UnityEngine.Vector4>(input.size()); unsafe { fixed(UnityEngine.Vector4 *p = output) { input.CopyToArray((IntPtr)p); } } return(output.ToList()); }
static public UnityEngine.Color[] ColorFromVtArray(VtVec4fArray input) { var output = UsdIo.ArrayAllocator.Malloc <UnityEngine.Color>(input.size()); return(ColorFromVtArray(input, ref output)); }
static public UnityEngine.Color32[] Color32FromVtArray(VtVec4fArray input) { UnityEngine.Color32[] ret = UsdIo.ArrayAllocator.Malloc <UnityEngine.Color32>(input.size()); UnityEngine.Vector4[] rgb = FromVtArray(input); for (int i = 0; i < ret.Length; i++) { ret[i] = new UnityEngine.Color(rgb[i][0], rgb[i][1], rgb[i][2], rgb[i][3]); } return(ret); }