private void RemovePlacement(InstanceHolder holder, int index) { var element = holder.Elements[index]; if (element == null) { return; } holder.GroupElement.Children.Remove(element); element.Dispose(); holder.Elements[index] = null; }
private void ConfigurePlacement(InstanceHolder holder, int index) { RemovePlacement(holder, index); var placement = holder.Placements[index]; var inst = factory.CreateModelSection(tagId, 0, placement.MeshIndex, 1); if (inst == null) { holder.Elements[index] = null; return; } BindPlacement(placement, inst); holder.Elements[index] = inst; holder.GroupElement.Children.Add(inst); }