コード例 #1
0
        public View3dMeasurementUI(View3dControl owner)
        {
            InitializeComponent();
            Owner = GetWindow(owner);

            View3dCtrl  = owner;
            Measurement = new Measurement(owner.Window);
            PinState    = new PinData(this, EPin.TopRight);

            // Set up commands
            SetSpotColour   = Command.Create(this, SetSpotColourInternal);
            ReferenceFrames = new ListCollectionView(Enum <Measurement.EReferenceFrame> .ValuesArray);

            DataContext = this;
        }
コード例 #2
0
        public View3dLightingUI(Window owner, View3d.Window window)
        {
            InitializeComponent();
            Owner    = owner;
            Icon     = owner?.Icon;
            m_window = window;

            Light    = new View3d.Light(m_window.LightProperties);
            PinState = new PinData(this, EPin.Centre);

            SetAmbientColour  = Command.Create(this, SetAmbientColourInternal);
            SetDiffuseColour  = Command.Create(this, SetDiffuseColourInternal);
            SetSpecularColour = Command.Create(this, SetSpecularColourInternal);
            Accept            = Command.Create(this, AcceptInternal);

            DataContext = this;
        }
コード例 #3
0
        public View3dObjectManagerUI(Window owner, View3d.Window window, IEnumerable <Guid>?exclude = null)
        {
            InitializeComponent();
            Owner = owner;
            Icon  = Owner?.Icon;

            PinState      = new PinData(this, EPin.Centre);
            ObjectManager = new View3d.ObjectManager(window, exclude ?? Array.Empty <Guid>());
            ObjectsView   = new ListCollectionView(ObjectManager.Objects);

            ExpandAll         = Command.Create(this, ExpandAllInternal);
            CollapseAll       = Command.Create(this, CollapseAllInternal);
            ApplyFilter       = Command.Create(this, ApplyFilterInternal);
            SetVisible        = Command.Create(this, SetVisibleInternal);
            SetWireframe      = Command.Create(this, SetWireframeInternal);
            UpdateSelected    = Command.Create(this, UpdateSelectedInternal);
            InvertSelection   = Command.Create(this, InvertSelectionInternal);
            ToggleShowNormals = Command.Create(this, InternalToggleShowNormals);

            DataContext = this;
        }