示例#1
0
        public static MinMaxVector2 GetBlueprintCorners(Vector2[] cornerArray)
        {
            var blueprintCorners = new MinMaxVector2(0f, 0f, 0f, 0f);

            blueprintCorners.Apply(cornerArray);

            return(blueprintCorners);
        }
示例#2
0
        public static MinMaxVector2 GetBlueprintCorners(BlueprintModel blueprint)
        {
            var blueprintCorners = new MinMaxVector2(0f, 0f, 0f, 0f);
            var corners          = GetCorners(blueprint);

            blueprintCorners.Apply(corners);

            return(blueprintCorners);
        }
示例#3
0
        public static Vector2 GetSize(Vector2[] cornerArray)
        {
            var blueprintCorners = new MinMaxVector2(0f, 0f, 0f, 0f);

            blueprintCorners.Apply(cornerArray);

            return(new Vector2(
                       blueprintCorners.maxX - blueprintCorners.minX,
                       blueprintCorners.maxY - blueprintCorners.minY));
        }
示例#4
0
        public static Vector2 GetSize(this BlueprintModel blueprint)
        {
            var blueprintCorners = new MinMaxVector2(0f, 0f, 0f, 0f);
            var corners          = GetCorners(blueprint);

            blueprintCorners.Apply(corners);

            return(new Vector2(
                       blueprintCorners.maxX - blueprintCorners.minX,
                       blueprintCorners.maxY - blueprintCorners.minY));
        }