In the middle of multithreading parsers.
This commit is contained in:
@@ -11,8 +11,12 @@ class component_array_set {};
|
||||
template<typename C, typename... Ts>
|
||||
class component_array_set<C, z3d::structure<Ts...>>
|
||||
{
|
||||
public:
|
||||
component_array_set() = default;
|
||||
|
||||
C component_flags;
|
||||
z3d::structure<z3d::vector<Ts>...> component_arrays{};
|
||||
|
||||
protected:
|
||||
void clear_component_arrays()
|
||||
{
|
||||
@@ -24,10 +28,6 @@ protected:
|
||||
component_arrays
|
||||
);
|
||||
}
|
||||
|
||||
C component_flags;
|
||||
z3d::structure<z3d::vector<Ts>...> component_arrays{};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
|
||||
#include "assets/components/material_components.hpp"
|
||||
#include "generic/component_set.hpp"
|
||||
|
||||
@@ -13,22 +11,27 @@ struct material_data : detail::component_set<material_components::all>
|
||||
|
||||
material_data() = default;
|
||||
|
||||
material_components::surface_properties& initialized_surface_properties();
|
||||
|
||||
[[nodiscard]] inline z3d::optional<material_components::surface_properties>& surface_properties();
|
||||
[[nodiscard]] inline z3d::optional<material_components::transparency>& transparency();
|
||||
[[nodiscard]] inline z3d::optional<material_components::ambient_color_texture>& ambient_color_texture_id();
|
||||
[[nodiscard]] inline z3d::optional<material_components::diffuse_color_texture>& diffuse_color_texture_id();
|
||||
[[nodiscard]] inline z3d::optional<material_components::specular_color_texture>& specular_color_texture_id();
|
||||
[[nodiscard]] inline z3d::optional<material_components::ambient_filter>& ambient_filter();
|
||||
[[nodiscard]] inline z3d::optional<material_components::diffuse_filter>& diffuse_filter();
|
||||
[[nodiscard]] inline z3d::optional<material_components::specular_filter>& specular_filter();
|
||||
[[nodiscard]] inline z3d::optional<material_components::shininess>& shininess();
|
||||
[[nodiscard]] inline z3d::optional<material_components::alpha>& alpha();
|
||||
[[nodiscard]] inline z3d::optional<material_components::ambient_filter_texture>& specular_filter_texture_id();
|
||||
[[nodiscard]] inline z3d::optional<material_components::diffuse_filter_texture>& diffuse_filter_texture_id();
|
||||
[[nodiscard]] inline z3d::optional<material_components::specular_filter_texture>& specular_filter_texture_id();
|
||||
[[nodiscard]] inline z3d::optional<material_components::shininess_texture>& shininess_texture_id();
|
||||
[[nodiscard]] inline z3d::optional<material_components::alpha_texture>& alpha_texture_id();
|
||||
[[nodiscard]] inline z3d::optional<material_components::bump_texture>& bump_texture_id();
|
||||
|
||||
[[nodiscard]] inline const z3d::optional<material_components::surface_properties>& surface_properties() const;
|
||||
[[nodiscard]] inline const z3d::optional<material_components::transparency>& transparency() const;
|
||||
[[nodiscard]] inline const z3d::optional<material_components::ambient_color_texture>& ambient_color_texture_id() const;
|
||||
[[nodiscard]] inline const z3d::optional<material_components::diffuse_color_texture>& diffuse_color_texture_id() const;
|
||||
[[nodiscard]] inline const z3d::optional<material_components::specular_color_texture>& specular_color_texture_id() const;
|
||||
[[nodiscard]] inline const z3d::optional<material_components::ambient_filter>& ambient_filter() const;
|
||||
[[nodiscard]] inline const z3d::optional<material_components::diffuse_filter>& diffuse_filter() const;
|
||||
[[nodiscard]] inline const z3d::optional<material_components::specular_filter>& specular_filter() const;
|
||||
[[nodiscard]] inline const z3d::optional<material_components::shininess>& shininess() const;
|
||||
[[nodiscard]] inline const z3d::optional<material_components::alpha>& alpha() const;
|
||||
[[nodiscard]] inline const z3d::optional<material_components::alpha>& transparency() const;
|
||||
[[nodiscard]] inline const z3d::optional<material_components::ambient_filter_texture>& specular_filter_texture_id() const;
|
||||
[[nodiscard]] inline const z3d::optional<material_components::diffuse_filter_texture>& diffuse_filter_texture_id() const;
|
||||
[[nodiscard]] inline const z3d::optional<material_components::specular_filter_texture>& specular_filter_texture_id() const;
|
||||
[[nodiscard]] inline const z3d::optional<material_components::shininess_texture>& shininess_texture_id() const;
|
||||
[[nodiscard]] inline const z3d::optional<material_components::alpha_texture>& alpha_texture_id() const;
|
||||
[[nodiscard]] inline const z3d::optional<material_components::bump_texture>& bump_texture_id() const;
|
||||
@@ -38,6 +41,6 @@ struct material_data : detail::component_set<material_components::all>
|
||||
|
||||
}
|
||||
|
||||
#define INCLUDE_DYNAMIC_MATERIAL_DATA_IMPLEMENTATION
|
||||
#define INCLUDE_MATERIAL_DATA_IMPLEMENTATION
|
||||
#include "assets/data/material_data.ipp"
|
||||
#undef INCLUDE_DYNAMIC_MATERIAL_DATA_IMPLEMENTATION
|
||||
#undef INCLUDE_MATERIAL_DATA_IMPLEMENTATION
|
||||
|
||||
@@ -9,11 +9,16 @@
|
||||
namespace assets
|
||||
{
|
||||
|
||||
class point_cloud_data : detail::component_array_set<
|
||||
class point_cloud_data : public detail::component_array_set<
|
||||
point_cloud_vertex_components::flags,
|
||||
point_cloud_vertex_components::all
|
||||
> {
|
||||
public:
|
||||
using detail::component_array_set<
|
||||
point_cloud_vertex_components::flags,
|
||||
point_cloud_vertex_components::all
|
||||
>::component_array_set;
|
||||
|
||||
[[nodiscard]] inline std::vector<point_cloud_vertex_components::position>& positions();
|
||||
[[nodiscard]] inline std::vector<point_cloud_vertex_components::normal>& normals();
|
||||
[[nodiscard]] inline std::vector<point_cloud_vertex_components::color>& colors();
|
||||
|
||||
11
include/assets/data/pose_list_data.hpp
Normal file
11
include/assets/data/pose_list_data.hpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "pose_data.hpp"
|
||||
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
using pose_list_data = std::vector<pose_data>;
|
||||
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "config/primitives.hpp"
|
||||
#include "assets/components/shader_components.hpp"
|
||||
#include "assets/model_geometry.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
@@ -9,9 +11,20 @@ struct shader_source_data
|
||||
{
|
||||
z3d::vector<char> source{};
|
||||
|
||||
struct metadata
|
||||
{
|
||||
model_geometry::types geometry_type;
|
||||
shader_components::stage stage{};
|
||||
shader_components::flags components{};
|
||||
shader_components::flags static_enable{};
|
||||
shader_components::flags dynamic_enable{};
|
||||
} meta;
|
||||
|
||||
void clear()
|
||||
{
|
||||
source.clear();
|
||||
meta.stage = {};
|
||||
meta.components = {};
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "config/primitives.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
struct surface_properties
|
||||
{
|
||||
z3d::vec3 ambient_filter{ 0.7f, 0.7f, 0.7f };
|
||||
z3d::vec3 diffuse_filter{ 0.466f, 0.466f, 0.7922f };
|
||||
z3d::vec3 specular_filter{ 0.5974f, 0.2084f, 0.2084f };
|
||||
z3d::f32 shininess{ 100.2237f };
|
||||
};
|
||||
|
||||
}
|
||||
9
include/assets/data/uniform_surface_properties.hpp
Normal file
9
include/assets/data/uniform_surface_properties.hpp
Normal file
@@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include "config/primitives.hpp"
|
||||
|
||||
namespace assets
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user