Wireshark DNS协议分析实战:从抓包到故障定位
2026/10/18 18:23:39
这是一个通用的范本。放在这里 后期方便自己使用
1,先重写一组鼠标交互,满足鼠标交互的需求
class MyStyle : public vtkInteractorStyleImage { public: static MyStyle* New(); vtkTypeMacro(MyStyle, vtkInteractorStyleImage); // 左键:只做平移,不调父类,彻底关掉 Window/Level void OnLeftButtonDown() override { FindPokedRenderer(Interactor->GetEventPosition()[0], Interactor->GetEventPosition()[1]); if (!CurrentRenderer) return; // GrabFocus 可选;如仍报错就用强转或删掉 // GrabFocus(static_cast<vtkCommand*>(EventCallbackCommand)); StartPan(); } // 鼠标移动:只在 VTKIS_PAN 状态下做平移 void OnMouseMove() override { if (this->State == VTKIS_PAN) { this->Pan