コード例 #1
0
 public void GetMetaData(AudioMetaData audioMD)
 {
     using (IMarshaler marsh = audioMD.GetMarshaler(true))
     {
         OpenNIImporter.xnGetAudioMetaData(this.InternalObject, marsh.Native);
     }
 }
コード例 #2
0
 public string GetCalibrationPose()
 {
     StringBuilder sb = new StringBuilder(1024);
     UInt32 status = OpenNIImporter.xnGetSkeletonCalibrationPose(this.InternalObject, sb);
     WrapperUtils.CheckStatus(status);
     return sb.ToString();
 }
コード例 #3
0
        public void RunXmlScriptFromFile(string xmlFile)
        {
            EnumerationErrors errors = new EnumerationErrors();
            UInt32            status = OpenNIImporter.xnContextRunXmlScriptFromFile(this.InternalObject, xmlFile, errors.InternalObject);

            WrapperUtils.CheckEnumeration(status, errors);
        }
コード例 #4
0
 public void GetMetaData(IRMetaData irMD)
 {
     using (IMarshaler marsh = irMD.GetMarshaler(true))
     {
         OpenNIImporter.xnGetIRMetaData(this.InternalObject, marsh.Native);
     }
 }
コード例 #5
0
        public void AddNodeFromList(IEnumerator <NodeInfo> curr)
        {
            NodeInfoListEnumerator enumer = (NodeInfoListEnumerator)curr;
            UInt32 status = OpenNIImporter.xnNodeInfoListAddNodeFromList(this.InternalObject, enumer.InternalObject);

            WrapperUtils.CheckStatus(status);
        }
コード例 #6
0
 public void GetMetaData(DepthMetaData depthMD)
 {
     using (IMarshaler marsh = depthMD.GetMarshaler(true))
     {
         OpenNIImporter.xnGetDepthMetaData(this.InternalObject, marsh.Native);
     }
 }
コード例 #7
0
        public void Remove(IEnumerator <NodeInfo> location)
        {
            NodeInfoListEnumerator enumer = (NodeInfoListEnumerator)location;
            UInt32 status = OpenNIImporter.xnNodeInfoListRemove(this.InternalObject, enumer.InternalObject);

            WrapperUtils.CheckStatus(status);
        }
コード例 #8
0
        public License[] EnumerateLicenses()
        {
            IntPtr pArray;
            uint   size;
            UInt32 status = OpenNIImporter.xnEnumerateLicenses(this.InternalObject, out pArray, out size);

            WrapperUtils.CheckStatus(status);

            License[] result = null;

            try
            {
                result = new License[size];
                IntPtr ptr = pArray;

                for (int i = 0; i < size; ++i)
                {
                    result[i] = (License)Marshal.PtrToStructure(ptr, typeof(License));
                    ptr       = (IntPtr)(ptr.ToInt64() + Marshal.SizeOf(typeof(License)));
                }
            }
            finally
            {
                OpenNIImporter.xnFreeLicensesList(pArray);
            }

            return(result);
        }
コード例 #9
0
        public void Add(ProductionNodeDescription description, string creationInfo, NodeInfoList neededNodes)
        {
            UInt32 status = OpenNIImporter.xnNodeInfoListAdd(this.InternalObject, description, creationInfo,
                                                             neededNodes == null ? IntPtr.Zero : neededNodes.InternalObject);

            WrapperUtils.CheckStatus(status);
        }
コード例 #10
0
        public NodeInfoList EnumerateExistingNodes(NodeType type)
        {
            IntPtr pList;
            UInt32 status = OpenNIImporter.xnEnumerateExistingNodesByType(this.InternalObject, type, out pList);

            WrapperUtils.CheckStatus(status);
            return(new NodeInfoList(pList));
        }
コード例 #11
0
        public ProductionNode CreateProductionTree(NodeInfo nodeInfo)
        {
            IntPtr nodeHandle;
            UInt32 status = OpenNIImporter.xnCreateProductionTree(this.InternalObject, nodeInfo.InternalObject, out nodeHandle);

            WrapperUtils.CheckStatus(status);
            return(CreateProductionNodeObject(nodeHandle, nodeInfo.GetDescription().Type));
        }
コード例 #12
0
        private static IntPtr Create()
        {
            IntPtr pErrors;
            UInt32 status = OpenNIImporter.xnEnumerationErrorsAllocate(out pErrors);

            WrapperUtils.CheckStatus(status);
            return(pErrors);
        }
コード例 #13
0
ファイル: Codec.cs プロジェクト: shenjikai/MetaImagerProj
        private static IntPtr Create(Context context, CodecID codecID, ProductionNode initializer)
        {
            IntPtr nodeHandle;
            UInt32 status = OpenNIImporter.xnCreateCodec(context.InternalObject, codecID.InternalValue, initializer.InternalObject, out nodeHandle);

            WrapperUtils.CheckStatus(status);
            return(nodeHandle);
        }
コード例 #14
0
        public LockHandle LockForChanges()
        {
            uint   handle;
            UInt32 status = OpenNIImporter.xnLockNodeForChanges(this.InternalObject, out handle);

            WrapperUtils.CheckStatus(status);
            return(new LockHandle(handle));
        }
