SimObject |
1 package interfaces; 2 3 /** 4 * Interface class for all objects in a SimWorld 5 * 6 * @author Graham Ritchie 7 */ 8 public interface SimObject 9 { 10 /** 11 * Sets the desired velocity of this object - the SimWorld will then set its 12 * actual velocity accordingly (depending on wheher the object is colliding 13 * with another object etc.) Positive values mean the objet wants to move 14 * forward, and negative values mean the object wants to move backward. 15 * A velocity of 0 means the object wants to stop. 16 * 17 * @param v the desired velocity 18 */ 19 public void setDesiredVelocity(double v); 20 21 /** 22 * Sets the actual velocity of this object. 23 * 24 * @param v the actual velocity 25 */ 26 public void setActualVelocity(double v); 27 28 /** 29 * Sets this objects X coordinate 30 * 31 * @param x the X coordinate 32 */ 33 public void setXCoord(double x); 34 35 /** 36 * Sets this objects Y coordinate 37 * 38 * @param y the Y coordinate 39 */ 40 public void setYCoord(double y); 41 42 /** 43 * Sets this objects Z coordinate 44 * 45 * @param z the Z coordinate 46 */ 47 public void setZCoord(double z); 48 49 /** 50 * Returns this objects desired velocity. This may not be equal to its 51 * actual velocity. 52 * 53 * @return the desired velocity as a double 54 */ 55 public double getDesiredVelocity(); 56 57 /** 58 * Returns this objects actual velocity. 59 * 60 * @return the actual velocity as a double 61 */ 62 public double getActualVelocity(); 63 64 /** 65 * Returns this objects X coordinate 66 * 67 * @return the X coordinate as a double 68 */ 69 public double getXCoord(); 70 71 /** 72 * Returns this objects Y coordinate 73 * 74 * @return the Y coordinate as a double 75 */ 76 public double getYCoord(); 77 78 /** 79 * Returns this objects Z coordinate 80 * 81 * @return the Z coordinate as a double 82 */ 83 public double getZCoord(); 84 85 /** 86 * Sets the desired 'bearing velocity' of this object in the XZ plane - 87 * a bearing velocity is the rate at which the object wants to turn. 88 * Positive values mean the object wants to turn clockwise, negative values 89 * mean the object wants to turn antoclockwise and a deisred bearing velocity 90 * of 0 means the object does not want to turn at all. 91 * 92 * @param v the desired bearing velocity in the XZ plane 93 */ 94 public void setDesiredBearingVelocityXZ(double v); 95 96 /** 97 * Sets the desired 'bearing velocity' of this object in the XY plane. 98 * 99 * @param v the desired bearing velocity in the XY plane 100 */ 101 public void setDesiredBearingVelocityXY(double v); 102 103 /** 104 * Sets the actual 'bearing velocity' of this object in the XZ plane. 105 * 106 * @param b the actual bearing velocity in the XZ plane 107 */ 108 public void setActualBearingVelocityXZ(double b); 109 110 /** 111 * Sets the actual 'bearing velocity' of this object in the XY plane. 112 * 113 * @param b the actual bearing velocity in the XY plane 114 */ 115 public void setActualBearingVelocityXY(double b); 116 117 /** 118 * Sets the actual bearing of this object in the XZ plane 119 * 120 * @param b the bearing 121 */ 122 public void setActualBearingXZ(double b); 123 124 /** 125 * Sets the actual bearing of this object in the XY plane 126 * 127 * @param b the bearing 128 */ 129 public void setActualBearingXY(double b); 130 131 /** 132 * Returns this objects desired bearing velocity in the XZ plane 133 * 134 * @return the desired bearing velocity as a double 135 */ 136 public double getDesiredBearingVelocityXZ(); 137 138 /** 139 * Returns this objects desired bearing velocity in the XY plane 140 * 141 * @return the desired bearing velocity as a double 142 */ 143 public double getDesiredBearingVelocityXY(); 144 145 /** 146 * Returns this objects actual bearing velocity in the XZ plane 147 * 148 * @return the actual bearing velocity as a double 149 */ 150 public double getActualBearingVelocityXZ(); 151 152 /** 153 * Returns this objects actual bearing velocity in the XY plane 154 * 155 * @return the actual bearing velocity as a double 156 */ 157 public double getActualBearingVelocityXY(); 158 159 /** 160 * Returns this objects actual bearing in the XZ plane 161 * 162 * @return the actual bearing as a double 163 */ 164 public double getActualBearingXZ(); 165 166 /** 167 * Returns this objects actual bearing in the XY plane 168 * 169 * @return the actual bearing as a double 170 */ 171 public double getActualBearingXY(); 172 173 /** 174 * Returns this object's height 175 * 176 * @return the height as a double 177 */ 178 public double getHeight(); 179 180 /** 181 * Returns this object's width 182 * 183 * @return the width as a double 184 */ 185 public double getWidth(); 186 187 /** 188 * Returns this object's length 189 * 190 * @return the length as a double 191 */ 192 public double getLength(); 193 194 /** 195 * Returns a string describing this object's type 196 * 197 * @return the type as a string 198 */ 199 public String getType(); 200 } 201
SimObject |