Exemplo n.º 1
0
        public static void DebugDraw()
        {
            //BoundingBox box = new BoundingBox(new Vector3(-10000), new Vector3(10000));
            //var ents = GetAllEntitiesInBox(ref box);

            var result = new List <BoundingBoxD>();

            m_dynamicObjectsTree.GetAllNodeBounds(result);
            using (var batch = VRageRender.MyRenderProxy.DebugDrawBatchAABB(MatrixD.Identity, new Color(Color.SkyBlue, 0.05f), false, false))
            {
                foreach (var box in result)
                {
                    var aabb = box;
                    batch.Add(ref aabb);
                }
            }

            result.Clear();
            m_staticObjectsTree.GetAllNodeBounds(result);
            using (var batch = VRageRender.MyRenderProxy.DebugDrawBatchAABB(MatrixD.Identity, new Color(Color.Aquamarine, 0.05f), false, false))
            {
                foreach (var box in result)
                {
                    var aabb = box;
                    batch.Add(ref aabb);
                }
            }
        }