Search in sources :

Example 26 with Collidable

use of spacegraph.space3d.phys.Collidable in project narchy by automenta.

the class PairCachingGhostObject method removeOverlappingObjectInternal.

@Override
public void removeOverlappingObjectInternal(Broadphasing otherProxy, Intersecter intersecter, Broadphasing thisProxy1) {
    Collidable otherObject = otherProxy.data;
    Broadphasing actualThisProxy = thisProxy1 != null ? thisProxy1 : broadphase;
    assert (actualThisProxy != null);
    assert (otherObject != null);
    int index = overlappingObjects.indexOf(otherObject);
    if (index != -1) {
        // return array[index];
        overlappingObjects.setFast(index, overlappingObjects.get(overlappingObjects.size() - 1));
        overlappingObjects.removeFast(overlappingObjects.size() - 1);
        hashPairCache.removeOverlappingPair(actualThisProxy, otherProxy, intersecter);
    }
}
Also used : Collidable(spacegraph.space3d.phys.Collidable) Broadphasing(spacegraph.space3d.phys.collision.broad.Broadphasing)

Aggregations

Collidable (spacegraph.space3d.phys.Collidable)26 Transform (spacegraph.space3d.phys.math.Transform)6 spacegraph.util.math.v3 (spacegraph.util.math.v3)6 CollisionShape (spacegraph.space3d.phys.shape.CollisionShape)4 PersistentManifold (spacegraph.space3d.phys.collision.narrow.PersistentManifold)3 CompoundShape (spacegraph.space3d.phys.shape.CompoundShape)3 Broadphasing (spacegraph.space3d.phys.collision.broad.Broadphasing)2 ManifoldPoint (spacegraph.space3d.phys.collision.narrow.ManifoldPoint)2 ConcaveShape (spacegraph.space3d.phys.shape.ConcaveShape)2 SimpleSpatial (spacegraph.space3d.SimpleSpatial)1 Spatial (spacegraph.space3d.Spatial)1 Body3D (spacegraph.space3d.phys.Body3D)1 ClosestRay (spacegraph.space3d.phys.collision.ClosestRay)1 BroadphasePair (spacegraph.space3d.phys.collision.broad.BroadphasePair)1 CollisionAlgorithm (spacegraph.space3d.phys.collision.broad.CollisionAlgorithm)1 VoronoiSimplexSolver (spacegraph.space3d.phys.collision.narrow.VoronoiSimplexSolver)1 ContactConstraint (spacegraph.space3d.phys.constraint.ContactConstraint)1 SolverConstraint (spacegraph.space3d.phys.constraint.SolverConstraint)1 TypedConstraint (spacegraph.space3d.phys.constraint.TypedConstraint)1 ConvexShape (spacegraph.space3d.phys.shape.ConvexShape)1