| Modifier and Type | Field and Description |
|---|---|
| private final double | |
| protected final float[][] | |
| protected final Point2D[] | |
| private final int | |
| private final Line | |
| private final double | |
| private final double | |
| private final double |
| Access | Constructor and Description |
|---|---|
| pack-priv | ShadedTriangle(Point2D[]
an array of the 3 vertices of a triangle p, float[][] an array of color corresponding the vertex array p c)Constructor. |
| Modifier and Type | Method and Description |
|---|---|
| public float[] | |
| private int | |
| public boolean | |
| private double | |
| private double | |
| public int[] | |
| public int | |
| public Line | Returns: points of the line, or null if this triangle isn't a lineGet the line of a triangle. |
| private boolean | |
| public String |
| area | back to summary |
|---|---|
| private final double area | |
| color | back to summary |
|---|---|
| protected final float[][] color | |
| corner | back to summary |
|---|---|
| protected final Point2D[] corner | |
| degree | back to summary |
|---|---|
| private final int degree | |
| line | back to summary |
|---|---|
| private final Line line | |
| v0 | back to summary |
|---|---|
| private final double v0 | |
| v1 | back to summary |
|---|---|
| private final double v1 | |
| v2 | back to summary |
|---|---|
| private final double v2 | |
| ShadedTriangle | back to summary |
|---|---|
| pack-priv ShadedTriangle(Point2D[] p, float[][] c) Constructor.
| |
| calcColor | back to summary |
|---|---|
| public float[] calcColor(Point2D p) Calculate the color of a point.
| |
| calcDeg | back to summary |
|---|---|
| private int calcDeg(Point2D[] p) Calculate the degree value of a triangle.
| |
| contains | back to summary |
|---|---|
| public boolean contains(Point2D p) Whether a point is contained in this ShadedTriangle.
| |
| edgeEquationValue | back to summary |
|---|---|
| private double edgeEquationValue(Point2D p, Point2D p1, Point2D p2) | |
| getArea | back to summary |
|---|---|
| private double getArea(Point2D a, Point2D b, Point2D c) | |
| getBoundary | back to summary |
|---|---|
| public int[] getBoundary() get the boundary of a triangle.
| |
| getDeg | back to summary |
|---|---|
| public int getDeg() | |
| getLine | back to summary |
|---|---|
| public Line getLine() Get the line of a triangle.
| |
| overlaps | back to summary |
|---|---|
| private boolean overlaps(Point2D p0, Point2D p1) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |