[src]

Struct ncollide2df64::broad::DBVTBroadPhase

pub struct DBVTBroadPhase<B, BV, D, DV> {
    // some fields omitted
}

Broad phase based on a Dynamic Bounding Volume Tree.

It uses two separate trees: one for static objects and which is never updated, and one for moving objects.

Methods

impl<B: 'static + HasBoundingVolume<BV> + Clone, BV: 'static + LooseBoundingVolume + Translation<V> + Clone, D: Dispatcher<B, B, DV>, DV> DBVTBroadPhase<B, BV, D, DV>

fn new(dispatcher: D, margin: N) -> DBVTBroadPhase<B, BV, D, DV>

Creates a new broad phase based on a Dynamic Bounding Volume Tree.

fn num_interferences(&self) -> uint

Number of interferences detected by this broad phase.

Trait Implementations

impl<B: 'static + HasBoundingVolume<BV> + Clone + HasUid, BV: 'static + LooseBoundingVolume + Translation<V> + Clone, D: Dispatcher<B, B, DV>, DV> BroadPhase<B> for DBVTBroadPhase<B, BV, D, DV>

fn add(&mut self, b: B)

Adds an element to this broad phase.

fn remove(&mut self, b: &B)

Removes an element from this broad phase.

fn update(&mut self)

Updates the collision pairs based on the objects bounding volumes.

fn update_object(&mut self, object: &B)

Updates the collision pairs involving one specific object.

impl<B: 'static + HasBoundingVolume<BV> + HasUid + Clone, BV: 'static + LooseBoundingVolume + Translation<V> + Clone, D: Dispatcher<B, B, DV>, DV> InterferencesBroadPhase<B, DV> for DBVTBroadPhase<B, BV, D, DV>

fn for_each_pair(&self, f: |&B, &B, &DV|)

Execute a function on each interference detected by the broad phase.

fn for_each_pair_mut(&mut self, f: |&B, &B, &mut DV|)

Execute a function on each interference detected by the broad phase.

fn activate(&mut self, body: &B, f: |&B, &B, &mut DV|)

Marks and object as active.

Active objects are checked for interferences at each update.

fn deactivate(&mut self, body: &B)

Marks and object as inactive.

Inactive objects are assumed to be static and not tested for mutual interferences.

impl<B: 'static + HasBoundingVolume<BV> + HasUid + Clone, BV: 'static + LooseBoundingVolume + Translation<V> + Clone, D: Dispatcher<B, B, DV>, DV> BoundingVolumeBroadPhase<B, BV> for DBVTBroadPhase<B, BV, D, DV>

fn interferences_with_bounding_volume(&mut self, bv: &BV, out: &mut ~[B])

Collects every object which might intersect a given bounding volume.

impl<B: 'static + HasBoundingVolume<BV> + HasUid + Clone, BV: 'static + LooseBoundingVolume + RayCast + Translation<V> + Clone, D: Dispatcher<B, B, DV>, DV> RayCastBroadPhase<B> for DBVTBroadPhase<B, BV, D, DV>

fn interferences_with_ray(&mut self, ray: &Ray, out: &mut ~[B])

Collects every object which might intersect a ray.