コード例 #1
0
ファイル: main.cpp プロジェクト: 89grad/Fish-Game
void XN_CALLBACK_TYPE TrackPad_ItemSelect(XnInt32 nXItem, XnInt32 nYItem, XnVDirection eDir, void* cxt)
{
  printf("Select: %d,%d (%s)\n", nXItem, nYItem, XnVDirectionAsString(eDir));
  g_bIsPushed = TRUE;

  if (eventsock) 
    {
      char buffer[256];
      sprintf(buffer, "set Select: %d,%d (%s)\n", nXItem, nYItem, XnVDirectionAsString(eDir));
      write(eventsock,buffer, strlen(buffer));
      read(eventsock,buffer,250);
    }
}
コード例 #2
0
ファイル: main.cpp プロジェクト: sravanthib/openni_annotator
void XN_CALLBACK_TYPE MainSlider_OnSelect(XnInt32 nItem, XnVDirection dir, void* cxt)
{
	if (nItem == -1)
	{
	}
	else if (dir == DIRECTION_UP || dir == DIRECTION_FORWARD)
	{
		g_pMainFlowRouter->SetActive(g_pBox[nItem]);
	}
	else
	{
		printf("Slider: Bad direction for selection: %s\n", XnVDirectionAsString(dir));
	}
}
コード例 #3
0
ファイル: Kinect.cpp プロジェクト: chverma/IPV_SpaceInvaders
/**   
	* @fn MainSlider_OnSelect
	* Callback Kinect directory
    * @param XnInt32 nItem input variable to the function
    * @param dir XnVDirection input variable of the direction
    * @param cxt void input variable representing the kinect
    * It checks if there nItem and direction is upward and onward
*/
void XN_CALLBACK_TYPE MainSlider_OnSelect(XnInt32 nItem, XnVDirection dir, void* cxt)
{
	if (nItem == -1) 
	{
		printf(KNT_Msgs[KNT_BAD_ITEM]);
	}
	else if (dir == DIRECTION_UP || dir == DIRECTION_FORWARD)
	{
		printf(KNT_Msgs[KNT_SLIDER_BAD_DIR], XnVDirectionAsString(dir));
	}
	else
	{
		printf(KNT_Msgs[KNT_WRONG_DIR]);
	}
}