I’m getting inconsistent results with node.GetBoundingBox();
[Test]
public void BadBounds()
{
Scene inScene1 = new Scene();
var c1 = inScene1.RootNode.CreateChildNode( "Cube4", new Box( ).ToMesh());
c1.Transform.Translation = new Vector3( -20, 0, 120 );
Scene inScene2 = new Scene();
var c2 = inScene2.RootNode.CreateChildNode( "Cube2", new Box( ).ToMesh());
c2.Transform.Translation = new Vector3( 80, 0, 120 );
Scene inScene3 = new Scene();
var c3 = inScene3.RootNode.CreateChildNode( "Cube3", new Box( ).ToMesh());
c3.Transform.Translation = new Vector3( -20, 0, 20 );
Scene inScene4 = new Scene();
var c4 = inScene4.RootNode.CreateChildNode( "Cube4", new Box( ).ToMesh());
c4.Transform.Translation = new Vector3( 80, 0, 20 );
var bounds1 = c1.GetBoundingBox();
var bounds2 = c2.GetBoundingBox();
var bounds3 = c3.GetBoundingBox();
var bounds4 = c4.GetBoundingBox();
}
image.png (18.3 KB)
As you can see in the above image, Cube3 has incorrect bounding box for an unknown reason. Documentation is also unclear which coordinate system the bounding box should be in.
Bounds1, 2 and 4 have what I expected, but bounds3 seems to be local?