Closes #6, #7, #8, #9, #10 Refs #2, #122 Vendored bevy_render, bevy_core_pipeline, and bevy_pbr from Bevy v0.17.2 (commit 566358363126dd69f6e457e47f306c68f8041d2a) into libmarathon. - ~51K LOC vendored to crates/libmarathon/src/render/ - Merged bevy_render_macros into crates/macros/ - Fixed 773→0 compilation errors - Updated dependencies (encase 0.10→0.11, added 4 new deps) - Removed bevy_render/pbr/core_pipeline from app Cargo features All builds passing, macOS smoke test successful. Signed-off-by: Sienna Meridian Satterwhite <sienna@r3t.io>
47 lines
1.5 KiB
Rust
47 lines
1.5 KiB
Rust
use bevy_derive::{Deref, DerefMut};
|
|
use bevy_ecs::component::Component;
|
|
use bevy_ecs::entity::{Entity, EntityHashMap};
|
|
use bevy_ecs::reflect::ReflectComponent;
|
|
use bevy_reflect::{std_traits::ReflectDefault, Reflect};
|
|
use crate::render::sync_world::MainEntity;
|
|
|
|
#[derive(Component, Clone, Debug, Default, Reflect, Deref, DerefMut)]
|
|
#[reflect(Component, Debug, Default, Clone)]
|
|
pub struct RenderVisibleMeshEntities {
|
|
#[reflect(ignore, clone)]
|
|
pub entities: Vec<(Entity, MainEntity)>,
|
|
}
|
|
|
|
#[derive(Component, Clone, Debug, Default, Reflect)]
|
|
#[reflect(Component, Debug, Default, Clone)]
|
|
pub struct RenderCubemapVisibleEntities {
|
|
#[reflect(ignore, clone)]
|
|
pub(crate) data: [RenderVisibleMeshEntities; 6],
|
|
}
|
|
|
|
impl RenderCubemapVisibleEntities {
|
|
pub fn get(&self, i: usize) -> &RenderVisibleMeshEntities {
|
|
&self.data[i]
|
|
}
|
|
|
|
pub fn get_mut(&mut self, i: usize) -> &mut RenderVisibleMeshEntities {
|
|
&mut self.data[i]
|
|
}
|
|
|
|
pub fn iter(&self) -> impl DoubleEndedIterator<Item = &RenderVisibleMeshEntities> {
|
|
self.data.iter()
|
|
}
|
|
|
|
pub fn iter_mut(&mut self) -> impl DoubleEndedIterator<Item = &mut RenderVisibleMeshEntities> {
|
|
self.data.iter_mut()
|
|
}
|
|
}
|
|
|
|
#[derive(Component, Clone, Debug, Default, Reflect)]
|
|
#[reflect(Component, Default, Clone)]
|
|
pub struct RenderCascadesVisibleEntities {
|
|
/// Map of view entity to the visible entities for each cascade frustum.
|
|
#[reflect(ignore, clone)]
|
|
pub entities: EntityHashMap<Vec<RenderVisibleMeshEntities>>,
|
|
}
|