Hi,
The start point is based on the position and rotation of the viewpoint. The line is then extended out from this position towards the direction of the viewpoint.
If you simply wanted to draw the lines on the screen then you wouldn't need the 3d coordinates, but this is the only way to it using 3d coordinates. If the mouse was selecting a 3d object in the world, then you could get the exact 3d point that the mouse is clicking on using the viz.pick command, but if you are simply clicking on any point on the screen then what you are doing now is fine.
|