OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

HMD_Tracker_Synchronization


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
Ugras Erdogan
Guest





PostPosted: Wed Nov 05, 2008 12:22 pm    Post subject:
HMD_Tracker_Synchronization
Reply with quote

Dear All,
I've some questions regarding tracker data synchronization with OSG. Here they are:

For tracker hardware read/write/control events, a seperate thread is spawned from the main thread and that thread handles all the hardware related communication via interrupt driven way and converts the binary readings to that of radian angle values.
For the purpose of thread synchronization, I use Windows OS synchronization objects. This is also needed because in the lack of synchronization the original frame rate of the application and the yaw/pitch/roll values acquired from the tracker may go out of sync.
My questions are:
1) (As I haven't noticed up to now), does OSG have synchronization objects for the purpose above?
2) After obtaining the yaw/pitch/roll values in sync, is "updating the virtual camera's viewmatrix" correct way of proceeding or does OSG has some specialized functions for this?

Best regards,
Ugras

------------------
Post generated by Mail2Forum
Back to top
Ulrich Hertlein
Guest





PostPosted: Fri Nov 07, 2008 12:40 am    Post subject:
HMD_Tracker_Synchronization
Reply with quote

Hello Ugras,

Quoting Ugras Erdogan <>:
Quote:
      For the purpose of thread synchronization,  I use Windows OS
synchronization objects. This is also needed because in the lack of
synchronization the original frame rate of the application and the
yaw/pitch/roll values acquired from the tracker may go out of sync.
    My questions are:
1)  (As I haven't noticed up to now), does OSG have synchronization  objects
for the purpose above?

OSG includes the OpenThreads library which has cross-platform support for
threads, mutices(?), conditions etc. Have a look in include/OpenThreads.

Quote:
2) After obtaining the yaw/pitch/roll values in sync, is "updating the
virtual camera's viewmatrix" correct way of proceeding or does OSG has some
specialized functions for this?

You'd usually update the viewmatrix manually in your main loop using one of the
osg::Camera::setViewMatrix*() functions.

Another possibility is to subclass osgGA::MatrixManipulator. Examples for this
are DriveManipulator, FlightManipulator, etc.

Cheers,
/ulrich


------------------
Post generated by Mail2Forum
Back to top
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General 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
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Happy New Year to all OSG Users Chris Hanson General 0 Mon Jan 07, 2019 10:17 am View latest post
No new posts osg-users Digest, Vol 138, Issue 27 Zachary1234 General 0 Tue Jan 01, 2019 1:16 am View latest post
No new posts osg-users Digest, Vol 137, Issue 14 poweruserm@live.com.au General 0 Fri Nov 16, 2018 11:16 pm View latest post
No new posts General Users starting questions in O... A Z General 1 Mon Oct 15, 2018 3:59 am View latest post
No new posts osg-users Digest, Vol 136, Issue 8 jonasydy General 0 Wed Oct 10, 2018 12:40 am View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP