WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   assign object to a viewpoint (https://forum.worldviz.com/showthread.php?t=3765)

Saz 05-31-2011 01:55 AM

assign object to a viewpoint
 
Hi,
I want to assign two different objects to two different viewpoints and have tried various combinations gleaned from the tutorials and other forum entries (see below); however I've only acheived getting both of the quads in both of the windows (the non hashed code below) or nothing in either of the viewpoints

Code:

#add the road texture
#roadr = viz.add('roadld3.png',scene=viz.MainWindow)
#roadl = viz.add('roadld3.png',scene=rightView)
#roadr = viz.add('roadld3.png', parent=viz.SCREEN,SCENE=2)
#roadl = viz.add('roadld3.png',parent=viz.SCREEN,scene=1)


#create 2 windows
#Set main window size to half


leftWindow = viz.MainWindow
leftWindow.setSize([0.5,1])

#Add a new window to other half

rightWindow = viz.addWindow(pos=[0.5,1],size=[0.5,1])
rightWindow.clearcolor (0.5,0.5,0.5)

rightView = viz.addView()
rightWindow.setView(rightView)

roadr = viz.add('roadld3.png')
roadl = viz.add('roadld3.png')
#create a texture quad1 to add the road texture to
#and place it over ground
quadl = viz.addTexQuad(parent=viz.ORTHO,scene=leftWindow,texture=roadl)
quadr = viz.addTexQuad(parent=viz.ORTHO,scene=rightWindow,texture=roadr)

#quadr = viz.addTexQuad()
#quadr = viz.add(viz.TEXQUAD,viz.SCENE,2)
quadr.setScale(1,2,1)
quadr.setPosition(0,0.5,0,)
quadr.setEuler(0,90,0)
#quadr.texture(roadr)

roadr_position = 0.5
#groundr_position = 0

#create a texture quad left to add the road texture to
#and place it over ground

#quadl = viz.addTexQuad()
quadl.setScale(1,2,1)
quadl.setPosition(0,-0.5,0,)
quadl.setEuler(0,90,0)
#quadl.texture(roadl)
roadl_position = 0.5

Any help in whereabouts I'm going wrong would be great


All times are GMT -7. The time now is 09:35 PM.

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