|
std::string | get_name (const Registry &r, Entity e) |
|
bool | set_name (Registry &r, Entity e, const std::string &name) |
|
const GlobalTime & | get_time (const Registry &r) |
|
constexpr size_t | get_max_layers () |
|
RenderContext & | get_render_context (Registry &r) |
|
ViewportComponent & | get_render_context_viewport (Registry &r) |
|
Camera & | get_viewport_camera (Registry &r, ViewportComponent &viewport) |
|
const Camera & | get_viewport_camera (const Registry &r, const ViewportComponent &viewport) |
|
Camera & | get_viewport_camera (Registry &r, Entity e) |
|
const Camera & | get_viewport_camera (const Registry &r, Entity e) |
|
void | register_default_component_widgets () |
|
LA_UI_API void | set_material (Registry &r, Entity meshrender_entity, std::shared_ptr< Material > mat) |
|
LA_UI_API Entity | show_mesh (Registry &r, const Entity &mesh_entity, StringID shader=DefaultShaders::PBR, const ShaderDefines &shader_defines={}) |
|
LA_UI_API Entity | show_submesh (Registry &r, const Entity &mesh_entity, std::shared_ptr< Material > material, entt::id_type submesh_id) |
|
LA_UI_API Entity | show_mesh (Registry &r, Entity mesh_entity, Entity scene_node_entity, StringID shader=DefaultShaders::PBR, const ShaderDefines &shader_defines={}) |
|
LA_UI_API Entity | show_mesh (Registry &r, Entity mesh_entity, Entity scene_node_entity, std::shared_ptr< Material > material) |
|
LA_UI_API Entity | show_vertex_attribute (Registry &r, const Entity &mesh_entity, const std::string &attribute, Glyph glyph) |
|
LA_UI_API Entity | show_facet_attribute (Registry &r, const Entity &mesh_entity, const std::string &attribute, Glyph glyph) |
|
LA_UI_API Entity | show_edge_attribute (Registry &r, const Entity &mesh_entity, const std::string &attribute, Glyph glyph) |
|
LA_UI_API Entity | show_corner_attribute (Registry &r, const Entity &mesh_entity, const std::string &attribute, Glyph glyph) |
|
LA_UI_API Entity | show_indexed_attribute (Registry &r, const Entity &mesh_entity, const std::string &attribute, Glyph glyph) |
|
LA_UI_API void | set_colormap (Registry &r, Entity meshrender_entity, std::shared_ptr< Texture > texture) |
|
LA_UI_API void | set_colormap_range (Registry &r, Entity meshrender_entity, const Eigen::Vector4f &range_min, const Eigen::Vector4f &range_max) |
|
LA_UI_API void | set_colormap_range (Registry &r, Entity meshrender_entity, const std::pair< Eigen::VectorXf, Eigen::VectorXf > &range) |
|
LA_UI_API std::shared_ptr< Material > | get_material (Registry &r, Entity meshrender_entity) |
|
Transform & | get_transform (Registry &r, Entity e) |
|
template<typename Derived > |
Eigen::Affine3f & | set_transform (Registry &r, Entity e, const Derived &local_transform) |
|
template<typename Derived > |
Eigen::Affine3f & | apply_transform (Registry &r, Entity e, const Derived &local_transform) |
|
template<typename MeshType > |
Entity | add_mesh (Registry &r, std::shared_ptr< MeshType > mesh, const std::string &name="Unnamed mesh", StringID shader=DefaultShaders::PBR) |
|
template<typename MeshType > |
Entity | add_mesh (Registry &r, std::unique_ptr< MeshType > mesh, const std::string &name="Unnamed mesh", StringID shader=DefaultShaders::PBR) |
|
template<typename MeshType > |
Entity | load_mesh (Registry &r, const lagrange::fs::path &path_to_obj, bool load_materials=true, const std::string &name="Unnamed mesh", StringID shader=DefaultShaders::PBR) |
|
LA_UI_API void | set_mesh_vertices_dirty (Registry &r, Entity mesh_entity) |
|
LA_UI_API void | set_mesh_normals_dirty (Registry &r, Entity mesh_entity) |
|
LA_UI_API void | set_mesh_dirty (Registry &r, Entity mesh_entity) |
|
LA_UI_API void | set_show_attribute_dirty (Registry &r, Entity scene_entity) |
|
LA_UI_API void | set_mesh_attribute_dirty (Registry &r, Entity mesh_entity, IndexingMode mode, const std::string &name) |
|
LA_UI_API Entity | get_meshdata_entity (Registry &r, Entity scene_entity) |
|
LA_UI_API MeshData & | get_meshdata (Registry &r, Entity scene_or_mesh_entity) |
|
std::shared_ptr< Material > LA_UI_API | create_material (Registry &r, entt::id_type shader_id, const ShaderDefines &shader_defines={}) |
|
LA_UI_API Entity | add_camera (Registry &r, const Camera &camera=Camera::default_camera(1, 1)) |
|
LA_UI_API void | clear_scene (Registry &r) |
|
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 corresponding hit If root == ui::NullEntity, entire scene is traversed.
|
|
LA_UI_API IBL | generate_default_ibl (size_t resolution=256) |
| Creates pre-packaged IBL. More...
|
|
LA_UI_API void | set_camera_scheme (Keybinds &keybinds, DefaultCameraScheme camera_scheme) |
| Set camera control scheme from DefaultCameraScheme. More...
|
|
LA_UI_API bool | has_camera_scheme (const Keybinds &keybinds, DefaultCameraScheme camera_scheme) |
| Do the keybinds have one of the default camera schemes?
|
|
LA_UI_API Keybinds | initialize_default_keybinds () |
| Initializes all default keybinds.
|
|
LA_UI_API DefaultPanels | add_default_panels (Registry ®istry) |
|
LA_UI_API void | reset_layout (Registry ®istry) |
|
LA_UI_API void | register_default_shaders (Registry &r) |
|
LA_UI_API void | register_default_tools (Tools &tools) |
|
LA_UI_API void | select (Registry &r, const std::function< void(Registry &)> &selection_system) |
|
StringID | string_id (const std::string &str) |
|
StringID | string_id (const char *str) |
|
template<typename T > |
void | component_clone (Registry *w, Entity src, Entity dst) |
|
template<typename T > |
void | component_move (Registry *w, Entity src, Entity dst) |
|
template<typename T > |
void | component_add_default (Registry *w, Entity dst) |
|
template<typename Component > |
void | register_component (const std::string &display_name=entt::type_id< Component >().name().data()) |
|
template<typename Component , auto Func> |
void | register_component_widget () |
|
template<typename Component > |
void | register_component_widget (const std::function< void(Registry *, Entity)> &fn) |
|
void | show_widget (Registry &w, Entity e, const entt::meta_type &meta_type) |
|
template<typename Resolvable > |
void | show_widget (Registry &r, Entity e, const Resolvable &resolvable) |
|
LA_UI_API bool | button_unstyled (const char *label) |
|
LA_UI_API bool | button_toolbar (bool selected, const std::string &label, const std::string &tooltip="", const std::string &keybind_id="", const Keybinds *keybinds=nullptr, bool enabled=true) |
|
LA_UI_API bool | button_icon (bool selected, const std::string &label, const std::string &tooltip="", const std::string &keybind_id="", const Keybinds *keybinds=nullptr, bool enabled=true, ImVec2 size=ImVec2(0, 0)) |
|
LA_UI_API Entity | add_component_panel (Registry &r, const std::string &name="Components") |
|
LA_UI_API Entity | add_keybinds_panel (Registry &r, const std::string &name="Keybinds") |
|
LA_UI_API Entity | add_logger_panel (Registry &r, const std::string &name="Logger") |
|
LA_UI_API std::shared_ptr< spdlog::sinks::sink > | get_logger_sink (Registry &r) |
|
LA_UI_API Entity | add_renderer_panel (Registry &r, const std::string &name="Renderer") |
|
LA_UI_API Entity | add_scene_panel (Registry &r, const std::string &name="Scene") |
|
LA_UI_API Entity | add_toolbar_panel (Registry &r, const std::string &name="Toolbar") |
|
LA_UI_API Entity | add_viewport_panel (Registry &r, const std::string &name, Entity viewport) |
|
LA_UI_API void | camera_controller_system (Registry ®istry) |
| Adjust camera based on CameraController.
|
|
LA_UI_API void | camera_turntable_system (Registry ®istry) |
| Rotates Camera based on CameraTurntable component.
|
|
LA_UI_API void | camera_focusfit_system (Registry ®istry) |
| Zooms Camera based on CameraZoomToFit component.
|
|
LA_UI_API void | render_background (Registry ®istry) |
|
LA_UI_API void | setup_vertex_data (Registry ®istry) |
|
LA_UI_API void | render_geometry (Registry ®istry) |
|
LA_UI_API void | render_post_process (Registry ®istry) |
|
LA_UI_API void | render_shadowmaps (Registry ®istry) |
|
LA_UI_API void | render_viewport (Registry ®istry, Entity e) |
| Render viewport Renders all geometry visible in this viewport into the viewport's framebuffer.
|
|
LA_UI_API void | render_viewports (Registry ®istry) |
| Render all enabled viewports. More...
|
|
LA_UI_API void | update_accelerated_picking (Registry &r) |
|
LA_UI_API bool | gizmo_system_is_using () |
|
LA_UI_API bool | gizmo_system_is_over () |
|
LA_UI_API void | gizmo_system_set_draw_list () |
|
LA_UI_API void | gizmo_system (Registry ®istry, const Camera &camera, const Eigen::Vector2f &canvas_pos, GizmoMode mode=GizmoMode::SELECT) |
|
LA_UI_API void | update_lights_system (Registry ®istry) |
|
LA_UI_API void | update_mesh_bounds_system (Registry &ctx) |
|
LA_UI_API void | update_mesh_buffers_system (Registry &ctx) |
|
LA_UI_API void | update_mesh_elements_hovered (Registry &r) |
|
LA_UI_API void | update_mesh_hovered (Registry &ctx) |
| Sets <Hovered> component if the mesh is hovered a ViewportPanel. More...
|
|
LA_UI_API void | update_scene_bounds_system (Registry &ctx) |
| Sets context <AABB> variable.
|
|
LA_UI_API void | update_transform_hierarchy (Registry ®istry) |
|
LA_UI_API entt::id_type | register_shader_as (Registry &r, entt::id_type id, const ShaderDefinition &def) |
|
LA_UI_API entt::id_type | register_shader (Registry &r, const ShaderDefinition &def) |
|
LA_UI_API entt::id_type | register_shader (Registry &r, const std::string &path, const std::string &display_name) |
|
LA_UI_API entt::id_type | register_shader_variant (Registry &r, entt::id_type id, const ShaderDefines &shader_defines) |
|
LA_UI_API ShaderResource | get_shader (Registry &r, entt::id_type id) |
|
LA_UI_API RegisteredShaders & | get_registered_shaders (Registry &r) |
|
LA_UI_API ShaderCache & | get_shader_cache (Registry &r) |
|
LA_UI_API bool | add_file_to_shader_virtual_fs (const std::string &virtual_path, const std::string &contents, bool overwrite=false) |
| Creates a file using virtual_path with contents in the shader virtual file system. More...
|
|
template<typename T > |
entt::id_type | register_tool_type (const std::string &display_name, const std::string &icon, const std::string &keybind) |
|
LA_UI_API AABB | get_bounding_box (const Registry ®istry, Entity e) |
| Returns Axis Aligned Bounding Box of the entity in world space If entity does not have bounds, returns an empty AABB.
|
|
LA_UI_API AABB | get_bounding_box_local (const Registry ®istry, Entity e) |
| Returns Axis Aligned Bounding Box of the entity in model space If entity does not have bounds, returns an empty AABB.
|
|
LA_UI_API AABB | get_selection_bounding_box (const Registry ®istry) |
| Returns Axis Aligned Bounding Box of all entities with <Selected> component If there's no selection returns an empty AABB.
|
|
LA_UI_API float | get_nearest_bounds_distance (const Registry ®istry, const Eigen::Vector3f &from, const Layer &visible, const Layer &hidden) |
| Returns the least distance between from and any point within any bounding box. More...
|
|
LA_UI_API float | get_furthest_bounds_distance (const Registry ®istry, const Eigen::Vector3f &from, const Layer &visible, const Layer &hidden) |
| Returns the greatest distance between from and any point within any bounding box. More...
|
|
LA_UI_API AABB | get_scene_bounding_box (const Registry ®istry) |
| Returns the bounding box of everything (must be set as context variable after update_scene_bounds)
|
|
LA_UI_API const Bounds & | get_scene_bounds (const Registry ®istry) |
| Returns the bounds of everything (must be set as context variable after update_scene_bounds)
|
|
LA_UI_API Bounds & | get_scene_bounds (Registry ®istry) |
|
LA_UI_API Color | colormap_viridis (float t) |
|
LA_UI_API Color | colormap_magma (float t) |
|
LA_UI_API Color | colormap_plasma (float t) |
|
LA_UI_API Color | colormap_inferno (float t) |
|
LA_UI_API Color | colormap_turbo (float t) |
|
LA_UI_API Color | colormap_coolwarm (float t) |
|
LA_UI_API std::shared_ptr< Texture > | generate_colormap (const std::function< Color(float)> &generator, int resolution=256) |
|
EventEmitter & | get_event_emitter (Registry &r) |
|
template<typename Event > |
void | on (Registry &r, std::function< void(Event &)> listener) |
| Register a listener for Event. More...
|
|
template<typename Event , typename... Args> |
void | publish (Registry &r, Args &&... args) |
| Trigger an event of type Event. More...
|
|
template<typename Event > |
void | forward_entity_event (Registry &r, Entity e) |
| Utility function for forwarding events that contain only an entity identifier.
|
|
template<typename Component , typename ConstructEvent , typename DestroyEvent > |
void | toggle_component_event (Registry &r) |
| Enable/Disable on_construct and on_destroy events depending on whether ConstructEvent and DestroyEvent have any listeners.
|
|
LA_UI_API FileDialogPath | open_file (const std::string &title, const fs::path &default_path=".", const std::vector< FileFilter > &filters={{"All Files", "*"}}) |
| Opens a native file dialog to open a single file. More...
|
|
LA_UI_API std::vector< FileDialogPath > | open_files (const std::string &title, const fs::path &default_path=".", const std::vector< FileFilter > &filters={{"All Files", "*"}}) |
| Opens a native file dialog to open multiple files. More...
|
|
LA_UI_API FileDialogPath | save_file (const std::string &title, const fs::path &default_path=".", const std::vector< FileFilter > &filters={{"All Files", "*"}}, FileSave overwrite_behavior=FileSave::ConfirmOverwrite) |
| Opens a native file dialog to save a file. More...
|
|
LA_UI_API FileDialogPath | open_folder (const std::string &title, const fs::path &default_path=".", FolderOpen open_behavior=FolderOpen::LastOpened) |
| Opens a native file dialog to select a folder. More...
|
|
LA_UI_API IBL | generate_ibl (const fs::path &path, size_t resolution=1024) |
| Utility functions for Image Based Lights (IBLs) More...
|
|
LA_UI_API IBL | generate_ibl (const std::shared_ptr< Texture > &background_texture, size_t resolution=1024) |
| Generates Image Based Light from given rectangular texture. More...
|
|
LA_UI_API Entity | get_ibl_entity (const Registry ®istry) |
| Returns first <IBL> entity found in registry. More...
|
|
LA_UI_API const IBL * | get_ibl (const Registry ®istry) |
| Returns pointer to the first IBL found in the registry. More...
|
|
LA_UI_API IBL * | get_ibl (Registry ®istry) |
|
LA_UI_API Entity | add_ibl (Registry ®istry, IBL ibl) |
| Adds IBL to the scene.
|
|
LA_UI_API void | clear_ibl (Registry ®istry) |
| Removes all ibls.
|
|
LA_UI_API bool | save_ibl (const IBL &ibl, const fs::path &folder) |
| Saves IBL as individual .png files in given folder. More...
|
|
LA_UI_API void | render_points (Registry &r, const std::vector< Eigen::Vector3f > &points) |
|
LA_UI_API void | render_point (Registry &r, const Eigen::Vector3f &point) |
|
LA_UI_API void | render_lines (Registry &r, const std::vector< Eigen::Vector3f > &lines) |
|
LA_UI_API void | upload_immediate_system (Registry &r) |
|
LA_UI_API InputState & | get_input (Registry &r) |
|
LA_UI_API const InputState & | get_input (const Registry &r) |
|
LA_UI_API Keybinds & | get_keybinds (Registry &r) |
|
LA_UI_API const Keybinds & | get_keybinds (const Registry &r) |
|
LA_UI_API InputState::Mouse & | get_mouse (Registry &r) |
|
LA_UI_API const InputState::Mouse & | get_mouse (const Registry &r) |
|
LA_UI_API std::shared_ptr< Texture > | load_texture (const fs::path &path, const Texture::Params ¶ms=Texture::Params()) |
|
LA_UI_API std::shared_ptr< Material > | convert_material (Registry &r, const fs::path &base_dir, const tinyobj::material_t &tinymat) |
| Convertrs tinyobj's material_t to UI's Material. More...
|
|
template<typename MeshType > |
Entity | load_obj (Registry &r, const fs::path &path, const io::MeshLoaderParams ¶ms=io::MeshLoaderParams()) |
| Loads obj as a single mesh. More...
|
|
template<typename MeshType > |
std::pair< Entity, std::vector< std::shared_ptr< Material > > > | load_obj_with_materials (Registry &r, const fs::path &path, const io::MeshLoaderParams ¶ms=io::MeshLoaderParams()) |
| Loads obj as a single mesh and materials. More...
|
|
LA_UI_API void | add_to_layer (Registry ®istry, Entity e, LayerIndex index) |
|
LA_UI_API void | remove_from_layer (Registry ®istry, Entity e, LayerIndex index) |
|
LA_UI_API bool | is_in_layer (Registry ®istry, Entity e, LayerIndex index) |
|
LA_UI_API bool | is_in_any_layers (Registry ®istry, Entity e, Layer layers_bitset) |
|
LA_UI_API bool | is_visible_in (const Registry ®istry, Entity e, const Layer &visible_layers, const Layer &hidden_layers) |
|
LA_UI_API LayerIndex | get_next_available_layer_index (Registry &r) |
|
LA_UI_API LayerIndex | register_layer_name (Registry ®istry, const std::string &name, LayerIndex index) |
|
LA_UI_API LayerIndex | register_layer_name (Registry ®istry, const std::string &name) |
|
LA_UI_API const std::string & | get_layer_name (Registry ®istry, LayerIndex index) |
|
LA_UI_API void | register_default_layer_names (Registry ®istry) |
|
Eigen::Vector3f | get_canonical_light_direction () |
|
LA_UI_API Entity | add_point_light (Registry &r, Eigen::Vector3f intensity=Eigen::Vector3f::Ones(), Eigen::Vector3f position=Eigen::Vector3f::Zero()) |
|
LA_UI_API Entity | add_directional_light (Registry &r, Eigen::Vector3f intensity=Eigen::Vector3f::Ones(), Eigen::Vector3f direction=-Eigen::Vector3f::UnitY()) |
|
LA_UI_API Entity | add_spot_light (Registry &r, Eigen::Vector3f intensity=Eigen::Vector3f::Ones(), Eigen::Vector3f position=Eigen::Vector3f::Ones(), Eigen::Vector3f direction=-Eigen::Vector3f::Ones(), float cone_angle=pi()/4.0f) |
|
LA_UI_API std::pair< Eigen::Vector3f, Eigen::Vector3f > | get_light_position_and_direction (const Registry &r, Entity e) |
|
LA_UI_API void | clear_lights (Registry &r) |
|
template<typename... Args> |
void | log_once (ui::Registry &r, spdlog::level::level_enum level, const std::string_view &fmt, Args &&... args) |
| Log message once per registry lifetime.
|
|
template<typename... Args> |
void | log_trace_once (ui::Registry &r, const std::string_view &fmt, Args &&... args) |
|
template<typename... Args> |
void | log_debug_once (ui::Registry &r, const std::string_view &fmt, Args &&... args) |
|
template<typename... Args> |
void | log_info_once (ui::Registry &r, const std::string_view &fmt, Args &&... args) |
|
template<typename... Args> |
void | log_warn_once (ui::Registry &r, const std::string_view &fmt, Args &&... args) |
|
template<typename... Args> |
void | log_error_once (ui::Registry &r, const std::string_view &fmt, Args &&... args) |
|
template<typename... Args> |
void | log_critical_once (ui::Registry &r, const std::string_view &fmt, Args &&... args) |
|
LA_UI_API Eigen::Matrix4f | normal_matrix (const Eigen::Affine3f &transform) |
| Returns 4x4 transformation matrix that can be used for normals Performs transpose inverse.
|
|
LA_UI_API Eigen::Projective3f | perspective (float fovy, float aspect, float zNear, float zFar) |
| Constructs perspective projection matrix. More...
|
|
LA_UI_API Eigen::Projective3f | ortho (float left, float right, float bottom, float top, float zNear, float zFar) |
| Constructs orthograpic projection matrix. More...
|
|
LA_UI_API Eigen::Matrix4f | look_at (const Eigen::Vector3f &eye, const Eigen::Vector3f ¢er, const Eigen::Vector3f &up) |
| Constructs "look at" view matrix,. More...
|
|
LA_UI_API Eigen::Vector3f | unproject_point (const Eigen::Vector3f &v, const Eigen::Matrix4f &view, const Eigen::Matrix4f &perspective, const Eigen::Vector4f &viewport) |
| Unprojects screen point (with x,y in screen coordinates and z in NDC) back to 3D world. More...
|
|
LA_UI_API float | pi () |
|
LA_UI_API float | two_pi () |
| 2 * pi
|
|
LA_UI_API Eigen::Vector3f | vector_projection (const Eigen::Vector3f &vector, const Eigen::Vector3f &onto) |
| Projects vector onto 'onto' vector.
|
|
LA_UI_API float | vector_angle (const Eigen::Vector3f &a, const Eigen::Vector3f &b) |
| Returns angle in radians between a and b.
|
|
template<typename MeshType > |
Entity | register_mesh (Registry &r, std::shared_ptr< MeshType > mesh) |
|
template<typename MeshType > |
Entity | register_mesh (Registry &r, std::unique_ptr< MeshType > mesh) |
|
template<typename V , typename F > |
lagrange::Mesh< V, F > & | cast_mesh (MeshData &mesh_data) |
|
template<typename MeshType > |
MeshType & | get_mesh (Registry &r, Entity e) |
|
LA_UI_API MeshData & | get_mesh_data (Registry &r, Entity e) |
|
LA_UI_API const MeshData & | get_mesh_data (const Registry &r, Entity e) |
|
LA_UI_API bool | has_mesh_component (const Registry &r, Entity e) |
|
LA_UI_API size_t | get_num_vertices (const MeshData &d) |
|
LA_UI_API size_t | get_num_facets (const MeshData &d) |
|
LA_UI_API size_t | get_num_edges (const MeshData &d) |
|
LA_UI_API RowMajorMatrixXf | get_mesh_vertices (const MeshData &d) |
|
LA_UI_API RowMajorMatrixXi | get_mesh_facets (const MeshData &d) |
|
LA_UI_API RowMajorMatrixXf | get_mesh_vertex_attribute (const MeshData &d, const std::string &name) |
|
LA_UI_API RowMajorMatrixXf | get_mesh_corner_attribute (const MeshData &d, const std::string &name) |
|
LA_UI_API RowMajorMatrixXf | get_mesh_facet_attribute (const MeshData &d, const std::string &name) |
|
LA_UI_API RowMajorMatrixXf | get_mesh_edge_attribute (const MeshData &d, const std::string &name) |
|
LA_UI_API RowMajorMatrixXf | get_mesh_attribute (const MeshData &d, IndexingMode mode, const std::string &name) |
|
std::pair< Eigen::VectorXf, Eigen::VectorXf > LA_UI_API | get_mesh_attribute_range (const MeshData &d, IndexingMode mode, const std::string &name) |
|
LA_UI_API AABB | get_mesh_bounds (const MeshData &d) |
|
LA_UI_API void | ensure_uv (MeshData &d) |
|
LA_UI_API void | ensure_normal (MeshData &d) |
|
LA_UI_API void | ensure_tangent_bitangent (MeshData &d) |
|
LA_UI_API void | ensure_is_selected_attribute (MeshData &d) |
|
LA_UI_API void | map_indexed_attribute_to_corner_attribute (MeshData &d, const std::string &name) |
|
LA_UI_API void | map_corner_attribute_to_vertex_attribute (MeshData &d, const std::string &name) |
|
LA_UI_API void | upload_mesh_vertices (const MeshData &d, GPUBuffer &gpu) |
|
LA_UI_API void | upload_mesh_triangles (const MeshData &d, GPUBuffer &gpu) |
|
LA_UI_API void | upload_mesh_vertex_attribute (const MeshData &d, const RowMajorMatrixXf &data, GPUBuffer &gpu) |
|
LA_UI_API void | upload_mesh_corner_attribute (const MeshData &d, const RowMajorMatrixXf &data, GPUBuffer &gpu) |
|
LA_UI_API void | upload_mesh_facet_attribute (const MeshData &d, const RowMajorMatrixXf &data, GPUBuffer &gpu) |
|
LA_UI_API void | upload_mesh_edge_attribute (const MeshData &d, const RowMajorMatrixXf &data, GPUBuffer &gpu) |
|
LA_UI_API std::unordered_map< entt::id_type, std::shared_ptr< GPUBuffer > > | upload_submesh_indices (const MeshData &d, const std::string &facet_attrib_name) |
|
LA_UI_API bool | has_mesh_vertex_attribute (const MeshData &d, const std::string &name) |
|
LA_UI_API bool | has_mesh_corner_attribute (const MeshData &d, const std::string &name) |
|
LA_UI_API bool | has_mesh_facet_attribute (const MeshData &d, const std::string &name) |
|
LA_UI_API bool | has_mesh_edge_attribute (const MeshData &d, const std::string &name) |
|
LA_UI_API bool | has_mesh_indexed_attribute (const MeshData &d, const std::string &name) |
|
LA_UI_API std::optional< RayFacetHit > | intersect_ray (const MeshData &d, const Eigen::Vector3f &origin, const Eigen::Vector3f &dir) |
| Intersect ray with MeshData.
|
|
LA_UI_API bool | select_facets_in_frustum (MeshData &d, SelectionBehavior sel_behavior, const Frustum &frustum) |
|
LA_UI_API void | select_vertices_in_frustum (MeshData &d, SelectionBehavior sel_behavior, const Frustum &frustum) |
|
LA_UI_API void | select_edges_in_frustum (MeshData &d, SelectionBehavior sel_behavior, const Frustum &frustum) |
|
LA_UI_API void | propagate_corner_selection (MeshData &d, const std::string &attrib_name) |
|
LA_UI_API void | propagate_vertex_selection (MeshData &d, const std::string &attrib_name) |
|
LA_UI_API void | propagate_facet_selection (MeshData &d, const std::string &attrib_name) |
|
LA_UI_API void | combine_vertex_and_corner_selection (MeshData &d, const std::string &attrib_name) |
|
LA_UI_API void | select_facets_by_color (MeshData &d, const std::string &attrib_name, SelectionBehavior sel_behavior, const unsigned char *color_bytes, size_t colors_byte_size) |
|
LA_UI_API void | select_edges_by_color (MeshData &d, const std::string &attrib_name, SelectionBehavior sel_behavior, const unsigned char *color_bytes, size_t colors_byte_size) |
|
LA_UI_API void | select_vertices_by_color (MeshData &d, const std::string &attrib_name, SelectionBehavior sel_behavior, const unsigned char *color_bytes, size_t colors_byte_size) |
|
LA_UI_API void | select_facets (MeshData &d, SelectionBehavior sel_behavior, const std::vector< int > &facet_indices) |
|
LA_UI_API void | filter_closest_vertex (MeshData &d, const std::string &attrib_name, SelectionBehavior sel_behavior, const Camera &camera, const Eigen::Vector2i &viewport_pos) |
|
template<typename V , typename F > |
lagrange::Mesh< V, F > & | cast_mesh (const Registry &r, Entity e) |
|
Entity | get_mesh_entity (Registry &r, Entity e) |
|
template<typename MeshType > |
void | register_mesh_type (const std::string &display_name=entt::type_id< MeshType >().name().data()) |
|
LA_UI_API std::optional< RayFacetHit > | intersect_ray (Registry &r, Entity e, const Eigen::Vector3f &origin, const Eigen::Vector3f &dir) |
| Mesh triangle X ray intersection Uses an accelerated data structure if enabled for entity e (use enable_accelerated_picking )
|
|
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) More...
|
|
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) More...
|
|
LA_UI_API void | clear_element_selection_render (Registry &r, bool exclude_selected) |
|
LA_UI_API MeshSelectionRender & | ensure_selection_render (Registry &r, Entity e) |
|
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.
|
|
LA_UI_API void | mark_selection_dirty (Registry &r, MeshSelectionRender &sel_render) |
|
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 with MeshGeometry or MeshData Returns false if entity does not have a mesh.
|
|
LA_UI_API bool | has_accelerated_picking (Registry &r, Entity e) |
|
LA_UI_API int | color_to_id (unsigned char r, unsigned char g, unsigned char b) |
| Translates shader output color to numerial ID.
|
|
LA_UI_API bool | is_id_background (int id) |
| Is numerical ID from shader a background?
|
|
LA_UI_API const std::vector< unsigned char > & | read_pixels (Registry &r, ViewportComponent &v, int x, int y, int w, int h) |
| Read pixels of viewport in rectangle at x,y of size w,h.
|
|
LA_UI_API ViewportComponent & | setup_offscreen_viewport (Registry &r, Entity ofscreen_viewport_entity, Entity active_viewport_entity, StringID override_shader) |
| Copies properties of active viewport to offscreen viewport, sets up a material override using override_shader.
|
|
LA_UI_API std::tuple< int, int, int, int > | setup_scissor (Registry &r, ViewportComponent &offscreen_viewport, const SelectionContext &sel_ctx) |
| Sets rasterizer scissor based on SelectionContext.
|
|
LA_UI_API void | set_render_transforms (GLScope &scope, Shader &shader, const Camera &camera, const Transform *transform=nullptr) |
|
LA_UI_API void | render_vertex_data (const VertexData &vd, GLenum primitive, GLsizei per_element_size) |
|
LA_UI_API GLenum | get_gl_primitive (const PrimitiveType &p) |
|
LA_UI_API GLsizei | get_gl_primitive_size (const PrimitiveType &p) |
|
LA_UI_API GLsizei | get_gl_primitive_size (GLenum primitive_enum) |
|
LA_UI_API std::shared_ptr< VertexData > | generate_cube_vertex_data (bool edges=false) |
|
LA_UI_API std::shared_ptr< VertexData > | generate_quad_vertex_data () |
|
LA_UI_API GLMesh | generate_quad_mesh_gpu () |
|
LA_UI_API void | update_vao (VertexData &vertex_data) |
|
LA_UI_API entt::resource< Shader > | get_or_load_shader (ShaderCache &cache, const std::string &generic_path, bool virtual_fs=false) |
|
template<typename BufferComponent > |
bool | set_mesh_geometry_layout (const Registry ®istry, const Entity mesh_geometry_entity, const int &location, VertexData &vertex_data) |
|
LA_UI_API int | get_gl_attribute_dimension (GLenum attrib_type) |
|
LA_UI_API void | update_vertex_data (const GLMesh &glmesh, const Shader &shader, VertexData &glvd, IndexingMode indexing, entt::id_type submesh_index) |
| Assigns buffers from GLMesh to GLVertexData to Shader specified locations. More...
|
|
LA_UI_API bool | deselect_all (Registry ®istry) |
|
LA_UI_API bool | dehover_all (Registry ®istry) |
|
bool | is_selected (const Registry ®istry, Entity e) |
|
bool | is_hovered (const Registry ®istry, Entity e) |
|
decltype(auto) | selected_view (Registry ®istry) |
|
decltype(auto) | hovered_view (Registry ®istry) |
|
LA_UI_API bool | is_child_selected (const Registry ®istry, Entity e, bool recursive=true) |
|
LA_UI_API bool | is_child_hovered (const Registry ®istry, Entity e, bool recursive=true) |
|
LA_UI_API std::vector< Entity > | collect_selected (const Registry ®istry) |
|
LA_UI_API std::vector< Entity > | collect_hovered (const Registry ®istry) |
|
LA_UI_API bool | set_selected (Registry ®istry, Entity e, SelectionBehavior behavior=SelectionBehavior::SET) |
|
LA_UI_API bool | set_hovered (Registry ®istry, Entity e, SelectionBehavior behavior=SelectionBehavior::SET) |
|
LA_UI_API bool | select (Registry ®istry, Entity e) |
|
LA_UI_API bool | deselect (Registry ®istry, Entity e) |
|
LA_UI_API bool | hover (Registry ®istry, Entity e) |
|
LA_UI_API bool | dehover (Registry ®istry, Entity e) |
|
LA_UI_API SelectionContext & | get_selection_context (Registry &r) |
|
LA_UI_API const SelectionContext & | get_selection_context (const Registry &r) |
|
LA_UI_API SelectionBehavior | selection_behavior (const Keybinds &keybinds) |
|
LA_UI_API bool | are_selection_keys_down (const Keybinds &keybinds) |
|
LA_UI_API bool | are_selection_keys_pressed (const Keybinds &keybinds) |
|
LA_UI_API bool | are_selection_keys_released (const Keybinds &keybinds) |
|
LA_UI_API SelectionBehavior | selection_behavior (const Registry &r) |
|
LA_UI_API bool | are_selection_keys_down (const Registry &r) |
|
LA_UI_API bool | are_selection_keys_pressed (const Registry &r) |
|
LA_UI_API bool | are_selection_keys_released (const Registry &r) |
|
LA_UI_API Tools & | get_tools (ui::Registry &r) |
|
LA_UI_API const Tools & | get_tools (const ui::Registry &r) |
|
template<typename T > |
bool | is_element_type (entt::id_type elem_type) |
|
LA_UI_API Tools & | initialize_tools (ui::Registry &r) |
| Initialize Tools context variable.
|
|
LA_UI_API void | run_current_tool (ui::Registry &r) |
| Run currently selected tool.
|
|
LA_UI_API void | update_previous_tool (ui::Registry &r) |
| Update previously used tool - must be called for is_tool_(de)activate to work.
|
|
LA_UI_API bool | is_tool_activated (const ui::Registry &r, entt::id_type tool_type) |
| Was tool type activated this frame.
|
|
LA_UI_API bool | is_tool_activated (const ui::Registry &r, entt::id_type tool_type, entt::id_type element_type) |
| Was tool type and element type activated this frame.
|
|
LA_UI_API bool | is_tool_deactivated (const ui::Registry &r, entt::id_type tool_type) |
| Was tool type deactivated this frame.
|
|
LA_UI_API bool | is_tool_deactivated (const ui::Registry &r, entt::id_type tool_type, entt::id_type element_type) |
| Was tool type and element type deactivated this frame.
|
|
template<typename ToolTag > |
bool | is_tool_active (const ui::Registry &r) |
|
template<typename ToolTag , typename ElementTag > |
bool | is_tool_active (const ui::Registry &r) |
|
template<typename ToolTag > |
bool | is_tool_activated (const ui::Registry &r) |
|
template<typename ToolTag , typename ElementTag > |
bool | is_tool_activated (const ui::Registry &r) |
|
template<typename ToolTag > |
bool | is_tool_deactivated (const ui::Registry &r) |
|
template<typename ToolTag , typename ElementTag > |
bool | is_tool_deactivated (const ui::Registry &r) |
|
LA_UI_API Entity | create_scene_node (Registry &r, const std::string &name="Unnamed Scene Node Entity", Entity parent=NullEntity) |
|
LA_UI_API void | remove (Registry &r, Entity e, bool recursive=false) |
| Removes entity. More...
|
|
LA_UI_API void | set_parent (Registry ®istry, Entity child, Entity new_parent) |
| Sets new_parent as as child's new parent. More...
|
|
LA_UI_API Entity | get_parent (const Registry ®istry, Entity e) |
| Returns parent of e. More...
|
|
LA_UI_API std::vector< Entity > | get_children (const Registry ®istry, Entity e) |
| Returns all children of e. More...
|
|
LA_UI_API bool | is_orphan (const Registry ®istry, Entity child) |
| Returns true if child has no parents (is at top-level in the hierarachy) More...
|
|
LA_UI_API void | orphan (Registry ®istry, Entity child) |
| Reparents child to be top-level (i.e., to have to parents). More...
|
|
LA_UI_API void | foreach_child (const Registry ®istry, const Entity parent, const std::function< void(Entity)> &fn) |
| Calls fn(Entity) on each direct child of parent entity. More...
|
|
LA_UI_API void | foreach_child_recursive (const Registry ®istry, const Entity parent, const std::function< void(Entity)> &fn) |
| Calls fn(Entity) on each child of parent entity recursively. More...
|
|
LA_UI_API void | iterate_inorder (Registry ®istry, const std::function< bool(Entity)> &on_enter, const std::function< void(Entity, bool)> &on_exit) |
| Alternative to foreach_child_recursive.
|
|
LA_UI_API Entity | group (Registry ®istry, const std::vector< Entity > &entities, const std::string &name="NewGroup") |
|
LA_UI_API Entity | group_under (Registry ®istry, const std::vector< Entity > &entities, Entity parent) |
|
LA_UI_API Entity | ungroup (Registry ®istry, Entity parent, bool remove_parent=false) |
| Returns new parent.
|
|
LA_UI_API void | orphan_without_subtree (Registry ®istry, Entity e) |
| Removes the node from tree and puts it as top-level node.
|
|
LA_UI_API bool | begin_panel (UIPanel &panel) |
|
LA_UI_API void | end_panel (UIPanel &panel) |
|
LA_UI_API Entity | add_panel (Registry &r, const std::string &title, const std::function< void(void)> &body_fn) |
| Adds window that executed given imgui_code. More...
|
|
LA_UI_API Entity | add_panel (Registry &r, const std::string &title, const std::function< void(Registry &, Entity)> &body_fn, const std::function< void(Registry &, Entity)> &before_fn=nullptr, const std::function< void(Registry &, Entity)> &after_fn=nullptr, const std::function< void(Registry &, Entity)> &menubar_fn=nullptr) |
|
LA_UI_API void | toggle_panel (Registry &r, Entity e) |
|
LA_UI_API const WindowSize & | get_window_size (const Registry &r) |
| Returns global window size. More...
|
|
LA_UI_API MainMenuHeight | get_menu_height (const Registry &r) |
|
LA_UI_API void | hide_tab_bar (Registry &r, Entity uipanel_entity) |
|
LA_UI_API Entity | add_viewport (Registry ®istry, Entity camera_entity, bool srgb=false) |
| Creates an offscreen viewport with given camera. Create ViewportPanel to show it on screen.
|
|
LA_UI_API void | instance_camera_to_viewports (Registry ®istry, Entity source_viewport) |
|
LA_UI_API void | copy_camera_to_viewports (Registry ®istry, Entity source_viewport) |
|
LA_UI_API ViewportPanel * | get_focused_viewport_panel (Registry ®istry) |
| Focused Viewport UI Panel Returns nullptr if there is no focused viewport.
|
|
LA_UI_API Entity | get_focused_viewport_entity (Registry ®istry) |
| Focused Viewport (entity) Returns NullEntity if there is no focused viewport.
|
|
LA_UI_API ViewportComponent * | get_focused_viewport (Registry ®istry) |
| Focused Viewport (component reference) Returns nullptr if there is no focused viewport.
|
|
LA_UI_API Entity | get_focused_camera_entity (Registry ®istry) |
| Returns NullEntity if there is no focused viewport.
|
|
LA_UI_API Camera * | get_focused_camera (Registry ®istry) |
| Returns nullptr if there is no focused viewport.
|
|
LA_UI_API Camera & | get_camera (Registry ®istry, Entity e) |
|
LA_UI_API Entity | get_hovered_viewport_panel_entity (Registry ®istry) |
| Returns NullEntity if there is no hovered viewport.
|
|
LA_UI_API Entity | get_hovered_viewport_entity (Registry ®istry) |
| Returns NullEntity if there is no hovered viewport.
|
|
LA_UI_API bool | camera_focus_and_fit (Registry ®istry, Entity camera, bool focus=true, bool fit=true, float duration_seconds=1.0f, const std::function< bool(Registry &r, Entity e)> &filter=nullptr) |
| Adjusts camera to fit the scene bounding box over the next several frames. More...
|
|
LA_UI_API void | camera_focus_and_fit (Registry ®istry) |
| Adjusts focused camera to fit the scene bounding box over the next several frames.
|
|
LA_UI_API Entity | get_selection_viewport_entity (const Registry ®istry) |
|
LA_UI_API Entity | get_objectid_viewport_entity (const Registry ®istry) |
|
LA_UI_API void | add_selection_outline_post_process (Registry ®istry, Entity viewport_entity, const Color &selection_color) |
|
PrimitiveType | get_raster_primitive (Glyph g) |
|
Entity | show_attribute_surface (Registry ®istry, const Entity &mesh_entity, IndexingMode attribute_type, const std::string source_attribute, PrimitiveType raster_primitive, StringID shader_id=DefaultShaders::SurfaceVertexAttribute) |
|
void | transform_tool_impl (Registry ®istry, GizmoMode mode) |
|
void | select_object (Registry &r) |
|
void | select_element (Registry &) |
|
void | draw_logger_panel (Registry &r, Entity entity) |
|
std::shared_ptr< Texture > | get_brdflut (Registry &r) |
|
void | activate_shader (Registry &r, Shader &shader, RenderContext &rctx) |
|
void | meshrender_to_render_queue (Registry &r) |
|
void | sort_gl_render_queue (Registry &r) |
|
void | render_gl_render_queue (Registry &r) |
|
void | update_shadowmap_texture_cube (ShadowMap &shadowmap) |
|
void | update_shadowmap_texture_2D (ShadowMap &shadowmap) |
|
void | adjust_camera (Registry ®istry, ViewportComponent &viewport, Camera &cam) |
|
ui::Entity | add_light_visualization_mesh (Registry &r, ui::Entity light_e) |
|
Entity | ensure_single_selection (Registry &r) |
|
void | update_mesh_hovered_GL (Registry &r, const SelectionContext &sel_ctx) |
|
void | update_transform_recursive (Registry ®istry, Entity e, const Eigen::Affine3f &parent_global_transform, bool check_change=false) |
|
template<typename VA , typename VB > |
bool | test_axis (const VA &va, const VB &vb, const Eigen::Vector3f &n) |
|
bool | checkGLError (const char *label) |
|
bool | is_whitespace_only (const std::string &s) |
|
std::unordered_map< GLenum, std::string > | preprocessShaderCode (std::string code, const ShaderDefines &defines) |
|
std::string | annotate_lines (const std::string &str) |
|
entt::id_type | hash_shader_definition (const ShaderDefinition &def) |
|
float | sRGB_to_linear (float v) |
|
Eigen::Vector3f | sRGB_to_linear (const Eigen::Vector3f &c) |
|
float | linear_to_sRGB (float v) |
|
Eigen::Vector3f | linear_to_sRGB (const Eigen::Vector3f &c) |
|
GLenum | get_type_from_internal_format (GLenum internal_format) |
|
Color | colormap_lookup (const int palette[], const size_t N, float t) |
|
Color | colormap_lookup (const float palette[][3], const size_t N, float t) |
|
ImmediateEntities & | get_immediate_entities (Registry &r) |
|
lagrange::fs::path | resolve_texture_path (const lagrange::fs::path &parent_path, const char *tex_path) |
|
std::shared_ptr< Texture > | discover_texture (const fs::path &base_dir, const std::string &name, const std::string &suffix, const Texture::Params ¶m=Texture::Params()) |
|
float | eval_minor (const Eigen::Matrix4f &m, int r0, int r1, int r2, int c0, int c1, int c2) |
|
void | initialize_selection_materials (Registry &r, MeshSelectionRender &sr) |
|
template<typename Component > |
bool | deselect_all_impl (Registry &r) |
|
template<typename Component > |
bool | set_selection_component_impl (Registry &r, Entity e, SelectionBehavior behavior) |
|
Entity | get_last_child (const Registry ®istry, const TreeNode &parent_tree) |
|
void | iterate_inorder_recursive (Registry ®istry, Entity e, const std::function< bool(Entity)> &on_enter, const std::function< void(Entity, bool)> &on_exit) |
|
void | remove_from_tree (Registry ®istry, Entity e) |
|
std::string | ensure_unique_uiwindow_title (const Registry &r, const std::string &in_title) |
|
void | camera_zoom_to_fit (Registry &, Entity, float, const std::function< bool(Registry &r, Entity e)> &) |
|
void | camera_focus_on (Registry ®istry, Entity camera, float duration_seconds, const std::function< bool(Registry &r, Entity e)> &filter) |
|