Esempio n. 1
0
        /// <summary>
        /// Return the lightprobes in the vicinity of the location and range
        /// </summary>
        /// <param name="position">Location to check</param>
        /// <param name="range">Distance from this location to check for</param>
        /// <returns>List of matching light probe groups</returns>
        public List <LightProbeGroup> GetProbeGroups(Vector3 position, float range)
        {
            if (m_probeLocations == null)
            {
                return(new List <LightProbeGroup>());
            }
            Rect query = new Rect(position.x - range, position.z - range, range * 2f, range * 2f);

            return(m_probeLocations.Find(query).ToList());
        }
Esempio n. 2
0
        /// <summary>
        /// Return the number of trees within range of the location provided
        /// </summary>
        /// <param name="position">Location to check</param>
        /// <param name="range">Range around location to check</param>
        /// <returns>Number of trees within range</returns>
        public int Count(Vector3 position, float range)
        {
            if (m_terrainTreeLocations == null)
            {
                return(0);
            }
            Rect query = new Rect(position.x - range, position.z - range, range * 2f, range * 2f);

            return(m_terrainTreeLocations.Find(query).Count());
        }