WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-05-2009, 01:05 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
You can set the triangle's parent to be the line and then when you move or rotate the line the triangle will follow.
Code:
triangle = viz.endlayer(parent=line)
Reply With Quote
  #2  
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 02.bmp (146.6 KB, 6057 views)
File Type: bmp 01.bmp (133.9 KB, 6053 views)
Reply With Quote
  #3  
Old 08-11-2009, 01:41 AM
Chrissy2009 Chrissy2009 is offline
Member
 
Join Date: May 2009
Posts: 33
Oh, is there nobody who can help me???
Reply With Quote
Reply

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Draw a triangle instead of a point Chrissy2009 Vizard 1 07-21-2009 09:46 AM
Create line and vertex Chrissy2009 Vizard 2 07-20-2009 10:53 AM
Draw Vector in viewpoint lookat direction Chrissy2009 Vizard 2 05-30-2009 12:50 AM
Draw Line between Points Chrissy2009 Vizard 2 05-13-2009 04:42 AM
Draw Line between Points selected by mouse Johannes Vizard 7 01-07-2005 02:50 PM


All times are GMT -7. The time now is 07:16 PM.


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