pub struct Cube<S> { /* private fields */ }Expand description
Cuboid primitive.
Have a cached set of corner points to speed up computation.
Implementations§
Trait Implementations§
Source§impl<S> ComputeBound<Aabb3<S>> for Cube<S>where
S: BaseFloat,
impl<S> ComputeBound<Aabb3<S>> for Cube<S>where
S: BaseFloat,
Source§fn compute_bound(&self) -> Aabb3<S>
fn compute_bound(&self) -> Aabb3<S>
Compute the bounding volume
Source§impl<S> ComputeBound<Sphere<S>> for Cube<S>where
S: BaseFloat,
impl<S> ComputeBound<Sphere<S>> for Cube<S>where
S: BaseFloat,
Source§fn compute_bound(&self) -> Sphere<S>
fn compute_bound(&self) -> Sphere<S>
Compute the bounding volume
Source§impl<S> Discrete<Ray<S, Point3<S>, Vector3<S>>> for Cube<S>where
S: BaseFloat,
impl<S> Discrete<Ray<S, Point3<S>, Vector3<S>>> for Cube<S>where
S: BaseFloat,
Source§fn intersects(&self, ray: &Ray3<S>) -> bool
fn intersects(&self, ray: &Ray3<S>) -> bool
Intersection test
Source§impl<S> From<Cube<S>> for Primitive3<S>where
S: BaseFloat,
impl<S> From<Cube<S>> for Primitive3<S>where
S: BaseFloat,
Source§fn from(cuboid: Cube<S>) -> Primitive3<S>
fn from(cuboid: Cube<S>) -> Primitive3<S>
Converts to this type from the input type.
impl<S: PartialEq> StructuralPartialEq for Cube<S>
Auto Trait Implementations§
impl<S> Freeze for Cube<S>
impl<S> RefUnwindSafe for Cube<S>where
Cuboid<S>: RefUnwindSafe,
impl<S> Send for Cube<S>
impl<S> Sync for Cube<S>
impl<S> Unpin for Cube<S>
impl<S> UnsafeUnpin for Cube<S>where
Cuboid<S>: UnsafeUnpin,
impl<S> UnwindSafe for Cube<S>where
Cuboid<S>: 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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<P, C> Continuous<(Particle<P>, Range<P>)> for Cwhere
C: Continuous<Ray<<P as EuclideanSpace>::Scalar, P, <P as EuclideanSpace>::Diff>, Result = P>,
P: EuclideanSpace,
<P as EuclideanSpace>::Diff: InnerSpace,
<P as EuclideanSpace>::Scalar: BaseFloat,
impl<P, C> Continuous<(Particle<P>, Range<P>)> for Cwhere
C: Continuous<Ray<<P as EuclideanSpace>::Scalar, P, <P as EuclideanSpace>::Diff>, Result = P>,
P: EuclideanSpace,
<P as EuclideanSpace>::Diff: InnerSpace,
<P as EuclideanSpace>::Scalar: BaseFloat,
Source§impl<P, C> ContinuousTransformed<(Particle<P>, Range<P>)> for Cwhere
C: ContinuousTransformed<Ray<<P as EuclideanSpace>::Scalar, P, <P as EuclideanSpace>::Diff>, Result = P, Point = P>,
P: EuclideanSpace,
<P as EuclideanSpace>::Diff: InnerSpace,
<P as EuclideanSpace>::Scalar: BaseFloat,
impl<P, C> ContinuousTransformed<(Particle<P>, Range<P>)> for Cwhere
C: ContinuousTransformed<Ray<<P as EuclideanSpace>::Scalar, P, <P as EuclideanSpace>::Diff>, Result = P, Point = P>,
P: EuclideanSpace,
<P as EuclideanSpace>::Diff: InnerSpace,
<P as EuclideanSpace>::Scalar: BaseFloat,
Source§impl<P, C> ContinuousTransformed<Ray<<P as EuclideanSpace>::Scalar, P, <P as EuclideanSpace>::Diff>> for Cwhere
C: Continuous<Ray<<P as EuclideanSpace>::Scalar, P, <P as EuclideanSpace>::Diff>, Result = P>,
P: EuclideanSpace,
<P as EuclideanSpace>::Scalar: BaseFloat,
impl<P, C> ContinuousTransformed<Ray<<P as EuclideanSpace>::Scalar, P, <P as EuclideanSpace>::Diff>> for Cwhere
C: Continuous<Ray<<P as EuclideanSpace>::Scalar, P, <P as EuclideanSpace>::Diff>, Result = P>,
P: EuclideanSpace,
<P as EuclideanSpace>::Scalar: BaseFloat,
Source§fn intersection_transformed<T>(
&self,
ray: &Ray<<P as EuclideanSpace>::Scalar, P, <P as EuclideanSpace>::Diff>,
transform: &T,
) -> Option<P>where
T: Transform<P>,
fn intersection_transformed<T>(
&self,
ray: &Ray<<P as EuclideanSpace>::Scalar, P, <P as EuclideanSpace>::Diff>,
transform: &T,
) -> Option<P>where
T: Transform<P>,
Intersection test for transformed self
Source§impl<P, C> Discrete<(Particle<P>, Range<P>)> for Cwhere
C: Continuous<Ray<<P as EuclideanSpace>::Scalar, P, <P as EuclideanSpace>::Diff>, Result = P>,
P: EuclideanSpace,
<P as EuclideanSpace>::Diff: InnerSpace,
<P as EuclideanSpace>::Scalar: BaseFloat,
impl<P, C> Discrete<(Particle<P>, Range<P>)> for Cwhere
C: Continuous<Ray<<P as EuclideanSpace>::Scalar, P, <P as EuclideanSpace>::Diff>, Result = P>,
P: EuclideanSpace,
<P as EuclideanSpace>::Diff: InnerSpace,
<P as EuclideanSpace>::Scalar: BaseFloat,
Source§impl<P, C> DiscreteTransformed<(Particle<P>, Range<P>)> for Cwhere
C: ContinuousTransformed<Ray<<P as EuclideanSpace>::Scalar, P, <P as EuclideanSpace>::Diff>, Result = P, Point = P>,
P: EuclideanSpace,
<P as EuclideanSpace>::Diff: InnerSpace,
<P as EuclideanSpace>::Scalar: BaseFloat,
impl<P, C> DiscreteTransformed<(Particle<P>, Range<P>)> for Cwhere
C: ContinuousTransformed<Ray<<P as EuclideanSpace>::Scalar, P, <P as EuclideanSpace>::Diff>, Result = P, Point = P>,
P: EuclideanSpace,
<P as EuclideanSpace>::Diff: InnerSpace,
<P as EuclideanSpace>::Scalar: BaseFloat,
Source§impl<P, C> DiscreteTransformed<Ray<<P as EuclideanSpace>::Scalar, P, <P as EuclideanSpace>::Diff>> for Cwhere
C: Discrete<Ray<<P as EuclideanSpace>::Scalar, P, <P as EuclideanSpace>::Diff>>,
P: EuclideanSpace,
<P as EuclideanSpace>::Scalar: BaseFloat,
impl<P, C> DiscreteTransformed<Ray<<P as EuclideanSpace>::Scalar, P, <P as EuclideanSpace>::Diff>> for Cwhere
C: Discrete<Ray<<P as EuclideanSpace>::Scalar, P, <P as EuclideanSpace>::Diff>>,
P: EuclideanSpace,
<P as EuclideanSpace>::Scalar: BaseFloat,
Source§fn intersects_transformed<T>(
&self,
ray: &Ray<<P as EuclideanSpace>::Scalar, P, <P as EuclideanSpace>::Diff>,
transform: &T,
) -> boolwhere
T: Transform<P>,
fn intersects_transformed<T>(
&self,
ray: &Ray<<P as EuclideanSpace>::Scalar, P, <P as EuclideanSpace>::Diff>,
transform: &T,
) -> boolwhere
T: Transform<P>,
Intersection test for transformed self