This sounds like a great plan. It makes sense I think to set these up external to the model (as xml files).
As for using the 2D panel, maybe in the model scenegraph we could use a callback from the leaf where the panel will go to solve #1. Another technique that I was thinking about to solve #4 was something I read about in the Red book. If you plot hotspots on a x and y grid, then on a click you can redraw the panel in the backbuffer with the x,y of the hotspots encoded as the "color bits" for the objects, and have the same rotations applied. Then when you read back the color for the pixel that was clicked on you'll get the x,y of the pixel. (Sounds like it'd be fun to debug :-)) But the problem with this is it could get very complicated if you had mulitple panels in the same aircraft (dc3). I think #2 is solvable just by scaling and shifting the 2D panel according to the offsets (the 2D panel is already scaled). But the only solution to #3 is to be able to give instruments some depth. For that reason I think it makes sense to redo them in 3D. We would certainly have to have seperate configurations for the 2D panels being used in the 3D cockpits anyway, so we might as well do it right. I do think it is important to have it done in xml. Would we run into any problems with multiple layers of transparency in the 3D instruments? Also I would assume that rendering textures in 3D space would be more expensive than 2D, so this could end up slowing things down. Best, Jim David Megginson <[EMAIL PROTECTED]> said: > Currently, the 2D panel displayed in the 3D model is a kludge. It > works enough of the time that you can fly, but some strange things > happen from time to time: > > 1. The 2D panel instruments show through any 3D objects that should > obstruct them, such as the yoke. > > 2. The 2D panel does not move with the eyepoint location, so if you > provide x/y/z offsets for the pilot view, the gauges follow you. > > 3. Some of the 2D instruments look stupid when not viewed straight-on. > > 4. The instruments are not clickable. > > For #3, we will obviously need to mix 3D objects with 2D instruments, > as I already have in the C172 by providing a 3D throttle and mixture > control; for #4 and #2, Andy can add another transformation into his > code for the view offsets; and for #1, we can SSG-ify the panel and > add it to the 3D model's scene graph. > _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
