20 #ifndef ANTKEEPER_RENDER_MODEL_HPP
21 #define ANTKEEPER_RENDER_MODEL_HPP
75 m_vertex_stride = stride;
82 [[nodiscard]]
inline const std::shared_ptr<gl::vertex_array>&
get_vertex_array() const noexcept
84 return m_vertex_array;
88 return m_vertex_array;
96 [[nodiscard]]
inline const std::shared_ptr<gl::vertex_buffer>&
get_vertex_buffer() const noexcept
98 return m_vertex_buffer;
102 return m_vertex_buffer;
109 return m_vertex_offset;
115 return m_vertex_stride;
136 [[nodiscard]]
inline const std::vector<model_group>&
get_groups() const noexcept
140 [[nodiscard]]
inline std::vector<model_group>&
get_groups() noexcept
161 std::shared_ptr<gl::vertex_array> m_vertex_array;
162 std::shared_ptr<gl::vertex_buffer> m_vertex_buffer;
163 std::size_t m_vertex_offset{};
164 std::size_t m_vertex_stride{};
165 aabb_type m_bounds{{0, 0, 0}, {0, 0, 0}};
166 std::vector<model_group> m_groups;
aabb_type & get_bounds() noexcept
Returns the bounds of the model.
std::shared_ptr< gl::vertex_array > & get_vertex_array() noexcept
Returns the vertex array associated with this model.
geom::box< float > aabb_type
AABB type.
std::shared_ptr< gl::vertex_buffer > & get_vertex_buffer() noexcept
Returns the vertex buffer associated with this model.
const aabb_type & get_bounds() const noexcept
Returns the bounds of the model.
::skeleton & get_skeleton() noexcept
Returns the skeleton associated with this model.
const std::shared_ptr< gl::vertex_buffer > & get_vertex_buffer() const noexcept
Returns the vertex buffer associated with this model.
constexpr std::size_t get_vertex_stride() const noexcept
Returns the byte stride between consecutive elements within the vertex buffer.
void set_vertex_offset(std::size_t offset) noexcept
Sets the byte offset to the first vertex in the vertex buffer.
void set_vertex_stride(std::size_t stride) noexcept
Sets the byte stride between consecutive elements within the vertex buffer.
constexpr std::size_t get_vertex_offset() const noexcept
Returns the byte offset to the first vertex in the vertex buffer.
std::vector< model_group > & get_groups() noexcept
Returns the model's model groups.
const ::skeleton & get_skeleton() const noexcept
Returns the skeleton associated with this model.
const std::vector< model_group > & get_groups() const noexcept
Returns the model's model groups.
const std::shared_ptr< gl::vertex_array > & get_vertex_array() const noexcept
Returns the vertex array associated with this model.
Skeletal animation skeleton.
primitive_topology
Primitive topologies.
@ triangle_list
Separate triangle primitives.
T offset(T longitude)
Calculates the UTC offset at a given longitude.
n-dimensional axis-aligned rectangle.
32-bit FNV-1a hash value.
Part of a model which is associated with exactly one material.
std::shared_ptr< render::material > material
gl::primitive_topology primitive_topology
std::uint32_t vertex_count
std::uint32_t first_vertex