Esempio n. 1
0
 public IPCStream_In(NamedPipeClient_In client, NUIApp nuiApp)
 {
     _client = client;
     _client.ServerMessage += client_ServerMessage;
     _client.Error         += client_Error;
     this.nuiApp            = nuiApp;
 }
        internal NuiSensor(NUIApp nuiApp, string name, string company, int id, SensorState state,
                           int colorFrameWidth, int colorFrameHeight, int colorbpp, int depthFrameWidth, int depthFrameHeight, int depthbpp, int maxTrackingbody)
        {
            this.nuiApp = nuiApp;

            this.name    = name;
            this.company = company;
            this.id      = id;
            this._state  = state;


            bool EnableCoordinate = false;

            double JointDepthXMult   = 0;
            double JointDepthXFix    = 0;
            double JointDepthYMult   = 0;
            double JointDepthYFix    = 0;
            double DepthToJointZMult = 0;

            //나중엔 uID 로 처리하던가 해야함.
            switch (name)
            {
            case "Kinect":
                EnableCoordinate = true;

                JointDepthXMult   = 1.85;
                JointDepthXFix    = 0;
                JointDepthYMult   = 1.9;
                JointDepthYFix    = 0.13;
                DepthToJointZMult = 0.00123;
                break;

            case "Kinect2":
                EnableCoordinate = true;

                JointDepthXMult   = 1.5;
                JointDepthXFix    = 0;
                JointDepthYMult   = 1.45;
                JointDepthYFix    = 0.085;
                DepthToJointZMult = 0.00107;
                break;
            }

            ColorInfo = new ColorInfo(colorFrameWidth, colorFrameHeight, colorbpp);

            if (EnableCoordinate)
            {
                DepthInfo = new DepthInfo(depthFrameWidth, depthFrameHeight, short.MinValue, short.MaxValue, depthbpp,
                                          EnableCoordinate,
                                          JointDepthXMult, JointDepthXFix, JointDepthYMult, JointDepthYFix,
                                          DepthToJointZMult);
            }
            else
            {
                DepthInfo = new DepthInfo(depthFrameWidth, depthFrameHeight, short.MinValue, short.MaxValue, depthbpp);
            }

            BodyInfo = new BodyInfo(maxTrackingbody);
        }
        public static void __INIT(string appName, Queue <CWORK_STRUCT> Cwork_Queue, object _queueLock)
        {
            if (nuiApp != null)
            {
                return;
            }

            nuiApp = new NUIApp(appName, ref Cwork_Queue, _queueLock);
        }
Esempio n. 4
0
 public IPCStream_Out(NamedPipeClient_Out client, NUIApp nuiApp)
 {
     _client        = client;
     _client.Error += client_Error;
     this.nuiApp    = nuiApp;
 }
 public TCPStream(Socket pSocket, NUIApp nuiApp)
 {
     this.nuiApp = nuiApp;
     _socket     = pSocket;
     WaitForData(new SocketInfo(_socket, 16));
 }
 public NamedPipeClient_In(string pipeName, NUIApp nuiApp)
 {
     this.nuiApp   = nuiApp;
     this.pipeName = @"\\.\pipe\" + pipeName;
 }