public virtual ModelVisual3D GetModelVisual3D(ModelVisual3DFilter FilterSettings, bool Selected) { lastModelVisual3DFilter = FilterSettings; isSelected = Selected; UpdateLastModelVisual3D(); return(lastModelVisual3D); }
ModelVisual3D IModelVisual3D.GetModelVisual3D(ModelVisual3DFilter FilterSettings, bool Selected) { if (lastModelVisual3D == null) { lastModelVisual3D = new ModelVisual3D(); } else { lastModelVisual3D.Children.Clear(); } lastModelVisual3DFilter = FilterSettings; FillModel(Selected); return(lastModelVisual3D); }
//void IModelVisual3D.UpdateViewToLookDirection( Vector3D LookDirection ) //{ // Vector3D look = LookDirection; // look.Normalize(); // TextVectorOver = new Vector3D( -look.Y, look.X, 0 ); // TextVectorUp = new Vector3D( -look.Z * look.X, -look.Z * look.Y, look.Y * look.Y + look.X * look.X ); // TextVectorOver.Normalize(); // TextVectorUp.Normalize(); //} UIElement IModelVisual3D.GetUIElement(ModelVisual3DFilter FilterSettings, Viewport3DVisual DestinationViewport3D) { if (FilterSettings.Texts2D) { TextBlock tb = new TextBlock(); tb.FontSize += 1; tb.FontWeight = FontWeights.Bold; tb.Foreground = new SolidColorBrush(Colors.DarkGreen); tb.Text = Text; Point p2d = MeshDiagram3DMath.Get2DPoint(this.Point3D, DestinationViewport3D); Canvas.SetTop(tb, p2d.Y + 0); Canvas.SetLeft(tb, p2d.X + 10); return(tb); } else { return(new UIElement()); } }
private ModelVisual3D PrepareModelVisual3D(ModelVisual3DFilter FilterSettings, bool Selected) { if (FilterSettings.Triangles) { if (Centric) { return(CreateModel3DModel(Selected ? materialSelected : materialNormal, X, Y, Z, SizeX, SizeY, SizeZ, ModelType)); } else { return(CreateModel3DModel(Selected ? materialSelected : materialNormal, X + SizeX / 2, Y + SizeY / 2, Z + SizeZ / 2, SizeX, SizeY, SizeZ, ModelType)); } } else { return(new ModelVisual3D()); } }
UIElement IModelVisual3D.GetUIElement(ModelVisual3DFilter FilterSettings, Viewport3DVisual DestinationViewport3D) { return(new UIElement()); }
ModelVisual3D IModelVisual3D.GetModelVisual3D(ModelVisual3DFilter FilterSettings, bool Selected) { lastFilterSettings = FilterSettings; return(lastModelVisual3D = PrepareModelVisual3D(FilterSettings, Selected)); }
public virtual UIElement GetUIElement(ModelVisual3DFilter FilterSettings, Viewport3DVisual DestinationViewport3DVisual) { return(this.MyModelVisual3D.GetUIElement(FilterSettings, DestinationViewport3DVisual)); }