// MFNode.C

#include "vrml.H"

MFNode *MFNode::instantiate(class Proto *master)
{
  MFNode *instance = new MFNode(*this);
  for (int i=0; i<size; i++) {
    (*instance)[i] = s[i]->instantiate(master); 
  }
  return instance;
}

void MFNode::firstnodes(array<SFNode*> *result)
{
  if (result->size < size)
    result->grow(size - result->size);
  result->size = size;
  for (int i=0; i<size; i++)
    (*result)[i] = s[i]->firstnode();
}
