I am struggling with capturing mouse move event.
e.g. I have this custom style and set it to the interactor.
namespace {
class vtkMouseMoveStyle : public vtkInteractorStyleTrackballCamera
{
public:
static vtkMouseMoveStyle* New();
vtkTypeMacro(vtkMouseMoveStyle, vtkInteractorStyleTrackballCamera);
virtual void OnLeftButtonUp() override
{
// Forward events
vtkInteractorStyleTrackballCamera::OnLeftButtonUp();
}
virtual void OnMouseMove() override
{
std::cout << "Mouse moved!";
}
};
vtkStandardNewMacro(vtkMouseMoveStyle);
} // namespace
But the OnMouseMove() method here only fires when I am holding left/right button and moving my mouse.
I would like to capture the event as soon as the cursor location changes inside the viewport. Can anyone point me to the right direction?
Thanks,
Cameron