当前位置: 首页>>代码示例>>Python>>正文


Python viz.go函数代码示例

本文整理汇总了Python中viz.go函数的典型用法代码示例。如果您正苦于以下问题:Python go函数的具体用法?Python go怎么用?Python go使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了go函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: main

def main():
	global loc_list
	global active_location
	loc_list = []
	
	mainSceneWindow = None
	cameraWindow = None
	cameraWindowView = None
	cam = None
	pause_screen = None
	nunchuck_disconnect_screen = None
	message_screen = None
	wiimote = None
	nunchuck_wiimote = None
	should_it_run = None
	
	mainSceneWindow, cameraWindow, cameraWindowView, cam, pause_screen, nunchuck_disconnect_screen, message_screen, wiimote, nunchuck_wiimote, should_it_run = init_settings(mainSceneWindow, cameraWindow, cameraWindowView, cam, pause_screen, nunchuck_disconnect_screen, message_screen, wiimote, nunchuck_wiimote, should_it_run)
	
	vizact.ontimer(0, moveCamera, nunchuck_wiimote, should_it_run)
	viz.callback(wii.EXT_CONNECT_EVENT,onConnect)
	viz.callback(wii.EXT_DISCONNECT_EVENT,onDisconnect)
	
	initializer(loc_list)
	arMarkerLoader(cam)
	wiimoteInitializer(wiimote, nunchuck_wiimote, should_it_run, message_screen)
	
	viz.go() # Inicia VIZ
	
	for item in loc_list:
		if item.space_name == "piazza.osgb":
			active_location = item
			item.addLocation()
开发者ID:luion,项目名称:virtual-ar-museum,代码行数:32,代码来源:universe.py

示例2: setup_world

    def setup_world(self):
        viz.setOption('viz.fullscreen.monitor', 1)
        #viz.setOption('viz.window.width', 2560)
        #viz.setOption('viz.window.height', 1040)
        #viz.setMultiSample(4)
        #viz.MainWindow.clip(0.01, 500)
        #viz.vsync(1)

        vizconfig.register(nvis.nvisorSX111())

        viz.go(viz.FULLSCREEN)
开发者ID:EmbodiedCognition,项目名称:tracing-experiment,代码行数:11,代码来源:main.py

示例3: main

def main():
    global TRACKER

    viz.go(0)

    # configure the phasespace.
    mocap = vrlab.Phasespace('192.168.1.230', freq=100., postprocess=True)
    mocap.start_thread()
    TRACKER = mocap.track_points(M)

    viztask.schedule(workflow)
开发者ID:EmbodiedCognition,项目名称:cube-experiment,代码行数:11,代码来源:configure.py

示例4: go

	def go(self):
		"""Use this command to start the application."""
		
			
		if self.__cave_mode:
			viz.go(viz.STEREO | viz.FULLSCREEN)
		else:
			viz.go(viz.FULLSCREEN)
				
		viz.mouse.setOverride(viz.ON)
		
		self.callback(viz.UPDATE_EVENT,self.__onUpdate)
开发者ID:WykonGoar,项目名称:CaveTargetSchooter,代码行数:12,代码来源:cavelib3.py

示例5: main

