In my Final year project.
There is a bit where I need to do a robotic arm.
And when ever an instruction is read and a value is given.
I want to move the arm at a animated style.
I've try to used Behvior class at first and used WakeuponElapsedtime as the
basic way to move object.
To get a smooth animation I was told I need to use RotationINterporlator to
so. But, I can treat it like Behavior class and extends to write a different
class. It would not compile and gave me an errror saying that
RotationInterporlator is design not to be a public class and not to be used
out side the package.
If I try to write out the object in the create Scence Graph method, than I
can do wakeupcriteria check.
Please help if there is other solution to this problem.
yours sincerely
Raymond Lau
This is the error generated
MouseNavigatorApp.java:93: RotationInterpolator() is not public in
javax.media.j
3d.RotationInterpolator; cannot be accessed from outside package
objTurn(Alpha alpha, TransformGroup targetTG){
^
This is the part of the code
public class objTurn extends RotationInterpolator{
private TransformGroup targetTG;
private Alpha alpha;
private AxisAngle4f spinny;
private Transform3D rotatey= new Transform3D();
objTurn(Alpha alpha, TransformGroup targetTG){
this.alpha=alpha;
this.targetTG=targetTG;
}
public void initialize(){
spinny = new AxisAngle4f(0.0f,1.0f,0.0f,(float)(Math.PI*2.0));
rotatey.set(spinny);
this.wakeupOn(new WakeupOnElapsedTime(500));
}
public void processStimulus(Enumeration criteria){
this.setMinimumAngle(0.0f);
this.setMaximumAngle((float)(Math.PI*2.0));
this.setSchedulingBounds(new BoundingSphere());
this.setAxisOfRotation(rotatey);
this.setTarget(targetTG);
this.wakeupOn(new WakeupOnElapsedTime(500));
}
}
===========================================================================
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".