Function ncollide3d::pipeline::glue::remove_proxies[][src]

#[must_use = "The graph index of the collision object returned by this method has been changed to the returned graph index."]
pub fn remove_proxies<'a, N: RealField, Handle: CollisionObjectHandle>(
    broad_phase: &mut impl BroadPhase<N, AABB<N>, Handle> + ?Sized,
    interactions: &mut InteractionGraph<N, Handle>,
    proxy_handle: BroadPhaseProxyHandle,
    graph_index: CollisionObjectGraphIndex
) -> Option<(Handle, CollisionObjectGraphIndex)>

Free all the resources allocated by the broad-phase and the interaction graph for the given proxy handles.

This will free the resoruces allocated by the create_proxies function. A special care should be taken with the return value of this function.

Return (important, please read)

Thus function either returns None or a pair composed of a collision object handle and a collision object graph index. If None is returned, no extra work is required from the caller. If Some is returned, the it is necessary that the collision object graph index of the collider identified by the returned handle is replaced by the returned collision object graph index. This is caused by the fact that the indices used by the interaction graph to identify collision objects are not stable wrt. the deletion of collision objects. Therefore, removing one collision object can result in the collision object graph index of another collision object to be changed.