Gamey
21-08-2006 13:42:01
This is kind of a general .NET/GUI question. Apologies.
The editor I am dabbling with needs to handle mouse and keyboard processing during normal .NET DoDragDrop. I am trying to place one of the Ogre::Movables in 3space. I can get the XY coordinates from the mouse position, but inferring Z is tough.
My current algorithm simply finds the intersection of the mouse ray with an XZ plane that has a y coordinate of 0. That works fine if I want to place things on the "floor". I want to allow a drag and drop from my palettes to the scene and also allow for the user to spin the mouse wheel or press keys that will alter the y coordinate of the drop operation.
Unfortunately. DoDragDrop kindly squashes all keyboard and mouse events. Alternate, more specific events, are used in their stead such as DragEnter, DragLeave, DragHover, GiveFeedback, and QueryContinueDrag. None of these give me access to the general state of the keyboard or to mouse events ( in my case I really need the mouse wheel event to fire.)
First, does anyone have a better proposal for placing the object in 3space? Second, is there a way to hook the DoDragDrap message loop at some more base level? Do I have to capture the mouse myself from my drag source and do it all manually? Any and all help is greatly appreciated.
The editor I am dabbling with needs to handle mouse and keyboard processing during normal .NET DoDragDrop. I am trying to place one of the Ogre::Movables in 3space. I can get the XY coordinates from the mouse position, but inferring Z is tough.
My current algorithm simply finds the intersection of the mouse ray with an XZ plane that has a y coordinate of 0. That works fine if I want to place things on the "floor". I want to allow a drag and drop from my palettes to the scene and also allow for the user to spin the mouse wheel or press keys that will alter the y coordinate of the drop operation.
Unfortunately. DoDragDrop kindly squashes all keyboard and mouse events. Alternate, more specific events, are used in their stead such as DragEnter, DragLeave, DragHover, GiveFeedback, and QueryContinueDrag. None of these give me access to the general state of the keyboard or to mouse events ( in my case I really need the mouse wheel event to fire.)
First, does anyone have a better proposal for placing the object in 3space? Second, is there a way to hook the DoDragDrap message loop at some more base level? Do I have to capture the mouse myself from my drag source and do it all manually? Any and all help is greatly appreciated.