From bef20e27682d3468b9943286a7ce6fa681981757 Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Sun, 15 Jan 2012 16:56:59 -0800 Subject: j3dcore: format BoundingSphere constructors to alwats set the state in the same order Set in the order: boundId, center, radius. Signed-off-by: Harvey Harrison --- .../share/javax/media/j3d/BoundingSphere.java | 57 +++++++++++----------- 1 file changed, 28 insertions(+), 29 deletions(-) (limited to 'src/classes/share') diff --git a/src/classes/share/javax/media/j3d/BoundingSphere.java b/src/classes/share/javax/media/j3d/BoundingSphere.java index 18b4e3c..e2f28f0 100644 --- a/src/classes/share/javax/media/j3d/BoundingSphere.java +++ b/src/classes/share/javax/media/j3d/BoundingSphere.java @@ -59,33 +59,32 @@ double radius; private BoundingBox tmpBox = null; private BoundingPolytope tmpPolytope = null; - /** - * Constructs and initializes a BoundingSphere from a center and radius. - * @param center the center of the bounding sphere - * @param radius the radius of the bounding sphere - */ - public BoundingSphere(Point3d center, double radius) { +/** + * Constructs and initializes a BoundingSphere from a center and radius. + * @param center the center of the bounding sphere + * @param radius the radius of the bounding sphere + */ +public BoundingSphere(Point3d center, double radius) { + boundId = BOUNDING_SPHERE; this.center = new Point3d(center); this.radius = radius; - boundId = BOUNDING_SPHERE; updateBoundsStates(); - } - /** - * Constructs and initializes a BoundingSphere with radius = 1 at 0 0 0. - */ - public BoundingSphere() { +} + +/** + * Constructs and initializes a BoundingSphere with radius = 1 at 0 0 0. + */ +public BoundingSphere() { boundId = BOUNDING_SPHERE; center = new Point3d(); radius = 1.0; - } - - /** - * Constructs and initializes a BoundingSphere from a bounding object. - * @param boundsObject a bounds object - */ - public BoundingSphere(Bounds boundsObject) { - int i; +} +/** + * Constructs and initializes a BoundingSphere from a bounding object. + * @param boundsObject a bounds object + */ +public BoundingSphere(Bounds boundsObject) { boundId = BOUNDING_SPHERE; center = new Point3d(); @@ -129,7 +128,7 @@ double radius; (polytope.verts[0].z - center.z)* (polytope.verts[0].z - center.z)); - for(i=1;i