Beispiel #1
0
        /// <summary>
        /// Registers a new volume to the manager
        /// </summary>
        /// <param name="volume">The volume to add</param>
        public void Register(AuraVolume volume)
        {
            _culler.Register(volume);

            if (!_registredVolumes.Contains(volume))
            {
                _registredVolumes.Add(volume);

                volume.OnTextureMaskStateChanged += Volume_onTextureMaskStateChanged;
                volume.OnTextureMaskChanged      += Volume_onTextureMaskChanged;
            }
        }
Beispiel #2
0
        /// <summary>
        /// Register an AuraLights to be taken into account
        /// </summary>
        /// <param name="light">The candidate light</param>
        /// <returns>True if registration went well, false otherwise</returns>
        public bool Register(AuraLight light, bool castShadows, bool castCookie)
        {
            if (light.Type == LightType.Spot && !_lights.Contains(light))
            {
                _culler.Register(light);

                _lights.Add(light);

                if (castShadows)
                {
                    _shadowmapsCollector.AddTexture(light.shadowMapRenderTexture);
                }

                if (castCookie)
                {
                    _cookieMapsCollector.AddTexture(light.cookieMapRenderTexture);
                }

                return(true);
            }

            return(false);
        }