def main():

    viz.vsync(viz.ON)
    viz.window.setFullscreenMonitor([2])
    viz.setMultiSample(4)
    viz.MainWindow.clip(0.01, 200)

    viz.go(viz.FULLSCREEN)

    environment = viz.addChild("piazza.osgb")
    environment.setPosition(2.75, 0, -0.75)

    mocap = phasespace.Phasespace()

    head = mocap.get_rigidTracker("hmd")

    # DOES NOT ACCOUNT FOR RIGID BODY OFFSET DURING RESET

    # mocap.track_rigid('Resources/hmd-nvisMount.rb', center_markers=(1,2))
    head.link_pose(viz.MainView)

    # glove = mocap.track_points([8, 9, 10])

    paddle = mocap.track_rigid({17: (0, 0, 1), 19: (0, 0, 0), 20: (1, 0, 0), 22: (0, 1, 0)})

    mocap.start_thread()
    # mocap.start_timer()

    def log_mocap(timer_id):
        # print 'glove#9 pos {0[1]:.2f} {0[1]:.2f} {0[2]:.2f}'.format(*glove.get_marker(9))
        print "head    pos {0[0]:.2f} {0[1]:.2f} {0[2]:.2f}, quat {1[0]:.3f} {1[1]:.3f} {1[2]:.3f} {1[3]:.3f}".format(
            *head.get_pose()
        )
        print "main    " + str(viz.MainView.getPosition())
        # print 'paddle  pos {0[0]:.2f} {0[1]:.2f} {0[2]:.2f}, quat {1[0]:.3f} {1[1]:.3f} {1[2]:.3f} {1[3]:.3f}'.format(*paddle.get_pose())

    viz.callback(viz.TIMER_EVENT, log_mocap)
    viz.starttimer(0, 1, viz.FOREVER)

    def keydown(key):

        if key == "h":
            head.reset()
        if key == "H":
            head.save()
        elif key == "1":

            print "Marker Pos: " + str(mocap.get_MarkerPos(1))

    viz.callback(viz.KEYDOWN_EVENT, keydown)
开发者ID:YanjieGao,项目名称:ExperimentBase,代码行数:50,代码来源:phasespace_newTest.py

示例6: __init__

	def __init__(self):

		viz.go(viz.FULLSCREEN |viz.QUAD_BUFFER)
		viz.window.setFullscreen(1)

		#####################
		#setup CAVE
		polyMode = viz.POLY_WIRE
		#viz.setFarPlane(1)
		#viz.setMultiSample(4) #didn't observe a difference in landscapes with anti-aliasing.
		viz.window.setPolyMode(viz.POLY_WIRE)
		viz.vsync(viz.ON)#this may increase frame rate but may get tears
		viz.ipd(0.2) #20 cm apart eyes seemed right for our scaling.

		self.cave = vizcave.Cave()
开发者ID:dustinfreeman,项目名称:IglooKitchener,代码行数:15,代码来源:cave_man.py

示例7: __setupVizParams__

	def __setupVizParams__(self):
		
		#Just playing here#
		#viz.setMultiSample(8)
		#viz.fov(120)
		
		#Check monitor refresh rate and set stereo mode accordingly#
		monitor_RefreshRate = viz.getOption('viz.monitor.refresh_rate', type=int)
		#if(119 <= monitor_RefreshRate):
			#Turn on the physics engine
		viz.phys.enable() 
		viz.window.setFullscreenMonitor(2)
		viz.setMultiSample(8)
		viz.go(viz.FULLSCREEN | viz.QUAD_BUFFER)
		print "here"
开发者ID:performlabrit,项目名称:VRWalking-Preliminary,代码行数:15,代码来源:WEnvironment.py

示例8: InitHMD

def InitHMD():
	global collisionLimbBoxes
	if(USE_HMD):
		pptExtension.setup();
		viz.go(viz.FULLSCREEN)
		viz.clip(0.1)
		vizact.onupdate(0, pptExtension.pptUpdate, avatar, ghostAvatar, collisionLimbBoxes);
		if(len(collisionLimbBoxes) > 0):
			vizact.ontimer(1, pptExtension.refreshAvatar, ghostAvatar, avatar, collisionLimbBoxes);
		else:
			vizact.ontimer(1, pptExtension.refreshAvatar, ghostAvatar, avatar, None);
	else:
		pptSimulation.setup(avatar);
		viz.clip(0.1)
		viz.go(viz.FULLSCREEN);
		vizact.onupdate(0, pptSimulation.pptUpdate, avatar, ghostAvatar, collisionLimbBoxes);
开发者ID:vhilab,项目名称:thirdArm,代码行数:16,代码来源:MirrorTouchCubes2.py

示例9: InitHMD

def InitHMD():
#BL:start		
	global collisionLimbBoxes
#	if USE_HMD:
	pptextension.setup()
	if some_global_variables.headTrackingActive:
		viz.go(viz.HMD | viz.TRACKER)
	else:
		viz.go()
	viz.window.setSize(1260, 950)		
	#viz.go(viz.FULLSCREEN)
