Update the ReaderWriterATTR file so that it used the definitions that Joseph

Steel obtained from MPI.

Removed the unique child check from the flt::PrimRecord and osg::Group, this
allows more flexibility when specifing nodes, and is faster..
This commit is contained in:
Robert Osfield
2003-01-20 09:56:09 +00:00
parent 3723dcda1d
commit ec30f7d8a6
3 changed files with 64 additions and 26 deletions

View File

@@ -1,3 +1,4 @@
#include <osg/Group>
#include <osg/BoundingBox>
#include <osg/Transform>
@@ -53,7 +54,17 @@ void Group::traverse(NodeVisitor& nv)
bool Group::addChild( Node *child )
{
if (child && !containsNode(child))
if (!child) return false;
#if ENSURE_CHILD_IS_UNIQUE
if (containsNode(child))
{
notify(WARN)<<"Adding non unique child to osg::Group, ignoring call"<<std::endl;
return false;
}
#endif
if (child)
{
// note ref_ptr<> automatically handles incrementing child's reference count.
_children.push_back(child);