[osg-users] 回复: Understanding osg::CulingSet::pixelSize() andcomputePixelSizeVector()
Robert Osfield
robert.osfield at gmail.com
Mon Jul 31 04:34:56 PDT 2017
Hi Young,
On 31 July 2017 at 10:19, Young <337533078 at qq.com> wrote:
> Is _pixelSizeVector meaning the ratio of space distance to screen pixel?
>
I don't recall off the top of my head, but looking at the code from
CullingSet:
/** Compute the pixel of an object at position v, with specified
radius.*/
float pixelSize(const Vec3& v,float radius) const { return
radius/(v*_pixelSizeVector); }
The _pixelSizeVector is a set of ratio that give the size in local
coordinates of a pixel in screen space projected to a given distance away
from the eye point.
I'm not wording this well, it's a very long time since thought about the
code - it's not a bit of the OSG discussed much, it just quietly works away
doing it's job. I've written lots of code over the years and if it works
fine you really don't need to retain much knowledge about it...
Robert.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20170731/fe16740b/attachment.htm>
More information about the osg-users
mailing list