#pragma once #include "config/primitives.hpp" #include #include #include "util/enum_bitfield_operators.hpp" namespace assets::mesh_vertex_components { using position = z3d::vec3; using normal = z3d::vec3; using tex_coord = z3d::vec2; using color = z3d::vec3; using reflectance = z3d::f32; namespace indices { inline constexpr z3d::size position = 0; inline constexpr z3d::size normal = 1; inline constexpr z3d::size tex_coord = 2; inline constexpr z3d::size color = 3; inline constexpr z3d::size reflectance = 4; } enum class flags : z3d::u8 { 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 = z3d::structure< position, normal, tex_coord, color, reflectance >; constexpr inline auto count = std::tuple_size_v; } // namespace mesh_vertex_components DEFINE_ENUM_BITFIELD_OPERATORS(assets::mesh_vertex_components::flags)