Struct cam_geom::RayBundle [−][src]
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>, // some fields omitted }
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
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>,
Return the single ray from the RayBundle with exactly one ray.
impl<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.
impl<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.
pub 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.
pub 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
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>,
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>,
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>,
Deserialize this value from the given Serde deserializer. Read more
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>,
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>,
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> 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
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self
The inverse inclusion map: attempts to construct self from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self is actually part of its subset T (and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self to the equivalent element of its superset.