1 package SteeringStuff; 2 3 import java.awt.Color; 4 import java.io.Serializable; 5 import java.util.LinkedList; 6 7 /** 8 * The enum of the types of the steerings. Each type has its name color and order. But the navigation layer doesn't use these values. (But for instance the SteeringGui does.) 9 * @author Marki 10 */ 11 public enum SteeringType implements Serializable { 12 //OBSTACLE_AVOIDANCE(1, "Obstacle Avoidance", new Color(255f/255f,186f/255,88f/255,0.5f)), //světle oranžová 25-167-255 13 OBSTACLE_AVOIDANCE(1, "Obstacle Avoidance", new Color(155f/255,101f/255,53f/255,0.5f)), //tmavě hnědá 20-168-155 14 PEOPLE_AVOIDANCE(2, "People Avoidance", new Color(230f/255f,128f/255,72f/255,0.5f)), //tělová 15-175-230 15 //TARGET_APPROACHING(3, "Target Approaching", new Color(206f/255f,255f/255,87f/255,0.5f)), //brčálově světle zelená 55-168-255 16 //TARGET_APPROACHING(3, "Target Approaching", new Color(172f/255f,255f/255,23f/255,0.5f)), //světle zelená 55-168-255 17 TARGET_APPROACHING(3, "Target Approaching", new Color(144f/255f,211f/255,21f/255,0.5f)), //brčálově světle zelená 55-168-255 18 PATH_FOLLOWING(4, "Path Following", new Color(65f/255f,155f/255,53f/255,0.3f)), //tmavě zelená 80-168-155 19 //WALL_FOLLOWING(5, "Wall Following", new Color(155f/255,101f/255,53f/255,0.5f)), //tmavě hnědá 20-168-155 20 WALL_FOLLOWING(5, "Wall Following", new Color(255f/255f,186f/255,88f/255,0.5f)), //světle oranžová 25-167-255 21 LEADER_FOLLOWING(6, "Leader Following", new Color(60f/255f,175f/255,100f/255,0.5f)), //tmavší tyrkysová 100-167-175 22 WALK_ALONG(7, "Walk Along", new Color(255f/255f,145f/255,86f/255,0.5f)), //tmavě oranžová 15-168-255 23 TRIANGLE(8, "Triangle", new Color(0,0,0,0.5f)), //cerna 24 STICK_TO_PATH(9, "Stick To Path", new Color(0,0,0,0.5f)); 25 26 private int order; 27 private String name; 28 private Color color; 29 30 private SteeringType(int order, String name, Color color) { 31 this.order = order; 32 this.name = name; 33 this.color = color; 34 } 35 36 public static LinkedList<SteeringType> getCollection() { 37 LinkedList<SteeringType> result = new LinkedList<SteeringType>(); 38 39 for (SteeringType type : SteeringType.values()) { 40 result.add(type); 41 } 42 return result; 43 } 44 45 public Color getColor() { 46 return color; 47 } 48 49 public String getName() { 50 return name; 51 } 52 53 public int getOrder() { 54 return order; 55 } 56 } 57 58 /* 59 OBSTACLE_AVOIDANCE(1, "Obstacle Avoidance", new Color(238f/255,137f/255,26f/255,0.5f)), 60 PEOPLE_AVOIDANCE(2, "People Avoidance", new Color(255f/255,174f/255,156f/255,0.5f)), 61 TARGET_APPROACHING(3, "Target Approaching", new Color(179f/255,255f/255,66f/255,0.5f)), 62 PATH_FOLLOWING(4, "Path Following", new Color(116f/255,255f/255,66f/255,0.5f)), 63 WALL_FOLLOWING(5, "Wall Following", new Color(255f/255,166f/255,66f/255,0.5f)), 64 LEADER_FOLLOWING(6, "Leader Following", new Color(66f/255,255f/255,157f/255,0.5f)), 65 WALK_ALONG(7, "Walk Along", new Color(66f/255,255f/255,214f/255,0.5f)); 66 67 68 OBSTACLE_AVOIDANCE(1, "Obstacle Avoidance", new Color(25f/255f,0.85f,1.0f,0.5f)), //světle oranžová 25-167-255 69 PEOPLE_AVOIDANCE(2, "People Avoidance", new Color(15f/255f,0.7f,0.9f,0.5f)), //tělová 15-175-230 70 TARGET_APPROACHING(3, "Target Approaching", new Color(55f/255f,0.85f,1.0f,0.5f)), //brčálově světle zelená 55-168-255 71 PATH_FOLLOWING(4, "Path Following", new Color(80f/255f,0.85f,0.6f,0.3f)), //tmavě zelená 80-168-155 72 WALL_FOLLOWING(5, "Wall Following", new Color(20f/255f,0.85f,0.6f,0.5f)), //tmavě hnědá 20-168-155 73 LEADER_FOLLOWING(6, "Leader Following", new Color(100f/255f,0.85f,0.7f,0.5f)), //tmavší tyrkysová 100-167-175 74 WALK_ALONG(7, "Walk Along", new Color(15f/255f,0.85f,1.0f,0.5f)); //tmavě oranžová 20-167-155*/