public void CreatePositions_CoincidingPoints_ShouldNotReturnNaN()
        {
            Point3DCollection result = null;
            CrossThreadTestRunner.RunInSTA(
                () =>
                {
                    var vp = new Viewport3D();
                    var visual = new ModelVisual3D();
                    vp.Children.Add(visual);

                    var b = new LineGeometryBuilder(visual);
                    b.UpdateTransforms();
                    result = b.CreatePositions(new[] { new Point3D(0, 0, 0), new Point3D(0, 0, 0) });
                });

            for (int i = 0; i < result.Count; i++)
            {
                Assert.IsTrue(
                    !double.IsNaN(result[i].X) && !double.IsNaN(result[i].Y) && !double.IsNaN(result[i].Z),
                    "Point " + i + " is invalid");
            }
        }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref = "LinesVisual3D" /> class.
 /// </summary>
 public LinesVisual3D()
 {
     this.builder = new LineGeometryBuilder(this);
 }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref = "LinesVisual3D" /> class.
 /// </summary>
 public LinesVisual3D()
 {
     this.builder = new LineGeometryBuilder(this);
 }