public void Render()
        {
            if (!Enabled)
            {
                return;
            }

            lineManager.ClearAllLines();

            var data = physXScene.GetDebugRenderable();


            if (data.PointCount > 0)
            {
                DebugPoint[] points = data.GetDebugPoints();

                for (int x = 0; x < data.LineCount; x++)
                {
                    lineManager.AddCenteredBox(points[x].Point.dx(), 0.01f, Int32ToColor(points[x].Color).dx());
                }
            }

            if (data.LineCount > 0)
            {
                DebugLine[] lines = data.GetDebugLines();

                for (int x = 0; x < data.LineCount; x++)
                {
                    DebugLine line = lines[x];

                    Color4 color4 = Int32ToColor(line.Color).dx();
                    color4.Alpha = 255; // Fix alpha
                    lineManager.AddLine(line.Point0.dx(), line.Point1.dx(), color4);
                }
            }

            if (data.TriangleCount > 0)
            {
                DebugTriangle[] triangles = data.GetDebugTriangles();

                for (int x = 0; x < data.TriangleCount; x++)
                {
                    DebugTriangle triangle = triangles[x];

                    lineManager.AddTriangle(triangle.Point0.dx(), triangle.Point1.dx(), triangle.Point2.dx(), Int32ToColor(triangle.Color).dx());
                }
            }

            game.LineManager3D.Render(lineManager, game.Camera);
        }
 private void updateWireframeBox(LineManager3DLines ret, ChunkCoordinate chunk)
 {
     ret.ClearAllLines();
     worldOctree.GetWorldObjects(chunk)
     .ForEach(p => ret.AddAABB(p.BoundingBox, Matrix.Identity, new Color4(0, 0, 0)));
 }