public Point[] getScreenSquare(AutomatedCar.Models.WorldObject worldObject, int screenWidth, int screenHeight) { return(new Point[4] { new Point(this.centerCar.X - (screenWidth / 2), this.centerCar.Y - (screenHeight / 2)), new Point(this.centerCar.X + (screenWidth / 2), this.centerCar.Y - (screenHeight / 2)), new Point(this.centerCar.X - (screenWidth / 2), this.centerCar.Y + (screenHeight / 2)), new Point(this.centerCar.X + (screenWidth / 2), this.centerCar.Y + (screenHeight / 2)) }); }
public Point getPositionFromScreen(AutomatedCar.Models.WorldObject worldObject, int screenWidth, int screenHeight) { return(new Point(worldObject.X - this.centerCar.X + (screenWidth / 2), worldObject.Y - this.centerCar.Y + (screenHeight / 2))); }
public Point getPositionFromCenter(AutomatedCar.Models.WorldObject worldObject) { return(new Point(worldObject.X - this.centerCar.X, worldObject.Y - this.centerCar.Y)); }