public unsafe bool CalculateDistance <T>(ColliderDistanceInput input, ref T collector) where T : struct, ICollector <DistanceHit> { fixed(PhysicsCompoundCollider *target = &this) { return(DistanceQueries.ColliderDistance(input, (Collider *)target, ref collector)); } }
public static bool CalculateDistance <T>(ref T target, ColliderDistanceInput input, out DistanceHit result) where T : struct, IQueryable { var collector = new ClosestHitCollector <DistanceHit>(input.MaxDistance); if (target.CalculateDistance(input, ref collector)) { result = collector.ClosestHit; return(true); } result = new DistanceHit(); return(false); }
public bool CalculateDistance <T>(ColliderDistanceInput input, ref T collector) where T : struct, ICollector <DistanceHit> { return(CollisionWorld.CalculateDistance(input, ref collector)); }
public bool CalculateDistance(ColliderDistanceInput input, ref NativeList <DistanceHit> allHits) => QueryWrappers.CalculateDistance(ref this, input, ref allHits);
public bool CalculateDistance(ColliderDistanceInput input, out DistanceHit closestHit) => QueryWrappers.CalculateDistance(ref this, input, out closestHit);
// Collider distance public bool CalculateDistance(ColliderDistanceInput input) => QueryWrappers.CalculateDistance(ref this, input);
public static bool CalculateDistance <T>(ref T target, ColliderDistanceInput input, ref NativeList <DistanceHit> allHits) where T : struct, IQueryable { var collector = new AllHitsCollector <DistanceHit>(input.MaxDistance, ref allHits); return(target.CalculateDistance(input, ref collector)); }
public static bool CalculateDistance <T>(ref T target, ColliderDistanceInput input) where T : struct, IQueryable { var collector = new AnyHitCollector <DistanceHit>(input.MaxDistance); return(target.CalculateDistance(input, ref collector)); }
public bool CalculateDistance <T>(ColliderDistanceInput input, ref T collector) where T : struct, ICollector <DistanceHit> { return(Broadphase.CalculateDistance(input, m_PhysicsBodies, ref collector)); }
public bool CalculateDistance <T>(ColliderDistanceInput input, ref T collector) where T : struct, ICollector <DistanceHit> { return(Collider.IsCreated && Collider.Value.CalculateDistance(input, ref collector)); }