• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python viz.go函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: vhilGo

def vhilGo(
    vive=False,
    ppt1=False,
    OH=False,
    otherTrackerVirtualIDs=[],
    debug=False,
    homePos=[0, 1.82, 0],
    homeOri=[0, 0, 0],
    keyboardcontrol=True,
    mode=0,
    **kwargs
):
    global VIVE
    global PPT1
    global DEBUG
    global HOME_POS
    global HOME_ORI

    # Run-context constants #
    VIVE = vive  # Indicates whether we are going to run the simulation on an HTC Vive.
    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(mode)

    if keyboardcontrol:
        keyboardControl(viz.MainView)

    return setupHardware(OH, otherTrackerVirtualIDs, **kwargs)
开发者ID:vhilab,项目名称:Ocean-Acidification,代码行数:36,代码来源:vhil_devkit_Vive.py


示例17: setUpHMD

def setUpHMD():
	global lhTracker, rhTracker, flyingLink, headTracker
	viz.window.setSize(1520,1205)
	viz.go(viz.TRACKER)

	
	view = viz.MainView
#	isense = viz.add('intersense.dle')
#	headTracker = isense.addTracker(port=1)
#	vizact.onkeydown('r',headTracker.resetHeading)
	#vrpn = viz.add('vrpn7.dle')
	#Tracker_HOSTNAME = '171.64.33.43'
	
	from vizconnect.util.virtual_trackers import OpticalHeading
	
	import steamvr
	# vive view will take the Main View (viz.MainView)
	hmd = steamvr.HMD()


		
### Trackers ###

	ORI_TRACKER = hmd.getSensor()
	offsetMarkerNode = viz.addGroup()
	headTracker = viz.link(ORI_TRACKER, offsetMarkerNode)

	lhTracker = steamvr.getControllerList()[0]
	rhTracker = steamvr.getControllerList()[1]
	
	viveViewLink = viz.link(headTracker, viz.MainView)

	
	if FLYING_F:
		flyingLink = viveViewLink
		flyingLink.postTrans(START_POSITION_BASE)
开发者ID:vhilab,项目名称:Demos,代码行数:36,代码来源:Flying_Demo_2015.py


示例18: display

	def display(self):
		"""
		Initialize the display
		
		Mode selection:
			0 - Regular computer
			1 - 3D TV
			2 - Oculus rift
		"""
		if self.displayMode == 0:
			viz.setMultiSample(4)
			viz.fov(60)
			viz.window.setSize([1280,720])
			viz.go()
			viz.window.setFullscreenMonitor(1)
#			viz.go(viz.FULLSCREEN) #viz.FULLSCREEN

		elif self.displayMode == 1:
			viz.setMultiSample(4)
			viz.go(viz.STEREO_HORZ | viz.FULLSCREEN)
			
		elif self.displayMode == 2:
			viz.go(viz.STEREO_HORZ)
			viz.setMultiSample(16)
			viz.window.setSize([1280,720])
			
			KEYS = {
				'reset'		: 'r',
				'camera'	: 'c'}
			
			# Helps reduce latency
			#do not use ? makes things worse.
			#viz.setOption('viz.glFinish',1)
		
		elif self.displayMode == 3:
			viz.setMultiSample(4)
			viz.fov(60)
			viz.go(viz.FULLSCREEN) #viz.FULLSCREEN
			viz.window.setFullscreenMonitor(2)

		# Initial direction of main view
		viz.MainView.setEuler([0,0,0])
		viz.MainView.setPosition([0,0,-3], viz.ABS_GLOBAL)
开发者ID:bmj8778,项目名称:sterescopicTableTop,代码行数:43,代码来源:init.py


示例19:

import viz
import viztask
import vizjoy
import math
import random
import time
import vizshape
import vizact
import datetime
import time
import Queue


viz.go(viz.PROMPT)
viz.collision(viz.ON)


''' *************************** KINECT CODE ***************************** '''
#myHead = vrpn.addTracker( '[email protected]', HEAD)
HEAD = 0
NECK = 1
TORSO = 2
WAIST = 3
LEFTCOLLAR = 4
LEFTSHOULDER = 5
LEFTELBOW = 6
LEFTWRIST = 7
LEFTHAND = 8
LEFTFINGERTIP = 9
RIGHTCOLLAR = 10
RIGHTSHOULDER = 11
开发者ID:cstrachan88,项目名称:Summer-Research,代码行数:31,代码来源:Experiment1.py


示例20:

Subject is intended to stand still on the treadmill wearing typical plugin gait with hip marker set.
Targets are displayed showing how far a subject should step forward.

In version 3 rev3, feedback, cursor, and target are on.

Treadmill moves the feet back to neutral after a step

rev 3 incorps a counter of successful steps
"""
import viz
import vizshape
import time
import vizinfo

viz.go(

viz.FULLSCREEN #run world in full screen
)

#viz.addChild('dojo.osgb')
# code to add the grid to the environment
#grid = vizshape.addGrid()

#initExtraWindows()

#viz.MainView.setPosition(0, 0, -1)
#viz.MainView.setEuler(0,0,0)

#set target tolerance for stride length

global targetL
targetL = 0.3
开发者ID:willpower2727,项目名称:VR_scripts,代码行数:32,代码来源:BFback_steplength_static_v3_rev3_FIT.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python viz.link函数代码示例发布时间:2022-05-26
下一篇:
Python viz.fov函数代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap