void EnvirePhysics::itemAdded(const TypedItemAddedEvent<PhysicsConfigMapItem>& e)
{
#ifdef DEBUG
  LOG_DEBUG(("[EnvirePhysics::ItemAdded] PhysicsConfigMapItem item received in frame *** " + e.frame + "***").c_str());
#endif
  PhysicsConfigMapItem::Ptr pItem = e.item;
  try
  {         
    //try to convert the item into a node Data
    NodeData * node = new NodeData;
    std::shared_ptr<NodeData> nodePtr(node);
    if(node->fromConfigMap(&pItem->getData(), ""))
    {
      Transform fromOrigin;
      if(originId.compare(e.frame) == 0)
      {
        //this special case happens when the graph only contains one frame
        //and items are added to that frame. In that case aksing the graph 
        //for the transformation would cause an exception
        fromOrigin.setTransform(TransformWithCovariance::Identity());
      }
      else
      {
        fromOrigin = control->graph->getTransform(originId, e.frame); 
      }
      node->pos = fromOrigin.transform.translation;
      node->rot = fromOrigin.transform.orientation;
      if (instantiateNode(nodePtr, e.frame))
      {
#ifdef DEBUG
        LOG_DEBUG(("[EnvirePhysics::ItemAdded] PhysicsConfigMapItem - Instantiated and stored the nodeInterface in frame ***" + e.frame + "***").c_str());
#endif
      }
    }
  }
  catch(const UnknownTransformException& ex)
  {
    cerr << ex.what() << endl;
  }
}