sandbox
Loading...
Searching...
No Matches
sbx::scenes::scene Class Reference

Public Types

using registry_type = ecs::basic_registry< scenes::node >
 

Public Member Functions

 scene (const std::filesystem::path &path)
 
auto create_child_node (const scenes::node parent, const std::string &tag="Node", const scenes::transform &transform=scenes::transform{}) -> scenes::node
 
auto create_node (const std::string &tag="Node", const scenes::transform &transform=scenes::transform{}) -> scenes::node
 
auto destroy_node (const scenes::node node) -> void
 
auto camera () -> scenes::node
 
auto set_active_camera (const scenes::node camera) -> void
 
auto world_transform (const scenes::node node) -> math::matrix4x4
 
auto world_normal (const scenes::node node) -> math::matrix4x4
 
auto parent_transform (const scenes::node node) -> math::matrix4x4
 
auto world_position (const scenes::node node) -> math::vector3
 
auto world_rotation (const scenes::node node) -> math::quaternion
 
auto world_scale (const scenes::node node) -> math::vector3
 
auto make_child_of (const scenes::node node, const scenes::node parent) -> void
 
auto is_valid (const scenes::node node) const -> bool
 
template<typename Type , typename... Other, typename... Exclude>
auto query (ecs::exclude_t< Exclude... >=ecs::exclude_t{}) -> decltype(auto)
 
template<typename Type , typename... Other, typename... Exclude>
auto query (ecs::exclude_t< Exclude... >=ecs::exclude_t{}) const -> decltype(auto)
 
template<typename Type , typename Compare , typename Sort = utility::std_sort, typename... Args>
auto sort (Compare compare, Sort sort=Sort{}, Args &&... args) -> void
 
template<typename Component >
auto has_component (const scenes::node node) const -> bool
 
template<typename Component , typename... Args>
auto add_component (const scenes::node node, Args &&... args) -> decltype(auto)
 
template<typename Component >
auto get_component (const scenes::node node) const -> const Component &
 
template<typename Component >
auto get_component (const scenes::node node) -> Component &
 
template<typename Component , typename... Args>
auto get_or_add_component (const scenes::node node, Args &&... args) -> Component &
 
auto light () -> directional_light &
 
auto root () -> scenes::node
 
auto light_space () -> math::matrix4x4
 
auto find_node (const scenes::id &id) -> scenes::node
 
auto save (const std::filesystem::path &path) -> void
 
template<typename... Args>
auto add_image (const utility::hashed_string &name, const std::filesystem::path &path, Args &&... args) -> void
 
auto has_image (const utility::hashed_string &name) const -> bool
 
auto get_image (const utility::hashed_string &name) -> graphics::image2d_handle
 
auto image_metadata (const graphics::image2d_handle &handle) const -> const assets::asset_metadata &
 
template<typename... Args>
auto add_cube_image (const utility::hashed_string &name, const std::filesystem::path &path, Args &&... args) -> void
 
auto get_cube_image (const utility::hashed_string &name) -> graphics::cube_image2d_handle
 
auto cube_image_metadata (const graphics::cube_image2d_handle &handle) const -> const assets::asset_metadata &
 
template<typename Mesh , typename... Args>
auto add_mesh (const utility::hashed_string &name, Args &&... args) -> void
 
template<typename Mesh , typename Path , typename... Args>
requires (std::is_constructible_v<std::filesystem::path, Path>)
auto add_mesh (const utility::hashed_string &name, const Path &path, Args &&... args) -> void
 
auto get_mesh (const utility::hashed_string &name) -> math::uuid
 
auto mesh_metadata (const math::uuid &handle) const -> const assets::asset_metadata &
 
template<typename Mesh , typename... Args>
auto add_animation (const utility::hashed_string &name, Args &&... args) -> void
 
auto get_animation (const utility::hashed_string &name) -> math::uuid
 
template<typename Material , typename... Args>
auto add_material (const utility::hashed_string &name, Args &&... args) -> Material &
 
auto has_material (const utility::hashed_string &name) const -> bool
 
auto get_material (const utility::hashed_string &name) -> math::uuid
 
auto material_metadata (const math::uuid &handle) const -> const assets::asset_metadata &
 
auto uniform_handler () -> graphics::uniform_handler &
 
auto update_uniform_handler () -> void
 
auto screen_point_to_ray (const math::vector2 &position) -> math::ray
 
auto node_count () const -> std::size_t
 

Static Public Attributes

template<typename... Exclude>
static constexpr auto query_filter = ecs::exclude<Exclude...>
 

The documentation for this class was generated from the following files: