Re: [osg-users] Bigger bounding box to make picking (intersection) easier?

2014-03-31 Thread Alistair Baxter
osg::Box is the thing you are after. Create a ShapeDrawable for one, and add it to a group that is part of, or that contains your cow model. Then set node flags or a cull callback to make the ShapeDrawable invisible, and if you like, you could also set flags on the intersection visitor to only

[osg-users] Bigger bounding box to make picking (intersection) easier?

2014-03-28 Thread Petr Svoboda
Hi, I would like to ask if there is some way how to create bigger bounding box over some model to make it easier to pick it/ intersect with. For example if there is a cow.osg model and I want to pick it then how do it in a way that I dont need to click with my mouse exactly on that model but a

Re: [osg-users] Bigger bounding box to make picking (intersection) easier?

2014-03-28 Thread Trajce Nikolov NICK
Ahoj Petr, you can override the bound volume calculation with your own code via callback. Have a look in the Node class /** Callback to allow users to override the default computation of bounding volume.*/ struct ComputeBoundingSphereCallback : public osg::Object {

Re: [osg-users] Bigger bounding box to make picking (intersection) easier?

2014-03-28 Thread Robert Osfield
HI Petr, The ray intersection testing goes right down to the polygon level when testing for intersection so expanding the bounding box won't make any difference. Perhaps what you are looking for is the PolytopeIntersector, this allows you to create a screen aligned polytope that can intersection