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; } }