On 30 March 2016 at 08:14, Andrey Perper <[email protected]> wrote:

> >I guess he wants to have the updateCallback called for "culled" geodes,
> or some way to check if the node was culled.
>
> Yes!! that is correct!
>

The OSG by default calls update callbacks on all nodes that have an update
callback, so works fine for culled and non culled nodes/drawables/statesets.

If you want to just do updates on objects that aren't culled and in the
view frustum then you'll be best using a cull callback, but would need to
take care if your application is multi-threaded as multiple threads could
end up reading/writing to the shared data structures.


>
> > I know too little about the specifics of your application.
> The Application has earth + missile tracks on earth.
> I just add these tracks to scene and my viewer must stay at point before
> adding. Camera rotating is performed around earth center
>

There is the osgGA::NodeTrackerManipulator, see the osgsimulation example -
it tracks an oversized cessna model as it tracks around the eath.

I suspect this camera manipualator isn't exactly what you'll need so will
need to consider writing your own camera manipulator to simple computing
the view matrix in the main loop and applying this to the viewer's master
Camera's view matrix each frame. If you do the later then there isn't any
need for camera manipulator.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to