4 using System.Collections.Generic;
5 using SiliconStudio.Core;
6 using SiliconStudio.Core.Extensions;
7 using SiliconStudio.Paradox.Effects;
8 using SiliconStudio.Paradox.EntityModel;
9 using SiliconStudio.Paradox.Games;
11 namespace SiliconStudio.
Paradox.Engine
15 internal HashSet<ModelNodeLinkComponent> DirtyLinks =
new HashSet<ModelNodeLinkComponent>();
19 : base(new
PropertyKey[] { TransformationComponent.Key, ModelNodeLinkComponent.Key })
25 return entity.Get(ModelNodeLinkComponent.Key);
30 entity.Transformation.UseTRS =
false;
31 entity.Transformation.isSpecialRoot =
true;
33 modelNodeLinkComponent.Processor =
this;
35 if (meshProcessor == null)
40 DirtyLinks.Add(modelNodeLinkComponent);
43 modelNodeLinkComponent.EntityLink.NodeIndex = -1;
49 if (meshProcessor == null)
52 meshProcessor.UnlinkEntity(modelNodeLinkComponent.EntityLink);
54 modelNodeLinkComponent.Processor = null;
61 if (DirtyLinks.Count == 0)
64 if (meshProcessor == null)
67 foreach (var transformationLinkComponent
in DirtyLinks)
70 meshProcessor.UnlinkEntity(transformationLinkComponent.EntityLink);
71 meshProcessor.LinkEntity(transformationLinkComponent.Entity, transformationLinkComponent.Target, transformationLinkComponent.NodeName);
override void OnEntityAdding(Entity entity, ModelNodeLinkComponent modelNodeLinkComponent)
override void OnEntityRemoved(Entity entity, ModelNodeLinkComponent modelNodeLinkComponent)
Game entity. It usually aggregates multiple EntityComponent
Entity processor, triggered on various EntitySystem events such as Entity and Component additions and...
Current timing used for variable-step (real time) or fixed-step (game time) games.
A class that represents a tag propety.
override void Draw(GameTime time)
override ModelNodeLinkComponent GenerateAssociatedData(Entity entity)