From: Anders P. <an...@gm...> - 2008-12-05 13:01:15
|
Alternatively you can put smaller objects at the corners of the box and maintain their positions as the box is moved or resized. Clicking/dragging these objects would mean to perform one action while clicking the box can do something else. This has the additional benefit of showing the user graphically where to click for different effects. The main downside is the increased complexity. Any comments on this general solution? /Anders On Fri, Dec 5, 2008 at 12:48 PM, Stef Mientki <s.m...@ru...> wrote: > >> thanks Bruce, >> >> Bruce Sherwood wrote: >> > The general case is complicated, but it might not be too difficult in >> > a particular situation. From the documentation on mouse events: >> > >> > ray A unit vector pointing from camera in the direction of the mouse >> > cursor. The points under the mouse cursor are exactly { camera + t*ray >> > for t>0}. >> > >> > Also note the project() function for projecting the mouse position >> > onto a given plane. >> > >> > I'm afraid that it's up to you to use these tools; your question is >> > not a simple one. >> Well the question was simple, but the solution isn't ;-) >> I think for the moment (and maybe forever) I'm going to use >> alt/ctrl/shift to differentiate between actions. >> cheers, >> Stef >> >> > >> > Bruce Sherwood >> > >> > Stef Mientki wrote: >> >> hello, >> >> >> >> probably another simple question (for those who are known with >> >> vector algebra), >> >> how do I determine if I click in the corner region of a box or >> >> somewhere on the middle. >> >> >> >> the idea is that dragging, >> >> - should rotate the box if the start drag is in the corner >> >> - should move the object is hit some where in the middle >> >> >> >> thanks, >> >> Stef Mientki >> > >> > >> >> >> |