From Steve Lunsford, "Attached is a copy of TXPNode.cpp with the repaired computeBounds call. I
discovered that TXPNodes were being culled out prematurely because the loaded sub-tiles resulted in a computed bounds that was smaller than the extents indicated in the archive. I think this fix should be fine. I can't think of any reason why we would want to use anything other than the archive extents."
This commit is contained in:
parent
b704045e6c
commit
030fe7d9ea
@ -104,11 +104,21 @@ void TXPNode::traverse(osg::NodeVisitor& nv)
|
||||
|
||||
osg::BoundingSphere TXPNode::computeBound() const
|
||||
{
|
||||
#if 1
|
||||
|
||||
// Steve Lunsford 10/28/05 : - Had to avoid using the child group nodes for bounds calculation
|
||||
// because apparently the loader doesn't load all the sub-tiles for this node, resulting in a Group::computeBounds
|
||||
// call which returns a size smaller than the actual size represented by this node so consequently this node gets culled out.
|
||||
// note, submission merged and rearranged by Robert Osfield as an #if #else just in case we need to revert.
|
||||
return osg::BoundingSphere( _extents );
|
||||
#else
|
||||
// original code which uses the extents of the children when one is available.
|
||||
if (getNumChildren() == 0)
|
||||
{
|
||||
return osg::BoundingSphere( _extents );
|
||||
}
|
||||
return Group::computeBound();
|
||||
#endif
|
||||
}
|
||||
|
||||
void TXPNode::setArchiveName(const std::string& archiveName)
|
||||
|
Loading…
Reference in New Issue
Block a user