Esempio n. 1
0
 public override void InitializeElements(ModelFactory factory)
 {
     StartPositionGroup = new Helix.GroupModel3D();
     foreach (var pos in scenario.StartingPositions)
     {
         AddStartPositionElement(pos);
     }
 }
Esempio n. 2
0
 public override void InitializeElements(ModelFactory factory)
 {
     TriggerVolumeGroup = new Helix.GroupModel3D();
     foreach (var vol in scenario.TriggerVolumes)
     {
         AddTriggerVolumeElement(vol);
     }
 }
Esempio n. 3
0
        public override void DisposeSceneElements()
        {
            scenario.TriggerVolumes.ChildPropertyChanged -= OnTriggerVolumePropertyChanged;

            TriggerVolumeGroup?.Dispose();
            TriggerVolumes.Clear();

            TriggerVolumeGroup = null;
            sceneNode.Items.Clear();
        }
Esempio n. 4
0
        public static IEnumerable <Helix.Element3D> EnumerateDescendents(this Helix.GroupElement3D group, bool invisible = false)
        {
            if (group.Children.Count == 0)
            {
                return(Enumerable.Empty <Helix.Element3D>());
            }

            var validChildren = group.Children.Where(e => invisible || e.Visible);

            var descendents = validChildren;

            foreach (var branch in validChildren.OfType <Helix.GroupElement3D>())
            {
                descendents = descendents.Concat(branch.EnumerateDescendents());
            }

            return(descendents);
        }
Esempio n. 5
0
 public override void DisposeSceneElements()
 {
     StartPositionGroup?.Dispose();
     StartPositions.Clear();
     StartPositionGroup = null;
 }