summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wu <lekensteyn@gmail.com>2014-01-17 11:03:52 +0100
committerPeter Wu <lekensteyn@gmail.com>2014-01-17 11:03:52 +0100
commit92337732d437972e96fb86bb4f06d6c418fc9aa8 (patch)
tree5daa5033f5d9828330577face633c4774009778d
parent39f1b2e104d1180e0444f0873982d5e71ab0cb8a (diff)
download2iv60-robots-92337732d437972e96fb86bb4f06d6c418fc9aa8.tar.gz
Make control points for O track counter-clockwise
-rw-r--r--src/RaceTrack.java40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/RaceTrack.java b/src/RaceTrack.java
index ea9694a..6662196 100644
--- a/src/RaceTrack.java
+++ b/src/RaceTrack.java
@@ -42,6 +42,7 @@ class RaceTrack extends BetterBase {
* Array with control points for the custom track.
*/
private Vector[] controlPointsCustomTrack;
+ private Vector[] selectedControlPoints;
private final RobotRace race;
/**
* Debug option: set to true to show control points.
@@ -56,37 +57,36 @@ class RaceTrack extends BetterBase {
// points are chosen such that the boundaries of a quarter lay
// on a straight line (to get second-order continuity).
- // top #---|#---#
- // left ^- - - - - - - begin here (top right)
- // # #
- // | | (v then continue clock-wise)
+ // top #---#|--# this is the first control point of top-left,
+ // left ^- - - - - - and the last of top-right
+ // # top #
+ // | right | (^ then continue anti-clockwise)
+ // - |
+ // # # <- - - begin here (top-right)
// | -
- // # # <- - this point is the last of top-right,
- // - | and the first of bottom-left
// | bottom |
// # left right #
- // #----#|--#
+ // #--|#---#
controlPointsOTrack = new Vector[] {
// top-right
- new Vector( 0, 15, 1),
+ new Vector( 15, 0, 1),
+ new Vector( 15, 8, 1),
new Vector( 8, 15, 1),
- new Vector( 15, 8, 1),
- // bottom-right
- new Vector( 15, 0, 1),
- new Vector( 15, -8, 1),
+ // top-left
+ new Vector( 0, 15, 1),
+ new Vector( -8, 15, 1),
+ new Vector(-15, 8, 1),
- new Vector( 8, -15, 1),
// bottom-left
- new Vector( 0, -15, 1),
- new Vector( -8, -15, 1),
-
- new Vector(-15, -8, 1),
- // top-left
new Vector(-15, 0, 1),
- new Vector(-15, 8, 1),
+ new Vector(-15, -8, 1),
+ new Vector( -8, -15, 1),
- new Vector( -8, 15, 1),
+ // bottom-right
+ new Vector( 0, -15, 1),
+ new Vector( 8, -15, 1),
+ new Vector( 15, -8, 1),
};
}