Пример #1
0
 public Anchor3dVectorPacket(Anchor3d[] value) : base()
 {
     UnsafeNativeMethods.mp__MakeAnchor3dVectorPacket__PA_i(value, value.Length, out var ptr).Assert();
     this.ptr = ptr;
 }
Пример #2
0
 public ImageFrame(ImageFormat.Format format, int width, int height, uint alignmentBoundary) : base()
 {
     UnsafeNativeMethods.mp_ImageFrame__ui_i_i_ui(format, width, height, alignmentBoundary, out var ptr).Assert();
     this.ptr = ptr;
 }
Пример #3
0
 protected override void DeleteMpPtr()
 {
     UnsafeNativeMethods.mp_ImageFrame__delete(ptr);
 }
Пример #4
0
 public void SetToZero()
 {
     UnsafeNativeMethods.mp_ImageFrame__SetToZero(mpPtr).Assert();
     GC.KeepAlive(this);
 }
Пример #5
0
 public void SetAlignmentPaddingAreas()
 {
     UnsafeNativeMethods.mp_ImageFrame__SetAlignmentPaddingAreas(mpPtr).Assert();
     GC.KeepAlive(this);
 }
Пример #6
0
 public Timestamp(long value) : base()
 {
     UnsafeNativeMethods.mp_Timestamp__l(value, out var ptr).Assert();
     this.ptr = ptr;
 }
Пример #7
0
 public override GpuBuffer GetValue()
 {
     return(new GpuBuffer(UnsafeNativeMethods.MpPacketGetGpuBuffer(ptr), false));
 }
Пример #8
0
 public void Cancel()
 {
     UnsafeNativeMethods.mp_CalculatorGraph__Cancel(mpPtr).Assert();
     GC.KeepAlive(this);
 }
Пример #9
0
 protected override void DeleteMpPtr()
 {
     UnsafeNativeMethods.mp_CalculatorGraph__delete(ptr);
 }
Пример #10
0
 public StringPacket(string value, Timestamp timestamp) : base()
 {
     UnsafeNativeMethods.mp__MakeStringPacket_At__PKc_Rtimestamp(value, timestamp.mpPtr, out var ptr).Assert();
     GC.KeepAlive(timestamp);
     this.ptr = ptr;
 }
 protected override void DeleteMpPtr()
 {
     UnsafeNativeMethods.mp_StatusOrGpuResources__delete(ptr);
 }
Пример #12
0
 public StringPacket(string value) : base()
 {
     UnsafeNativeMethods.mp__MakeStringPacket__PKc(value, out var ptr).Assert();
     this.ptr = ptr;
 }
Пример #13
0
 public Packet() : base(UnsafeNativeMethods.MpPacketCreate(), true)
 {
 }
Пример #14
0
 protected override void DeleteMpPtr()
 {
     UnsafeNativeMethods.mp_Timestamp__delete(ptr);
 }
Пример #15
0
 public Anchor3dVectorPacket(Anchor3d[] value, Timestamp timestamp) : base()
 {
     UnsafeNativeMethods.mp__MakeAnchor3dVectorPacket_At__PA_i_Rt(value, value.Length, timestamp.mpPtr, out var ptr).Assert();
     GC.KeepAlive(timestamp);
     this.ptr = ptr;
 }
Пример #16
0
 public GpuBufferPacket(GpuBuffer gpuBuffer, int timestamp) :
     base(UnsafeNativeMethods.MpMakeGpuBufferPacketAt(gpuBuffer.GetPtr(), timestamp))
 {
     gpuBuffer.ReleaseOwnership();
     valueHandle = GCHandle.Alloc(gpuBuffer);
 }
Пример #17
0
 static CalculatorGraphConfig()
 {
     UnsafeNativeMethods.SetProtobufLogHandler(Marshal.GetFunctionPointerForDelegate(protobufLogHandler));
 }
Пример #18
0
        public static Timestamp FromSeconds(double seconds)
        {
            UnsafeNativeMethods.mp_Timestamp_FromSeconds__d(seconds, out var ptr).Assert();

            return(new Timestamp(ptr));
        }