I have one problem.
I use VRML97 file as input file.
(VRML97 source example)---------------------------------------------
DEF VRMLCone Transform {translation -3 0 0 children [
Shape { geometry Cone { bottomRadius 1 height 2 }
appearance Appearance {
material DEF Mat2 Material { diffuseColor 0 1 0 }
}
}
]}
------------------------------------------------------------------------------------
After parsing the input file, and then Java3D scene graph is constructed.
And I added RotationInterpolator and PositionInterpolator the scene graph.
Two interpolators use TransformGroup of Java3D as their target.
I thought that the first line in above VRML97 sourcef will be have an effect such as
Transform3D t3d = new Transform();
t3d.setTranslation(new Vector3f(-3.0f, 0.0f, 0.0f));
TransformGroup tg = new TransformGroup(t3d));
RotationInterpolator rotInt = new RotationInterpolator(alpha, tg);
However, the result window of my program always show only the effect such as
Transform3D t3d = new Transform();
t3d.setTranslation(new Vector3f(0.0f, 0.0f, 0.0f));
TransformGroup tg = new TransformGroup(t3d));
RotationInterpolator rotInt = new RotationInterpolator(alpha, tg);
I don't know what is wrong....
Arbitrarily, If I set like below
Transform3D t3d = new Transform();
t3d.setTranslation(new Vector3f(0.0f, 0.0f, 0.0f));
TransformGroup tg = new TransformGroup(t3d));
RotationInterpolator rotInt = new RotationInterpolator(alpha, tg);
Transform3D new_t3d = new Transform();
TransformGroup new_tg = new TransformGroup(new_t3d));
t3d.setTranslation(new Vector3f(-3.0f, 0.0f, 0.0f));
rotInt.setTarget(new_tg);
the effect is represented in only the first frame.
Whit is wrong? please give me an answer...
==============================================
161 Gajeong-dong, Yuseong-gu, Daejeon 305-350, Korea
Electronics and Telecommunications Research Insititute
Computer Software Technology Laboratory
Virtual Reality Research Center
Image-based Rendering Team
Sungye Kim
tel : 042-860-5828
fax : 042-860-1051
pcs : 016-343-2375
homepage : http://129.254.76.244
http://insideblue.hihome.com
e-mail : [EMAIL PROTECTED]
==============================================