You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was messing around with PointOctree and found some issues by trying to remove a point in some specific location, I guess is some round stuff related.
The test below fails in the i = 50 with the vector <25. 25. 25>
[Fact]publicvoidRemoveTest2(){varsize=0.5f;// Add points.for(inti=1;i<100;++i)
_octree.Add(i,new Vector3(size*i));// Should remove geometries based on object and bounding boxfor(inti=1;i<100;++i){
_octree.Remove(i,new Vector3(size*i)).ShouldBeTrue($"{i}{new Vector3(size*i)}");// Fail in 50 <25. 25. 25>}
_octree.Count.ShouldBe(0);}
The text was updated successfully, but these errors were encountered:
The same problem happens if you edit the original RemoveTest and remove the first part.
Just add and remove by point. In that case, fails in i=25.
I noticed using a different initial octree size you have points in the border of the octree, in the test the octree size is 50 and the test fails when i = 50/2.
[Fact]publicvoidRemoveTest(){//// Add points//for (int i = 1; i < 100; ++i)// _octree.Add(i, new Vector3(i));//// Should not remove geometries that are not in the tree//_octree.Remove(10, Vector3.Zero).ShouldBeFalse();//_octree.Remove(10, new Vector3(5)).ShouldBeFalse();//// Should remove geometries based on object//for (int i = 1; i < 100; ++i)// _octree.Remove(i).ShouldBeTrue();//_octree.Count.ShouldBe(0);// Re-add points.for(inti=1;i<100;++i)
_octree.Add(i,new Vector3(i));// Should remove geometries based on object and bounding boxfor(inti=1;i<100;++i)
_octree.Remove(i,new Vector3(i)).ShouldBeTrue();
_octree.Count.ShouldBe(0);}
I was messing around with
PointOctree
and found some issues by trying to remove a point in some specific location, I guess is some round stuff related.The test below fails in the
i = 50
with the vector<25. 25. 25>
The text was updated successfully, but these errors were encountered: