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
sourceimpl<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>,
sourceimpl<Coords, BType, R> RayBundle<Coords, BType, R, U1, Owned<R, U1, U3>> where
Coords: CoordinateSystem,
BType: Bundle<R>,
R: RealField,
impl<Coords, BType, R> RayBundle<Coords, BType, R, U1, Owned<R, U1, U3>> where
Coords: CoordinateSystem,
BType: Bundle<R>,
R: RealField,
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.
sourceimpl<Coords, R, NPTS, StorageMultiple> RayBundle<Coords, SharedOriginRayBundle<R>, R, NPTS, StorageMultiple> where
Coords: CoordinateSystem,
R: RealField,
NPTS: Dim,
StorageMultiple: Storage<R, NPTS, U3>,
impl<Coords, R, NPTS, StorageMultiple> RayBundle<Coords, SharedOriginRayBundle<R>, R, NPTS, StorageMultiple> where
Coords: CoordinateSystem,
R: RealField,
NPTS: Dim,
StorageMultiple: Storage<R, NPTS, U3>,
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.
sourceimpl<Coords, R, NPTS, StorageMultiple> RayBundle<Coords, SharedDirectionRayBundle<R>, R, NPTS, StorageMultiple> where
Coords: CoordinateSystem,
R: RealField,
NPTS: Dim,
StorageMultiple: Storage<R, NPTS, U3>,
impl<Coords, R, NPTS, StorageMultiple> RayBundle<Coords, SharedDirectionRayBundle<R>, R, NPTS, StorageMultiple> where
Coords: CoordinateSystem,
R: RealField,
NPTS: Dim,
StorageMultiple: Storage<R, NPTS, U3>,
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.
sourceimpl<Coords, BType, R, NPTS, StorageMultiple> RayBundle<Coords, BType, R, NPTS, StorageMultiple> where
Coords: CoordinateSystem,
BType: Bundle<R>,
R: RealField,
NPTS: Dim,
StorageMultiple: Storage<R, NPTS, U3>,
impl<Coords, BType, R, NPTS, StorageMultiple> RayBundle<Coords, BType, R, NPTS, StorageMultiple> where
Coords: CoordinateSystem,
BType: Bundle<R>,
R: RealField,
NPTS: Dim,
StorageMultiple: Storage<R, NPTS, U3>,
sourcepub fn point_on_ray(&self) -> Points<Coords, R, NPTS, Owned<R, NPTS, U3>> where
DefaultAllocator: Allocator<R, NPTS, U3>,
pub fn point_on_ray(&self) -> Points<Coords, R, NPTS, Owned<R, NPTS, U3>> where
DefaultAllocator: Allocator<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>> where
DefaultAllocator: Allocator<R, NPTS, U3>,
pub fn point_on_ray_at_distance(
&self,
distance: R
) -> Points<Coords, R, NPTS, Owned<R, NPTS, U3>> where
DefaultAllocator: Allocator<R, NPTS, U3>,
get a 3D point on the ray at a defined distance from the origin(s)
Trait Implementations
sourceimpl<Coords: Clone, BType: Clone, R: Clone, NPTS: Clone, StorageMultiple: Clone> Clone for RayBundle<Coords, BType, R, NPTS, StorageMultiple> where
Coords: CoordinateSystem,
BType: Bundle<R>,
R: RealField,
NPTS: Dim,
StorageMultiple: Storage<R, NPTS, U3>,
impl<Coords: Clone, BType: Clone, R: Clone, NPTS: Clone, StorageMultiple: Clone> Clone for RayBundle<Coords, BType, R, NPTS, StorageMultiple> where
Coords: CoordinateSystem,
BType: Bundle<R>,
R: RealField,
NPTS: Dim,
StorageMultiple: Storage<R, NPTS, U3>,
sourceimpl<Coords: Debug, BType: Debug, R: Debug, NPTS: Debug, StorageMultiple: Debug> Debug for RayBundle<Coords, BType, R, NPTS, StorageMultiple> where
Coords: CoordinateSystem,
BType: Bundle<R>,
R: RealField,
NPTS: Dim,
StorageMultiple: Storage<R, NPTS, U3>,
impl<Coords: Debug, BType: Debug, R: Debug, NPTS: Debug, StorageMultiple: Debug> Debug for RayBundle<Coords, BType, R, NPTS, StorageMultiple> where
Coords: CoordinateSystem,
BType: Bundle<R>,
R: RealField,
NPTS: Dim,
StorageMultiple: Storage<R, NPTS, U3>,
sourceimpl<'de, Coords, BType, R, NPTS, StorageMultiple> Deserialize<'de> for RayBundle<Coords, BType, R, NPTS, StorageMultiple> where
Coords: CoordinateSystem,
BType: Bundle<R>,
R: RealField,
NPTS: Dim,
StorageMultiple: Storage<R, NPTS, U3>,
BType: Deserialize<'de>,
R: Deserialize<'de>,
NPTS: Deserialize<'de>,
StorageMultiple: Deserialize<'de>,
impl<'de, Coords, BType, R, NPTS, StorageMultiple> Deserialize<'de> for RayBundle<Coords, BType, R, NPTS, StorageMultiple> where
Coords: CoordinateSystem,
BType: Bundle<R>,
R: RealField,
NPTS: Dim,
StorageMultiple: Storage<R, NPTS, U3>,
BType: Deserialize<'de>,
R: Deserialize<'de>,
NPTS: Deserialize<'de>,
StorageMultiple: Deserialize<'de>,
sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<Coords: PartialEq, BType: PartialEq, R: PartialEq, NPTS: PartialEq, StorageMultiple: PartialEq> PartialEq<RayBundle<Coords, BType, R, NPTS, StorageMultiple>> for RayBundle<Coords, BType, R, NPTS, StorageMultiple> where
Coords: CoordinateSystem,
BType: Bundle<R>,
R: RealField,
NPTS: Dim,
StorageMultiple: Storage<R, NPTS, U3>,
impl<Coords: PartialEq, BType: PartialEq, R: PartialEq, NPTS: PartialEq, StorageMultiple: PartialEq> PartialEq<RayBundle<Coords, BType, R, NPTS, StorageMultiple>> for RayBundle<Coords, BType, R, NPTS, StorageMultiple> where
Coords: CoordinateSystem,
BType: Bundle<R>,
R: RealField,
NPTS: Dim,
StorageMultiple: Storage<R, NPTS, U3>,
sourceimpl<Coords, BType, R, NPTS, StorageMultiple> Serialize for RayBundle<Coords, BType, R, NPTS, StorageMultiple> where
Coords: CoordinateSystem,
BType: Bundle<R>,
R: RealField,
NPTS: Dim,
StorageMultiple: Storage<R, NPTS, U3>,
BType: Serialize,
R: Serialize,
NPTS: Serialize,
StorageMultiple: Serialize,
impl<Coords, BType, R, NPTS, StorageMultiple> Serialize for RayBundle<Coords, BType, R, NPTS, StorageMultiple> where
Coords: CoordinateSystem,
BType: Bundle<R>,
R: RealField,
NPTS: Dim,
StorageMultiple: Storage<R, NPTS, U3>,
BType: Serialize,
R: Serialize,
NPTS: Serialize,
StorageMultiple: Serialize,
impl<Coords, BType, R, NPTS, StorageMultiple> StructuralPartialEq for RayBundle<Coords, BType, R, NPTS, StorageMultiple> where
Coords: CoordinateSystem,
BType: Bundle<R>,
R: RealField,
NPTS: Dim,
StorageMultiple: Storage<R, NPTS, U3>,
Auto Trait Implementations
impl<Coords, BType, R, NPTS, StorageMultiple> RefUnwindSafe for RayBundle<Coords, BType, R, NPTS, StorageMultiple> where
BType: RefUnwindSafe,
Coords: RefUnwindSafe,
NPTS: RefUnwindSafe,
R: RefUnwindSafe,
StorageMultiple: RefUnwindSafe,
impl<Coords, BType, R, NPTS, StorageMultiple> Send for RayBundle<Coords, BType, R, NPTS, StorageMultiple> where
BType: Send,
Coords: Send,
StorageMultiple: Send,
impl<Coords, BType, R, NPTS, StorageMultiple> Sync for RayBundle<Coords, BType, R, NPTS, StorageMultiple> where
BType: Sync,
Coords: Sync,
StorageMultiple: Sync,
impl<Coords, BType, R, NPTS, StorageMultiple> Unpin for RayBundle<Coords, BType, R, NPTS, StorageMultiple> where
BType: Unpin,
Coords: Unpin,
NPTS: Unpin,
R: Unpin,
StorageMultiple: Unpin,
impl<Coords, BType, R, NPTS, StorageMultiple> UnwindSafe for RayBundle<Coords, BType, R, NPTS, StorageMultiple> where
BType: UnwindSafe,
Coords: UnwindSafe,
NPTS: UnwindSafe,
R: UnwindSafe,
StorageMultiple: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct self from the equivalent element of its
superset. Read more
fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if self is actually part of its subset T (and can be converted to it).
fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset but without any property checks. Always succeeds.
fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts self to the equivalent element of its superset.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more