/// <summary>
        /// Constructor
        /// </summary>
        /// <param name="camera">The reference camera, for culling purposes</param>
        /// <param name="frustumSettings">The frustum settings</param>
        public VolumesManager(Camera camera, FrustumSettings frustumSettings)
        {
            _referenceCamera      = camera;
            this._frustumSettings = frustumSettings;

            _culler = new ObjectsCuller <AuraVolume>(_referenceCamera, this._frustumSettings);
            for (int i = 0; i < AuraCamera.CommonDataManager.VolumesCommonDataManager.RegisteredVolumesList.Count; ++i)
            {
                _culler.Register(AuraCamera.CommonDataManager.VolumesCommonDataManager.RegisteredVolumesList[i]);
            }

            Camera.onPreRender += Camera_onPreRender;

            AuraCamera.CommonDataManager.VolumesCommonDataManager.OnRegisterVolume   += VolumesCommonDataManager_OnRegisterVolume;
            AuraCamera.CommonDataManager.VolumesCommonDataManager.OnUnregisterVolume += VolumesCommonDataManager_OnUnregisterVolume;
        }
Example #2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="camera">The reference camera, for culling purposes</param>
        /// <param name="frustumSettings">The frustum settings</param>
        public SpotLightsManager(Camera camera, FrustumSettings frustumSettings)
        {
            _referenceCamera = camera;
            _frustumSettings = frustumSettings;

            _culler = new ObjectsCuller <AuraLight>(_referenceCamera, this._frustumSettings);
            for (int i = 0; i < AuraCamera.CommonDataManager.LightsCommonDataManager.RegisteredSpotLightsList.Count; ++i)
            {
                _culler.Register(AuraCamera.CommonDataManager.LightsCommonDataManager.RegisteredSpotLightsList[i]);
            }

            Camera.onPreRender += Camera_onPreRender;

            AuraCamera.CommonDataManager.LightsCommonDataManager.OnRegisterSpotLight   += LightsCommonDataManager_OnRegisterSpotLight;
            AuraCamera.CommonDataManager.LightsCommonDataManager.OnUnregisterSpotLight += LightsCommonDataManager_OnUnregisterSpotLight;
        }
 /// <summary>
 /// Called when a new volume registers onto the global list
 /// </summary>
 /// <param name="auraVolume">The newly registered volume</param>
 private void VolumesCommonDataManager_OnRegisterVolume(AuraVolume auraVolume)
 {
     _culler.Register(auraVolume);
 }
Example #4
0
 /// <summary>
 /// Called when a new spot light registers onto the global list
 /// </summary>
 /// <param name="auraLight">The newly registered light</param>
 private void LightsCommonDataManager_OnRegisterSpotLight(AuraLight auraLight)
 {
     _culler.Register(auraLight);
 }