Esempio n. 1
0
 /// <summary>
 ///     Reset all lists that have to deal with what updates the viewer has
 /// </summary>
 public void Close()
 {
     if (m_presence == null)
     {
         return;
     }
     m_SentInitialObjects = false;
     m_prioritizer        = null;
     m_culler             = null;
     m_inUse    = false;
     m_queueing = false;
     lock (m_objectUpdatesToSendLock)
         m_objectUpdatesToSend.Clear();
     lock (m_presenceUpdatesToSendLock)
         m_presenceUpdatesToSend.Clear();
     lock (m_presenceAnimationsToSendLock)
         m_presenceAnimationsToSend.Clear();
     lock (m_lastPresencesInViewLock)
         lastPresencesDInView.Clear();
     lock (m_objectPropertiesToSendLock)
         m_objectPropertiesToSend.Clear();
     lastGrpsInView.Clear();
     m_presence.OnSignificantClientMovement         -= SignificantClientMovement;
     m_presence.Scene.EventManager.OnMakeChildAgent -= EventManager_OnMakeChildAgent;
     m_scene.EventManager.OnClosingClient           -= EventManager_OnClosingClient;
     m_presence.Scene.WhiteCoreEventManager.UnregisterEventHandler("DrawDistanceChanged",
                                                                   WhiteCoreEventManager_OnGenericEvent);
     m_presence.Scene.WhiteCoreEventManager.UnregisterEventHandler("SignficantCameraMovement",
                                                                   WhiteCoreEventManager_OnGenericEvent);
     m_presence = null;
 }
Esempio n. 2
0
 public SceneViewer(IScenePresence presence)
 {
     m_presence = presence;
     m_scene    = presence.Scene;
     m_presence.OnSignificantClientMovement         += SignificantClientMovement;
     m_presence.Scene.EventManager.OnMakeChildAgent += EventManager_OnMakeChildAgent;
     m_scene.EventManager.OnClosingClient           += EventManager_OnClosingClient;
     m_presence.Scene.WhiteCoreEventManager.RegisterEventHandler("DrawDistanceChanged",
                                                                 WhiteCoreEventManager_OnGenericEvent);
     m_presence.Scene.WhiteCoreEventManager.RegisterEventHandler("SignficantCameraMovement",
                                                                 WhiteCoreEventManager_OnGenericEvent);
     m_prioritizer = new Prioritizer(presence.Scene);
     m_culler      = new Culler(presence.Scene);
 }