View Single Post
  #1  
Old 08-05-2009, 07:46 AM
Chrissy2009 Chrissy2009 is offline
Member
 
Join Date: May 2009
Posts: 33
Draw line with a triangle at the end

Hi,

I want to draw a line and at the end of this line I want to draw an arrow.

I've made:
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)
But now I've got the problem, that the triangle should be drawn in the local coordinate sytem of the line. So that the arrows shows allways at the right direction.

I looked at the tutorial "Hierarchical Models", but this does not help.

I want to draw a line and at the end of this line there should be an arrow.

And it should be possible to rotate the line along with the arrow.

Can anybody help me - please?

Thanks a lot!
Reply With Quote