Hi,

  FYI, the technique explained by Thibault is also used in the example
Picking from the QuictStartGuide source code for the selected object.

Good luck!

2007/6/26, Thibault Genessay <[EMAIL PROTECTED]>:

Hi Fernando


On 6/26/07, Fernando Giovanini <[EMAIL PROTECTED]> wrote:
>
> Hello all,
>
> I would like to know how can I animate (what class I have to use, how I
> use those classes) an object like a Sphere ou a  Cube.
> I just need to make those objects rotate, translate and chage de fps
> rate.


You'll have to place the nodes which you want to animate separately under
their own osg::MatrixTransform nodes, i.e. if the cube and the sphere need
to rotate or move separately, use 2 matrix transforms. Then, you define one
or several update callbacks on these nodes. You use the timestamp provided
by the callback to compute the rotation amounts, you define the
transformation matrix which you apply to the parent osg::MatrixTransform
node.

Have a look at the osggeometry example, more precisely at how the
background is animated (the class MyTransformCallback is what you are
looking for).

Cheers

Thibault


Thanks,
> Fernando
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/
>


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to