libs/yocto/yocto_scene.cpp
// Split bvh nodes according to a type
Split bvh nodes according to a type
Split bvh nodes according to a type
static pair<int, int> split_nodes(vector<scene_bvh_primitive>& primitives,
    int start, int end, scene_bvh_type type) {
  switch (type) {
    case scene_bvh_type::default_: return split_middle(primitives, start, end);
    case scene_bvh_type::highquality: return split_sah(primitives, start, end);
    case scene_bvh_type::middle: return split_middle(primitives, start, end);
    case scene_bvh_type::balanced:
      return split_balanced(primitives, start, end);
    default: throw std::runtime_error("should not have gotten here");
  }
}
static pair < int , int > split_nodes ( vector < scene_bvh_primitive > & primitives , int start , int end , scene_bvh_type type ) { switch ( type ) { case scene_bvh_type :: default_ : return split_middle ( primitives , start , end ) ; case scene_bvh_type :: highquality : return split_sah ( primitives , start , end ) ; case scene_bvh_type :: middle : return split_middle ( primitives , start , end ) ; case scene_bvh_type :: balanced : return split_balanced ( primitives , start , end ) ; default : throw std :: runtime_error ( " " ) ; } }
Split bvh nodes according to a type
Split bvh nodes according to a type