public class EasySpace extends Space implements Easy
space.addLine(0,0,100,100).setColor(Color.RED); space.addCircle(0, 0, 1).setColor(Color.RED); space.addShape(new Line(0, 0, 10, 10)).setColor(Color.RED);
Constructor and Description |
---|
EasySpace()
Luo uuden avaruuden
|
Modifier and Type | Method and Description |
---|---|
Axis |
addAxis(double xLength,
double yLength,
double zLength)
Lisää olioon koordinaatistoakselit.
|
Axis |
addAxis(double xLength,
double yLength,
double zLength,
double x,
double y,
double z)
Lisää olioon koordinaatistoakselit.
|
Circle |
addCircle(double x,
double y,
double r)
Lisää olioon ympyrän.
|
Circle |
addCircle(double x,
double y,
double z,
double r)
Lisää olioon ympyrän.
|
FillPolygon |
addFillPolygon(double[][] points)
Lisää olioon täytetyn monikulmion.
|
FillPolygon |
addFillPolygon(double[] xpoints,
double[] ypoints)
Lisää olioon täytetyn monikulmion.
|
Line |
addLine(double x1,
double y1,
double x2,
double y2)
Lisää olioon uuden viivan.
|
Line |
addLine(double x1,
double y1,
double z1,
double x2,
double y2,
double z2)
Lisää olioon viivan.
|
Polygon |
addPolygon(double[][] points)
Lisää olioon monikulmion.
|
Polygon |
addPolygon(double[] xpoints,
double[] ypoints)
Lisää olioon monikulmion.
|
Drawable |
addShape(Drawable shape)
Lisää olioon kuvion joka on Drawable-olio.
|
add, draw, getSavedPath, redraw, registerWindow, remove, removeAll, unRegisterWindow
public EasySpace()
public Drawable addShape(Drawable shape)
Easy
space.addShape(new Line(0, 0, 10, 10)).setColor(Color.RED);
public Line addLine(double x1, double y1, double x2, double y2)
Easy
space.addLine(0,0,100,100).setColor(Color.RED);
public Line addLine(double x1, double y1, double z1, double x2, double y2, double z2)
Easy
space.addLine(0, 0, 0, 100, 100, 100).setColor(Color.RED);
public Circle addCircle(double x, double y, double r)
Easy
space.addCircle(0, 0, 1).setColor(Color.RED);
public Circle addCircle(double x, double y, double z, double r)
Easy
space.addCircle(0, 0, 0, 1).setColor(Color.RED);
public Polygon addPolygon(double[] xpoints, double[] ypoints)
Easy
double[] xpoints = {-1, 2, 4}; double[] ypoints = [5, 6, 7}; space.addPolygon(xpoints, ypoints).setColor(Color.RED);
addPolygon
in interface Easy
xpoints
- monikulmion kärkipisteiden x-koordinaatitypoints
- monikulmion käskipisteiden y-koordinaatitpublic Polygon addPolygon(double[][] points)
Easy
double[][] points = {{2, 6}, {5, 5}, {-1, 2.5}} space.addPoylgon(points).setColor(Color.RED);
addPolygon
in interface Easy
points
- monikulmion kärkipisteiden koordinaatitpublic Axis addAxis(double xLength, double yLength, double zLength)
Easy
space.addAxis(5, 5, 5).setColor(Color.RED);
public Axis addAxis(double xLength, double yLength, double zLength, double x, double y, double z)
Easy
space.addAxis(5, 5, 5, 0, 0, 0).setColor(Color.RED);
public FillPolygon addFillPolygon(double[] xpoints, double[] ypoints)
Easy
double[] xpoints = {-1, 2, 4}; double[] ypoints = [5, 6, 7}; space.addFillPolygon(xpoints, ypoints).setColor(Color.RED);
addFillPolygon
in interface Easy
xpoints
- monikulmion kärkipisteiden x-koordinaatitypoints
- monikulmion käskipisteiden y-koordinaatitpublic FillPolygon addFillPolygon(double[][] points)
Easy
double[][] points = {{2, 6}, {5, 5}, {-1, 2.5}} space.addFillPoylgon(points).setColor(Color.RED);
addFillPolygon
in interface Easy
points
- monikulmion kärkipisteiden koordinaatit