Hi,
We are working with cyber glove and so i have used
Draggable class to specify a transform group thats
draggable and also we want to specify the
interpolation operation on this transform group once
its draggable function is done.
heres the piece of code
***************************
1#--
Draggable.add (locale, objTranslate, box);
//add the path interpolators
//add interpolation objects with initial values
Quat4f[] q = new Quat4f[2];
Point3f[] p =new Point3f[2];
Alpha alpha = null;
Transform3D ax = new Transform3D();
float k[]= {0.0f,1.0f};
p[0] = new Point3f(0.0f,0.0f,0.0f);
p[1] = new Point3f(0.0f,0.0f,0.0f);
q[0]=new Quat4f(0.0f,1.0f,1.0f,0.0f);
q[1]=new Quat4f(0.0f,1.0f,1.0f,0.0f);
//default setting for interpolations
rot = new
RotPosPathInterpolator(alpha,objTranslate,ax,k,q,p);
rot.setSchedulingBounds(new BoundingSphere());
//
objRoot.addChild(rot);
//
2#----
private void setPositions(Point3f[] p)
{newPos = p;}
private void setQuaternions(Quat4f[] q)
{newQuats = q;}
private void setKnots(float[] f)
{newKnots = f;}
private void setObjectInMotion()
{
Alpha newAlpha = new Alpha(1,10000);
//setting the new values for the interpolator and
moving the objects
rot.setPathArrays(newKnots,newQuats,newPos);
rot.setAlpha(newAlpha);
}
------
*******************************
and also coded a method that sets the new value for
position and quaternions as well knots and sets the
alpha value for the interpolation so that the
interpolation works..
but i m not getting any runtime error though, but once
i set the alpha value to the interpolator object the
object in interpolation should start moving but i am
not experiencing the same. The object remains where it
is.
All the same methods and code work if i use if for
mouse dragging, but when i use for the cyberglove
there is some issue which i could not forsee.
Am i doing something wrong. Can anyone help me out in
this regard.
thanks in advance.
ram
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
===========================================================================
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".