Re: Locator 3D
- To: mathgroup at smc.vnet.net
- Subject: [mg84700] Re: Locator 3D
- From: m.r at inbox.ru
- Date: Thu, 10 Jan 2008 05:33:13 -0500 (EST)
- References: <fi0ndv$5c5$1@smc.vnet.net> <fibg4o$5qo$1@smc.vnet.net>
On Jan 9, 2:52=A0am, "Fred Klingener" <gigabitbuc... at gmail.com> wrote: > "???" <zhengji... at gmail.com> wrote in message > > news:flv5q1$2av$1 at smc.vnet.net... > > > Dear all, > > > I think we can get some inspiration from 3D games. > > > For example, Homeworld. By moving the mouse we are moving the 3D > > selection point on X-Y pane, then holding SHIFT down and moving the > > mouse to move the selection point on Z axis while (X, Y) are not > > changed. > > A natural enough approach to manipulating a pick cursor, but the crux here= > is relating the resulting 2D screen coordinates to a pick object in > Graphics3D space. > > A lot of the work can be done with user-accessible information (like > ViewMatrix), but there seem to be key data hidden. The display changes siz= e > with labeling option e.g. > > AFAIK the only place the complete transformation is exposed is in > EventHandler with MousePosition["Graphics3DBoxIntercepts"]. > > Fred Mouseover and Tooltip work in 3D as well: DynamicModule[{i = 0}, Graphics3D[ {AbsolutePointSize[5], MapIndexed[ Mouseover[Dynamic[i = 0; Point[#]], Dynamic[ i = #2[[1]]; {AbsolutePointSize[10], Red, Point[#]}]] &, RandomReal[{-1, 1}, {10, 3}]]}, Epilog -> Inset[Style[Dynamic[i], 24], ImageScaled[{.5, .95}]], PlotRange -> 1] ] Maxim Rytin m.r at inbox.ru