WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-19-2004, 05:17 PM
tavaksai tavaksai is offline
Member
 
Join Date: Jul 2004
Posts: 22
calculating angle differences

Hello,

I am trying to find a way to rotate a child in a hierarchy
in such a way that it matches the old rotation of
the parent after parent has been rotated.
Here is an example:


parent = viz.add('parent.wrl')
child = parent.add('child.wrl')
parent_euler = parent.get(viz.EULER)

parent.rotate(yaw1, pitch1, roll1)


now do child.rotate(yaw2, pitch2, roll2) such that
the child has the same rotation as (parallel to)
the parent did before parent rotated.

That is,
(parent_euler) == (child.get(viz.EULER, viz.ABSOLUTE_WORLD))

I am guessing that it may be possible to get the angle
difference between old parent rotation and new parent
rotation and then rotating child by that difference, I
just don't know how get the angle difference.

I am using Euler angles as examples here, but matrix trasformations would be ok also.

Is there maybe a way to detach child from parent using
the hierarchy.dlm plug-in and then reattaching them so that
child keeps old rotation (relative to world) after being attached
to parent?

Thanks in advance,
Max
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 08:19 AM.


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