可视化系统的另外一个重要方面是子系统的选择。在VTK中,有一个类层次picker,被粗略地分成两类对象:一类对象根据与硬件相关方法和软件方法作比对来选择vtkProp(例如:ray-casting);另一类对象在一次picker运算之后,提供不同水平的信息。例如:一些picker仅提供XYZ世界空间的位置,而不指明它们选择了哪个vtkProp;其它picker...
拾取 拾取是用来选择场景中的物体,获取物体的信息 通常调用vtkAbstractPicker::Pick()方法拾取物体 不同的拾取子类,返回的拾取信息也不同,如物体的全局坐标,单元ID,点ID等 调用语法:Pick(SelectX,SelectY,SelectZ,Renderer) 与Renderer相关联的角色都是被拾取的对象 Pick方法不能直接调用,而是交由交互类vtkRenderWin...
Roderick.Huangupate vtk example build4a19a1b11天前 3 次提交 取消 提示:由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件 config_backup upate vtk example build 11天前 src_cell_picker upate vtk example build 11天前 src_cell_picker_vs_point_picker ...
在VTK中,有一个类层次picker,被粗略地分成两类对象:一类对象根据与硬件相关方法和软件方法作比对来选择vtkProp(例如:ray-casting);另一类对象在一次picker运算之后,提供不同水平的信息。例如:一些picker仅提供XYZ世界空间的位置,而不指明它们选择了哪个vtkProp;其它picker不但给出所选的vtkProp,还给出组成用于定义道具...
picker->Pick((double)pickPos[0], (double)pickPos[1], 0.0, m_ren); } protected: vtkRenderer* m_ren; }; 然后lbp->SetParameters(ren);把vtkRenderer传递进来,再添加事件处理 iren->AddObserver(vtkCommand::LeftButtonPressEvent, lbp); iren得到鼠标左击事件,并对vktPointPick进行PicK. ...
eval picker Pick [iren GetEventPosition] 0 ren1 } } For a double click the iren's RepeatCount var is set to 1. For a single click it's set to 0. Here's the full example (modified annotatePick.tcl): To perform a pick in the example below: move the cursor to the position in the...
Common/vtkProp returns NULL Rendering/vtkInteractorStyleImage returns a pointer to itself vtkCommand::StartPickEvent Rendering/vtkPropPicker returns NULL Rendering/vtkInteractorStyleImage returns a pointer to itself vtkCommand::EndPickEvent Rendering/vtkPropPicker returns NULL ...
VTK中使用鼠标拾取的例程,非常精练,来自清华大学CAD实验室内部资料(It is an example program about mouse pick using VTK from CAD lab of Qinghua University as close data.It is very te
40、pper.h"#include"vtkPropPicker.h"#include"vtkProperty.h"#include"vtkRenderWindow.h"#include"vtkRenderer.h"#include"vtkSTLReader.h"#include"vtkShrinkPolyData.h"intmain(intargc,char*argv口)/创建绘制器对象vtkRenderer*ren1=vtkRenderer二New();/设置相机re 41、n1->GetActiveCamera()->SetClippin...
# This example demonstrates cell picking using vtkCellPicker. It displays # the results of picking using a vtkTextMapper. # # First we include the VTK Tcl packages which will make available # all of the vtk commands to Tcl # package require vtk package require vtkinteraction # create ...