[vtkusers] vtkPointWidget set the right position

ChenDawnWind cybfly1 at hotmail.com
Tue Apr 16 10:01:01 EDT 2013


Hi everyone,I want to position a point in the model,then i use the codes like this:
	vtkSmartPointer<vtkPointWidget> pointWidget = vtkSmartPointer<vtkPointWidget>::New();	pointWidget->SetPosition(center.x, center.y, 0);	pointWidget->SetInteractor(iren);	pointWidget->On();
But the point always appear at the corner of the outline of the model.So i search the answer in the examples and google, and tried:
        vtkSmartPointer<vtkPointWidget> pointWidget = vtkSmartPointer<vtkPointWidget>::New();        pointWidget->PlaceWidget();	pointWidget->SetPosition(center.x, center.y, 0);	pointWidget->SetInteractor(iren);	pointWidget->On();
or some other codes but the problem still. So i wanna know what codes should i use to achieve my goal?Thanks!
DawnWind.ChenCSU 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130416/08074827/attachment.htm>


More information about the vtkusers mailing list