Struct kdtree_ray::KDtree [−][src]
The KD-tree data structure stores the elements implementing BoundingBox.
Implementations
impl<P: BoundingBox> KDtree<P>
[src]
pub fn new(values: Vec<P>) -> Self
[src]
This function is used to create a new KD-tree. You need to provide a
Vec
of values that implement BoundingBox
trait.
pub fn intersect(
&self,
ray_origin: &Vector3<f32>,
ray_direction: &Vector3<f32>
) -> Vec<Arc<P>>
[src]
&self,
ray_origin: &Vector3<f32>,
ray_direction: &Vector3<f32>
) -> Vec<Arc<P>>
This function takes a ray and return a reduced list of candidates that can be intersected by the ray.
Trait Implementations
impl<P> BoundingBox for KDtree<P> where
P: BoundingBox,
[src]
P: BoundingBox,
fn bounding_box(&self) -> AABB
[src]
impl<P: Clone> Clone for KDtree<P> where
P: BoundingBox,
[src]
P: BoundingBox,
impl<P: Debug> Debug for KDtree<P> where
P: BoundingBox,
[src]
P: BoundingBox,
Auto Trait Implementations
impl<P> RefUnwindSafe for KDtree<P> where
P: RefUnwindSafe,
P: RefUnwindSafe,
impl<P> Send for KDtree<P> where
P: Send + Sync,
P: Send + Sync,
impl<P> Sync for KDtree<P> where
P: Send + Sync,
P: Send + Sync,
impl<P> Unpin for KDtree<P>
impl<P> UnwindSafe for KDtree<P> where
P: RefUnwindSafe,
P: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,