From b2cab891f8593230243a45bcec4e729e2a30f784 Mon Sep 17 00:00:00 2001 From: NiseVoid Date: Thu, 1 Feb 2024 01:39:32 +0100 Subject: [PATCH] Add Clone to intersection test types --- crates/bevy_math/src/bounding/raytest2d.rs | 6 +++--- crates/bevy_math/src/bounding/raytest3d.rs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/bevy_math/src/bounding/raytest2d.rs b/crates/bevy_math/src/bounding/raytest2d.rs index cb0a7ea676e64..52106c3940d85 100644 --- a/crates/bevy_math/src/bounding/raytest2d.rs +++ b/crates/bevy_math/src/bounding/raytest2d.rs @@ -2,7 +2,7 @@ use super::{Aabb2d, BoundingCircle, IntersectsVolume}; use crate::{primitives::Direction2d, Ray2d, Vec2}; /// A raycast intersection test for 2D bounding volumes -#[derive(Debug)] +#[derive(Clone, Debug)] pub struct RayTest2d { /// The ray for the test pub ray: Ray2d, @@ -99,7 +99,7 @@ impl IntersectsVolume for RayTest2d { } /// An intersection test that casts an [`Aabb2d`] along a ray. -#[derive(Debug)] +#[derive(Clone, Debug)] pub struct AabbCast2d { /// The ray along which to cast the bounding volume pub ray: RayTest2d, @@ -136,7 +136,7 @@ impl IntersectsVolume for AabbCast2d { } /// An intersection test that casts a [`BoundingCircle`] along a ray. -#[derive(Debug)] +#[derive(Clone, Debug)] pub struct BoundingCircleCast { /// The ray along which to cast the bounding volume pub ray: RayTest2d, diff --git a/crates/bevy_math/src/bounding/raytest3d.rs b/crates/bevy_math/src/bounding/raytest3d.rs index 726dbf34f2401..b07d3829c80e9 100644 --- a/crates/bevy_math/src/bounding/raytest3d.rs +++ b/crates/bevy_math/src/bounding/raytest3d.rs @@ -2,7 +2,7 @@ use super::{Aabb3d, BoundingSphere, IntersectsVolume}; use crate::{primitives::Direction3d, Ray3d, Vec3}; /// A raycast intersection test for 3D bounding volumes -#[derive(Debug)] +#[derive(Clone, Debug)] pub struct RayTest3d { /// The ray for the test pub ray: Ray3d, @@ -106,7 +106,7 @@ impl IntersectsVolume for RayTest3d { } /// An intersection test that casts an [`Aabb3d`] along a ray. -#[derive(Debug)] +#[derive(Clone, Debug)] pub struct AabbCast3d { /// The ray along which to cast the bounding volume pub ray: RayTest3d, @@ -143,7 +143,7 @@ impl IntersectsVolume for AabbCast3d { } /// An intersection test that casts a [`BoundingSphere`] along a ray. -#[derive(Debug)] +#[derive(Clone, Debug)] pub struct BoundingSphereCast { /// The ray along which to cast the bounding volume pub ray: RayTest3d,