WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 05-05-2009, 12:47 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
You can use the matrix.preEuler methods to rotate objects relative to arbitrary coordinate frames. Here is how you would roll object1 relative to object2's coordinate frame:
Code:
m = object2.getMatrix()
m.preEuler(0,0,1)
object1.setQuat(m.getQuat())
You would use similar code to perform the rotation relative to the viewpoint by retrieving the matrix from the viz.MainView object.

Let me know if I misunderstood your question or you need more specific examples.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
retrieve Object names Geoffrey Vizard 11 12-11-2009 04:26 AM
how to pick up the object, move and rotate using mouse nasr Vizard 5 05-05-2009 03:11 AM
reseting an object durf Vizard 3 03-17-2009 11:48 PM
Child Object Rotation paulgoldberg Vizard 5 09-05-2006 11:33 AM
rotate to object jargon Vizard 1 08-08-2005 12:20 PM


All times are GMT -7. The time now is 01:35 PM.


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