|
From: Dirk S. <di...@tb...> - 2004-10-26 07:06:19
|
Morning Peter, Thanks for your answer; I will drop in the moment I'm stuck! 1) Using a 1:1 scale drawing a pallet of .46m becomes very difficult, since e.g. graphics.fillRect accepts only int's as parameters (this is in pixels, right?). Also I noticed that 'automagically' I get a nice tooltip in my animation window, showing the coordinates of my mousepointer both in 'world' and 'screen' coordinates. How do I turn this on/off? 2) Detecting collision (this has, for the moment, nothing to do with the animation). My pallet's have (they are Locatable) a getBounds method giving the static bounds of a pallet around (0,0,0). To detect collision between two objects I will use the (javax.media.j3d)Bounds.intersect method. Where to go from this point? > Do I need a getCurrentBounds method? How to "add" pallet.Location and pallet.getBounds() ? > In case of intersection, is it possible to detect the magnitude of penetration, so that I can make the pallet move as far as possible by subtracting penetration from initial deltaX,Y,Z ? > Why does Bounds.intersect() return (only) a boolean? 3) By the end of this day I would like to have working collision-detection on my pallets with a proper animation; this is where I wan't the scale of my animation to be properly defined, so that intersection of bounds coincides with collision of on-screen-rectangles. 4) My current work (in progress) is available on CVS: Module comparison2. I'm currently testing/developing the above with two pallets moving in opposite directions. Thanks for your time, Dirk -----Original Message----- From: Peter H.M. Jacobs [mailto:p.h...@tb...] Sent: dinsdag 26 oktober 2004 8:36 To: 'Dirk Samson'; 'Dsol-java (E-mail)' Subject: RE: [Dsol-java] Real / screen coordinates Hi Dirk, Today I will spend the entire day on some nice nerding.. I will upload the model of last week and show you how to use stuff.. To answer your question. Since the coordinates in DSOL reflect GIS coordinates, look at http://erg.usgs.gov/isb/pubs/gis_poster/ for more information. The easy way to understand the coordinates is to understand {x,y} in meters where positive x=right and positive y=up. On your screen the positive y=down. This is not DSOL specific but complies with international standards Peter Ps I you experience any problems today, please feel free to visit. -----Original Message----- From: dso...@li... [mailto:dso...@li...] On Behalf Of Dirk Samson Sent: Monday, October 25, 2004 4:11 PM To: Dsol-java (E-mail) Subject: [Dsol-java] Real / screen coordinates Dear dsol-guru's (this isn't a very specific question) Who can tell me more on the 'world' coordinates in the animation screen? Is there (where) a scale that can be defined? Where can I find more explanation (I think I know where to find the documentation) ? Groeten, dirk ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Dsol-java mailing list Dso...@li... https://lists.sourceforge.net/lists/listinfo/dsol-java |