public void When_the_sequence_only_contains_a_single_point_the_min_and_max_points_equal_the_point() { var thePoint = new Point(1, 2, 3); var aabb = AxisAlignedBoundingBox.FromPoints( new[] { thePoint }.Single()); Assert.Equal(thePoint, aabb.Min); Assert.Equal(thePoint, aabb.Max); }
public void When_the_sequence_contains_more_than_a_single_point_the_Max_point_equals_the_element_wise_maximum_of_the_sequence() { var points = new[] { new Point(1, 2, 3), new Point(2, 3, 4), new Point(4, 5, 6), new Point(-1, 3, 7), new Point(0, 0, -10) }; var aabb = AxisAlignedBoundingBox.FromPoints(points.AsEnumerable()); Assert.Equal(new Point(4, 5, 7), aabb.Max); }
public void An_exception_is_thrown_if_the_enumerable_is_empty() { Assert.Throws <InvalidOperationException>(() => AxisAlignedBoundingBox.FromPoints(Enumerable.Empty <Point>())); }
public AxisAlignedBoundingBox GetBoundingBox() { return(AxisAlignedBoundingBox.FromPoints(_a, _b, _c)); }
public AxisAlignedBoundingBox GetBoundingBox() { return(AxisAlignedBoundingBox.FromPoints(Vertices)); }