Quad2D.cs 821 B

12345678910111213141516171819202122232425262728293031
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Drawing;
  7. namespace bbiwarg.Utility
  8. {
  9. class Quad2D
  10. {
  11. public Vector2D TopLeft {private set; get;}
  12. public Vector2D TopRight { private set; get; }
  13. public Vector2D BottomLeft { private set; get; }
  14. public Vector2D BottomRight { private set; get; }
  15. public Quad2D(Vector2D bottomLeft, Vector2D topLeft, Vector2D topRight, Vector2D bottomRight)
  16. {
  17. TopLeft = topLeft;
  18. TopRight = topRight;
  19. BottomLeft = bottomLeft;
  20. BottomRight = BottomRight;
  21. }
  22. public PointF[] getVertices()
  23. {
  24. return new PointF[] {TopLeft,TopRight,BottomRight,BottomLeft};
  25. }
  26. }
  27. }