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>>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.
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>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§
source§impl<Coords, BType, R, NPTS, StorageMultiple> Clone for RayBundle<Coords, BType, R, NPTS, StorageMultiple>where
Coords: CoordinateSystem + Clone,
BType: Bundle<R> + Clone,
R: RealField + Clone,
NPTS: Dim + Clone,
StorageMultiple: Storage<R, NPTS, U3> + Clone,
impl<Coords, BType, R, NPTS, StorageMultiple> Clone for RayBundle<Coords, BType, R, NPTS, StorageMultiple>where
Coords: CoordinateSystem + Clone,
BType: Bundle<R> + Clone,
R: RealField + Clone,
NPTS: Dim + Clone,
StorageMultiple: Storage<R, NPTS, U3> + Clone,
source§impl<Coords, BType, R, NPTS, StorageMultiple> Debug for RayBundle<Coords, BType, R, NPTS, StorageMultiple>where
Coords: CoordinateSystem + Debug,
BType: Bundle<R> + Debug,
R: RealField + Debug,
NPTS: Dim + Debug,
StorageMultiple: Storage<R, NPTS, U3> + Debug,
impl<Coords, BType, R, NPTS, StorageMultiple> Debug for RayBundle<Coords, BType, R, NPTS, StorageMultiple>where
Coords: CoordinateSystem + Debug,
BType: Bundle<R> + Debug,
R: RealField + Debug,
NPTS: Dim + Debug,
StorageMultiple: Storage<R, NPTS, U3> + Debug,
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<RayBundle<Coords, BType, R, NPTS, StorageMultiple>> for RayBundle<Coords, BType, R, NPTS, StorageMultiple>where
Coords: CoordinateSystem + PartialEq,
BType: Bundle<R> + PartialEq,
R: RealField + PartialEq,
NPTS: Dim + PartialEq,
StorageMultiple: Storage<R, NPTS, U3> + PartialEq,
impl<Coords, BType, R, NPTS, StorageMultiple> PartialEq<RayBundle<Coords, BType, R, NPTS, StorageMultiple>> for RayBundle<Coords, BType, R, NPTS, StorageMultiple>where
Coords: CoordinateSystem + PartialEq,
BType: Bundle<R> + PartialEq,
R: RealField + PartialEq,
NPTS: Dim + PartialEq,
StorageMultiple: Storage<R, NPTS, U3> + PartialEq,
source§impl<Coords, BType, R, NPTS, StorageMultiple> Serialize for RayBundle<Coords, BType, R, NPTS, StorageMultiple>where
Coords: CoordinateSystem,
BType: Bundle<R> + Serialize,
R: RealField + Serialize,
NPTS: Dim + Serialize,
StorageMultiple: Storage<R, NPTS, U3> + Serialize,
impl<Coords, BType, R, NPTS, StorageMultiple> Serialize for RayBundle<Coords, BType, R, NPTS, StorageMultiple>where
Coords: CoordinateSystem,
BType: Bundle<R> + Serialize,
R: RealField + Serialize,
NPTS: Dim + Serialize,
StorageMultiple: Storage<R, NPTS, U3> + 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§
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§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).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.