示例#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));
     }
 }
示例#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);
        }
示例#3
0
 public bool CastCollider <T>(ColliderCastInput input, ref T collector) where T : struct, ICollector <ColliderCastHit>
 {
     return(CollisionWorld.CastCollider(input, ref collector));
 }
示例#4
0
 public bool CastCollider(ColliderCastInput input, ref NativeList <ColliderCastHit> allHits) => QueryWrappers.ColliderCast(ref this, input, ref allHits);
示例#5
0
 public bool CastCollider(ColliderCastInput input, out ColliderCastHit closestHit) => QueryWrappers.ColliderCast(ref this, input, out closestHit);
示例#6
0
 // Cast collider
 public bool CastCollider(ColliderCastInput input) => QueryWrappers.ColliderCast(ref this, input);
示例#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));
        }
示例#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));
        }
示例#9
0
 public bool CastCollider <T>(ColliderCastInput input, ref T collector) where T : struct, ICollector <ColliderCastHit>
 {
     return(Broadphase.CastCollider(input, m_PhysicsBodies, ref collector));
 }
示例#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));
 }