public override void CopyTo(IntPtr ptr, uint[] array, int arrayIndex) { var size = this.GetSize(ptr); if (size == 0) { return; } var elementPtr = this.GetElementPtr(ptr); InteropHelper.Copy(elementPtr, array, arrayIndex, (uint)size); }
public override Point <int>[] ToArray(IntPtr ptr) { var size = this.GetSize(ptr); if (size == 0) { return(new Point <int> [0]); } var dst = new OpenPose.Native.NativePointOfInt32[size]; var elementPtr = this.GetElementPtr(ptr); InteropHelper.Copy(elementPtr, dst, dst.Length); return(dst.Select(p => new Point <int>(p.x, p.y)).ToArray()); }
public override LogMode[] ToArray(IntPtr ptr) { var size = this.GetSize(ptr); if (size == 0) { return(new LogMode[0]); } var dst = new LogMode[size]; var elementPtr = this.GetElementPtr(ptr); InteropHelper.Copy(elementPtr, dst, dst.Length); return(dst); }
public override Rectangle <float>[] ToArray(IntPtr ptr) { var size = this.GetSize(ptr); if (size == 0) { return(new Rectangle <float> [0]); } var dst = new NativeMethods.NativeRectangleOfFloat[size]; var elementPtr = this.GetElementPtr(ptr); InteropHelper.Copy(elementPtr, dst, dst.Length); return(dst.Select(r => new Rectangle <float>(r.x, r.y, r.width, r.height)).ToArray()); }