public MeshDiagramViewport3D() { InitializeComponent(); SetCameraTransform(); filter = ModelVisual3DFilter.AllOnExceptTexts; filter.FilterIsChanged += new EventHandler(filter_FilterIsChanged); elements = new ListOfIModelVisual3D(); //RefreshScene(); Trackball_3DTools_Initialisation(); }
public IModelVisual3D GetMatchedElement(Point point2D, ModelVisual3DFilter FilterSettings) { IModelVisual3D returnedIModelVisual3D = null; foreach (IModelVisual3D modelVisual3D in this) { if (modelVisual3D.CanBeSelected && modelVisual3D.Match(point2D)) { returnedIModelVisual3D = modelVisual3D; } } return(returnedIModelVisual3D); }
private ModelVisual3D PrepareModelVisual3D(ModelVisual3DFilter FilterSettings, bool Selected) { if (Selected) { throw new NotImplementedException("Selection of lines is not yet implemented"); } if (FilterSettings.Lines) { ScreenSpaceLines3D line = new ScreenSpaceLines3D(); line.Thickness = 1; line.Color = Colors.Black; line.Points.Add(Start.Point3D); line.Points.Add(End.Point3D); return(line); } else { return(new ModelVisual3D()); } }
UIElement IModelVisual3D.GetUIElement(ModelVisual3DFilter FilterSettings, Viewport3DVisual DestinationViewport3D) { return(new UIElement()); }
ModelVisual3D IModelVisual3D.GetModelVisual3D(ModelVisual3DFilter FilterSettings, bool Selected) { lastModelVisual3DFilter = FilterSettings; return(lastModelVisual3D = PrepareModelVisual3D(FilterSettings, Selected)); }