Re: [osg-users] newbie pixelSize() vs. measured screen size query
Thanks Frederic - as you say, for the case of a square, you'd expect the bounding sphere diameter to contain the bounding box - ie. in this case the square itself. The problem I'm having is trying to relate the pixelSize() returned value to the pixel size of the square's diagonal as measured on the screen. I expected them to be identical, but they don't correlate at all. Is the returned value of pixelSize() for a bounding sphere an area/ diameter? Either way it doesn't seem to equate to the measurements I make from doing a screen grab and counting pixels. I have a feeling I'm missing some kind of transformation between computing the pixelSize and relating that to the measurements made on the screen. Paul -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=30607#30607 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] newbie pixelSize() vs. measured screen size query
- paul graham a écrit : Thanks Frederic - as you say, for the case of a square, you'd expect the bounding sphere diameter to contain the bounding box - ie. in this case the square itself. Only if your geometry is axis-aligned, but I supposed it is in your case. -Fred ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] newbie pixelSize() vs. measured screen size query
- paul graham a écrit : Thanks Frederic - as you say, for the case of a square, you'd expect the bounding sphere diameter to contain the bounding box - ie. in this case the square itself. Only if your geometry is axis-aligned, but I supposed it is in your case. I did a small drawing in case it is not clear : http://frbouvi.free.fr/flightsim/bounding_sphere.jpg -Fred ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] newbie pixelSize() vs. measured screen size query
Many thanks Frederic, I now see the point you're making. Still not sure exactly what pixelSize() returns - I may do some simple experiments without the billboard, maybe with just a simple sphere and see if the pixelSize() then correlates with screen pixel measurements - unfortunately I can't do any coding from home at the moment though. Paul -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=30611#30611 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] newbie pixelSize() vs. measured screen size query
Hi, I discovered recently that it is a bounding box that is first calculated for drawables. Then the bounding sphere of nodes is the bounding sphere of the bounding boxes. -Fred - paul graham a écrit : Hi, I've modified the osg billboard example and am examining the pixel size computed from one of the billboard's bounding spheres. I'm sure I'm missing something fundamental in my understanding of what's going on, but I expected the pixel size computed by pixelSize() to correspond to the length of the billboard's diagonal as measured on the screen? Can anyone explain to me the relationship between the pixel size returned from the pixelSize() function and the on-screen pixel size (ie. of the billboard) in this instance? Many thanks Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org