Esempio n. 1
0
 /// <summary>
 /// Attaches the elements to the specified host.
 /// </summary>
 /// <param name="host">The host.</param>
 public void Attach(IRenderHost host)
 {
     if (!IsAttached)
     {
         foreach (var e in this.OwnedRenderables)
         {
             e.Attach(host);
         }
         SharedModelContainerInternal?.Attach(host);
         foreach (var e in this.D2DRenderables)
         {
             e.Attach(host);
         }
         IsAttached = true;
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Detaches the elements.
 /// </summary>
 public void Detach()
 {
     if (IsAttached)
     {
         IsAttached = false;
         foreach (var e in this.OwnedRenderables)
         {
             e.Detach();
         }
         SharedModelContainerInternal?.Detach();
         foreach (var e in this.D2DRenderables)
         {
             e.Detach();
         }
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Attaches the elements to the specified host.
 /// </summary>
 /// <param name="host">The host.</param>
 public void Attach(IRenderHost host)
 {
     if (!IsAttached)
     {
         foreach (var e in this.OwnedRenderables)
         {
             e.Attach(EffectsManager);
             e.Invalidated += NodeInvalidated;
         }
         SharedModelContainerInternal?.Attach(host);
         foreach (var e in this.D2DRenderables)
         {
             e.Attach(host);
         }
         IsAttached = true;
     }
 }