WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-27-2014, 10:29 AM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
Stereo Setting Example Code

Just a script exposing stereo settings with slider bars.

Code:
import viz
import vizconfig
import vizdragdrop
import vizshape

viz.go(viz.FULLSCREEN | viz.QUAD_BUFFER) #to enable quad buffer, must be in the start
viz.MainWindow.stereo(viz.ANAGLYPHIC)

#viz.MainWindow.ipd(.06)
#viz.MainWindow.screenDistance(1)
#viz.MainWindow.fov(40)
#viz.MainWindow.fusionDistance(2.5)

#Create a configurable object for stereo settings
bc= vizconfig.BasicConfigurable('stereo')
bc.addChoiceRadioItem('Stereo Format',[('Quad buffer',viz.QUAD_BUFFER), \
										('Anaglyphic',viz.ANAGLYPHIC), \
										('Side by Side TV',viz.STEREO_3DTV_SIDE_BY_SIDE), \
										('Top Bottom TV',viz.STEREO_3DTV_TOP_AND_BOTTOM),\
										('Horizontal Stereo for 2 channels',viz.STEREO_HORZ)],\
										viz.MainWindow.stereo,viz.MainWindow.getStereo)
bc.addFloatRangeItem('Inter-pulilary Distance',[-.5,.5],fset=viz.MainWindow.ipd,fget=viz.MainWindow.getIPD)
bc.addFloatRangeItem('Screen Distance',[0,5],fset=viz.MainWindow.screenDistance,fget=viz.MainWindow.getScreenDistance)
bc.addFloatRangeItem('Field of View Vertical',[10,150],fset=viz.MainWindow.fov,fget=viz.MainWindow.getVerticalFOV)
bc.addFloatRangeItem('Fusion Distance',[.2,10],fset=viz.MainWindow.fusionDistance,fget=viz.MainWindow.getFusionDistance)
vizconfig.register(bc)
vizconfig.getConfigWindow().setWindowVisible(True)

gallery = viz.add('gallery.osgb')

f = viz.add('vcc_female.cfg', pos=[0, 0, 2])
f.state(5)


import vizcam
tracker = vizcam.addPivotNavigate()
tracker.setPosition([0,1.5,0])
viz.link(tracker,viz.MainView)

#load files dropped on me
vizdragdrop.enable()
dropedModel = None
def onDropModelFile(e):
	global dropedModel
	if dropedModel:
		dropedModel.remove()
	else:
		gallery.remove()
		f.remove()
		vizshape.addGrid()
	dropedModel = viz.add(e.filenames[0])
	
vizdragdrop.onDropFile(None,onDropModelFile)
__________________
Paul Elliott
WorldViz LLC
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with using WIRKS without the Kinect in a mirror setting Jennifer Vizard 0 06-03-2013 03:17 PM
stereo fusing trouble with caveview pitbool Vizard 1 10-16-2012 08:00 PM
what is causing (a) slow frame rate and (b) spontaneous NVIDIA stereo off billjarrold Vizard 0 07-11-2012 01:25 PM
vizcave and quad-buffered stereo michaelrepucci Vizard 7 11-29-2011 11:15 AM
walkto plays no animation... k_iwan Vizard 15 06-10-2008 10:04 AM


All times are GMT -7. The time now is 03:22 AM.


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