public void NaN() { var partition = new CompressedAabbTree { EnableSelfOverlaps = true, GetAabbForItem = GetAabbForItem }; partition.Add(1); partition.Add(4); partition.Add(2); partition.Add(3); // Aabb builder throws exception. Assert.Throws <GeometryException>(() => partition.Update(false)); partition = new CompressedAabbTree(); partition.EnableSelfOverlaps = true; partition.GetAabbForItem = GetAabbForItem; partition.BottomUpBuildThreshold = 0; partition.Add(1); partition.Add(4); partition.Add(2); partition.Add(3); // Full rebuild. CompressedAabbTree throws exception when computing quantization. Assert.Throws <GeometryException>(() => partition.Update(true)); partition = new CompressedAabbTree(); partition.EnableSelfOverlaps = true; partition.GetAabbForItem = GetAabbForItem; partition.BottomUpBuildThreshold = 0; partition.Add(1); partition.Add(2); partition.Add(3); partition.Update(true); partition.Add(4); // Partial rebuild. CompressedAabbTree throws exception when computing quantization. Assert.Throws <GeometryException>(() => partition.Update(false)); }
public void Infinite() { GlobalSettings.ValidationLevel = 0xff; var partition = new CompressedAabbTree { EnableSelfOverlaps = true, GetAabbForItem = GetAabbForItem }; partition.Add(1); partition.Add(0); partition.Add(2); partition.Add(3); // Exception because CompressedAabbTree cannot handle infinite. Assert.Throws<GeometryException>(() => partition.Update(false)); }
public void Infinite() { GlobalSettings.ValidationLevel = 0xff; var partition = new CompressedAabbTree { EnableSelfOverlaps = true, GetAabbForItem = GetAabbForItem }; partition.Add(1); partition.Add(0); partition.Add(2); partition.Add(3); // Exception because CompressedAabbTree cannot handle infinite. Assert.Throws <GeometryException>(() => partition.Update(false)); }
public void NaN() { var partition = new CompressedAabbTree { EnableSelfOverlaps = true, GetAabbForItem = GetAabbForItem }; partition.Add(1); partition.Add(4); partition.Add(2); partition.Add(3); // Aabb builder throws exception. Assert.Throws<GeometryException>(() => partition.Update(false)); partition = new CompressedAabbTree(); partition.EnableSelfOverlaps = true; partition.GetAabbForItem = GetAabbForItem; partition.BottomUpBuildThreshold = 0; partition.Add(1); partition.Add(4); partition.Add(2); partition.Add(3); // Full rebuild. CompressedAabbTree throws exception when computing quantization. Assert.Throws<GeometryException>(() => partition.Update(true)); partition = new CompressedAabbTree(); partition.EnableSelfOverlaps = true; partition.GetAabbForItem = GetAabbForItem; partition.BottomUpBuildThreshold = 0; partition.Add(1); partition.Add(2); partition.Add(3); partition.Update(true); partition.Add(4); // Partial rebuild. CompressedAabbTree throws exception when computing quantization. Assert.Throws<GeometryException>(() => partition.Update(false)); }