Beispiel #1
0
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            for (int cntr = 1; cntr <= 1; cntr++)
            {
                Color lineColor = UtilityWPF.GetRandomColor(64, 192);

                ScreenSpaceLines3D lineModel = new ScreenSpaceLines3D(false);
                lineModel.Thickness = 1d;
                lineModel.Color     = lineColor;


                Point3D fromPoint = Math3D.GetRandomVector(15d).ToPoint();
                Point3D toPoint   = Math3D.GetRandomVector(15d).ToPoint();


                //lineModel.AddLine(fromPoint, toPoint);
                lineModel.Points.Add(fromPoint);
                lineModel.Points.Add(toPoint);


                _viewport.Children.Add(lineModel);


                lineModel.CalculateGeometry();



                _lastLine = lineModel;
            }
        }