[WiiuseCpp] Unable use IR Track April 15, 2011 04:11PM | Registered: 12 years ago Posts: 3 |
int main(int argc, char** argv) { CWii wii; int numFound; printf("Searching for wiimotes...\n"); //Find the wiimote (search for up to five seconds) numFound = wii.Find(5); // Connect to the wiimote std::vector& wiimotes = wii.Connect(); // Get the Wiimote CWiimote &wiimote = *(wiimotes.begin()); // Enable IR tracking wiimote.IR.SetMode(CIR::ON); // Set the sensibility at maximum wiimote.IR.SetSensitivity(5); // While the user doesn't press the 'q' key while(!GetKeyState('Q')) { // Get my dots std::vector &dots = wiimote.IR.GetDots(); // Coords of these dots int x=0, y=0; // Print coords of all these dots for(unsigned int j=0; j<dots.size(); j++) { dots.at(j).GetCoordinate(x, y); printf("x : %d\t y : %d\n", x, y); } // Sleep for 10 ms Sleep(10); } return 0; }
Re: [WiiuseCpp] Unable use IR Track April 15, 2011 04:47PM | Registered: 14 years ago Posts: 379 |
Re: [WiiuseCpp] Unable use IR Track April 15, 2011 05:22PM | Registered: 12 years ago Posts: 3 |
Re: [WiiuseCpp] Unable use IR Track April 15, 2011 05:34PM | Registered: 14 years ago Posts: 379 |
Re: [WiiuseCpp] Unable use IR Track April 15, 2011 05:43PM | Registered: 12 years ago Posts: 3 |