WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   3d model rotation? (https://forum.worldviz.com/showthread.php?t=71)

howard 10-02-2003 01:16 PM

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

farshizzo 10-02-2003 01:36 PM

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!

howard 10-02-2003 04:35 PM

Hi, farshizzo
Yes, it's what I'm looking for.
thank you.


All times are GMT -7. The time now is 10:15 PM.

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