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


Python vizact.ontimer2函数代码示例

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


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

示例1: objectBasketed

def objectBasketed(e):
 global rhandtar, lhandtar, rSelectedNode, lSelectedNode, rhGrabber, lhGrabber, ALL_GRABBED_EVENT
 global yMove, basketBounding
 selectedNode = e.__dict__['released']
# if e.target == rhandtar:
#  selectedNode = rSelectedNode
# elif e.target == lhandtar:
#  selectedNode = lSelectedNode
 
 if selectedNode != None:
  globals_oa.AUDIO_SUCCESS.play()
  
  yMove = 0.02
  basketBounding = globals_oa.basket.getBoundingBox()
  vizact.ontimer2(0.001, 400, dropObject, selectedNode)
  
  rhGrabber.removeItems([selectedNode])
  lhGrabber.removeItems([selectedNode])
#  if e.target == rhandtar:
#   rhGrabber.release()
#  elif e.target == lhandtar:
#   lhGrabber.release()
  currentListOfGrabables = rhGrabber.getItems()
  print "currentListOfGrabables = " + str(currentListOfGrabables)
  if currentListOfGrabables == []:
   viz.sendEvent(ALL_GRABBED_EVENT)
开发者ID:vhilab,项目名称:Ocean-Acidification,代码行数:26,代码来源:TheCrystalReef.py

示例2: onEnter

 def onEnter(e): 
  global rightHandTarget, leftHandTarget
  print 'working'
  if e.target == rightHandTarget:
    vizact.ontimer2(.004, 100, vibrateRightHand)
  if e.target == leftHandTarget:
    vizact.ontimer2(.004, 100, vibrateLeftHand)
开发者ID:vhilab,项目名称:Ocean-Acidification,代码行数:7,代码来源:TCR2_Main.py

示例3: step

def step():
	global prevStep
	prevStep = "UP"
	print prevStep
	walk = vizact.walkTo([male.getPosition()[0] + 1, 0,male.getPosition()[2]], walkSpeed = 1)
	male.runAction(walk)
#	viz.MainView.velocity(0,0,1)
	vizact.ontimer2(.9,0,setDown)
开发者ID:zhengyeve,项目名称:Summer-Research,代码行数:8,代码来源:firstwalk.py

示例4: main

def main():
	global initialStep
#	if initialStep:
	time.sleep(3)
	text1.setPosition(0,1.6,4)
	print "START"
	vizact.ontimer2(0.33, 2, getInitial)
	vizact.ontimer(1/60, checkStep)
开发者ID:cstrachan88,项目名称:Summer-Research,代码行数:8,代码来源:TwoKinects.py

示例5: step

def step():
	global prevStep
	prevStep = "UP"
	
	x,y,z = unitVector(math.cos(math.radians(aveYaw+90)), 0, math.sin(math.radians(aveYaw+90)))
	viz.MainView.velocity(x, y, z)
	
	vizact.ontimer2(.9,0,setDown)
开发者ID:cstrachan88,项目名称:Summer-Research,代码行数:8,代码来源:Experiment1.py

示例6: h2co3FormationTriggerEvent

def h2co3FormationTriggerEvent(e):
	global rightHandTarget, leftHandTarget, bubble
	print "Forming H2CO3 now!!!"
	bubble.disable(viz.RENDERING)
	if e.target == rightHandTarget:
		vizact.ontimer2(0.004, 25, vibrateHandController, 2)
	elif e.target == leftHandTarget:
		vizact.ontimer2(0.004, 25, vibrateHandController, 1)
	viztask.schedule(H2CO3formation())
开发者ID:vhilab,项目名称:Ocean-Acidification,代码行数:9,代码来源:boat_scene.py

示例7: step

def step():
	global prevStep, stepCount, finalYaw
	prevStep = "UP"
	
	x,y,z = unitVector(math.cos(math.radians(finalYaw+90)), 0, math.sin(math.radians(finalYaw+90)))
	viz.MainView.velocity(x, y, z)
	stepCount += 1
	print stepCount
	vizact.ontimer2(.9,0,setDown)
开发者ID:cstrachan88,项目名称:Summer-Research,代码行数:9,代码来源:2kinectsHMD0706.py

示例8: step

def step():
	global prevStep, stepCounter
	prevStep = "UP"
	
	x,y,z = unitVector(math.cos(math.radians(aveYaw+90)), 0, math.sin(math.radians(aveYaw+90)))
	view.velocity(x, y, z)
	
	stepCounter += 1
	print stepCounter
	vizact.ontimer2(.9,0,setDown)
开发者ID:cstrachan88,项目名称:Summer-Research,代码行数:10,代码来源:CameraMove_KneeThreshold.py

示例9: training_display

