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

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

            TriggerVolumeGroup = null;
            sceneNode.Items.Clear();
        }
Example #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);
        }
Example #5
0
 public override void DisposeSceneElements()
 {
     StartPositionGroup?.Dispose();
     StartPositions.Clear();
     StartPositionGroup = null;
 }