|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.byu.phun2d.DrawObj edu.byu.phun2d.Triangle
public class Triangle
This class will draw a triangle based on any three points.
Constructor Summary | |
---|---|
Triangle(double x1,
double y1,
double x2,
double y2,
double x3,
double y3)
Constructs a triangle object with the specified three corners. |
Method Summary | |
---|---|
void |
setP1(double x,
double y)
Change the location of point 1 on the triangle |
void |
setP2(double x,
double y)
Change the location of point 2 on the triangle |
void |
setP3(double x,
double y)
Change the location of point 3 on the triangle |
Methods inherited from class edu.byu.phun2d.DrawObj |
---|
getFillColor, getLineColor, getLineWidth, getRotate, getScaleX, getScaleY, getTranslate, insideToOutside, outsideToInside, setFillColor, setLineColor, setLineWidth, setRotate, setScale, setTranslate |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Triangle(double x1, double y1, double x2, double y2, double x3, double y3)
x1
- X coordinate of corner 1y1
- Y coordinate of corner 1x2
- X coordinate of corner 2y2
- Y coordinate of corner 2x3
- X coordinate of corner 3y3
- Y coordinate of corner 3Method Detail |
---|
public void setP1(double x, double y)
x
- new X coordinatey
- new Y coordinatepublic void setP2(double x, double y)
x
- new X coordinatey
- new Y coordinatepublic void setP3(double x, double y)
x
- new X coordinatey
- new Y coordinate
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |