Example #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++)
            {
                ScatterPlotItem plotItem = Get(i);
                Point           pt       = matrix.VertexToViewportPt(new Point3D(plotItem.x, plotItem.y, plotItem.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;
                }
            }
        }
 // select
 public virtual void Select(ViewportRect rect, TransformMatrix matrix, Viewport3D viewport3d)
 {
 }