WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 02-28-2005, 02:29 PM
Johannes Johannes is offline
Member
 
Join Date: Jan 2005
Posts: 143
Well, maybe I'm just not good enough to pick a point on the line (because the line is so small....).
I just want to use this to get the position of a certain point in the scene...

Code:
def mouseclick(button):
	global beginPos0502, line0503
	pos = viz.mousepos()
	print 'mouse is currently at',pos
	if button == viz.MOUSEBUTTON_RIGHT:
		line = viz.screentoworld(viz.mousepos())
		begin = line[:3]
		end = line[3:]
		viz.startlayer(viz.LINE_LOOP)
		viz.vertex(begin)
		viz.vertex(end)
		line0503 = viz.endlayer()
		print end
	if button == viz.MOUSEBUTTON_LEFT:
		object = viz.pick()
		#if object.valid() and object != arrow:
		if (object.valid() and object ==airtrack.slider):
			pos = object.get(viz.POSITION)
			beginPos0502=pos[0]
			viz.mousedata(viz.ABSOLUTE,viz.ABSOLUTE)
			viz.callback(viz.MOUSEMOVE_EVENT, mymousemove)
			viz.mouse(viz.OFF)
	if button == viz.MOUSEBUTTON_MIDDLE:
		print 'middle'
		object = viz.pick()
		if (object.valid()and object ==line0503):
			print object.get(viz.POSITION)
Reply With Quote
 

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


All times are GMT -7. The time now is 07:34 AM.


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