View Single Post
  #1  
Old 05-13-2009, 10:43 AM
lilio lilio is offline
Member
 
Join Date: May 2009
Posts: 11
viz.vertex coordinates

Hello,

I want to create a vertex at the mouseclick position, but I don't know how to do it.

If I create two vertex points:
Code:
viz.startlayer(viz.POINTS)
viz.pointsize(10)
viz.vertexcolor(viz.RED)
viz.vertex(0,0,10)
viz.vertex(1,1,10)
line = viz.endlayer()
And afterthat I click with my mouse at these points and look at my output window:
Code:
print viz.mouse.getPosition()
Then I had to recognize, that there are absolutly different values.

The vertex are at [0,0,10] and [1,1,10] and my mouseposition shows [0.6,0.3] and [0.5,0.2]!

Are the vertex coordinates world coordinates? Or what means 0,0,10? And what are the mouseposition coordinates?

What's the reason for this difference. I want to create vertex at the mouseclick position.

Can anybody help me - please.
Reply With Quote