diff options
author | Steve <steveb9@u.washington.edu> | 2011-03-18 02:08:33 +0000 |
---|---|---|
committer | Steve <steveb9@u.washington.edu> | 2011-03-18 02:08:33 +0000 |
commit | 544548ac412807b38295bfb4c1159c6980ef90ff (patch) | |
tree | d2e0569af37098f2a6b76d66b8cca83521f860c5 /src | |
parent | 8177b32a6bf985826acab6df25e313edb50104cd (diff) |
commented out the CollisionDetector work around 275, 276
Added transient declaration to my_blimp
Pass fin colorAttributes instead of texture
Diffstat (limited to 'src')
-rw-r--r-- | src/common/CollisionDetector.java | 4 | ||||
-rw-r--r-- | src/tesseract/objects/blimp/Blimp.java | 19 |
2 files changed, 13 insertions, 10 deletions
diff --git a/src/common/CollisionDetector.java b/src/common/CollisionDetector.java index f193a29..dbe2b15 100644 --- a/src/common/CollisionDetector.java +++ b/src/common/CollisionDetector.java @@ -272,8 +272,8 @@ public class CollisionDetector { if (a instanceof Sphere && b instanceof Sphere)
return calculateCollisions((Sphere)a, (Sphere)b);
- if (!a.getBounds().intersect(b.getBounds()))
- return EMPTY_COLLISION_LIST;
+ /*if (!a.getBounds().intersect(b.getBounds()))
+ return EMPTY_COLLISION_LIST;*/
if (a instanceof Particle)
return calculateCollisions((Particle)a, b);
diff --git a/src/tesseract/objects/blimp/Blimp.java b/src/tesseract/objects/blimp/Blimp.java index 1613a65..3d044e2 100644 --- a/src/tesseract/objects/blimp/Blimp.java +++ b/src/tesseract/objects/blimp/Blimp.java @@ -45,6 +45,7 @@ import com.sun.j3d.utils.image.TextureLoader; *
*/
public class Blimp extends RemoteObject {
+
KeyInfo lastEvent;
/**
@@ -55,7 +56,7 @@ public class Blimp extends RemoteObject { private final int MAX_TURN = 32;
private final float MAX_SPEED = .3f;
private Vector3f[] vectors;
- private TransformGroup my_blimp;
+ transient TransformGroup my_blimp;
private int my_bomb_count = 0;
/**
@@ -151,7 +152,7 @@ public class Blimp extends RemoteObject { vectors = gi.getNormals();
//fin1
- TextureLoader tl = new TextureLoader("lava.jpg", null);
+ /*TextureLoader tl = new TextureLoader("lava.jpg", null);
ImageComponent2D image = tl.getImage();
int width = image.getWidth();
int height = image.getHeight();
@@ -166,13 +167,16 @@ public class Blimp extends RemoteObject { texture.setImage(imageLevel, tl.getScaledImage(width, height));
}
texture.setMagFilter(Texture2D.NICEST);
- texture.setMinFilter(Texture2D.NICEST);
- Material mat = new Material();
- mat.setDiffuseColor(1, 0, 0);
+ texture.setMinFilter(Texture2D.NICEST);*/
+ //Material mat = new Material();
+ ///mat.setDiffuseColor(1, 1, 1);
Appearance appearance = new Appearance();
- appearance.setTexture(texture);
- appearance.setMaterial(mat);
+ //appearance.setTexture(texture);
+ //appearance.setMaterial(mat);
+
+ appearance.setColoringAttributes(new ColoringAttributes(new Color3f(.1f,.1f,.3f),
+ ColoringAttributes.FASTEST));
BlimpFin fin = new BlimpFin(1, new Vector3f(0f * my_scale,
@@ -257,7 +261,6 @@ public class Blimp extends RemoteObject { */
protected void keyEventReceived(final KeyInfo event) {
lastEvent = event;
- Vector3f temp = new Vector3f();
Transform3D currentOrientation = new Transform3D();
my_blimp.getTransform(currentOrientation);
Transform3D rollRight = new Transform3D();
|