WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-04-2006, 11:53 AM
Jerry Jerry is offline
Member
 
Join Date: Jun 2004
Posts: 105
How to get the position of a vertex

How can I get the position of a single vertex of an on-the-fly line?
The line has only two vertices and is being rotated by linking it
to an Intersense tracker. I want to obtain the positions of the
endpoints as it moves.
Reply With Quote
  #2  
Old 10-04-2006, 12:28 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
If you have the latest BETA version you can do the following:
Code:
pos = line.getVertex(0) #Get raw position of vertex 0
If you want to get the transformed vertex position then you will need to multiply the raw position with the lines transform:
Code:
pos = viz.Vector(line.getVertex(0))
pos = pos * line.getMatrix()
I've just added the ability to pass an optional parameter to getVertex which will automatically perform this calculation for you. It will be available in the next release.
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


All times are GMT -7. The time now is 05:18 AM.


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