I think the simplified model would need to be more complicated than a simple 2d array eventually, to handle multi-story buildings and the like. Arrays (or whatever construct you desire) would need to be stored for each level, and the class would automatically determine the correct plane to check for heights based on where the viewer is in 3d space.
----- Original Message ----- From: "Florin Herinean" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, February 21, 2003 7:19 AM Subject: [JAVA3D] AW: [JAVA3D] AW: [JAVA3D] Advantages of picking over consulting t he actual geo metry As you say, it's valid to use it every frame and so on, but I wouldn't do it. For the type of thing you are doing, as I could see from your posted image, I would use a simplified model to do the picking, eventually an *extremely* simplified model, like a b&w height bitmap. Knowing the distance to the ground will be simply a lookup into a table based on x-y, avoiding completely the picking mechanism. Cheers, Florin -----Urspr�ngliche Nachricht----- Von: Rob Nugent [mailto:[EMAIL PROTECTED]] Gesendet: Freitag, 21. Februar 2003 13:07 An: [EMAIL PROTECTED] Betreff: Re: [JAVA3D] AW: [JAVA3D] Advantages of picking over consulting the actual geo metry Florin, The trouble is that the Locale.pickAll() and Shape3D.intersect() is that they are essentially the *only* mechanisms provided by Java3D for testing for intersections between ray, segment, etc and geometry in the scene. Yes, calling these from a user interaction as a result of a mouse click is a common use case. However, it is entirely valid that I should e.g. want to pick the object under my view platform every frame or use these routines to do collision detection. They are the only capabilities provided by Java3D that allow me to do this, and the garbage they produce can easily be excessive. Rob Florin Herinean wrote: > I think that "picking" should simply do that. I mean you move the mouse over > the screen, and "pick" something. In that case you need the whole picking > framework, and since the picking is done only when you click the mouse, it > shouldn't generate so much garbage. After all, how quickly can you click the > mouse buttons ??? For the rest like terrain following and maybe collision, > the program itself can be constructed so that it can be really very > efficient, without the picking framework, as was posted before. > > However, I do see one circumstance when you can use picking for terrain > following, when you don't know anything about the terrain. You navigate over > a terrain which was provided by a 3rd party program and you or your program > doesn't have a single clue of how it looks like. > > Cheers, > > Florin ========================= To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help". --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.449 / Virus Database: 251 - Release Date: 1/27/2003 =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
