From Luc Frauciel, "You'll find attached a new option that allow, when using LOD in USER_DEFINED_CENTER mode to expand the radius of the node by the radius of loaded objets.
Motivation ; When using PagedLODs, you don't always know the real size of loaded children, If it occurs that they are out of predefined bounds, picking on the parts that are out of bound will fail They also can be culled out too soon. The problem often occurs with long object (roads). I've modified LOD and ProxyNode to include this option." and later email: "Attached the UNION_OF_BOUNDING_SPHERE_AND_USER_DEFINED version There are impacts on some serializers (dae, osgWrapper). I haven't modified deprecated osg, since it's deprecated"
This commit is contained in:
@@ -110,6 +110,14 @@ BoundingSphere ProxyNode::computeBound() const
|
||||
{
|
||||
return BoundingSphere(_userDefinedCenter,_radius);
|
||||
}
|
||||
else if (_centerMode==UNION_OF_BOUNDING_SPHERE_AND_USER_DEFINED && _radius>=0.0f)
|
||||
{
|
||||
BoundingSphere bs = BoundingSphere(_userDefinedCenter,_radius);
|
||||
bs.expandBy(Group::computeBound());
|
||||
//alternative (used in TxpPagedLOD)
|
||||
// bs.expandRadiusBy(Group::computeBound());
|
||||
return bs;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Group::computeBound();
|
||||
|
||||
Reference in New Issue
Block a user