info-inventor-dev
[Top] [All Lists]

Re: About SoVRMLOrientationInterpolator in TGS inventor

To: SMTP@xxxxxxx
Subject: Re: About SoVRMLOrientationInterpolator in TGS inventor
From: mmh@xxxxxxx (Mike Heck)
Date: Mon, 30 Jul 2001 17:23:29 -0700 (PDT)
Cc: "info-inventor-dev@xxxxxxxxxxx"@tgs.com
Sender: owner-info-inventor-dev@xxxxxxxxxxx
 > 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

<Prev in Thread] Current Thread [Next in Thread>