diff options
author | Steve <steveb9@u.washington.edu> | 2011-02-18 09:52:15 +0000 |
---|---|---|
committer | Steve <steveb9@u.washington.edu> | 2011-02-18 09:52:15 +0000 |
commit | ca82b8a601c67e6731bc06d212fb2153a4170c0c (patch) | |
tree | 891ab518e8e9e4e84419b33768d8b16b1ab2c830 /src/tesseract/objects/Ellipsoid.java | |
parent | af467cea40b760221244a6ce23c4e04ca2d3f37a (diff) |
Fixed picking of ellipsoid
Particle had same problem fixed
They were both returning a TG instead of a Node so added pick coded to both
Added InertiaTensor to Planar polygon
Diffstat (limited to 'src/tesseract/objects/Ellipsoid.java')
-rw-r--r-- | src/tesseract/objects/Ellipsoid.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tesseract/objects/Ellipsoid.java b/src/tesseract/objects/Ellipsoid.java index c3199ab..25c924e 100644 --- a/src/tesseract/objects/Ellipsoid.java +++ b/src/tesseract/objects/Ellipsoid.java @@ -110,12 +110,13 @@ public class Ellipsoid extends PhysicalObject { private TransformGroup createDefaultEllipsoid(final float radius, final float a,
final float b, final float c) {
- Sphere sphere = new Sphere(radius, new Sphere().getPrimitiveFlags(), DEFAULT_DIVISIONS);
- // | Sphere.ENABLE_GEOMETRY_PICKING,
- // DEFAULT_DIVISIONS);
+ Sphere sphere = new Sphere(radius, new Sphere().getPrimitiveFlags() | Sphere.ENABLE_GEOMETRY_PICKING,
+ DEFAULT_DIVISIONS);
Transform3D tmp = new Transform3D();
tmp.set(new Matrix3f(a, 0.0f, 0.0f, 0.0f, b, 0.0f, 0.0f, 0.0f, c));
TransformGroup tg = new TransformGroup(tmp);
+ tg.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
+ tg.setCapability(TransformGroup.ENABLE_PICK_REPORTING);
tg.addChild(sphere);
return tg;
}
|