Esempio n. 1
0
  //----------------------------------------------------------------------------
  void DummyRouting::collectNodes(LinkDescription::HyperEdge* hedge)
  {
    bool no_route = hedge->get<bool>("no-route");

    auto fork =
      std::make_shared<LinkDescription::HyperEdgeDescriptionForkation>();
    hedge->setHyperEdgeDescription(fork);
    fork->position = hedge->getCenter();

    //float2 offset = hedge->get<float2>("screen-offset");

    // add regions
    for( auto& node: hedge->getNodes() )
    {
      if(    node->get<bool>("hidden")
          || (no_route && !node->get<bool>("always-route")) )
        continue;

      // add children (hyperedges)
      for( auto& child: node->getChildren() )
        collectNodes(child.get());

      if( node->get<bool>("hidden") )
        continue;

      segment_t segment;
      segment.nodes.push_back(node);

      fork->outgoing.push_back(segment);

//      if( !node->get<std::string>("outside-scroll").empty() )
//        outside_nodes.push_back(node);
    }
  }
Esempio n. 2
0
void
NBOwnTLDef::setParticipantsInformation() {
    // assign participating nodes to the request
    collectNodes();
    // collect the information about participating edges and links
    collectEdges();
    collectLinks();
}
Esempio n. 3
0
void CollisionTest::collectNodes(Node* root)
{
	for (int i = 0; i < root->getChildrenSet()->size(); i++)
	{
		if (root->getChildrenSet()->at(i)->hasObject()){
			addNode(root->getChildrenSet()->at(i));
			collectNodes(root->getChildrenSet()->at(i));
		}
		//TODO: If you want a collision with sound, you have to upgrade it yourself 
	}
}
Esempio n. 4
0
  //----------------------------------------------------------------------------
  uint32_t DummyRouting::process(unsigned int type)
  {
    if( !_subscribe_links->isValid() )
    {
      LOG_DEBUG("No valid routing data available.");
      return 0;
    }

    LinkDescription::LinkList& links = *_subscribe_links->_data;
    for( auto it = links.begin(); it != links.end(); ++it )
      collectNodes(it->_link.get());

    return RENDER_DIRTY | MASK_DIRTY;
  }
Esempio n. 5
0
CollisionTest::CollisionTest(Node* rootNode)
{
	collectNodes(rootNode);
}