예제 #1
0
        // selection
        public override void Select(ViewportRect rect, TransformMatrix matrix, Viewport3D viewport3d)
        {
            int nDotNo = GetDataNo();

            if (nDotNo == 0)
            {
                return;
            }

            double xMin = rect.XMin();
            double xMax = rect.XMax();
            double yMin = rect.YMin();
            double yMax = rect.YMax();

            for (int i = 0; i < nDotNo; i++)
            {
                Point pt = matrix.VertexToViewportPt(new Point3D(m_vertices[i].x, m_vertices[i].y, m_vertices[i].z),
                                                     viewport3d);

                if ((pt.X > xMin) && (pt.X < xMax) && (pt.Y > yMin) && (pt.Y < yMax))
                {
                    m_vertices[i].selected = true;
                }
                else
                {
                    m_vertices[i].selected = false;
                }
            }
        }
예제 #2
0
        public MainWindow()
        {
            _transformMatrix     = new TransformMatrix();
            _selectedVieportRect = new ViewportRect();

            _mappingEngine        = Mapper.Engine;
            _integralSystemSolver = new IntegralSystemSolver();

            Settings  = new Settings();
            ViewModel = new MainWindowViewModel
            {
                FunctionF         = "1",
                FunctionG         = "1",
                Lambda            = "1",
                PartitionsOnCrack = 10,
                PartitionsOnBound = 20,
                MeshSize          = 20,
                Radius            = 2
            };
            DataContext = ViewModel;

            InitializeComponent();
            InitResultTable();
        }
예제 #3
0
 // select
 public virtual void Select(ViewportRect rect, TransformMatrix matrix, Viewport3D viewport3d)
 {
 }