Beispiel #1
0
        public Vector2D[] GetNormals(IPolygon other)
        {
            var pts  = GetPoints();
            var axes = new Vector2D[2];

            axes[0] = Vector2D.Axis(pts[0], pts[1]);
            axes[1] = Vector2D.AxisNormalLeft(pts[0], pts[1]);

            return(axes);
        }
        public Vector2D[] GetNormals(IPolygon other)
        {
            var cons = GetSides();
            var axes = new Vector2D[cons.Length];

            for (Int32 a = 0; a < cons.Length; a++)
            {
                axes[a] = Vector2D.AxisNormalLeft(cons[a]);
            }

            return(axes);
        }