View Single Post
  #2  
Old 03-13-2013, 02:49 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,449
Here's an example that places markers around the panorama:
Code:
import viz
import vizmat
import vizshape

viz.setMultiSample(4)
viz.fov(60)
viz.go()

env = viz.addEnvironmentMap('townhall_L.jpg')
sky = viz.addCustomNode('skydome.dlc')
sky.texture(env)

viz.link( viz.Mouse , viz.addTexQuad(viz.SCREEN,texture=viz.add('crosshair.png')) )
viz.mouse.setVisible(viz.OFF)

def placeMarker():
	line = viz.MainWindow.screenToWorld(viz.mouse.getPosition())
	pos = vizmat.MoveAlongVector(line.begin,line.dir,40)
	shape = vizshape.addCircle()
	shape.color(viz.RED)
	shape.billboard()
	shape.setPosition(pos)
	
#place a marker when the left mouse is pressed
vizact.onmousedown(viz.MOUSEBUTTON_RIGHT,placeMarker)

import vizcam
vizcam.PanoramaNavigate()
Reply With Quote