forked from MrBly/WalnutiQ
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BoundingBox.java
32 lines (27 loc) · 858 Bytes
/
BoundingBox.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package model.util;
/**
* @author Quinn Liu ([email protected])
* @version June 30, 2014
*/
public class BoundingBox {
private double width, height, depth;
public BoundingBox(double width, double height, double depth) {
if (width < 0 || height < 0 || depth < 0) {
throw new IllegalArgumentException("In class BoundingBox constructor method one of the input parameters" +
" are invalid because it is less than 0. Currently width = " + width + ", height = " + height +
", and depth = " + depth);
}
this.width = width;
this.height = height;
this.depth = depth;
}
public double getWidth() {
return this.width;
}
public double getHeight() {
return this.height;
}
public double getDepth() {
return this.depth;
}
}