Struct cam_geom::RayBundle

source ·
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>,

source

pub fn directions(&self) -> Matrix<R, NPTS, U3, Owned<R, NPTS, U3>>

get directions of each ray in bundle

source

pub fn centers(&self) -> Matrix<R, NPTS, U3, Owned<R, NPTS, U3>>

get centers (origins) of each ray in bundle

source§

impl<Coords, BType, R> RayBundle<Coords, BType, R, U1, Owned<R, U1, U3>>
where Coords: CoordinateSystem, BType: Bundle<R>, R: RealField,

source

pub fn to_single_ray(&self) -> Ray<Coords, R>

Return the single ray from the RayBundle with exactly one ray.

source§

impl<Coords, R, NPTS, StorageMultiple> RayBundle<Coords, SharedOriginRayBundle<R>, R, NPTS, StorageMultiple>
where Coords: CoordinateSystem, R: RealField, NPTS: Dim, StorageMultiple: Storage<R, NPTS, U3>,

source

pub fn new_shared_zero_origin( data: Matrix<R, NPTS, U3, StorageMultiple> ) -> Self

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.

source§

impl<Coords, R, NPTS, StorageMultiple> RayBundle<Coords, SharedDirectionRayBundle<R>, R, NPTS, StorageMultiple>
where Coords: CoordinateSystem, R: RealField, NPTS: Dim, StorageMultiple: Storage<R, NPTS, U3>,

source

pub fn new_shared_plusz_direction( data: Matrix<R, NPTS, U3, StorageMultiple> ) -> Self

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

source

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.

source

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,

source§

fn clone(&self) -> RayBundle<Coords, BType, R, NPTS, StorageMultiple>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
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,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
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>,

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<Coords, BType, R, NPTS, StorageMultiple> PartialEq 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§

fn eq(&self, other: &RayBundle<Coords, BType, R, NPTS, StorageMultiple>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
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,

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

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> Freeze for RayBundle<Coords, BType, R, NPTS, StorageMultiple>
where BType: Freeze, StorageMultiple: Freeze,

§

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>
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, StorageMultiple: Unpin, R: Unpin, NPTS: Unpin,

§

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,