[src]

Struct ncollide2df64::partitioning::BVT

pub struct BVT<B, BV> {
    // some fields omitted
}

A Boundig Volume Tree.

Methods

impl<B, BV> BVT<B, BV>

fn new_with_partitioner(leaves: ~[(B, BV)], partitioner: |uint, ~[(B, BV)]| -> PartFnResult<B, BV>) -> BVT<B, BV>

Builds a bounding volume tree using an user-defined construction function.

fn visit<Vis: BVTVisitor<B, BV>>(&self, visitor: &mut Vis)

Visit this tree using… a visitor!

fn visit_mut<Vis: BVTVisitor<B, BV>>(&mut self, visitor: &mut Vis)

Visit this tree using… a visitor! Visitor arguments are mutable.

fn root_bounding_volume<'r>(&'r self) -> Option<&'r BV>

Reference to the bounding volume of the tree root.

fn depth(&self) -> uint

Computes the depth of this tree.

impl<B> BVT<B, AABB>

fn new_kdtree(leaves: ~[(B, AABB)]) -> BVT<B, AABB>

Creates a new kdtree.

impl<B, BV: RayCast> BVT<B, BV>

fn cast_ray<'a, T>(&'a self, ray: &Ray, cast_fn: &|&B, &Ray| -> Option<(N, T)>) -> Option<(N, T, &'a B)>

Computes the closest intersection between the objects stored on this tree and a given ray.

Trait Implementations

impl<B: RayCast, BV: RayCast> RayCast for BVT<B, BV>

fn toi_with_ray(&self, ray: &Ray) -> Option<N>

Computes the time of impact between this geometry and a ray

fn toi_and_normal_with_ray(&self, ray: &Ray) -> Option<(N, V)>

Computes the intersection point between this geometry and a ray.

fn intersects_ray(&self, ray: &Ray) -> bool

Tests whether a ray intersects this geometry.

fn toi_with_transform_and_ray(&self, m: &M, ray: &Ray) -> Option<N>

Computes the time of impact between this transform geometry and a ray.

fn toi_and_normal_with_transform_and_ray(&self, m: &M, ray: &Ray) -> Option<(N, V)>

Computes the time of impact, and normal between this transformed geometry and a ray.

fn intersects_with_transform_and_ray(&self, m: &M, ray: &Ray) -> bool

Tests whether a ray intersects this transformed geometry.

impl<B: Clone, BV: Clone> Clone for BVT<B, BV>

Automatically derived.

fn clone(&self) -> BVT<B, BV>

impl<__E: Encoder, B: Encodable<__E>, BV: Encodable<__E>> Encodable<__E> for BVT<B, BV>

Automatically derived.

fn encode(&self, __arg_0: &mut __E)

impl<__D: Decoder, B: Decodable<__D>, BV: Decodable<__D>> Decodable<__D> for BVT<B, BV>

Automatically derived.

fn decode(__arg_0: &mut __D) -> BVT<B, BV>