示例#1
0
        public static GridPos TransformOccupiedPosition(GridPosR localGridPos, GridPos ori_OccupiedPosition)
        {
            GridPos temp_rot = GridPos.RotateGridPos(ori_OccupiedPosition, localGridPos.orientation);
            GridPos final    = temp_rot + (GridPos)localGridPos;

            return(final);
        }
示例#2
0
        public static List <GridPos> TransformOccupiedPositions(GridPosR localGridPos, List <GridPos> ori_OccupiedPositions)
        {
            List <GridPos> resGP = new List <GridPos>();

            foreach (GridPos oriGP in ori_OccupiedPositions)
            {
                GridPos temp_rot = GridPos.RotateGridPos(oriGP, localGridPos.orientation);
                GridPos final    = temp_rot + (GridPos)localGridPos;
                resGP.Add(final);
            }

            return(resGP);
        }
示例#3
0
        public static List <GridPos3D> TransformOccupiedPositions_XZ(GridPosR.Orientation orientation, List <GridPos3D> ori_OccupiedPositions)
        {
            List <GridPos3D> res = new List <GridPos3D>();

            foreach (GridPos3D oriGP in ori_OccupiedPositions)
            {
                GridPos   temp_rot = GridPos.RotateGridPos(new GridPos(oriGP.x, oriGP.z), orientation);
                GridPos3D final    = new GridPos3D(temp_rot.x, oriGP.y, temp_rot.z);
                res.Add(final);
            }

            return(res);
        }