private NuiContextInit ( bool twoPlayer ) : bool | ||
twoPlayer | bool | |
return | bool |
/******************************************************************************** * DEVICE MANAGEMENT -> initialize, uninitialize, and update sensor * ******************************************************************************/ //called on application start private void Start() { NUIisReady = false; //initialize Kinect sensor NUIisReady = KinectWrapper.NuiContextInit(twoPlayer); //display messages if (NUIisReady) { Debug.Log("Sensor Initialized."); } else { Debug.Log("Could Not Initialize Sensor."); } if (scaleFactor == 0) { Debug.Log("WARNING: KUInterface.scaleFactor is set to zero. All joint positions will be the zero vector."); } //set up image memory // seqTex = new byte[IM_W * IM_H * 4]; // cols = new Color32[IM_W * IM_H]; // texture = new Texture2D(IM_W, IM_H); // seqDepth = new byte[IM_W * IM_H * 2]; // dcols = new Color32[IM_W * IM_H]; // depthImg = new Texture2D(IM_W, IM_H); // depth = new short[IM_W][]; // for (int i = 0; i < depth.Length; i++) { // depth[i] = new short[IM_H]; // } }
private void btnStart_Click(object sender, RoutedEventArgs e) { /* * lbResults.Items.Add("Test with WPF"); * * int liTest = KinectWrapper.GetANumber(); * lbResults.Items.Add(liTest); * * IntPtr mpString = KinectWrapper.GetAString(); * string lsTest = Marshal.PtrToStringAnsi(mpString); * lbResults.Items.Add(lsTest); */ //Test Camera KinectWrapper.NuiContextInit(false); KinectWrapper.SetCameraAngle(0); }
void Start() { //initialize Kinect sensor KinectWrapper.NuiContextInit(ref isReady); if (isReady) { UnityEngine.Debug.Log("Sensor Initialized."); } else { UnityEngine.Debug.Log("Could Not Initialize Sensor."); } if (scaleFactor == 0) { UnityEngine.Debug.Log("WARNING: KUInterface.scaleFactor is set to zero. All joint positions will be the zero vector."); } }
/***************************************** * Unity3D Methods **************************************/ // Use this for initialization void Start() { //Tests(); SP = this; NUIisReady = false; NUIisReady = KinectWrapper.NuiContextInit(mbTwoPlayer); //initialize Kinect sensor //display messages if (NUIisReady) { Debug.Log("Sensor Initialized."); } else { Debug.Log("Could Not Initialize Sensor."); } KinectWrapper.SetCameraAngle(-20); }