Package org.openpatch.scratch
Class Triangle
java.lang.Object
org.openpatch.scratch.Shape
org.openpatch.scratch.Triangle
Represents a triangle shape defined by three vertices.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionTriangle(double x1, double y1, double x2, double y2, double x3, double y3) Creates a triangle with the specified vertices. -
Method Summary
Methods inherited from class org.openpatch.scratch.Shape
contains, draw, getBounds, intersects, invalidateCache, rotate, scale, translate
-
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 vertexy1- the y-coordinate of the first vertexx2- the x-coordinate of the second vertexy2- the y-coordinate of the second vertexx3- the x-coordinate of the third vertexy3- the y-coordinate of the third vertex
-