コード例 #15
0
        private static IntPtr Init()
        {
            IntPtr pContext;
            UInt32 status = OpenNIImporter.xnInit(out pContext);

            WrapperUtils.CheckStatus(status);
            return(pContext);
        }
コード例 #16
0
        public Point3D GetCoM(UserID id)
        {
            Point3D com    = new Point3D();
            UInt32  status = OpenNIImporter.xnGetUserCoM(this.InternalObject, id, out com);

            WrapperUtils.CheckStatus(status);
            return(com);
        }
コード例 #17
0
        public Point3D[] ConvertRealWorldToProjective(Point3D[] realWorldPoints)
        {
            Point3D[] projective = new Point3D[realWorldPoints.Length];
            UInt32    status     = OpenNIImporter.xnConvertRealWorldToProjective(this.InternalObject, (uint)realWorldPoints.Length, realWorldPoints, projective);

            WrapperUtils.CheckStatus(status);
            return(projective);
        }
コード例 #18
0
        public Point3D[] ConvertProjectiveToRealWorld(Point3D[] projectivePoints)
        {
            Point3D[] realWorld = new Point3D[projectivePoints.Length];
            UInt32    status    = OpenNIImporter.xnConvertProjectiveToRealWorld(this.InternalObject, (uint)projectivePoints.Length, projectivePoints, realWorld);

            WrapperUtils.CheckStatus(status);
            return(realWorld);
        }
コード例 #19
0
        public FieldOfView GetFieldOfView()
        {
            FieldOfView fov    = new FieldOfView();
            UInt32      status = OpenNIImporter.xnGetDepthFieldOfView(this.InternalObject, ref fov);

            WrapperUtils.CheckStatus(status);
            return(fov);
        }
コード例 #20
0
        public ProductionNode FindExistingNode(NodeType type)
        {
            IntPtr nodeHandle;
            UInt32 status = OpenNIImporter.xnFindExistingNodeByType(this.InternalObject, type, out nodeHandle);

            WrapperUtils.CheckStatus(status);
            return(CreateProductionNodeObject(nodeHandle, type));
        }
コード例 #21
0
        public ProductionNode GetProductionNodeByName(string name)
        {
            IntPtr nodeHandle;
            UInt32 status = OpenNIImporter.xnGetNodeHandleByName(this.InternalObject, name, out nodeHandle);

            WrapperUtils.CheckStatus(status);
            return(CreateProductionNodeObject(nodeHandle));
        }
コード例 #22
0
        public WaveOutputMode GetWaveOutputMode()
        {
            WaveOutputMode mode   = new WaveOutputMode();
            UInt32         status = OpenNIImporter.xnGetWaveOutputMode(this.InternalObject, ref mode);

            WrapperUtils.CheckStatus(status);
            return(mode);
        }
コード例 #23
0
        public Cropping GetCropping()
        {
            Cropping cropping = new Cropping();
            UInt32   status   = OpenNIImporter.xnGetCropping(this.InternalObject, ref cropping);

            WrapperUtils.CheckStatus(status);
            return(cropping);
        }
コード例 #24
0
        public double GetRealProperty(string propName)
        {
            double value;
            UInt32 status = OpenNIImporter.xnGetRealProperty(this.InternalObject, propName, out value);

            WrapperUtils.CheckStatus(status);
            return(value);
        }
コード例 #25
0
ファイル: Recorder.cs プロジェクト: shenjikai/MetaImagerProj
        private static IntPtr Create(Context context, string formatName)
        {
            IntPtr nodeHandle;
            UInt32 status = OpenNIImporter.xnCreateRecorder(context.InternalObject, formatName, out nodeHandle);

            WrapperUtils.CheckStatus(status);
            return(nodeHandle);
        }
コード例 #26
0
        public UInt32 TellFrame(string nodeName)
        {
            UInt32 frame;
            UInt32 status = OpenNIImporter.xnTellPlayerFrame(this.InternalObject, nodeName, out frame);

            WrapperUtils.CheckStatus(status);
            return(frame);
        }
コード例 #27
0
ファイル: Wrappers.cs プロジェクト: shenjikai/MetaImagerProj
 internal NodeWrapper(IntPtr hNode, bool addRef)
     : base(hNode)
 {
     if (addRef)
     {
         OpenNIImporter.xnProductionNodeAddRef(hNode);
     }
 }
コード例 #28
0
        public UInt32 GetNumFrames(string nodeName)
        {
            UInt32 frames;
            UInt32 status = OpenNIImporter.xnGetPlayerNumFrames(this.InternalObject, nodeName, out frames);

            WrapperUtils.CheckStatus(status);
            return(frames);
        }
コード例 #29
0
        private static IntPtr Create(Context context, string name)
        {
            IntPtr handle;
            UInt32 status = OpenNIImporter.xnCreateMockNode(context.InternalObject, NodeType.IR, name, out handle);

            WrapperUtils.CheckStatus(status);
            return(handle);
        }
コード例 #30
0
ファイル: Codec.cs プロジェクト: shenjikai/MetaImagerProj
        public UInt32 DecodeData(IntPtr source, UInt32 sourceSize, IntPtr dest, UInt32 destSize)
        {
            UInt32 written;
            UInt32 status = OpenNIImporter.xnDecodeData(this.InternalObject, source, sourceSize, dest, destSize, out written);

            WrapperUtils.CheckStatus(status);
            return(written);
        }