def training_display(rt,acc):
	print "acc",acc
	if acc:
		msg = "RIGHT"
		correct_sound.play()
	else:
		msg = "WRONG"
		incorrect_sound.play()
	block_text.message(msg + " %.2fs"%rt)
	vizact.ontimer2(rate=MESSAGE_TIME, repeats=0,func=clear_text)
开发者ID:marloverket,项目名称:crosstask,代码行数:10,代码来源:crosstrial.py

示例10: step

def step():
    global prevStep, lastX, lastZ
    prevStep = "UP"
    x, z = calcUnitVector()
    viz.MainView.velocity(lastX, 0, lastZ)
    lastX = x
    lastZ = z
    walk = vizact.walkTo([x + male.getPosition()[0], 0, z + male.getPosition()[2]], walkSpeed=1)
    viz.MainView.lookAt([male.getPosition()[0], 2, male.getPosition()[2]])
    male.runAction(walk)
    vizact.ontimer2(0.9, 0, setDown)
开发者ID:cstrachan88,项目名称:Summer-Research,代码行数:11,代码来源:firstwalk.py

示例11: grabObject

def grabObject(e):
 global rSelectedNode, lSelectedNode, rhGrabber, lhGrabber
 if e.grabber == rhGrabber:
  rSelectedNode = e.grabbed
  globals_oa.rhViveTracker.setVibration(0.004)
  vizact.ontimer2(0.004, 25, vibrateHandController, 2)
 elif e.grabber == lhGrabber:
  lSelectedNode = e.grabbed
  globals_oa.lhViveTracker.setVibration(0.004)
  vizact.ontimer2(0.004, 25, vibrateHandController, 1)

 globals_oa.AUDIO_PICKUP.play()
开发者ID:vhilab,项目名称:Ocean-Acidification,代码行数:12,代码来源:TheCrystalReef.py

示例12: explode

def explode():
	print('apply spin')
#	fire.setPosition(0,0,0)
#	fire.applyForce( dir=[0,0,-0.01],duration=0.001)
#	fire.addAction(vizact.spin(1,1,0,500,viz.FOREVER))
#	fire.setScale([2,2,2])
#	fire.setScale([4,4,4])
#	fire.setAnimationSpeed(20)
	box1.visible(1)
	box1.setAnimationTime(0)
	box1.setAnimationState(0)
	fire.visible(1)
	vizact.ontimer2(0.6,0,hide,0)
开发者ID:willpower2727,项目名称:VR_scripts,代码行数:13,代码来源:Vizard46.py

示例13: testex

def testex(nothing):
	global rxplode
	global lxplode
	fire1.visible(1)
	fire2.visible(1)
	rxplode.visible(1)
	rxplode.setAnimationTime(0.1)
	rxplode.setAnimationState(0)
	vizact.ontimer2(0.6,0,hide1,0)
	lxplode.visible(1)
	lxplode.setAnimationTime(0.1)
	lxplode.setAnimationState(0)
	vizact.ontimer2(0.6,0,hide2,0)
开发者ID:willpower2727,项目名称:VR_scripts,代码行数:13,代码来源:BFback_GradualAdaptation_statictargets_rev9_twotargets_x.py

示例14: playNarrationFile

def playNarrationFile( obj=None ):
	#global selector
	#selector.disable()
	selector.removeOnDeselectCallback(RADIO)
	selector.removeOnSelectCallback(RADIO)
	selector.disable()
	print 'narrating'
	audio = obj.narrationFile[0]
	sound = viz.addAudio(audio)
	duration = sound.getDuration()
	sound.play()
	print "playing " + str(audio)
	vizact.ontimer2(duration+DELAY_UNTIL_NARRATION, 0, checkForNextEvent, obj)
	del obj.narrationFile[0]
开发者ID:vhilab,项目名称:homelessness-study,代码行数:14,代码来源:ApartmentNarration.py

示例15: grabObject

def grabObject(e):
	global rSelectedNode, lSelectedNode, rhtool, lhtool, objectName
	print "e.grabbed.id = " + str(e.grabbed.id)
	if e.grabber == rhtool:
		rSelectedNode = e.grabbed
		globals_oa.rhViveTracker.setVibration(0.004)
		vizact.ontimer2(0.004, 25, vibrateHandController, 2)
	elif e.grabber == lhtool:
		lSelectedNode = e.grabbed
		globals_oa.lhViveTracker.setVibration(0.004)
		vizact.ontimer2(0.004, 25, vibrateHandController, 1)
		#globals_oa.lhModel.disable(viz.RENDERING)
		#globals_oa.lhClosedModel.visible(True)
	globals_oa.AUDIO_PICKUP.play()
	objectName = getObjectName(e.grabbed)
开发者ID:vhilab,项目名称:Ocean-Acidification,代码行数:15,代码来源:scavengerhunt.py


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