From be276b5fa3ae85a5769d3a9fcb6397bc9aabb14e Mon Sep 17 00:00:00 2001 From: Steve Date: Fri, 18 Mar 2011 04:35:20 +0000 Subject: Adjustments --- src/tesseract/objects/blimp/BlimpFin.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/tesseract/objects/blimp/BlimpFin.java') diff --git a/src/tesseract/objects/blimp/BlimpFin.java b/src/tesseract/objects/blimp/BlimpFin.java index 9d62bd8..4de5b09 100644 --- a/src/tesseract/objects/blimp/BlimpFin.java +++ b/src/tesseract/objects/blimp/BlimpFin.java @@ -8,7 +8,6 @@ package tesseract.objects.blimp; import javax.media.j3d.Appearance; -import javax.media.j3d.ColoringAttributes; import javax.media.j3d.Geometry; import javax.media.j3d.ImageComponent2D; import javax.media.j3d.Material; @@ -45,6 +44,11 @@ public class BlimpFin extends PhysicalObject { */ public static final int DEFAULT_DIVISIONS = 4; + /** + * The appearance of this fin + */ + private Appearance my_appearance; + /** * Create a new Ellipsoid. * @@ -54,9 +58,11 @@ public class BlimpFin extends PhysicalObject { * @param divisions an in for the shape divisions. */ public BlimpFin( final float mass, final Vector3f position, - final float radius) { + final float radius, final Appearance appearance) { super(position, mass); + my_appearance = appearance; + setShape(createShape(radius, DEFAULT_DIVISIONS)); /*if (inverseMass != 0) { @@ -90,14 +96,11 @@ public class BlimpFin extends PhysicalObject { new NormalGenerator().generateNormals(gInfo); gInfo.convertToIndexedTriangles(); Shape3D fin = new Shape3D(gInfo.getGeometryArray()); - Appearance appearance = new Appearance(); - appearance.setColoringAttributes(new ColoringAttributes(new Color3f(.1f,.1f,.3f), - ColoringAttributes.FASTEST)); PolygonAttributes polyAttr = new PolygonAttributes(PolygonAttributes.POLYGON_FILL, PolygonAttributes.CULL_NONE, 0); - appearance.setPolygonAttributes(polyAttr); + my_appearance.setPolygonAttributes(polyAttr); geometry.setCapability(Geometry.ALLOW_INTERSECT); - fin = new Shape3D(geometry, appearance); + fin = new Shape3D(geometry, my_appearance); Transform3D rotate = new Transform3D(); rotate.rotY(Math.PI / 4); TransformGroup tg = new TransformGroup(rotate); -- cgit v1.2.3