aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes
diff options
context:
space:
mode:
authorHarvey Harrison <[email protected]>2012-01-14 15:23:46 -0800
committerHarvey Harrison <[email protected]>2012-01-14 15:23:46 -0800
commitfd03c27a1a4d3a295f9cb9606bba4f96478a8bcc (patch)
tree489d40ecf49aa617c342e5e07c9280ca5501d464 /src/classes
parente2cd2a8c0eed5ccc0f3c0f1e07ad0a7f08b733c3 (diff)
j3dcore: annotate Point3d members of BoundingBox as final
Signed-off-by: Harvey Harrison <[email protected]>
Diffstat (limited to 'src/classes')
-rw-r--r--src/classes/share/javax/media/j3d/BoundingBox.java34
1 files changed, 16 insertions, 18 deletions
diff --git a/src/classes/share/javax/media/j3d/BoundingBox.java b/src/classes/share/javax/media/j3d/BoundingBox.java
index 1aa1fde..25b0a94 100644
--- a/src/classes/share/javax/media/j3d/BoundingBox.java
+++ b/src/classes/share/javax/media/j3d/BoundingBox.java
@@ -46,17 +46,15 @@ import com.sun.j3d.internal.HashCodeUtil;
public class BoundingBox extends Bounds {
- /**
- * The corner of the bounding box with the numerically smallest
- * values.
- */
- Point3d lower;
+/**
+ * The corner of the bounding box with the numerically smallest values.
+ */
+final Point3d lower;
- /**
- * The corner of the bounding box with the numerically largest
- * values.
- */
- Point3d upper;
+/**
+ * The corner of the bounding box with the numerically largest values.
+ */
+final Point3d upper;
private Point3d centroid = null;
private static final double EPS = 1.0E-8;
@@ -188,14 +186,14 @@ public class BoundingBox extends Bounds {
public BoundingBox(Bounds[] bounds) {
int i=0;
- upper = new Point3d();
- lower = new Point3d();
+ upper = new Point3d();
+ lower = new Point3d();
boundId = BOUNDING_BOX;
if( bounds == null || bounds.length <= 0 ) {
- // Negative volume.
- lower = new Point3d( 1.0d, 1.0d, 1.0d);
- upper = new Point3d(-1.0d, -1.0d, -1.0d);
+ // Negative volume.
+ lower.set(1.0d, 1.0d, 1.0d);
+ upper.set(-1.0d, -1.0d, -1.0d);
updateBoundsStates();
return;
}
@@ -206,9 +204,9 @@ public class BoundingBox extends Bounds {
}
if( i >= bounds.length ) { // all bounds objects were empty
- // Negative volume.
- lower = new Point3d( 1.0d, 1.0d, 1.0d);
- upper = new Point3d(-1.0d, -1.0d, -1.0d);
+ // Negative volume.
+ lower.set(1.0d, 1.0d, 1.0d);
+ upper.set(-1.0d, -1.0d, -1.0d);
updateBoundsStates();
return;
}