pub struct RayBundle<Coords, BType, R, NPTS, StorageMultiple>where
Coords: CoordinateSystem,
BType: Bundle<R>,
R: RealField,
NPTS: Dim,
StorageMultiple: Storage<R, NPTS, U3>,{
pub data: Matrix<R, NPTS, U3, StorageMultiple>,
/* private fields */
}
Expand description
3D rays. Can be in any CoordinateSystem
.
Any given RayBundle
will have a particular bundle type, which implements
the Bundle
trait.
Fields§
§data: Matrix<R, NPTS, U3, StorageMultiple>
The matrix storing the ray data.
Implementations§
source§impl<Coords, BType, R, NPTS, StorageMultiple> RayBundle<Coords, BType, R, NPTS, StorageMultiple>where
Coords: CoordinateSystem,
BType: Bundle<R>,
R: RealField,
NPTS: DimName,
StorageMultiple: Storage<R, NPTS, U3>,
DefaultAllocator: Allocator<R, NPTS, U3>,
impl<Coords, BType, R, NPTS, StorageMultiple> RayBundle<Coords, BType, R, NPTS, StorageMultiple>where
Coords: CoordinateSystem,
BType: Bundle<R>,
R: RealField,
NPTS: DimName,
StorageMultiple: Storage<R, NPTS, U3>,
DefaultAllocator: Allocator<R, NPTS, U3>,
source§impl<Coords, BType, R> RayBundle<Coords, BType, R, U1, Owned<R, U1, U3>>
impl<Coords, BType, R> RayBundle<Coords, BType, R, U1, Owned<R, U1, U3>>
sourcepub fn to_single_ray(&self) -> Ray<Coords, R>
pub fn to_single_ray(&self) -> Ray<Coords, R>
Return the single ray from the RayBundle with exactly one ray.
Create a new RayBundle instance in which all rays share origin at zero.
The number of points allocated is given by the npts
parameter, which
should agree with the NPTS
type. The coordinate system is given by the
Coords
type.
Create a new RayBundle instance in which all rays share +z direction.
The number of points allocated is given by the npts
parameter, which
should agree with the NPTS
type. The coordinate system is given by the
Coords
type.
source§impl<Coords, BType, R, NPTS, StorageMultiple> RayBundle<Coords, BType, R, NPTS, StorageMultiple>
impl<Coords, BType, R, NPTS, StorageMultiple> RayBundle<Coords, BType, R, NPTS, StorageMultiple>
sourcepub fn point_on_ray(&self) -> Points<Coords, R, NPTS, Owned<R, NPTS, U3>>
pub fn point_on_ray(&self) -> Points<Coords, R, NPTS, Owned<R, NPTS, U3>>
get a 3D point on the ray, obtained by adding the direction(s) to the origin(s)
The distance of the point from the ray bundle center is not definted and can be arbitrary.
sourcepub fn point_on_ray_at_distance(
&self,
distance: R
) -> Points<Coords, R, NPTS, Owned<R, NPTS, U3>>
pub fn point_on_ray_at_distance( &self, distance: R ) -> Points<Coords, R, NPTS, Owned<R, NPTS, U3>>
get a 3D point on the ray at a defined distance from the origin(s)
Trait Implementations§
source§impl<Coords, BType, R, NPTS, StorageMultiple> Clone for RayBundle<Coords, BType, R, NPTS, StorageMultiple>
impl<Coords, BType, R, NPTS, StorageMultiple> Clone for RayBundle<Coords, BType, R, NPTS, StorageMultiple>
source§impl<Coords, BType, R, NPTS, StorageMultiple> Debug for RayBundle<Coords, BType, R, NPTS, StorageMultiple>
impl<Coords, BType, R, NPTS, StorageMultiple> Debug for RayBundle<Coords, BType, R, NPTS, StorageMultiple>
source§impl<'de, Coords, BType, R, NPTS, StorageMultiple> Deserialize<'de> for RayBundle<Coords, BType, R, NPTS, StorageMultiple>where
Coords: CoordinateSystem,
BType: Bundle<R> + Deserialize<'de>,
R: RealField + Deserialize<'de>,
NPTS: Dim + Deserialize<'de>,
StorageMultiple: Storage<R, NPTS, U3> + Deserialize<'de>,
impl<'de, Coords, BType, R, NPTS, StorageMultiple> Deserialize<'de> for RayBundle<Coords, BType, R, NPTS, StorageMultiple>where
Coords: CoordinateSystem,
BType: Bundle<R> + Deserialize<'de>,
R: RealField + Deserialize<'de>,
NPTS: Dim + Deserialize<'de>,
StorageMultiple: Storage<R, NPTS, U3> + Deserialize<'de>,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl<Coords, BType, R, NPTS, StorageMultiple> PartialEq for RayBundle<Coords, BType, R, NPTS, StorageMultiple>
impl<Coords, BType, R, NPTS, StorageMultiple> PartialEq for RayBundle<Coords, BType, R, NPTS, StorageMultiple>
source§impl<Coords, BType, R, NPTS, StorageMultiple> Serialize for RayBundle<Coords, BType, R, NPTS, StorageMultiple>
impl<Coords, BType, R, NPTS, StorageMultiple> Serialize for RayBundle<Coords, BType, R, NPTS, StorageMultiple>
impl<Coords, BType, R, NPTS, StorageMultiple> StructuralPartialEq for RayBundle<Coords, BType, R, NPTS, StorageMultiple>
Auto Trait Implementations§
impl<Coords, BType, R, NPTS, StorageMultiple> Freeze for RayBundle<Coords, BType, R, NPTS, StorageMultiple>
impl<Coords, BType, R, NPTS, StorageMultiple> RefUnwindSafe for RayBundle<Coords, BType, R, NPTS, StorageMultiple>where
BType: RefUnwindSafe,
Coords: RefUnwindSafe,
StorageMultiple: RefUnwindSafe,
R: RefUnwindSafe,
NPTS: RefUnwindSafe,
impl<Coords, BType, R, NPTS, StorageMultiple> Send for RayBundle<Coords, BType, R, NPTS, StorageMultiple>
impl<Coords, BType, R, NPTS, StorageMultiple> Sync for RayBundle<Coords, BType, R, NPTS, StorageMultiple>
impl<Coords, BType, R, NPTS, StorageMultiple> Unpin for RayBundle<Coords, BType, R, NPTS, StorageMultiple>
impl<Coords, BType, R, NPTS, StorageMultiple> UnwindSafe for RayBundle<Coords, BType, R, NPTS, StorageMultiple>where
BType: UnwindSafe,
Coords: UnwindSafe,
StorageMultiple: UnwindSafe,
R: UnwindSafe,
NPTS: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.