Hi Partrick, You could use modeTrans.get() if the code block that works, but transform.get() in the one that fails.
Robert. On 18 February 2013 02:05, Patrick Keenan <[email protected]> wrote: > I have some unexpected behavior which is illustrated by the following code: > > > Code: > > stationaryModels.push_back(new MillModel("../Models/bigservo.osgb", > > osg::Matrix::translate(6000.0f, 0.0f, 200.0f), > > osg::Matrix::rotate(osg::inDegrees(0.0f),0.0f,0.0f,1.0f), > > MillModel::GREEN_OUTLINE, > > std::string(" ") > )); > for(int i = 0; i < stationaryModels.size(); i++) //todo use an > iterator > { > if (stationaryModels[i]->proxNode) > { > > tmp_root->addChild(stationaryModels[i]->modelTrans.get()); > } > } > > // todo Why isn't the outline shown in the following? > //for(std::vector<MillModel*>::iterator it = > stationaryModels.begin(); it != stationaryModels.end(); it++) > //{ > // if ((*it)->proxNode) > // { > // tmp_root->addChild((*it)->transform.get()); > // } > //} > > > > > > > My MillModel class creates osg::ref_ptr 's to transformations whose children > are my proxyNode models and adds some text and the osg::outline to the > models. Why would stationaryModels[i]->transform.get() be any different from > (*it)->transform.get()? I thought they were equivalent. Everything is fine > with the second (preferred) option except the osg::outline. > > PK > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=52721#52721 > > > > > Attachments: > http://forum.openscenegraph.org//files/stepper1_355.png > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

