-
Notifications
You must be signed in to change notification settings - Fork 0
/
CurvePoint.java
51 lines (43 loc) · 1.36 KB
/
CurvePoint.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package treamcode;
import org.opencv.core.Point;
public class CurvePoint {
public double x;
public double y;
public double heading;
public double moveSpeed;
public double turnSpeed;
public double followDistance;
public double pointLenght;
public CurvePoint( double y, double x, double moveSpeed, double turnSpeed,
double followDistance){
this.x = x;
this.y = y;
this.moveSpeed = moveSpeed;
this.turnSpeed = turnSpeed;
this.followDistance = followDistance;
}
public CurvePoint ( double y, double x, double heading, double moveSpeed, double turnSpeed,
double followDistance){
this.x = x;
this.y = y;
this.heading = heading;
this.moveSpeed = moveSpeed;
this.turnSpeed = turnSpeed;
this.followDistance = followDistance;
}
public CurvePoint( CurvePoint thispoint){
x = thispoint.x;
y = thispoint.y;
moveSpeed = thispoint.moveSpeed;
turnSpeed = thispoint.turnSpeed;
followDistance = thispoint.followDistance;
pointLenght = thispoint.pointLenght;
}
public Point toPoint(){
return new Point(x,y);
}
public void setPoint(Point point){
x = point.x;
y = point.y;
}
}