fixes
This commit is contained in:
39
include/assets/components/mesh_vertex_components.hpp
Executable file
39
include/assets/components/mesh_vertex_components.hpp
Executable file
@@ -0,0 +1,39 @@
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <tuple>
|
||||
#include "util/enum_operators.hpp"
|
||||
|
||||
namespace components::mesh_vertex {
|
||||
|
||||
using position = std::array<float, 3>;
|
||||
using normal = std::array<float, 3>;
|
||||
using tex_coord = std::array<float, 2>;
|
||||
using color = std::array<float, 3>;
|
||||
using reflectance = std::array<float, 1>;
|
||||
|
||||
namespace indices
|
||||
{
|
||||
using type = std::size_t;
|
||||
inline constexpr type position = 0;
|
||||
inline constexpr type normal = 1;
|
||||
inline constexpr type tex_coord = 2;
|
||||
inline constexpr type color = 3;
|
||||
inline constexpr type reflectance = 4;
|
||||
}
|
||||
|
||||
enum class flags : std::uint8_t {
|
||||
none = 0,
|
||||
position = 1 << indices::position,
|
||||
normal = 1 << indices::normal,
|
||||
tex_coord = 1 << indices::tex_coord,
|
||||
color = 1 << indices::color,
|
||||
reflectance = 1 << indices::reflectance
|
||||
};
|
||||
|
||||
using all = std::tuple<position, normal, tex_coord, color, reflectance>;
|
||||
constexpr inline auto count = std::tuple_size_v<all>;
|
||||
|
||||
} // namespace components::mesh_vertex
|
||||
|
||||
DEFINE_ENUM_FLAG_OPERATORS(components::mesh_vertex::flags)
|
||||
Reference in New Issue
Block a user