Пример #1
0
        public override void Step(Framework.Settings settings)
        {
            base.Step(settings);

            PolyShapesCallback callback = new PolyShapesCallback();

            callback._circle._radius = 2.0f;
            callback._circle._p      = new Vector2(0.0f, 2.1f);
            callback._transform.SetIdentity();
            callback._debugDraw = _debugDraw;

            AABB aabb;

            callback._circle.ComputeAABB(out aabb, ref callback._transform);

            _world.QueryAABB(callback.ReportFixture, ref aabb);

            Color color = new Color(0.4f, 0.7f, 0.8f);

            _debugDraw.DrawCircle(callback._circle._p, callback._circle._radius, color);

            _debugDraw.DrawString(50, _textLine, "Press 1-5 to drop stuff");
            _textLine += 15;
            _debugDraw.DrawString(50, _textLine, "Press a to (de)activate some bodies");
            _textLine += 15;
            _debugDraw.DrawString(50, _textLine, "Press d to destroy a body");
            _textLine += 15;
        }
Пример #2
0
        public override void Step(Framework.Settings settings)
        {
            base.Step(settings);

            PolyShapesCallback callback = new PolyShapesCallback();
            callback._circle._radius = 2.0f;
            callback._circle._p = new Vector2(0.0f, 2.1f);
            callback._transform.SetIdentity();
            callback._debugDraw = _debugDraw;

            AABB aabb;
            callback._circle.ComputeAABB(out aabb, ref callback._transform, 0);

            _world.QueryAABB(callback.ReportFixture, ref aabb);

            Color color = new Color(0.4f, 0.7f, 0.8f);
            _debugDraw.DrawCircle(callback._circle._p, callback._circle._radius, color);

            _debugDraw.DrawString(50, _textLine, "Press 1-5 to drop stuff");
            _textLine += 15;
            _debugDraw.DrawString(50, _textLine, "Press a to (de)activate some bodies");
            _textLine += 15;
            _debugDraw.DrawString(50, _textLine, "Press d to destroy a body");
            _textLine += 15;
        }