Пример #1
0
 //--------------------------------------------------------------------------------------------
 private void drawTest5()
 {
     myCamera.Position = new Point3D(-500, 0, 1500);
     CTest5 test5 = new CTest5();
     CNode[] nodes = test5.arrNodes;
     foreach (CNode c in nodes)
     {
         Model3DGroup models = CreateCube(c.X / 250 - 1000, c.Z / 250, c.Y / 250 - 250);
         ModelVisual3D visual = new ModelVisual3D();
         visual.Content = models;
         myViewport3D.Children.Add(visual);
     }
 }
Пример #2
0
        private void menuItemTest5_Click(object sender, RoutedEventArgs e)
        {
            CTest5 objCTest5 = new CTest5();
            canvasForImage.Children.Clear();

            foreach (CMember l in objCTest5.arrLines)
            {
                // Add a Line Element
                DrawLine(l, Brushes.Black, PenLineCap.Flat, PenLineCap.Flat, 2, canvasForImage);
            }
            foreach (CNode n in objCTest5.arrNodes)
            {
                DrawNode(n, Brushes.Red, Brushes.Red, 4, canvasForImage);

            }
        }