/// <summary>
        /// Construct with reference element
        /// </summary>
        public ViewportElementVM(NavigationElementVM refElem, List <GeometryModel3D> geom, Material material = null)
        {
            RefElem          = refElem;
            GeometryElements = geom != null ? geom : new List <GeometryModel3D>();
            _material        = material != null ? material : DefaultMaterial;
            _setGeometryMaterial();

            // Mechanism to sync selection
            refElem.PropertyChanged += (object sender, PropertyChangedEventArgs e) =>
            {
                if (sender == refElem && e.PropertyName == "IsSelected")
                {
                    this.IsSelected = refElem.IsSelected;
                }
            };
        }
示例#2
0
 /// <summary>
 /// Constructor
 /// </summary>
 public ViewportSpaceVM(NavigationElementVM refElem, List <GeometryModel3D> geom, Material material = null)
     : base(refElem, geom, material)
 {
 }