tried making naming more uniform and implemented most of the opengl managers
This commit is contained in:
80
source/assets/data/mesh_data.ipp
Normal file
80
source/assets/data/mesh_data.ipp
Normal file
@@ -0,0 +1,80 @@
|
||||
#ifndef INCLUDE_DYNAMIC_MESH_DATA_IMPLEMENTATION
|
||||
# error Never include this file directly include 'dynamic_mesh_buffer.hpp'
|
||||
#endif
|
||||
|
||||
inline std::vector<assets::mesh_vertex_components::position>& assets::mesh_data::positions()
|
||||
{
|
||||
return std::get<mesh_vertex_components::indices::position>(vertices);
|
||||
}
|
||||
|
||||
inline std::vector<assets::mesh_vertex_components::normal>& assets::mesh_data::normals()
|
||||
{
|
||||
return std::get<mesh_vertex_components::indices::normal>(vertices);
|
||||
}
|
||||
|
||||
inline std::vector<assets::mesh_vertex_components::tex_coord>& assets::mesh_data::tex_coords()
|
||||
{
|
||||
return std::get<mesh_vertex_components::indices::tex_coord>(vertices);
|
||||
}
|
||||
|
||||
inline std::vector<assets::mesh_vertex_components::color>& assets::mesh_data::colors()
|
||||
{
|
||||
return std::get<mesh_vertex_components::indices::color>(vertices);
|
||||
}
|
||||
|
||||
inline std::vector<assets::mesh_vertex_components::reflectance>& assets::mesh_data::reflectances()
|
||||
{
|
||||
return std::get<mesh_vertex_components::indices::reflectance>(vertices);
|
||||
}
|
||||
|
||||
inline std::vector<assets::mesh_data::triangle_type>& assets::mesh_data::triangles()
|
||||
{
|
||||
return m_triangles;
|
||||
}
|
||||
|
||||
inline auto& assets::mesh_data::material_id()
|
||||
{
|
||||
return m_material_id;
|
||||
}
|
||||
|
||||
inline const std::vector<assets::mesh_vertex_components::position>& assets::mesh_data::positions() const
|
||||
{
|
||||
return std::get<mesh_vertex_components::indices::position>(vertices);
|
||||
}
|
||||
|
||||
inline const std::vector<assets::mesh_vertex_components::normal>& assets::mesh_data::normals() const
|
||||
{
|
||||
return std::get<mesh_vertex_components::indices::normal>(vertices);
|
||||
}
|
||||
|
||||
inline const std::vector<assets::mesh_vertex_components::tex_coord>& assets::mesh_data::tex_coords() const
|
||||
{
|
||||
return std::get<mesh_vertex_components::indices::tex_coord>(vertices);
|
||||
}
|
||||
|
||||
inline const std::vector<assets::mesh_vertex_components::color>& assets::mesh_data::colors() const
|
||||
{
|
||||
return std::get<mesh_vertex_components::indices::color>(vertices);
|
||||
}
|
||||
|
||||
inline const std::vector<assets::mesh_vertex_components::reflectance>& assets::mesh_data::reflectances() const
|
||||
{
|
||||
return std::get<mesh_vertex_components::indices::reflectance>(vertices);
|
||||
}
|
||||
|
||||
inline const std::vector<assets::mesh_data::triangle_type>& assets::mesh_data::triangles() const
|
||||
{
|
||||
return m_triangles;
|
||||
}
|
||||
|
||||
inline const auto& assets::mesh_data::material_id() const
|
||||
{
|
||||
return m_material_id;
|
||||
}
|
||||
|
||||
inline void assets::mesh_data::clear()
|
||||
{
|
||||
clear_vertices();
|
||||
m_triangles.clear();
|
||||
m_material_id = {};
|
||||
}
|
||||
Reference in New Issue
Block a user