Class Triangle

java.lang.Object
org.openpatch.scratch.extensions.shape.Shape
org.openpatch.scratch.extensions.shape.Triangle

public class Triangle extends Shape
Represents a triangle shape defined by three vertices.
  • Constructor Details

    • Triangle

      public Triangle(double x1, double y1, double x2, double y2, double x3, double y3)
      Creates a triangle with the specified vertices.
      Parameters:
      x1 - the x-coordinate of the first vertex
      y1 - the y-coordinate of the first vertex
      x2 - the x-coordinate of the second vertex
      y2 - the y-coordinate of the second vertex
      x3 - the x-coordinate of the third vertex
      y3 - the y-coordinate of the third vertex