View Single Post
  #3  
Old 08-06-2009, 04:08 AM
Chrissy2009 Chrissy2009 is offline
Member
 
Join Date: May 2009
Posts: 33
Hey,
I've done this, but it does not work:

Code:
viz.startlayer(viz.LINES)
		viz.linewidth(5)
		viz.vertexcolor(0,0.6,0)
		viz.vertex(punkt1)
		viz.vertex(punkt2)
		
		viz.startlayer(viz.TRIANGLES)
		viz.vertex(1,0,0)
		viz.vertex(-1,0,0)
		viz.vertex(0,1,0)			
		name = viz.endlayer(scene=szene)
		triangle = viz.endlayer(parent=name)

		name.center(punkt1)
01.bmp shows my actual program. But the arrow isn't at the right position.

In 02.bmp I've described my problem. I want to draw a line and afterthat I want to draw the triangle in the local coordinate system of the line.

So, that I'm able to set the triangle allways on
Code:
viz.vertex(1,0,0)
		viz.vertex(-1,0,0)
		viz.vertex(0,1,0)
regardless of which is the direction of the line.

Hope somebody can help me.
Attached Images
File Type: bmp 01.bmp (133.9 KB, 1371 views)
File Type: bmp 02.bmp (146.6 KB, 1343 views)
Reply With Quote