Files
Z3D/include/assets/components/mesh_vertex_components.hpp
2025-03-30 22:38:06 +02:00

51 lines
876 B
C++
Executable File

#pragma once
#include "config/primitives.hpp"
#include <array>
#include <tuple>
#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
{
enum : z3d::size
{
position,
normal,
tex_coord,
color,
reflectance
};
}
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<all>;
} // namespace mesh_vertex_components
DEFINE_ENUM_BITFIELD_OPERATORS(assets::mesh_vertex_components::flags)