WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-16-2009, 07:54 PM
atamasan atamasan is offline
Member
 
Join Date: Jul 2009
Posts: 26
Question I have a question about link data

Hi.
Now I finally solve my problem(I posted before).
But only one thing make me confused.
When I use link, source data is different from destination data.

Uh, for example....

Code:
sensor=viz.addSensor('patriot')
hand=viz.add('hand.cfg')
bone=hand.getBone('bone index 1-2')
bone.lock()
link=viz.link(sensor,bone)

def print(e):
    print sensor.getEuler(), bone.getEuler()
viz.callback(viz.UPDATE_EVENT,print)
bone is linked, so I think "sensor.getEuler() and bone.getEuler() are same data, but it's different.

Do you have any idea for this?

Thank you very much.
Reply With Quote
  #2  
Old 09-17-2009, 06:47 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Link objects do not get updated until later on in the update cycle. There are a few ways to deal with this.

1) Register your callback with a priority greater than viz.PRIORITY_LINKS

2) Manually update the link before retrieving the values from the bone:
Code:
link.update()
print sensor.getEuler(), bone.getEuler()
3) Retrieve the euler values directly from the link:
Code:
print link.getEuler()
Reply With Quote
  #3  
Old 09-17-2009, 07:47 PM
atamasan atamasan is offline
Member
 
Join Date: Jul 2009
Posts: 26
Hi, farshizzo.
Thank you for your advice.
I didn't know "viz.PRIORITY_LINKS".
I'll try the manually update method you taught me.

Thank you again.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using 5DT plug-in with the data coming through network... mcicek Vizard 1 05-18-2009 06:17 PM
Flagging the Data Elittdogg Vizard 5 04-11-2008 12:40 PM
Flock of Birds question (again) Elittdogg Vizard 24 12-04-2007 10:37 AM
5DT Data Glove 5 Ultra Flexure Question bjgold Vizard 1 07-25-2006 03:58 PM
tracking using quaternarion data jfreeman Vizard 2 06-01-2005 09:48 AM


All times are GMT -7. The time now is 11:38 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2022, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC