[osg-users] cullcallback and visitor ?

Vincent Bourdier vincent.bourdier at gmail.com
Thu Sep 25 08:41:41 PDT 2008


Okay, it sound more complicated ...

Just to be sure :

class tileVisibleCallback : public osg::Drawable::CullCallback{
public:
    tileVisibleCallback();
    virtual void operator()(osg::Node* node, osgUtil::CullVisitor* nv);
    bool isCulled();

private:
    bool _cull;

};

Does it sound good for you ?
(the mix between Cullcallback and osgUtil looks strange for me... but...)

Thanks,
Regards.
  Vincent

2008/9/25 Robert Osfield <robert.osfield at gmail.com>

> On Thu, Sep 25, 2008 at 4:23 PM, Vincent Bourdier
> <vincent.bourdier at gmail.com> wrote:
> > Hi Robert,
> >
> > How is it possible to test directly against the view frustum ? manually ?
> or
> > is there a method still implemented ?
> > thanks.
>
> You create an osg::Polytope from the Camera's view and projection
> matrix which will be your frustum,  then transform by any transforms
> in the parent path to place the frustum in local coordinate, then test
> the objects bounding sphere/bound box against this frustum.  The
> osgUtil::PolytopeVisitor does most of this so could learn a lot form
> this.
>
> Robert.
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080925/fec68b1d/attachment-0003.htm>


More information about the osg-users mailing list