Interface Triangle2d

All Superinterfaces:
Iterable<Vector2d>, Polygon2d
All Known Subinterfaces:
MTriangle2d

public interface Triangle2d
extends Polygon2d
Read-only interface for 2-dimensional triangles.
Since:
9.10.2
  • Method Details

    • getFirstPoint

      Vector2d getFirstPoint()
      Returns the first point of the triangle.
      Returns:
      the first point of the triangle
      Since:
      9.10.2
    • getSecondPoint

      Vector2d getSecondPoint()
      Returns the second point of the triangle.
      Returns:
      the second point of the triangle
      Since:
      9.10.2
    • getThirdPoint

      Vector2d getThirdPoint()
      Returns the third point of the triangle.
      Returns:
      the third point of the triangle
      Since:
      9.10.2
    • create

      static Triangle2d create​(List<? extends Vector2d> points)
      Creates a new instance.
      Parameters:
      points - list of points
      Returns:
      the newly created instance
      Throws:
      IllegalArgumentException - if the list does not contain exactly three points
      Since:
      9.10.2
    • create

      static Triangle2d create​(Vector2d firstPoint, Vector2d secondPoint, Vector2d thirdPoint)
      Creates a new instance.
      Parameters:
      firstPoint - the first point
      secondPoint - the second point
      thirdPoint - the thirdPoint
      Returns:
      the newly created instance
      Throws:
      IllegalArgumentException - if the list does not contain exactly three points
      Since:
      9.10.2
    • create

      static Triangle2d create​(Triangle2d other)
      Creates a new instance.
      Parameters:
      other - the other triangle
      Returns:
      the newly created instance
      Since:
      9.10.2