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
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
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
{
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
4 matches
Mail list logo