Hi Folks, I have an AutoTransform set to maintain the axes model to the same screen size but I'm guessing I'm using it incorrectly. It behaves just like a scale node with a constant fixed scale instead of changing the scale to maintain a constant screen size. I've tried all sorts of param's for Min/Max scale. Code snip:
// Load an example model to show the XYZ axes. // in (m), hence the MatrixTransform. std::string modelFilename = std::string(getenv("APP_SIM_DATA_PATH")) + "/models/axes.osgt"; osg::ref_ptr<osg::Node> loadedModel = osgDB::readRefNodeFile(modelFilename); if (APP_VERIFY(nullptr != loadedModel.get())) { // Add an autotransform to make the axes the same size on the screen. osg::ref_ptr<osg::AutoTransform> at = new osg::AutoTransform; at->addChild(loadedModel); at->setAutoScaleToScreen(true); at->setMinimumScale(0.1); at->setMaximumScale(10.0); // Add the model scene_->addChild(at); } // if loadedModel else { APP_LOG_ERROR( "App::DidInitialize: Model not loaded %s", modelFilename.c_str()); } Thoughts? -Brad
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org