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


      return overlapsStatic.Concat(overlapsDynamic);
#else
      return ConcatWork<Pair<T>>.Create(overlapsStatic, overlapsDynamic);

    }
    /// <inheritdoc/>
    public override IEnumerable<T> GetOverlaps(Ray ray)
    {
      UpdateInternal();
      var overlapsStatic = StaticPartition.GetOverlaps(ray);
      var overlapsDynamic = DynamicPartition.GetOverlaps(ray);


      return overlapsStatic.Concat(overlapsDynamic);
#else
      return ConcatWork<T>.Create(overlapsStatic, overlapsDynamic);

    }
Ejemplo n.º 3
0
    /// <inheritdoc/>
    public override IEnumerable<Pair<T>> GetOverlaps(ISpatialPartition<T> otherPartition)
    {
      UpdateInternal();
      var overlapsStatic = StaticPartition.GetOverlaps(otherPartition);
      var overlapsDynamic = DynamicPartition.GetOverlaps(otherPartition);


      return overlapsStatic.Concat(overlapsDynamic);
#else
      return ConcatWork<Pair<T>>.Create(overlapsStatic, overlapsDynamic);

    }
    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);


      return overlapsStatic.Concat(overlapsDynamic);
#else
      return ConcatWork<T>.Create(overlapsStatic, overlapsDynamic);

    }