Creates a linkable object that takes the position information from one object and orientation information from another
Use to combine position and orientation information from two distinct sources.
A VizMergeLinkable object, which provides the following methods, in addition to the standard VizLinkable methods:
setPosLinkable(pos) | Set the linkable object that will provide position data. |
getPosLinkable() | Get the linkable object that provides position data. |
setOriLinkable(ori) | Set the linkable object that will provide orientation data. |
getOriLinkable() | Get the linkable object that provides orientation data. |
#Create moving object
objMove = viz.add('marker.wrl',color=viz.RED,pos=(0,1.8,3))
objMove.add(vizact.sequence(vizact.move(0,1,0,1),vizact.move(0,-1,0,1),viz.FOREVER))
#Create spinning object
objSpin = viz.add('marker.wrl',color=viz.BLUE,pos=(0,1.8,3))
objSpin.add(vizact.spin(0,1,0,90,viz.FOREVER))
#Create an object that will move and spin
marker = viz.add('marker.wrl',color=viz.PURPLE)
linkableMoveAndSpin = viz.mergeLinkable(objMove,objSpin)
viz.link(linkableMoveAndSpin,marker).postTrans([1,0,0])