80 material_property_blocks_.push_back(blank_property_block_);
81 meshes_.push_back(
mesh);
82 maybe_submesh_indices_.emplace_back();
83 model_matrices_.push_back(transform);
84 return handles_.emplace_back(handles_.size());
93 material_property_blocks_.push_back(material_prop_block);
94 meshes_.push_back(
mesh);
95 maybe_submesh_indices_.emplace_back();
96 model_matrices_.push_back(transform);
97 return handles_.emplace_back(handles_.size());
103 size_t submesh_index)
106 material_property_blocks_.push_back(blank_property_block_);
107 meshes_.push_back(
mesh);
108 maybe_submesh_indices_.emplace_back(submesh_index);
109 model_matrices_.push_back(transform);
110 return handles_.emplace_back(handles_.size());
117 size_t submesh_index)
120 material_property_blocks_.push_back(material_prop_block);
121 meshes_.push_back(
mesh);
122 maybe_submesh_indices_.emplace_back(submesh_index);
123 model_matrices_.push_back(transform);
124 return handles_.emplace_back(handles_.size());
130 material_property_blocks_.clear();
132 maybe_submesh_indices_.clear();
133 model_matrices_.clear();
137 [[nodiscard]]
bool empty()
const {
return materials_.empty(); }
156 if (
const auto local_centroid =
mesh(
id).centroid()) {
168 const auto&
handles()
const {
return handles_; }
175 std::vector<Material> materials_;
176 std::vector<MaterialPropertyBlock> material_property_blocks_;
177 std::vector<Mesh> meshes_;
178 std::vector<submesh_index_type> maybe_submesh_indices_;
179 std::vector<Matrix4x4> model_matrices_;
180 std::vector<handle_type> handles_;
Definition material_property_block.h:20
bool is_depth_tested() const
bool is_transparent() const
Definition render_queue.h:27
handle_type emplace(const Mesh &mesh, const Matrix4x4 &transform, const Material &material, const MaterialPropertyBlock &material_prop_block)
Definition render_queue.h:86
MaterialPropertyBlock & material_property_block(handle_type id)
Definition render_queue.h:143
const Matrix4x4 & model_matrix(handle_type id) const
Definition render_queue.h:151
handle_type emplace(const Mesh &mesh, const Matrix4x4 &transform, const Material &material, const MaterialPropertyBlock &material_prop_block, size_t submesh_index)
Definition render_queue.h:112
handle_type emplace(const Mesh &mesh, const Material &material)
Definition render_queue.h:39
std::ranges::subrange< handle_iterator > handle_subrange
Definition render_queue.h:32
std::ranges::subrange< handle_const_iterator > handle_const_subrange
Definition render_queue.h:33
std::vector< handle_type >::const_iterator handle_const_iterator
Definition render_queue.h:31
handle_type emplace(const Mesh &mesh, const Matrix4x4 &transform, const Material &material, size_t submesh_index)
Definition render_queue.h:99
bool is_depth_tested(handle_type id) const
Definition render_queue.h:164
Vector3 world_space_centroid(handle_type id) const
Definition render_queue.h:154
submesh_index_type & maybe_submesh_index(handle_type id)
Definition render_queue.h:149
Matrix3x3 normal_matrix3x3(handle_type id) const
Definition render_queue.h:165
size_t handle_type
Definition render_queue.h:29
handle_type emplace(const Mesh &mesh, const Transform &transform, const Material &material, const MaterialPropertyBlock &material_prop_block, size_t submesh_index)
Definition render_queue.h:68
bool empty() const
Definition render_queue.h:137
const auto & handles() const
Definition render_queue.h:168
Material & material(handle_type id)
Definition render_queue.h:140
size_t size_type
Definition render_queue.h:34
std::vector< handle_type >::iterator handle_iterator
Definition render_queue.h:30
const Mesh & mesh(handle_type id) const
Definition render_queue.h:145
const Material & material(handle_type id) const
Definition render_queue.h:139
Mesh & mesh(handle_type id)
Definition render_queue.h:146
auto & handles()
Definition render_queue.h:169
handle_type emplace(const Mesh &mesh, const Transform &transform, const Material &material, size_t submesh_index)
Definition render_queue.h:60
bool is_opaque(handle_type id) const
Definition render_queue.h:163
Matrix4x4 & model_matrix(handle_type id)
Definition render_queue.h:152
void clear()
Definition render_queue.h:127
friend bool operator==(const RenderQueue &, const RenderQueue &)=default
const submesh_index_type & maybe_submesh_index(handle_type id) const
Definition render_queue.h:148
const MaterialPropertyBlock & material_property_block(handle_type id) const
Definition render_queue.h:142
Matrix4x4 normal_matrix4x4(handle_type id) const
Definition render_queue.h:166
handle_type emplace(const Mesh &mesh, const Matrix4x4 &transform, const Material &material)
Definition render_queue.h:77
size_type size() const
Definition render_queue.h:171
handle_type emplace(const Mesh &mesh, const Transform &transform, const Material &material, const MaterialPropertyBlock &material_prop_block)
Definition render_queue.h:52
handle_type emplace(const Mesh &mesh, const Transform &transform, const Material &material)
Definition render_queue.h:45
Definition value_or_sentinel.h:16
Definition custom_decoration_generator.h:5
constexpr Matrix< T, 4, 4 > matrix4x4_cast(const Qua< T > &q)
Definition quaternion_functions.h:149
Vector3 transform_point(const Matrix4x4 &mat, const Vector3 &point)
Definition matrix_functions.h:540
Matrix< T, 3, 3 > normal_matrix(const Matrix< T, 4, 4 > &m)
Definition matrix_functions.h:502
Matrix< T, 4, 4 > normal_matrix4x4(const Matrix< T, 4, 4 > &m)
Definition matrix_functions.h:523
constexpr Matrix4x4 identity< Matrix4x4 >()
Definition matrix4x4.h:390