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

@@ -132,13 +132,22 @@ void PrimNodeRecord::addChild( Record *child )
{
if (child==NULL) return;
#if ENSURE_CHILD_IS_UNIQUE
ChildList::iterator itr = std::find(_children.begin(),_children.end(),child);
if (itr==_children.end())
{
#endif
// note ref_ptr<> automatically handles incrementing child's reference count.
_children.push_back(child);
child->_pParent = this;
#if ENSURE_CHILD_IS_UNIQUE
}
else
{
std::cout<<"Trying to add non unique child, ignoring"<<std::endl;
}
#endif
}