WorldViz User Forum the difference between transform matrix and setEuler,setPosition,setScale
 Register FAQ Search Today's Posts Mark Forums Read

#1
08-23-2010, 07:41 PM
 arscarsc Member Join Date: Aug 2010 Posts: 1
the difference between transform matrix and setEuler,setPosition,setScale

I don't understand what is the difference between transform matrix and setEuler,setPosition,setScale. In order to explain explicitly, we can use the following code as an exmaple

(1)import viz
viz.go()

logo.setPosition(0,0,10)
logo.setEuler([90,0,0])

(2)import viz
import vizmat
viz.go()
logo.setPosition(0,0,10)
x = vizmat.Transform()
x.makeAxisAngle(0,1,0,90)
logo.setMatrix(x)
#2
08-24-2010, 09:17 AM
 farshizzo WorldViz Team Member Join Date: Mar 2003 Posts: 2,849
The node.setMatrix command sets the entire transform matrix of the node, which includes position, rotation, and scale. The individual setPosition, setEuler, setScale, etc.. command only affect that specific attribute.

In your first example, the position of the object will be (0,0,10) after the call to setEuler.

In your second example, the position of the object will be (0,0,0) after the call to setMatrix, since you didn't specify a position value for the matrix.

 Thread Tools Display Modes Rate This Thread Linear Mode Rate This Thread: 5 : Excellent 4 : Good 3 : Average 2 : Bad 1 : Terrible

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements Vizard Precision Position Tracker (PPT) Plug-in development

 Similar Threads Thread Thread Starter Forum Replies Last Post aghena Vizard 2 07-21-2010 09:24 AM GiudiceLab Vizard 0 11-27-2009 12:42 PM stefs Vizard 1 10-09-2009 10:15 AM Charlotte Li Vizard 1 05-18-2009 02:38 PM david Vizard 4 03-27-2003 09:18 AM

All times are GMT -7. The time now is 05:32 AM.