public MainViewModel(IEnumerable <RepStructure> sts, StructureSet ss) { SSId = ss.Id; Pat = ss.Patient; Sts = sts.ToList(); Displaying = Sts.First(); var brush = new SolidColorBrush(Sts.First().Color); Model3D = new GeometryModel3D(Sts.First().Mesh, new DiffuseMaterial(brush)); }
public GeometryModel3D UpdateDisplaying(string id) { var model = new GeometryModel3D(); Displaying = Sts.First(e => e.Id == id); model.Geometry = Displaying.Mesh; var brush = new SolidColorBrush(Displaying.Color); model.Material = new DiffuseMaterial(brush); return(model); }