Ejemplo n.º 1
0
 public MeshDiagramViewport3D()
 {
     InitializeComponent();
     SetCameraTransform();
     filter = ModelVisual3DFilter.AllOnExceptTexts;
     filter.FilterIsChanged += new EventHandler(filter_FilterIsChanged);
     elements = new ListOfIModelVisual3D();
     //RefreshScene();
     Trackball_3DTools_Initialisation();
 }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 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());
     }
 }
Ejemplo n.º 4
0
 UIElement IModelVisual3D.GetUIElement(ModelVisual3DFilter FilterSettings, Viewport3DVisual DestinationViewport3D)
 {
     return(new UIElement());
 }
Ejemplo n.º 5
0
 ModelVisual3D IModelVisual3D.GetModelVisual3D(ModelVisual3DFilter FilterSettings, bool Selected)
 {
     lastModelVisual3DFilter = FilterSettings;
     return(lastModelVisual3D = PrepareModelVisual3D(FilterSettings, Selected));
 }