Skip to content

Commit

Permalink
Fix Sphere not setting material
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedro Henrique committed Dec 20, 2016
1 parent fdc6331 commit c4a0afb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/tracer/model/Sphere.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public Sphere(Vector3 center, float radius) {
* @param material the sphere material
*/
public Sphere(Vector3 center, float radius, Material material) {
super(material);
this.center = Objects.requireNonNull(center, "The center can not be null.").copy();
if (radius <= 0) {
throw new IllegalArgumentException("The radius should be greater than 0.");
Expand Down

0 comments on commit c4a0afb

Please sign in to comment.