示例#1
0
        PolyCollisionTest()
        {
            {
                _polygonA.Vertices = PolygonTools.CreateRectangle(0.2f, 0.4f);
                _transformA.Set(Vector2.Zero, 0.0f);
            }

            {
                _polygonB.Vertices = PolygonTools.CreateRectangle(0.5f, 0.5f);
                //_positionB = new Vector2(19.345284f, 1.5632932f);
                _positionB = new Vector2(0.345284f, 0.5632932f);

                _angleB = 1.9160721f;
                _transformB.Set(_positionB, _angleB);
            }
        }
示例#2
0
        DistanceTest()
        {
            {
                _transformA.SetIdentity();
                _transformA.p = new Vector2(0.0f, -0.2f);
                Vertices vertices = PolygonTools.CreateRectangle(10.0f, 0.2f);
                _polygonA = new PolygonShape(vertices, 0);
            }

            {
                _positionB = new Vector2(12.017401f, 0.13678508f);
                _angleB    = -0.0109265f;
                _transformB.Set(_positionB, _angleB);

                Vertices vertices = PolygonTools.CreateRectangle(2.0f, 0.1f);
                _polygonB = new PolygonShape(vertices, 0);
            }
        }