java.lang.Object
io.github.shimeoki.jfx.rasterization.Polygon3
All Implemented Interfaces:
Triangle

public final class Polygon3 extends Object implements Triangle
A default Triangle implementation.

Does store the references to the original points on creation. Getters of the vertices return the same reference everytime.

Since:
2.0.0
See Also:
  • Constructor Details

    • Polygon3

      public Polygon3(Point2f v1, Point2f v2, Point2f v3)
      Creates a new Polygon3 instance.
      Parameters:
      v1 - the first vertex
      v2 - the second vertex
      v3 - the third vertex
      Throws:
      NullPointerException - if at least one parameter is null
      Since:
      2.0.0
  • Method Details

    • v1

      public Point2f v1()
      Description copied from interface: Triangle
      Gets the first vertex of this triangle.
      Specified by:
      v1 in interface Triangle
      Returns:
      the first vertex
    • v2

      public Point2f v2()
      Description copied from interface: Triangle
      Gets the second vertex of this triangle.
      Specified by:
      v2 in interface Triangle
      Returns:
      the second vertex
    • v3

      public Point2f v3()
      Description copied from interface: Triangle
      Gets the third vertex of this triangle.
      Specified by:
      v3 in interface Triangle
      Returns:
      the third vertex