Hum the position are defined in space coordinate so you need to explicitely make them in world coordinate. When you create the vtkLineWidget and give it his position, take the renderer where the vtkLineWidget will be added and do that :<br>
<br>vtkRenderer renderer;<br>renderer.SetDisplayPoint(x,y,0); <br><br>Where x y are the position of the mouse in vtk display coordinate and 0 means you will put the line on the near plane (1 for the far plane...).<br><br>
and follow by I thing like that :<br><br>renderer.DisplayToWorld();<br>double[] worldPoints = renderer.GetWorldPoint();<br>lineWidget->SetPoint1(worldPoints);<br>etc.<br><br><br><br><div class="gmail_quote">2008/6/27 Sercani <<a href="mailto:sercanimailgroups@gmail.com">sercanimailgroups@gmail.com</a>>:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-US">
<div>
<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">Hi Julian, </span></p>
<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">Codes are too long to write down here so I am sending drawing
class files as a rar file to you. I am sending wxWidgets mouse events to
GlassPanel class and it handles (or will handle) everything and creates
dynamically an instance of ShapesStructure (a line3D or angle3D) and these classes
handles the drawing stuff. As you see in the codes comments I've tried many
things but coulnd't manage to draw shapes correctly. I've done my
new tryings in Line3D class and I was trying something new when I got your mail
so I don't know what is inside that class right now :D. Thanks for your
help and interest already…</span></p>
<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">Have a nice day,</span></p>
<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">Yours sincerely…</span></p>
</div>
</div>
</blockquote></div><br><br clear="all"><br>-- <br>Julian Ibarz