Exemplo n.º 1
0
 /// <summary>
 /// Returns an array of objects that intersect with the specified bounds, if any. Otherwise returns an empty array. See also: IsColliding.
 /// </summary>
 /// <param name="collidingWith">list to store intersections.</param>
 /// <param name="checkBounds">bounds to check.</param>
 /// <returns>Objects that intersect with the specified bounds.</returns>
 public void GetColliding(List <T> collidingWith, Bounds checkBounds)
 {
     //#if UNITY_EDITOR
     // For debugging
     //AddCollisionCheck(checkBounds);
     //#endif
     rootNode.GetColliding(ref checkBounds, collidingWith);
 }
Exemplo n.º 2
0
    ///// <summary>
    ///// Check if the specified ray intersects with anything in the tree. See also: GetColliding.
    ///// </summary>
    ///// <param name="checkRay">ray to check.</param>
    ///// <param name="maxDistance">distance to check.</param>
    ///// <returns>True if there was a collision.</returns>
    //public bool IsColliding(Ray checkRay, float maxDistance)
    //{
    //	//#if UNITY_EDITOR
    //	// For debugging
    //	//AddCollisionCheck(checkRay);
    //	//#endif
    //	return rootNode.IsColliding(ref checkRay, maxDistance);
    //}

    /// <summary>
    /// Returns an array of objects that intersect with the specified bounds, if any. Otherwise returns an empty array. See also: IsColliding.
    /// </summary>
    /// <param name="collidingWith">list to store intersections.</param>
    /// <param name="checkBounds">bounds to check.</param>
    /// <returns>Objects that intersect with the specified bounds.</returns>
    public List <T> GetColliding(Bounds checkBounds)
    {
        //#if UNITY_EDITOR
        // For debugging
        //AddCollisionCheck(checkBounds);
        //#endif
        List <T> collidingWith = new List <T>();

        rootNode.GetColliding(ref checkBounds, collidingWith);
        return(collidingWith);
    }
Exemplo n.º 3
0
 /// <summary>
 /// Returns an array of objects that intersect with the specified bounds, if any. Otherwise returns an empty array. See also: IsColliding.
 /// </summary>
 /// <param name="checkBounds">bounds to check.</param>
 /// <returns>Objects that intersect with the specified bounds.</returns>
 public T[] GetColliding(Bounds checkBounds)
 {
             #if UNITY_EDITOR
     AddCollisionCheck(checkBounds);
             #endif
     return(rootNode.GetColliding(checkBounds));
 }
 public void GetColliding(ref Bounds checkBounds, List <T> result)
 {
     rootNode.GetColliding(ref checkBounds, result);
 }