I want to drag an object across the screen. So I thought this would work
.
.
.
x = ((MouseEvent)event[i]).getX();
y = ((MouseEvent)event[i]).getY();
Point3d position = new Point3d();
canvas3D.getPixelLocationInImagePlate(x, y, position);
Transform3D imagePlateToVworld = new Transform3D();
canvas3D.getImagePlateToVworld(imagePlateToVworld);
imagePlateToVworld.transform(position);
transformGroup.getTransform(transformX);
Transform3D translationDelta = new Transform3D();
Vector3f translation = new Vector3f();
translation.x = position.x-x_last;
translation.y = position.y-y_last;
transDelta.set(translation);
x_last = position.x;
y_last = position.y;
transformX.mul(viewPlaneTransform);
transformX.mul(translationDelta);
transformX.mul(viewPlaneTransformInverted);
transformGroup.setTransform(transformX);
The final transform is close, but no cigar if there is a rotation in the
viewPlane transform.
I would appreciate any help on this.
Jim
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".