@@ -102,6 +102,14 @@ public BoundingBox(BoundingBox source) {
102102        this .zExtent  = source .zExtent ;
103103    }
104104
105+     /** 
106+      * Instantiate a BoundingBox with the specified extremes. 
107+      * 
108+      * @param min the desired minimum coordinate value for each axis (not null, 
109+      * not altered) 
110+      * @param max the desired maximum coordinate value for each axis (not null, 
111+      * not altered) 
112+      */ 
105113    public  BoundingBox (Vector3f  min , Vector3f  max ) {
106114        setMinMax (min , max );
107115    }
@@ -1009,18 +1017,38 @@ public Vector3f getExtent(Vector3f store) {
10091017        return  store ;
10101018    }
10111019
1020+     /** 
1021+      * Determine the X-axis distance between the center and the boundary. 
1022+      * 
1023+      * @return the distance 
1024+      */ 
10121025    public  float  getXExtent () {
10131026        return  xExtent ;
10141027    }
10151028
1029+     /** 
1030+      * Determine the Y-axis distance between the center and the boundary. 
1031+      * 
1032+      * @return the distance 
1033+      */ 
10161034    public  float  getYExtent () {
10171035        return  yExtent ;
10181036    }
10191037
1038+     /** 
1039+      * Determine the Z-axis distance between the center and the boundary. 
1040+      * 
1041+      * @return the distance 
1042+      */ 
10201043    public  float  getZExtent () {
10211044        return  zExtent ;
10221045    }
10231046
1047+     /** 
1048+      * Alter the X-axis distance between the center and the boundary. 
1049+      * 
1050+      * @param xExtent the desired distance (≥0) 
1051+      */ 
10241052    public  void  setXExtent (float  xExtent ) {
10251053        if  (xExtent  < 0 ) {
10261054            throw  new  IllegalArgumentException ();
@@ -1029,6 +1057,11 @@ public void setXExtent(float xExtent) {
10291057        this .xExtent  = xExtent ;
10301058    }
10311059
1060+     /** 
1061+      * Alter the Y-axis distance between the center and the boundary. 
1062+      * 
1063+      * @param yExtent the desired distance (≥0) 
1064+      */ 
10321065    public  void  setYExtent (float  yExtent ) {
10331066        if  (yExtent  < 0 ) {
10341067            throw  new  IllegalArgumentException ();
@@ -1037,6 +1070,11 @@ public void setYExtent(float yExtent) {
10371070        this .yExtent  = yExtent ;
10381071    }
10391072
1073+     /** 
1074+      * Alter the Z-axis distance between the center and the boundary. 
1075+      * 
1076+      * @param zExtent the desired distance (≥0) 
1077+      */ 
10401078    public  void  setZExtent (float  zExtent ) {
10411079        if  (zExtent  < 0 ) {
10421080            throw  new  IllegalArgumentException ();
@@ -1045,6 +1083,12 @@ public void setZExtent(float zExtent) {
10451083        this .zExtent  = zExtent ;
10461084    }
10471085
1086+     /** 
1087+      * Determine the minimum coordinate value for each axis. 
1088+      * 
1089+      * @param store storage for the result (modified if not null) 
1090+      * @return either storeResult or a new vector 
1091+      */ 
10481092    public  Vector3f  getMin (Vector3f  store ) {
10491093        if  (store  == null ) {
10501094            store  = new  Vector3f ();
@@ -1053,6 +1097,12 @@ public Vector3f getMin(Vector3f store) {
10531097        return  store ;
10541098    }
10551099
1100+     /** 
1101+      * Determine the maximum coordinate value for each axis. 
1102+      * 
1103+      * @param store storage for the result (modified if not null) 
1104+      * @return either storeResult or a new vector 
1105+      */ 
10561106    public  Vector3f  getMax (Vector3f  store ) {
10571107        if  (store  == null ) {
10581108            store  = new  Vector3f ();
@@ -1061,6 +1111,14 @@ public Vector3f getMax(Vector3f store) {
10611111        return  store ;
10621112    }
10631113
1114+     /** 
1115+      * Reconfigure with the specified extremes. 
1116+      * 
1117+      * @param min the desired minimum coordinate value for each axis (not null, 
1118+      * not altered) 
1119+      * @param max the desired maximum coordinate value for each axis (not null, 
1120+      * not altered) 
1121+      */ 
10641122    public  void  setMinMax (Vector3f  min , Vector3f  max ) {
10651123        this .center .set (max ).addLocal (min ).multLocal (0.5f );
10661124        xExtent  = FastMath .abs (max .x  - center .x );
@@ -1090,4 +1148,4 @@ public void read(JmeImporter e) throws IOException {
10901148    public  float  getVolume () {
10911149        return  (8  * xExtent  * yExtent  * zExtent );
10921150    }
1093- }
1151+ }
0 commit comments