wren
Vulkan-based game engine
Loading...
Searching...
No Matches
wren::scene::components::MeshRenderer Class Reference

#include <mesh.hpp>

Collaboration diagram for wren::scene::components::MeshRenderer:

Public Member Functions

auto bind (const std::shared_ptr< Context > &ctx, const std::shared_ptr< vk::Shader > &shader, const ::vk::CommandBuffer &cmd, const math::Mat4f &model_mat)
auto update_mesh (const Mesh &mesh)
auto update_mesh (const std::filesystem::path &project_root, const std::filesystem::path &mesh_path) -> expected< void >
void colour (const math::Vec4f &colour)
auto mesh () const
auto mesh_file () const

Private Attributes

std::optional< Meshmesh_
wren::math::Vec4f colour_
std::filesystem::path mesh_file_
std::shared_ptr< vk::Bufferubo_

Member Function Documentation

◆ bind()

auto wren::scene::components::MeshRenderer::bind ( const std::shared_ptr< Context > & ctx,
const std::shared_ptr< vk::Shader > & shader,
const ::vk::CommandBuffer & cmd,
const math::Mat4f & model_mat )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ colour()

void wren::scene::components::MeshRenderer::colour ( const math::Vec4f & colour)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mesh()

auto wren::scene::components::MeshRenderer::mesh ( ) const
inlinenodiscard
Here is the caller graph for this function:

◆ mesh_file()

auto wren::scene::components::MeshRenderer::mesh_file ( ) const
inlinenodiscard
Here is the caller graph for this function:

◆ update_mesh() [1/2]

auto wren::scene::components::MeshRenderer::update_mesh ( const Mesh & mesh)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_mesh() [2/2]

auto wren::scene::components::MeshRenderer::update_mesh ( const std::filesystem::path & project_root,
const std::filesystem::path & mesh_path ) -> expected<void>
inline
Here is the call graph for this function:

Member Data Documentation

◆ colour_

wren::math::Vec4f wren::scene::components::MeshRenderer::colour_
private

◆ mesh_

std::optional<Mesh> wren::scene::components::MeshRenderer::mesh_
private

◆ mesh_file_

std::filesystem::path wren::scene::components::MeshRenderer::mesh_file_
private

◆ ubo_

std::shared_ptr<vk::Buffer> wren::scene::components::MeshRenderer::ubo_
private

The documentation for this class was generated from the following file:
  • wren/include/wren/scene/components/mesh.hpp