> MIME-Version: 1.0
> Content-Disposition: inline
> Content-Transfer-Encoding: 8bit
> X-MIME-Autoconverted: from quoted-printable to 8bit by mail.java.sun.com id
eBJ8evK20766
> Date: Tue, 19 Dec 2000 09:34:42 +0100
> From: Nenad Latinovic <[EMAIL PROTECTED]>
> Subject: [JAVA3D] PickingCallback
> To: [EMAIL PROTECTED]
>
> Hello everyone,
> nobody answered to that, so I decided to try it again.
>
> I wrote a Class named PickHandler which implements the PickingCallback
> interface. When registering this Class to
> the according PickBehaviors i noticed something funny. Registering to
> PickRotateBehavior and to PickZoomBehavior
> is just fine. But when registering to PickTranslateBehavior one get's the
> following compile error:
>
> .\com\dcag\artos\groove\threed\StereoUniverse.java:693: Invalid type
expression.
>
> objectTranslate.setupCallback((PickingCallback)new
> PickHandler())
> ^
> By the way, it doesn't matter if you cast or not. Looks like a bug to me. Is
it
> already known yet?
>
This is not a known bug (to see if a bug is already on file check the
Bug Parade database at:
http://developer.java.sun.com/developer/bugParade/index.html).
I tried to write a sample program (attached) from your description but could
not get the error. Could you please send a small test case that demonstrates
the problem to [EMAIL PROTECTED] so we can look into this?
Thanks,
Dan Petersen
Java 3D Team
Sun Microsystems
import javax.vecmath.*;
import javax.media.j3d.*;
import com.sun.j3d.utils.picking.*;
import com.sun.j3d.utils.picking.behaviors.*;
class b implements PickingCallback {
static public void main(String args[]) {
b bInst = new b();
Canvas3D c = new Canvas3D(null);
BranchGroup bg = new BranchGroup();
BoundingSphere bounds = new BoundingSphere(new Point3d(0.0, 0.0, 0.0),
100.0);
PickZoomBehavior zoom = new PickZoomBehavior(bg, c, bounds);
PickTranslateBehavior xlate = new PickTranslateBehavior(bg, c, bounds);
zoom.setupCallback(bInst);
xlate.setupCallback(bInst);
}
public void transformChanged( int type, TransformGroup transform ) {
}
}