#BL:end
	viz.clip(0.1)
	vizact.onupdate(0, pptextension.pptUpdate, some_global_variables.avatar, some_global_variables.ghostAvatar, collisionLimbBoxes);
	if(len(collisionLimbBoxes) > 0):
		vizact.ontimer(1, pptextension.refreshAvatar, some_global_variables.ghostAvatar, some_global_variables.avatar, collisionLimbBoxes);
	else:
		vizact.ontimer(1, pptextension.refreshAvatar, some_global_variables.ghostAvatar, some_global_variables.avatar, None);
开发者ID:vhilab,项目名称:fiveArms,代码行数:18,代码来源:fiveArms.py

示例10: main

def main():
    viz.setOption('viz.fullscreen.monitor', 1)
    viz.setOption('viz.window.width', 2 * 640)
    viz.setOption('viz.window.height', 480)
    viz.setMultiSample(4)
    viz.MainWindow.clip(0.01, 500)

    vizconfig.register(nvis.nvisorSX111())

    viz.go(viz.FULLSCREEN)

    piazza = viz.addChild('piazza.osgb')

    mocap = phasespace.Mocap('192.168.1.230')

    head = mocap.track_rigid('Resources/hmd-nvis.rb', center_markers=(0, 5))
    head.link_pose(viz.MainView)

    glove = mocap.track_points([8, 9, 10])

    paddle = mocap.track_rigid({
      17:(0, 0, 1),
      19:(0, 0, 0),
      20:(1, 0, 0),
      22:(0, 1, 0),
    })

    mocap.start_thread()
    #mocap.start_timer()

    def log_mocap(timer_id):
        print 'glove#9 pos {0[1]:.2f} {0[1]:.2f} {0[2]:.2f}'.format(*glove.get_marker(9))
        print 'head    pos {0[0]:.2f} {0[1]:.2f} {0[2]:.2f}, quat {1[0]:.3f} {1[1]:.3f} {1[2]:.3f} {1[3]:.3f}'.format(*head.get_pose())
        print 'paddle  pos {0[0]:.2f} {0[1]:.2f} {0[2]:.2f}, quat {1[0]:.3f} {1[1]:.3f} {1[2]:.3f} {1[3]:.3f}'.format(*paddle.get_pose())

    viz.callback(viz.TIMER_EVENT, log_mocap)
    viz.starttimer(0, 1, viz.FOREVER)

    def keydown(*args):
        head.reset()
        paddle.reset()

    viz.callback(viz.KEYDOWN_EVENT, keydown)
开发者ID:EmbodiedCognition,项目名称:tracing-experiment,代码行数:43,代码来源:phasespace_test.py

示例11: InitHMD

def InitHMD():
	global collisionLimbBoxes
	if(USE_HMD):
#BL:start		
		viz.go(viz.HMD | viz.TRACKER)
		viz.window.setSize(1260, 950)		
		pptExtension.setup();
		#viz.go(viz.FULLSCREEN)
#BL:end
		viz.clip(0.1)
		vizact.onupdate(0, pptExtension.pptUpdate, avatar, ghostAvatar, collisionLimbBoxes);
		if(len(collisionLimbBoxes) > 0):
			vizact.ontimer(1, pptExtension.refreshAvatar, ghostAvatar, avatar, collisionLimbBoxes);
		else:
			vizact.ontimer(1, pptExtension.refreshAvatar, ghostAvatar, avatar, None);
	else:
		pptSimulation.setup(avatar);
		viz.clip(0.1)
		viz.go(viz.FULLSCREEN);
		vizact.onupdate(0, pptSimulation.pptUpdate, avatar, ghostAvatar, collisionLimbBoxes);
开发者ID:vhilab,项目名称:thirdArm,代码行数:20,代码来源:MirrorTouchCubes3.py

示例12: vhilGo

