WorldViz User Forum

WorldViz User Forum (
-   Vizard (
-   -   How to get the position of a vertex (

Jerry 10-04-2006 10:53 AM

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.

farshizzo 10-04-2006 11:28 AM

If you have the latest BETA version you can do the following:

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:

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.

All times are GMT -7. The time now is 10:47 PM.

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