示例#1
0
            public float GetMetric()
            {
                switch (Count)
                {
                case 0:
                    Box2DXDebug.Assert(false);
                    return(0.0f);

                case 1:
                    return(0.0f);

                case 2:
                    return(Vec2.Distance(Vertices[0].W, Vertices[1].W));

                case 3:
                    return(Vec2.Cross(Vertices[1].W - Vertices[0].W, Vertices[2].W - Vertices[0].W));

                default:
                    Box2DXDebug.Assert(false);
                    return(0.0f);
                }
            }