Sagewire Logo

How to grip and move the object with mouse

4 Message(s) by 2 Author(s) originally posted in 3d java


From: aleksandar Date:   Thursday, April 20, 2006
hi all,
I need help (as everyone else) :))

I'm trying to do the following.
whan i'm over some object and I press mouse button , after which i'm
doing the drag, I want that when mouse is moved the object also moves
but in such manner that the gripped point (on object)i s laways under
mouse pointer.

thanks


From: Ced Date:   Thursday, April 20, 2006
(sorry I can not speek english very well)

It's very easy, JAVA3D already have what you need. Take a look at
Mouse Translate in the JAVAdoc.

All you've to write is something like that :
MouseBehavior mouseTranslate = new MouseTranslate(this.mouseTransform);
this.mouseTransform.addChild(mouseTranslate);
mouseTranslate.setSchedulingBounds(schedulingBounds);

Do not forget to put the visual objects you want to move while your
mouse drag in the TransformGroup "mouseTranslate".

I hope my explanations are clear enough for you to understand :)

Take a look at the other MouseBehaviors : MouseRotate and MouseZoom,
they are also interresting. Don't use MouseZoom when you work with
parrallel projection.


From: Ced Date:   Friday, April 21, 2006
Ah, and use the right mouse button :)


From: aleksandar Date:   Friday, April 21, 2006
HI,

I'm very glad that someone has responded.

Unfortunately MouseTranslate behavior isn't what I had in mid. I've
tried with it in first place.

When the button is pressed over visual object and mouse is dragged the
selected object follows mouse movements and that is OK.
But I also want that during the drag, object lies under mouse cursor -
so that it seems that I have grabbed a point on that object and that
point acts like a handle for moving.

thanks



Next Message: Replace Shape3D in scene graph


Blogs related to How to grip and move the object with mouse

Petra Mare - luxury villa in Halkidiki, villa for rent in Kalithea ...
... snowboard shop high gas prices java games 2005 poetry contest laboratory ... trans union canon battery grip rolex datejust replica california home san ... center visual object wausau wisconsin washington dc limousine amerisuites ...

Koi Keeping Step 2 providing environment Step 2 Koi Keeping ...
... machinery power grip lynn allen autodesk palm beach county water utility rent ... quilting machines mystery science theater simple object access protocol ... school health lesson plans centrino turion vs roller mouse oregon fishing ...

Production Managers (Marlborough MA, Merrimack NH) (6) 0509315 ...
... skits juan de fuca plumbing fixtures furniture outlet object of my desire ... and lube express cool grip zebra eltron spy ware removal algae luggage cover ... to draw mickey mouse man poncho melanoma research world of warcraft vault ...

Intro to Computational Media Enter computational t...
Attempting to descrbie things through Processing, a Java-based programming language. ... it's one baby step at a time, I've gotten a solid grip on the fundamentals of computational thought. ... Use the mouse to move along the Z-Axis. ...

Sony Cyber-shot DSC-N1 Sony's DSC-N1 opens a new world of shooting ...
... radiator express visual object form tornado map of england rockville high ... backgammon electronic uninstall norton copywriting pr mouse trap car car ... vinyl fence euro star history of sweden cool grip java 2 platform eternal ...

Most schools have enough bus drivers As a nationwide shortage of ...
... graduation party favors renton townhouse golf grip technique 150cc moped ... state parks left handed mouse holiday inn indianapolis retirement communities ... in destin florida toy fair java object array theme comcast setup virginia ...


Programming | Sports | Autos

copyright 2006
Valid XHTML 1.0 Transitional