View Single Post
  #11  
Old 06-05-2012, 03:52 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
You will need to "flip" the position/rotation values of the markers as well. You can use the link.swapPos and link.swapEuler commands to accomplish this. Here is some sample code:
Code:
import viz
viz.go()

#Add ARToolkit extension
ar = viz.add('artoolkit.dle')

#Create camera using first available webcam
camera = ar.addWebCamera()

#Flip background quad
camera.background.setEuler([180,0,0])
camera.background.setPosition([camera.texture.getSize()[0],0,0])

#Create a matrix marker with the specified id
marker = camera.addMatrixMarker(0,width=1000)

#Add logo model
logo = viz.add('logo.ive')

#Link logo model to marker sensor
link = viz.link(marker,logo)

#Swap X position and yaw,roll of euler rotation
link.swapPos([-1,2,3],target=viz.LINK_POS_OP)
link.swapEuler([-1,2,-3],target=viz.LINK_ORI_OP)
Reply With Quote