WiiLi Wiki frontpage Include your post in the News Get links Hoteles Quito
WiiLi.org Forum Index WiiLi.org
a new revolution
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

IR: accessing X and Y data WITHOUT setting the mouse cursor?

 
Post new topic   Reply to topic    WiiLi.org Forum Index -> WiiremoteJ
View previous topic :: View next topic  
Author Message
joshue



Joined: 22 Mar 2008
Posts: 2

Digg It
PostPosted: Sat Mar 22, 2008 9:05 pm    Post subject: IR: accessing X and Y data WITHOUT setting the mouse cursor?

I'm interested in getting X and Y data for use as a pointer, but not actually setting the position of the actual system mouse cursor. (I'm using multiple wiimotes for a multi-user drawing program).

setting the mouse seems to be a capability of wiiremoteJ but I can't figure out how to use the script to access the X and Y position data without setting it.

apologies if this is obvious or easy to do - if someone could point me in the right direction I would be hugely appreciative. maybe there is a good script for converting the IR data out there (taking into account the roll of the wiimote).

thanks so much!

=josh
Back to top
View user's profile Send private message Visit poster's website
Cha0s
Site Admin


Joined: 17 Jan 2007
Posts: 421

Digg It
PostPosted: Sun Mar 23, 2008 12:40 am    Post subject:

Well, you have to do the calculations manually. But you can get raw position data (a value from 0 to 1 indicating where the dot was seen) by using the IREvent class and a WiiRemoteListener. For more details, check out the API docs. Wink
_________________
Cha0s
Back to top
View user's profile Send private message
joshue



Joined: 22 Mar 2008
Posts: 2

Digg It
PostPosted: Sun Mar 23, 2008 2:36 am    Post subject:

ah I see.

the reason I was asking was that I saw the wiiremotej.WiiRemoteMouse and wiiremotej.IRMouse interfaces,
specifically the IRMouse.processMouseEvent and thought that they were doing those calculations internally: now I see it just takes an average of each of the four light points and computes a center point from that...

thanks for the clarification. might be a nice addition to add in a future version of wiiremotej
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    WiiLi.org Forum Index -> WiiremoteJ All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group