> What I would like to do is to make a simple animation that a cone rotates.
> I was able to set rotation values to keyValue filed. But still, my program
> doesn't work. Could you tell me what the problem is?
> Following are the sorce code. I am using TGS OIV 2.6 on Windows 98.
There are two small bugs in this program:
1) The interpolator is changing the transform in the Transform node,
but your geometry is not a child of the Transform node and is not
affected by the change. Specifically:
root->addChild(myShape);
Should be:
mytrans->addChild(myShape);
2) The interpolator output is routed to an output port on the Transform
node instead of an input port. Specifically:
SoDB::createRoute(myOriInter,"value_changed",mytrans,"rotation_changed");
should be:
SoDB::createRoute(myOriInter,"value_changed",mytrans,"set_rotation");
Other than that it seems to work.
-Mike
TGS Inc, http://www.tgs.com
|