diff options
-rw-r--r-- | src/Material.java | 51 | ||||
-rw-r--r-- | src/RobotRace.java | 51 |
2 files changed, 51 insertions, 51 deletions
diff --git a/src/Material.java b/src/Material.java new file mode 100644 index 0000000..1968e7f --- /dev/null +++ b/src/Material.java @@ -0,0 +1,51 @@ +/** + * Materials that can be used for the robots. + */ +public enum Material { + + /** + * Gold material properties. + * Modify the default values to make it look like gold. + */ + GOLD ( + new float[] {0.8f, 0.8f, 0.8f, 1.0f}, + new float[] {0.0f, 0.0f, 0.0f, 1.0f}), + + /** + * Silver material properties. + * Modify the default values to make it look like silver. + */ + SILVER ( + new float[] {0.8f, 0.8f, 0.8f, 1.0f}, + new float[] {0.0f, 0.0f, 0.0f, 1.0f}), + + /** + * Wood material properties. + * Modify the default values to make it look like wood. + */ + WOOD ( + new float[] {0.8f, 0.8f, 0.8f, 1.0f}, + new float[] {0.0f, 0.0f, 0.0f, 1.0f}), + + /** + * Orange material properties. + * Modify the default values to make it look like orange. + */ + ORANGE ( + new float[] {0.8f, 0.8f, 0.8f, 1.0f}, + new float[] {0.0f, 0.0f, 0.0f, 1.0f}); + + /** The diffuse RGBA reflectance of the material. */ + float[] diffuse; + + /** The specular RGBA reflectance of the material. */ + float[] specular; + + /** + * Constructs a new material with diffuse and specular properties. + */ + private Material(float[] diffuse, float[] specular) { + this.diffuse = diffuse; + this.specular = specular; + } +} diff --git a/src/RobotRace.java b/src/RobotRace.java index f064de8..61edd34 100644 --- a/src/RobotRace.java +++ b/src/RobotRace.java @@ -286,57 +286,6 @@ public class RobotRace extends Base { } /** - * Materials that can be used for the robots. - */ - public enum Material { - - /** - * Gold material properties. - * Modify the default values to make it look like gold. - */ - GOLD ( - new float[] {0.8f, 0.8f, 0.8f, 1.0f}, - new float[] {0.0f, 0.0f, 0.0f, 1.0f}), - - /** - * Silver material properties. - * Modify the default values to make it look like silver. - */ - SILVER ( - new float[] {0.8f, 0.8f, 0.8f, 1.0f}, - new float[] {0.0f, 0.0f, 0.0f, 1.0f}), - - /** - * Wood material properties. - * Modify the default values to make it look like wood. - */ - WOOD ( - new float[] {0.8f, 0.8f, 0.8f, 1.0f}, - new float[] {0.0f, 0.0f, 0.0f, 1.0f}), - - /** - * Orange material properties. - * Modify the default values to make it look like orange. - */ - ORANGE ( - new float[] {0.8f, 0.8f, 0.8f, 1.0f}, - new float[] {0.0f, 0.0f, 0.0f, 1.0f}); - - /** The diffuse RGBA reflectance of the material. */ - float[] diffuse; - - /** The specular RGBA reflectance of the material. */ - float[] specular; - - /** - * Constructs a new material with diffuse and specular properties. - */ - private Material(float[] diffuse, float[] specular) { - this.diffuse = diffuse; - this.specular = specular; - } - } - * Implementation of a camera with a position and orientation. */ private class Camera { |