Esempio n. 1
0
 public unsafe bool CastCollider <T>(ColliderCastInput input, ref T collector) where T : struct, ICollector <ColliderCastHit>
 {
     fixed(PhysicsCompoundCollider *target = &this)
     {
         return(ColliderCastQueries.CastCollider(input, (Collider *)target, ref collector));
     }
 }
Esempio n. 2
0
        public static bool ColliderCast <T>(ref T target, ColliderCastInput input, out ColliderCastHit result) where T : struct, IQueryable
        {
            var collector = new ClosestHitCollector <ColliderCastHit>(1.0f);

            if (target.CastCollider(input, ref collector))
            {
                result = collector.ClosestHit;
                return(true);
            }

            result = new ColliderCastHit();
            return(false);
        }
Esempio n. 3
0
 public bool CastCollider <T>(ColliderCastInput input, ref T collector) where T : struct, ICollector <ColliderCastHit>
 {
     return(CollisionWorld.CastCollider(input, ref collector));
 }
Esempio n. 4
0
 public bool CastCollider(ColliderCastInput input, ref NativeList <ColliderCastHit> allHits) => QueryWrappers.ColliderCast(ref this, input, ref allHits);
Esempio n. 5
0
 public bool CastCollider(ColliderCastInput input, out ColliderCastHit closestHit) => QueryWrappers.ColliderCast(ref this, input, out closestHit);
Esempio n. 6
0
 // Cast collider
 public bool CastCollider(ColliderCastInput input) => QueryWrappers.ColliderCast(ref this, input);
Esempio n. 7
0
        public static bool ColliderCast <T>(ref T target, ColliderCastInput input, ref NativeList <ColliderCastHit> allHits) where T : struct, IQueryable
        {
            var collector = new AllHitsCollector <ColliderCastHit>(1.0f, ref allHits);

            return(target.CastCollider(input, ref collector));
        }
Esempio n. 8
0
        public static bool ColliderCast <T>(ref T target, ColliderCastInput input) where T : struct, IQueryable
        {
            var collector = new AnyHitCollector <ColliderCastHit>(1.0f);

            return(target.CastCollider(input, ref collector));
        }
Esempio n. 9
0
 public bool CastCollider <T>(ColliderCastInput input, ref T collector) where T : struct, ICollector <ColliderCastHit>
 {
     return(Broadphase.CastCollider(input, m_PhysicsBodies, ref collector));
 }
Esempio n. 10
0
 public bool CastCollider <T>(ColliderCastInput input, ref T collector) where T : struct, ICollector <ColliderCastHit>
 {
     return(Collider.IsCreated && Collider.Value.CastCollider(input, ref collector));
 }