Beispiel #1
0
 public Anchor3dVectorPacket(Anchor3d[] value) : base()
 {
     UnsafeNativeMethods.mp__MakeAnchor3dVectorPacket__PA_i(value, value.Length, out var ptr).Assert();
     this.ptr = ptr;
 }
 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;
 }
 protected override void DeleteMpPtr()
 {
     UnsafeNativeMethods.mp_ImageFrame__delete(ptr);
 }
 public void SetToZero()
 {
     UnsafeNativeMethods.mp_ImageFrame__SetToZero(mpPtr).Assert();
     GC.KeepAlive(this);
 }
 public void SetAlignmentPaddingAreas()
 {
     UnsafeNativeMethods.mp_ImageFrame__SetAlignmentPaddingAreas(mpPtr).Assert();
     GC.KeepAlive(this);
 }
Beispiel #6
0
 public Timestamp(long value) : base()
 {
     UnsafeNativeMethods.mp_Timestamp__l(value, out var ptr).Assert();
     this.ptr = ptr;
 }
Beispiel #7
0
 public override GpuBuffer GetValue()
 {
     return(new GpuBuffer(UnsafeNativeMethods.MpPacketGetGpuBuffer(ptr), false));
 }
Beispiel #8
0
 public void Cancel()
 {
     UnsafeNativeMethods.mp_CalculatorGraph__Cancel(mpPtr).Assert();
     GC.KeepAlive(this);
 }
Beispiel #9
0
 protected override void DeleteMpPtr()
 {
     UnsafeNativeMethods.mp_CalculatorGraph__delete(ptr);
 }
Beispiel #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);
 }
Beispiel #12
0
 public StringPacket(string value) : base()
 {
     UnsafeNativeMethods.mp__MakeStringPacket__PKc(value, out var ptr).Assert();
     this.ptr = ptr;
 }
Beispiel #13
0
 public Packet() : base(UnsafeNativeMethods.MpPacketCreate(), true)
 {
 }
Beispiel #14
0
 protected override void DeleteMpPtr()
 {
     UnsafeNativeMethods.mp_Timestamp__delete(ptr);
 }
Beispiel #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;
 }
Beispiel #16
0
 public GpuBufferPacket(GpuBuffer gpuBuffer, int timestamp) :
     base(UnsafeNativeMethods.MpMakeGpuBufferPacketAt(gpuBuffer.GetPtr(), timestamp))
 {
     gpuBuffer.ReleaseOwnership();
     valueHandle = GCHandle.Alloc(gpuBuffer);
 }
Beispiel #17
0
 static CalculatorGraphConfig()
 {
     UnsafeNativeMethods.SetProtobufLogHandler(Marshal.GetFunctionPointerForDelegate(protobufLogHandler));
 }
Beispiel #18
0
        public static Timestamp FromSeconds(double seconds)
        {
            UnsafeNativeMethods.mp_Timestamp_FromSeconds__d(seconds, out var ptr).Assert();

            return(new Timestamp(ptr));
        }