Clip the rays instead of shrinking them

This commit is contained in:
Guillaume Meunier
2024-11-01 14:13:58 +01:00
parent a5fda396b9
commit 1d9db26a6b
11 changed files with 99 additions and 78 deletions
+9
View File
@@ -175,6 +175,8 @@ struct scene_data
std::string name;
bool visible;
std::array<glm::vec4, 4> clipping_planes;
uint32_t layer_mask = 1;
std::vector<std::pair<size_t, glm::mat4>> joints; // Node index, inverse bind matrix of each joint
@@ -280,6 +282,13 @@ public:
return {scene->scene_nodes[id].parent_id, scene};
}
std::vector<node_handle> children()
{
assert(scene != nullptr);
return scene->find_children(*this);
}
operator bool() const
{
return id != scene_data::node::root_id;