14#include <lagrange/ui/api.h>
15#include <lagrange/ui/Entity.h>
16#include <lagrange/ui/types/Frustum.h>
17#include <lagrange/ui/utils/mesh.h>
23struct MeshSelectionRender;
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,
49 Frustum local_frustum);
60 StringID element_type,
61 SelectionBehavior sel_behavior,
62 Entity selected_entity,
63 Frustum local_frustum);
69LA_UI_API
void clear_element_selection_render(Registry& r,
bool exclude_selected);
71LA_UI_API MeshSelectionRender& ensure_selection_render(Registry& r, Entity e);
76 MeshSelectionRender& sel_render,
77 const Entity& selected_mesh_entity,
78 const StringID& current_element_type);
80LA_UI_API
void mark_selection_dirty(Registry& r, MeshSelectionRender& sel_render);
91LA_UI_API
bool has_accelerated_picking(Registry& r, Entity e);
Lagrange UI Viewer and mini 3D engine.
Definition: AcceleratedPicking.h:22
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.
Definition: AABBIGL.h:30