14#include <lagrange/ui/Entity.h>
15#include <lagrange/ui/api.h>
16#include <lagrange/ui/types/Frustum.h>
17#include <lagrange/ui/utils/mesh.h>
28LA_UI_API std::optional<RayFacetHit>
29intersect_ray(Registry& r, Entity e,
const Eigen::Vector3f& origin,
const Eigen::Vector3f& dir);
45 StringID element_type,
46 SelectionBehavior sel_behavior,
47 Entity selected_entity,
48 Entity active_viewport,
60 StringID element_type,
61 SelectionBehavior sel_behavior,
62 Entity selected_entity,
69LA_UI_API
void clear_element_selection_render(Registry& r,
bool exclude_selected);
77 const Entity& selected_mesh_entity,
78 const StringID& current_element_type);
91LA_UI_API
bool has_accelerated_picking(Registry& r, Entity e);
Frustum defined using 6 planes.
Definition Frustum.h:43
Lagrange UI Viewer and mini 3D engine.
Definition AcceleratedPicking.h:23
LA_UI_API bool enable_accelerated_picking(Registry &r, Entity e)
Computes acceleration structure (igl::AABB) for faster ray-triangle intersection Entity can be entity...
Definition mesh_picking.cpp:383
LA_UI_API bool select_visible_elements(Registry &r, StringID element_type, SelectionBehavior sel_behavior, Entity selected_entity, Entity active_viewport, Frustum local_frustum)
Selects visible mesh elements (sets is_selected attribute)
Definition mesh_picking.cpp:74
LA_UI_API bool select_elements_in_frustum(Registry &r, StringID element_type, SelectionBehavior sel_behavior, Entity selected_entity, Frustum local_frustum)
Selects mesh elements intersecting a frustum (sets is_selected attribute)
Definition mesh_picking.cpp:137
LA_UI_API std::optional< std::pair< Entity, RayFacetHit > > intersect_ray(Registry &r, const Eigen::Vector3f &origin, const Eigen::Vector3f &dir, ui::Entity root=ui::NullEntity, Layer visible_layers=Layer(true), Layer hidden_layers=Layer(false))
Intersect ray with meshes in root's hierarchy Returns a pair of intersected entity and the correspond...
Definition default_entities.cpp:502
LA_UI_API void update_selection_render(Registry &r, MeshSelectionRender &sel_render, const Entity &selected_mesh_entity, const StringID ¤t_element_type)
Update materials and visibility of different mesh elements.
Definition mesh_picking.cpp:323
Main namespace for Lagrange.
Singleton component storing materials and temporary entities for selected mesh element visualization.
Definition MeshSelectionRender.h:24