0

I am totally new with OpenSceneGraph

I can open and save an OSG asset. I need to do some simple transformations on it, like dimension scaling/rotation/translation.

It seems a pretty easy task, anyway I can't find any quick documentation :/

osg::ref_ptr<osg::Node> rectangle = osgDB::readNodeFile("../../inputs/Rectangle.osg");

// define simple transformation matrix
// apply  simple trnasformation matrix

osgDB::writeNodeFile(*rectangle, "../../outputs/saved.osg");

Any hint?

  • 1
    If you download the [latest stable source](http://www.openscenegraph.org/index.php/download-section/stable-releases) you'll find many examples. – G.M. Feb 11 '20 at 16:48

1 Answers1

0

Use class osg::MatrixTransform, see for instance this example

rickyviking
  • 846
  • 6
  • 17