Esempio n. 1
0
 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));
     }
 }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 public bool CalculateDistance <T>(ColliderDistanceInput input, ref T collector) where T : struct, ICollector <DistanceHit>
 {
     return(CollisionWorld.CalculateDistance(input, ref collector));
 }
Esempio n. 4
0
 public bool CalculateDistance(ColliderDistanceInput input, ref NativeList <DistanceHit> allHits) => QueryWrappers.CalculateDistance(ref this, input, ref allHits);
Esempio n. 5
0
 public bool CalculateDistance(ColliderDistanceInput input, out DistanceHit closestHit) => QueryWrappers.CalculateDistance(ref this, input, out closestHit);
Esempio n. 6
0
 // Collider distance
 public bool CalculateDistance(ColliderDistanceInput input) => QueryWrappers.CalculateDistance(ref this, input);
Esempio n. 7
0
        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));
        }
Esempio n. 8
0
        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));
        }
Esempio n. 9
0
 public bool CalculateDistance <T>(ColliderDistanceInput input, ref T collector) where T : struct, ICollector <DistanceHit>
 {
     return(Broadphase.CalculateDistance(input, m_PhysicsBodies, ref collector));
 }
Esempio n. 10
0
 public bool CalculateDistance <T>(ColliderDistanceInput input, ref T collector) where T : struct, ICollector <DistanceHit>
 {
     return(Collider.IsCreated && Collider.Value.CalculateDistance(input, ref collector));
 }