Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Clone to intersection test types #11640

Merged
merged 1 commit into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions crates/bevy_math/src/bounding/raytest2d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -99,7 +99,7 @@ impl IntersectsVolume<BoundingCircle> 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,
Expand Down Expand Up @@ -136,7 +136,7 @@ impl IntersectsVolume<Aabb2d> 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,
Expand Down
6 changes: 3 additions & 3 deletions crates/bevy_math/src/bounding/raytest3d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -106,7 +106,7 @@ impl IntersectsVolume<BoundingSphere> 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,
Expand Down Expand Up @@ -143,7 +143,7 @@ impl IntersectsVolume<Aabb3d> 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,
Expand Down