summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wu <lekensteyn@gmail.com>2013-11-21 17:22:33 +0100
committerPeter Wu <lekensteyn@gmail.com>2013-11-21 17:22:33 +0100
commite2f3362ae1089641da7b99b6c7c06b98361073a2 (patch)
tree2fd2798f9d589f08ca068bdc6320f8041abe83b6
parent397dda2d8c2e79eb14a883cb3260b7f2e67b7086 (diff)
download2iv60-robots-e2f3362ae1089641da7b99b6c7c06b98361073a2.tar.gz
robot parameters
-rw-r--r--src/RobotRace.java19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/RobotRace.java b/src/RobotRace.java
index 4384b38..3e14212 100644
--- a/src/RobotRace.java
+++ b/src/RobotRace.java
@@ -329,14 +329,25 @@ public class RobotRace extends Base {
/** The material from which this robot is built. */
private final Material material;
+ /** Relative lengths, widths and heights of robot model. */
+ private final float torsoHeight, torsoWidth, shoulderRadius, armLength,
+ legLength, armWidth, legWidth, neckHeight, headRadius;
+
/**
* Constructs the robot with initial parameters.
*/
- public Robot(Material material
- /* add other parameters that characterize this robot */) {
+ public Robot(Material material) {
+ /* Set all parameters of the robot */
this.material = material;
-
- // code goes here ...
+ this.torsoHeight = 0.6f;
+ this.torsoWidth = 0.48f;
+ this.shoulderRadius = 0.09f;
+ this.armLength = 0.6f;
+ this.armWidth = 0.15f;
+ this.legLength = 0.78f;
+ this.legWidth = 0.3f;
+ this.neckHeight = 0.3f;
+ this.headRadius = 0.18f;
}
/**