开发者

ActiViz .NET LeftButtonReleaseEvent: Where did i click

开发者 https://www.devze.com 2023-02-19 06:29 出处:网络
I\'m working with ActiViz .NET (VTK) and have a small problem. When I register a event (for ex. the LeftButtonReleaseEvt), I can\'t find out where on the RenderWindowControl I clicked.The event is ca

I'm working with ActiViz .NET (VTK) and have a small problem.

When I register a event (for ex. the LeftButtonReleaseEvt), I can't find out where on the RenderWindowControl I clicked. The event is called.

        ...       
        rwcVtk.RenderWindow.GetInteractor().LeftButtonPressEvt += new vtkObject.vtkObjectEventHandler(RenderWindow_LeftButtonReleaseEvt);            
    }

    void RenderWindow_Le开发者_开发知识库ftButtonReleaseEvt(vtkObject sender, vtkObjectEventArgs e)
    {
        //TODO: Where did i click?
    }

Can somebody help me? There isn't much documentation on that out there I think.


I didn't try out this, but maybe your are looking for this property:

this.Interactor.GetLastEventPosition();

To see this working go to your Activiz Examples folder "Examples\VolumeRendering\CS" and see that example.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号