Dear professionals,
I have a special problem that views a virtual campus. But
initially, I have a background with geometric shapes. I have used the Key
Navigator Behavior for keyboard events. I also wanted to have a gui
interface that will enable one to rotate up, down , left and right and to
zoom in or out a particular view..
The Keyboard Navigator behavior obtains the coordinates of the
view platform from the getViewPlatformTransform method of ViewPlatform..
I also did this for my GUI component that rotatates in increments
of +-0.8 radians. The method does not extend the behavior interface(I am
not sure this is an interface) But here is the code segment:
From the action listener:
byuplat = simpleU.getViewingPlatform().getViewPlatformTranform();
action=new ActionListener();
{
if(event.getSource()_ ==up)
{
simplebehavior myrotationbehavior = new
simplebehavior(byuplat);
}
}
public class simplebehavior extends TransformGroup
{
public TransformGroup targetTG = new Transformgroup();
public Transform3D rotation = new Transform3D();
public double angle = 0.0;
simplebehavior(Transform targetTG){
this.targetTG;
actionevent();
}
public void actionevent()
{
angle += 0.08;
rotation.rotX(angle);
targetTG.setTransform(rotation);
}
}
When I press the up button, it only translate to one
translation.
Do I have to use interpolators and make the button actionlistener
point to that behavior?
Thanks !!!
Bam-Bam
===========================================================================
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".