View Single Post
  #4  
Old 04-14-2011, 05:04 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,458
For the second camera you can create a second window using a different scene. Does the following work for you?
Code:
import viz
viz.go()
 
left_window = viz.MainWindow
left_window.setSize(0.5,1)
 
right_scene = viz.addScene()
right_view = viz.addView(scene=right_scene)
right_window = viz.addWindow(view=right_view,size=[.5,1],pos=[0.5,1])
 
#Add ARToolkit extension
ar = viz.add('artoolkit.dle')
 
#Create left camera
left_cam = ar.addWebCamera(window=left_window)
 
#Create right camera
right_cam = ar.addWebCamera(window=right_window)
 
avatar = viz.addAvatar('vcc_male.cfg')
avatar.duplicate(scene=right_scene)
 
#Create marker from pattern file
marker1 = left_cam.addMarker('ar/patt.worldviz',width=1000)
viz.link(marker1, avatar)
marker2 = right_cam.addMarker('ar/patt.worldviz',width=1000)
viz.link(marker2, avatar)

Last edited by Jeff; 04-14-2011 at 06:48 PM.
Reply With Quote