Добавлен класс Point
This commit is contained in:
parent
d31bdb7cb1
commit
10d3e55475
40
src/com/annimon/graphics/Point.java
Normal file
40
src/com/annimon/graphics/Point.java
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
package com.annimon.graphics;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author aNNiMON
|
||||||
|
*/
|
||||||
|
public class Point {
|
||||||
|
|
||||||
|
private double x, y;
|
||||||
|
|
||||||
|
public Point() {
|
||||||
|
x = y = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Point(double x, double y) {
|
||||||
|
this.x = x;
|
||||||
|
this.y = y;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getX() {
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setX(double x) {
|
||||||
|
this.x = x;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getY() {
|
||||||
|
return y;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setY(double y) {
|
||||||
|
this.y = y;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double[] getVector3() {
|
||||||
|
return new double[] { x, y, 1 };
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user