WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-12-2005, 03:49 PM
jargon jargon is offline
Member
 
Join Date: May 2005
Location: Es Bee
Posts: 9
Exclamation intersense orientation

I'm using an intersense box to orient a tennis racket. When I use the following code to interface the intersense with vizard:
*********************
racketOri = viz.add('intersense2.dls')
racket=viz.add('racket3.WRL')
racket.scale(1.8, 1.8, 1.8)
racket.rotate(-90,0,0)
racket.translate(0,0,0)
def mytimer(num):
racket.rotate(racketOri.get()[3],racketOri.get()[5], -
racketOri.get()[4])

viz.starttimer(0,0.01,-1)
viz.callback(viz.TIMER_EVENT,mytimer)
**********************

The racket orients correctly right until I roll the racket to a certain point. Then the racket yaws 180 degrees and pitches 180 degrees.

However When I use the following code
(employing the "link" command)
************
racketOri = viz.add('intersense2.dls')
racket=viz.add('racket3.WRL')
racket.scale(1.8, 1.8, 1.8)
racket.rotate(-90,0,0)
racket.translate(0,0,0)
racket.link(racket.Ori)
*****************

This problem goes away (I'm able to yaw pitch and roll 360 degree no problem) However I cannot rotate the racket because it's linked to the intersense orientation. I have two questions on this
1) Is there a way for me to orient the racket in Vizard such that I can use the link command - either resetting the intersense orientation or rotating the racket though it's linked.

2) Shouldn't these two pieces of code do the same thing? If there is a way I can fix the top code - this would solve the problem too.

I'd rather not rotate the model in 3ds max but if it came to that I could do that too.
Thanks for your help
Reply With Quote
 


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


All times are GMT -7. The time now is 07:35 AM.


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