WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-02-2003, 01:16 PM
howard howard is offline
Member
 
Join Date: Oct 2003
Posts: 6
3d model rotation?

is there any way to rotate a 3d model? instead 'absolute' rotate, I need 'relative' rotate a 3d model imported from wrl fie.
Thanks in advance

Howard
Reply With Quote
  #2  
Old 10-02-2003, 01:36 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi Howard,

The following example will rotate a model 45 degrees along the absolute y axis:
Code:
model.rotate(0,1,0,45,viz.RELATIVE)
The following example will rotate a model 45 degrees along its local y axis:
Code:
viz.rotate(model,viz.YAXIS,45)
If you need more advanced control you could use the Transform class. Here's a simple example:
Code:
import vizmat
X = vizmat.Transform()

X.makeRot(0,1,0,90)
X.postRot(0,1,45)

model.update(X)
Hope this helps!
Reply With Quote
  #3  
Old 10-02-2003, 04:35 PM
howard howard is offline
Member
 
Join Date: Oct 2003
Posts: 6
Hi, farshizzo
Yes, it's what I'm looking for.
thank you.
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


All times are GMT -7. The time now is 07:49 PM.


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