public void DrawSquaresForSelectedObjects(List <ObjectInfo> objs) { if (gridMeshes.Count == 0) { gridMeshes.Add(Instantiate(gridMeshPrefab)); } foreach (SquareCoords sqr in renderedSquares) { gridMeshes [gridMeshes.Count - 1].GetComponent <GridMeshController> ().RemoveSquare(sqr.start, sqr.end); } renderedSquares.Clear(); foreach (ObjectInfo obj in objs) { Rect objRect = new Rect(); objRect.position = new Vector2(obj.objRectCoord.x, obj.objRectCoord.y); Vector3 start = new Vector3(obj.objRectCoord.x, obj.objRectCoord.y + obj.objRectHeight, -1); Vector3 end = new Vector3(obj.objRectCoord.x + obj.objRectWidth, obj.objRectCoord.y, -1); SquareCoords foundSquare = renderedSquares.Find(o => o.start == start && o.end == end); if (foundSquare == null) { gridMeshes [gridMeshes.Count - 1].GetComponent <GridMeshController> ().DrawSquare(start, end, "Yellow"); renderedSquares.Add(new SquareCoords().SetData(start, end)); } } }
public ActionResult GetPointsPost([FromBody] SquareCoords square) { var result = _pointManager.SearchPointsInSquare(square.LeftUpperLongitude, square.LeftUpperLatitude, square.RightLowerLongitude, square.RightLowerLatitude, 100); return(StatusCode(200, result)); }