Esempio n. 1
0
/* virtual */ void Serializer::visit(node::SunLightNode* node) {

  if (is_visible(node)) {
    data_->sun_lights_.push_back(node);

    visit_children(node);
  }
}
Esempio n. 2
0
/* virtual */ void Serializer::visit(node::TexturedQuadNode* node) {

  if (is_visible(node)) {

    add_bbox(node);

    data_->textured_quads_.push_back(node);

    visit_children(node);
  }
}
Esempio n. 3
0
/* virtual */ void Serializer::visit(node::RayNode* node) {

  if (is_visible(node)) {

    if (draw_rays_) {
      data_->rays_.push_back(node);
    }

    visit_children(node);
  }
}
Esempio n. 4
0
/* virtual */ void Serializer::visit(node::VolumeNode* node) {

  if ( is_visible(node) ) {
    if ( !node->data.get_volume().empty() ) {
      add_bbox(node);
      data_->volumenodes_.push_back(node);
    }

    visit_children(node);
  }
}
Esempio n. 5
0
/* virtual */ void Serializer::visit(node::SpotLightNode* node) {

  if (is_visible(node)) {

    add_bbox(node);

    data_->spot_lights_.push_back(node);

    visit_children(node);
  }
}
Esempio n. 6
0
  Statement* CheckNesting::operator()(Definition* n)
  {
    if (!is_mixin(n)) return n;

    Definition* old_mixin_definition = this->current_mixin_definition;
    this->current_mixin_definition = n;

    visit_children(n);

    this->current_mixin_definition = old_mixin_definition;

    return n;
  }
Esempio n. 7
0
void distribute_forall::operator()(expr * f, expr_ref & result) {
    m_todo.reset();
    flush_cache();

    m_todo.push_back(f);

    while (!m_todo.empty()) {
        expr * e = m_todo.back();
        if (visit_children(e)) {	        
            m_todo.pop_back();
            reduce1(e);
        }                
    }

    result = get_cached(f);
    SASSERT(result!=0);
    TRACE("distribute_forall", tout << mk_ll_pp(f, m_manager) << "======>\n" 
          << mk_ll_pp(result, m_manager););
Esempio n. 8
0
 // return true if n contains a variable in the range [begin, end]
 bool operator()(expr * n, unsigned begin = 0, unsigned end = UINT_MAX) {
     m_contains   = false;
     m_window     = end - begin;
     m_todo.reset();
     m_cache.reset();
     m_todo.push_back(expr_delta_pair(n, begin));
     while (!m_todo.empty()) {
         expr_delta_pair e = m_todo.back();
         if (visit_children(e.m_node, e.m_delta)) {
             m_cache.insert(e);
             m_todo.pop_back();
         }
         if (m_contains) {
             return true;
         }
     }
     SASSERT(!m_contains);
     return false;
 }
Esempio n. 9
0
/* virtual */ void Serializer::visit(node::GeometryNode* node) {


  if (is_visible(node))
  {
    if (!node->get_filename().empty() && !node->get_material().empty())
    {
      add_bbox(node);


      // add geometry to the serialized scene, if it exists in database
      if (gua::GeometryDatabase::instance()->is_supported(node->get_filename()))
      {
        data_->geometrynodes_[std::type_index(typeid(*node))].push_back(node);
      }
    }

    data_->materials_.insert(node->get_material());

    visit_children(node);
  }
}
Esempio n. 10
0
/* virtual */ void Serializer::visit(node::Node* node) {
  if (is_visible(node)) {
    visit_children(node);
  }
}