stuff...
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "config/primitives.hpp"
|
||||
#include <array>
|
||||
#include <tuple>
|
||||
#include "util/enum_bitfield_operators.hpp"
|
||||
@@ -7,23 +8,22 @@
|
||||
namespace assets::mesh_vertex_components
|
||||
{
|
||||
|
||||
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>;
|
||||
using position = z3d::vec3;
|
||||
using normal = z3d::vec3;
|
||||
using tex_coord = z3d::vec2;
|
||||
using color = z3d::vec3;
|
||||
using reflectance = z3d::f32;
|
||||
|
||||
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;
|
||||
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 : std::uint8_t
|
||||
enum class flags : z3d::u8
|
||||
{
|
||||
none = 0,
|
||||
position = 1 << indices::position,
|
||||
@@ -33,7 +33,13 @@ enum class flags : std::uint8_t
|
||||
reflectance = 1 << indices::reflectance
|
||||
};
|
||||
|
||||
using all = std::tuple<position, normal, tex_coord, color, reflectance>;
|
||||
using all = z3d::structure<
|
||||
position,
|
||||
normal,
|
||||
tex_coord,
|
||||
color,
|
||||
reflectance
|
||||
>;
|
||||
constexpr inline auto count = std::tuple_size_v<all>;
|
||||
|
||||
} // namespace mesh_vertex_components
|
||||
|
||||
Reference in New Issue
Block a user