public void TestChildSceneNodeRemoval() { SceneManager sceneManager = new BspSceneManager( "Manager under test" ); SceneNode node = sceneManager.CreateSceneNode( "testNode" ); SceneNode childNode = node.CreateChildSceneNode( "childNode" ); Assert.IsTrue( ManagerContainsNode( sceneManager, childNode ), "A child node was created but not added to the scene graph." ); node.RemoveChild( childNode.Name ); Assert.IsTrue( ManagerContainsNode( sceneManager, childNode ), "A child node was removed from its parent but also incorrectly removed from the scene graph." ); }
public void TestChildSceneNodeDestruction() { SceneManager sceneManager = new BspSceneManager( "Manager under test" ); SceneNode node = sceneManager.CreateSceneNode( "testNode" ); SceneNode childNode = node.CreateChildSceneNode( "childNode" ); Assert.IsTrue( ManagerContainsNode( sceneManager, childNode ), "A child node was created but not added to the scene graph." ); node.RemoveAndDestroyChild( childNode.Name ); Assert.IsFalse( ManagerContainsNode( sceneManager, childNode ), "A child node was destroryed but not removed from the scene graph." ); }