public override void InitializeElements(ModelFactory factory) { StartPositionGroup = new Helix.GroupModel3D(); foreach (var pos in scenario.StartingPositions) { AddStartPositionElement(pos); } }
public override void InitializeElements(ModelFactory factory) { TriggerVolumeGroup = new Helix.GroupModel3D(); foreach (var vol in scenario.TriggerVolumes) { AddTriggerVolumeElement(vol); } }
public override void DisposeSceneElements() { scenario.TriggerVolumes.ChildPropertyChanged -= OnTriggerVolumePropertyChanged; TriggerVolumeGroup?.Dispose(); TriggerVolumes.Clear(); TriggerVolumeGroup = null; sceneNode.Items.Clear(); }
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); }
public override void DisposeSceneElements() { StartPositionGroup?.Dispose(); StartPositions.Clear(); StartPositionGroup = null; }