public void InsertNode(SceneNode node, PartitionCategories category) { switch (category) { case PartitionCategories.Dynamic: mDynamicRoot.AddChild(node); break; case PartitionCategories.Static: ImplicitBoundingBoxNode boxNode = node as ImplicitBoundingBoxNode; if (boxNode == null) { boxNode = new ImplicitBoundingBoxNode(true); boxNode.AddChild(node); boxNode.RecalculateBound(); } if (mStaticTreeRoot == null) { mStaticTreeRoot = boxNode; } else { mStaticTreeRoot.InsertNodeIntoBVH(boxNode); } break; case PartitionCategories.Skybox: mSkyboxRoot.AddChild(node); break; } }
public void SetBoundCascading(BoundingBox newBound) { if (newBound != Bound) { Bound = newBound; ImplicitBoundingBoxNode parentBox = mParent as ImplicitBoundingBoxNode; if (parentBox != null) { parentBox.RecalculateBound(); } } }