Hi Robert,
I think you are right.
I am tring to use the PIXEL_SIZE_ON_SCREEN mode of LOD, and the most important 
is how to get a proper piexl threshold which used in the setRange(). So I want 
toknow is there a method to compute the pixel of the bounding sphere without 
the matrix (W, P, M). 


My method is     piexlParameter = bound.radius * bound.radius * C,  and C is a 
empirical value.  Is there a better method?


I am looking forward to your reply.
Young.


------------------ ???????? ------------------
??????: "Robert Osfield";<robert.osfi...@gmail.com>;
????????: 2017??7??31??(??????) ????7:34
??????: "OpenSceneGraph Users"<osg-users@lists.openscenegraph.org>; 

????: Re: [osg-users] ?????? Understanding osg::CulingSet::pixelSize() 
andcomputePixelSizeVector()



Hi Young,

On 31 July 2017 at 10:19, Young <337533...@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.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to