[vtkusers] HELP vtkPointPicker question
xiaofeng qi
xiaofeng_qi at sina.com
Wed Oct 22 03:54:03 EDT 2003
Hi,vtkusers
I am using vtk+java to develop a application to visualize
some CFD data.I use vtkPointPicker to pick the point
from a section plane,then i use the point's coordinate
as start point of a streamline , but something cause me annoyed,
The point's coordinate i got from vtkPointPicker is not
the same to the start point of the streamline,when I
press the mouse ,and the streamline do not start from the
cursor'position, it starts from some place else.
here is some of my codes,
vtkPointPicker picker=new vtkPointPicker();
picker.InitializePickList();
picker.AddPickList(sectionActor);
picker.PickFromListOn();
picker.SetTolerance(0.01);
picker.Pick(lastX, lastY, 0, renWin.GetRenderer());
if(picker.GetPointId()<0){
System.out.println("Mouse point: ("+lastX+","+lastY+")");
System.out.println("notok");
}else{
double []selPt = picker.GetSelectionPoint();
double []pickPos = picker.GetPickPosition();
drawStreamline(pickPos);
}
..............................
Do i miss something?Any help will be appreciate.
Thanks !!!
xiaofeng qi
xiaofeng_qi at sina.com
2003-10-22
More information about the vtkusers
mailing list