def vhilGo(rift=False, ppt1=False, OH=False, otherTrackerVirtualIDs=[], debug=False, homePos=[0,1.82,0], homeOri=[0,0,0]): #, **kwargs
	global RIFT
	global PPT1
	global DEBUG
	global HOME_POS
	global HOME_ORI
	
	# Run-context constants #
	RIFT = rift # Indicates whether we are going to run the simulation on an Oculus Rift.
	PPT1 = ppt1 # Indicates whether we are going to run the simulation in PPT1.
	DEBUG = debug # Indicates whether we are going to run the simulation in debug mode, enabling extra controls and features
	
	# HOME_POS, HOME_ORI: Starting position and orientation of viz.MainView.
	# reset() resets to the home position and home orientation by default.
	HOME_POS = homePos
	HOME_ORI = homeOri

	viz.go()
	reset()
	return setupHardware(OH, otherTrackerVirtualIDs)
开发者ID:vhilab,项目名称:VRITS-2015,代码行数:20,代码来源:vhil_devkit.py

示例13: InitHMD

def InitHMD():
    # BL:start
    global collisionLimbBoxes, isLeftHanded
    if USE_HMD:
        viz.go(viz.HMD | viz.TRACKER)
        viz.window.setSize(1260, 950)
        pptExtension.setup(isLeftHanded)
        # viz.go(viz.FULLSCREEN)
        # BL:end
        viz.clip(0.1)
        vizact.onupdate(0, pptExtension.pptUpdate, avatar, ghostAvatar, collisionLimbBoxes)
        if len(collisionLimbBoxes) > 0:
            vizact.ontimer(1, pptExtension.refreshAvatar, ghostAvatar, avatar, collisionLimbBoxes)
        else:
            vizact.ontimer(1, pptExtension.refreshAvatar, ghostAvatar, avatar, None)
    else:
        pptSimulation.setup(avatar)
        viz.clip(0.1)
        viz.go(viz.FULLSCREEN)
        vizact.onupdate(0, pptSimulation.pptUpdate, avatar, ghostAvatar, collisionLimbBoxes)
开发者ID:vhilab,项目名称:thirdArm,代码行数:20,代码来源:controlAppendages.py

示例14: setUp

def setUp():
	global currentCondition
	
	viz.setMultiSample(8)
	initGlobals()
	
	currentCondition = viz.choose('Select condition:', CONDITION_CHOICES)
	print "CurCondition:", currentCondition
	
	setFlags()

#	setUpRecording()
#
#	if YOKE_F:
#		setUpYoke()
#
#	if not FLYING_F:
#		setUpHelicopter()
#	
#	if(not confirmStates(currentCondition)):
#		viz.quit()
#		finish()  #TODO make it so that on failure no files are created.
#		return
#
#	#configData()
	
	if USE_HMD_F:
		setUpHMD()
		if not FLYING_F:
			setHeliInitPos()
	else:
		viz.go()
		viz.MainView.setPosition(START_POSITION_HELI)

	setUpWorld()

	setUpChild()
	
	setUpSound()
开发者ID:vhilab,项目名称:Demos,代码行数:39,代码来源:Flying_Demo_2015.py

示例15: __init__

    def __init__(self, filename=''):
        '''Opens and interprets configuration files for running experiments.

        This constructor opens both the system config (as defined by the
        <platform>.cfg file) and the experiment config (as defined by the given
        filename).

        Both configurations must conform the specs given in SYSTEM.ini and
        experiment.ini respectively. It also initializes the system as specified
        in the system config.
        '''
        self.exp = self.create_exp_config(filename)
        self.sys = self.create_sys_config()
        for path in self.sys['set_path']:
            viz.res.addPath(path)

        viz.window.setFullscreenMonitor(self.sys['displays'])
        viz.setMultiSample(self.sys['antiAliasPasses'])
        viz.MainWindow.clip(0.01, 200)

        self.writables = []
        self.writer = None
        self.mocap = None
        self.body_camera = None

        self._setup_hmd()
        self._setup_recorder()
        self._setup_eyetracking()
        self._setup_phasespace()
        self._setup_hiball()

        self.writables.append(self.mocap)
        self.writables.append(self.body_camera)

        if self.sys['use_fullscreen']:
            viz.go(viz.FULLSCREEN)
        else:
            viz.go()
开发者ID:EmbodiedCognition,项目名称:tracing-experiment,代码行数:38,代码来源:config.py


注:本文中的viz.go函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。