Add Clone to intersection test types (#11640)

# Objective

- Add Clone to RayTest/AabbCast2d/AabbCast3d/CircleCast/SphereCast
This commit is contained in:
NiseVoid 2024-02-01 01:54:30 +01:00 committed by GitHub
parent 1b98de68fe
commit e3126a494f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 6 deletions

View file

@ -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<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,
@ -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,

View file

@ -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<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,
@ -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,