Exemplo n.º 1
0
        /// <inheritdoc/>
        public override IEnumerable <Pair <T> > GetOverlaps(Vector3F scale, Pose pose, ISpatialPartition <T> otherPartition, Vector3F otherScale, Pose otherPose)
        {
            UpdateInternal();
            var overlapsStatic  = StaticPartition.GetOverlaps(scale, pose, otherPartition, otherScale, otherPose);
            var overlapsDynamic = DynamicPartition.GetOverlaps(scale, pose, otherPartition, otherScale, otherPose);

#if !POOL_ENUMERABLES
            return(overlapsStatic.Concat(overlapsDynamic));
#else
            return(ConcatWork <Pair <T> > .Create(overlapsStatic, overlapsDynamic));
#endif
        }
Exemplo n.º 2
0
        /// <inheritdoc/>
        public override IEnumerable <Pair <T> > GetOverlaps(ISpatialPartition <T> otherPartition)
        {
            UpdateInternal();
            var overlapsStatic  = StaticPartition.GetOverlaps(otherPartition);
            var overlapsDynamic = DynamicPartition.GetOverlaps(otherPartition);

#if !POOL_ENUMERABLES
            return(overlapsStatic.Concat(overlapsDynamic));
#else
            return(ConcatWork <Pair <T> > .Create(overlapsStatic, overlapsDynamic));
#endif
        }
        /// <inheritdoc/>
        public override IEnumerable <T> GetOverlaps(Ray ray)
        {
            UpdateInternal();
            var overlapsStatic  = StaticPartition.GetOverlaps(ray);
            var overlapsDynamic = DynamicPartition.GetOverlaps(ray);

#if !POOL_ENUMERABLES
            return(overlapsStatic.Concat(overlapsDynamic));
#else
            return(ConcatWork <T> .Create(overlapsStatic, overlapsDynamic));
#endif
        }
        public IEnumerable <T> GetOverlaps(IList <Plane> planes)
        {
            UpdateInternal();

            var staticPartition  = StaticPartition as ISupportFrustumCulling <T>;
            var dynamicPartition = DynamicPartition as ISupportFrustumCulling <T>;

            if (staticPartition == null || dynamicPartition == null)
            {
                throw new NotSupportedException("Both the static partition and the dynamic partition need to implement ISuppportFrustumCulling<T>.");
            }

            var overlapsStatic  = staticPartition.GetOverlaps(planes);
            var overlapsDynamic = dynamicPartition.GetOverlaps(planes);

#if !POOL_ENUMERABLES
            return(overlapsStatic.Concat(overlapsDynamic));
#else
            return(ConcatWork <T> .Create(overlapsStatic, overlapsDynamic));
#endif
        }