mirror of
https://github.com/eliasstepanik/big_space_with_trim.git
synced 2026-01-11 18:48:27 +00:00
Add missing component reflects, fix new lints
This commit is contained in:
parent
b2ebb025e7
commit
750a9a7398
@ -41,6 +41,7 @@ impl<P: GridPrecision> Plugin for CameraControllerPlugin<P> {
|
|||||||
|
|
||||||
/// Per-camera settings for the `big_space` floating origin camera controller.
|
/// Per-camera settings for the `big_space` floating origin camera controller.
|
||||||
#[derive(Clone, Debug, Reflect, Component)]
|
#[derive(Clone, Debug, Reflect, Component)]
|
||||||
|
#[reflect(Component)]
|
||||||
pub struct CameraController {
|
pub struct CameraController {
|
||||||
/// Smoothness of translation, from `0.0` to `1.0`.
|
/// Smoothness of translation, from `0.0` to `1.0`.
|
||||||
pub smoothness: f64,
|
pub smoothness: f64,
|
||||||
|
|||||||
@ -12,6 +12,7 @@ use bevy_utils::HashMap;
|
|||||||
/// [`BigSpace`] will be computed relative to this floating origin. There should always be exactly
|
/// [`BigSpace`] will be computed relative to this floating origin. There should always be exactly
|
||||||
/// one entity marked with this component within a [`BigSpace`].
|
/// one entity marked with this component within a [`BigSpace`].
|
||||||
#[derive(Component, Reflect)]
|
#[derive(Component, Reflect)]
|
||||||
|
#[reflect(Component)]
|
||||||
pub struct FloatingOrigin;
|
pub struct FloatingOrigin;
|
||||||
|
|
||||||
/// A "big space" is a hierarchy of high precision reference frames, rendered with a floating
|
/// A "big space" is a hierarchy of high precision reference frames, rendered with a floating
|
||||||
@ -27,6 +28,7 @@ pub struct FloatingOrigin;
|
|||||||
/// [`GlobalTransform`](bevy_transform::components::GlobalTransform) of all spatial entities within
|
/// [`GlobalTransform`](bevy_transform::components::GlobalTransform) of all spatial entities within
|
||||||
/// that `BigSpace`.
|
/// that `BigSpace`.
|
||||||
#[derive(Debug, Default, Component, Reflect)]
|
#[derive(Debug, Default, Component, Reflect)]
|
||||||
|
#[reflect(Component)]
|
||||||
pub struct BigSpace {
|
pub struct BigSpace {
|
||||||
/// Set the entity to use as the floating origin within this high precision hierarchy.
|
/// Set the entity to use as the floating origin within this high precision hierarchy.
|
||||||
pub floating_origin: Option<Entity>,
|
pub floating_origin: Option<Entity>,
|
||||||
|
|||||||
@ -34,6 +34,7 @@ pub mod propagation;
|
|||||||
/// the same rotating reference frame, instead of moving rapidly through space around a star, or
|
/// the same rotating reference frame, instead of moving rapidly through space around a star, or
|
||||||
/// worse, around the center of the galaxy.
|
/// worse, around the center of the galaxy.
|
||||||
#[derive(Debug, Clone, Reflect, Component)]
|
#[derive(Debug, Clone, Reflect, Component)]
|
||||||
|
#[reflect(Component)]
|
||||||
pub struct ReferenceFrame<P: GridPrecision + Reflect> {
|
pub struct ReferenceFrame<P: GridPrecision + Reflect> {
|
||||||
/// The high-precision position of the floating origin's current grid cell local to this
|
/// The high-precision position of the floating origin's current grid cell local to this
|
||||||
/// reference frame.
|
/// reference frame.
|
||||||
|
|||||||
@ -102,10 +102,10 @@ impl<P: GridPrecision> ReferenceFrame<P> {
|
|||||||
///
|
///
|
||||||
/// # Safety
|
/// # Safety
|
||||||
///
|
///
|
||||||
/// - While this function is running, `transform_query` must not have any fetches for `entity`, nor
|
/// - While this function is running, `transform_query` must not have any fetches for `entity`,
|
||||||
/// any of its descendants.
|
/// nor any of its descendants.
|
||||||
/// - The caller must ensure that the hierarchy leading to `entity` is well-formed and must remain
|
/// - The caller must ensure that the hierarchy leading to `entity` is well-formed and must
|
||||||
/// as a tree or a forest. Each entity must have at most one parent.
|
/// remain as a tree or a forest. Each entity must have at most one parent.
|
||||||
unsafe fn propagate_recursive(
|
unsafe fn propagate_recursive(
|
||||||
parent: &GlobalTransform,
|
parent: &GlobalTransform,
|
||||||
transform_query: &Query<
|
transform_query: &Query<
|
||||||
|
|||||||
@ -130,7 +130,7 @@ pub(super) mod sealed {
|
|||||||
fn clone_box(&self) -> Box<dyn ValidHierarchyNode>;
|
fn clone_box(&self) -> Box<dyn ValidHierarchyNode>;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: ?Sized> CloneHierarchy for T
|
impl<T> CloneHierarchy for T
|
||||||
where
|
where
|
||||||
T: 'static + ValidHierarchyNode + Clone,
|
T: 'static + ValidHierarchyNode + Clone,
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user