1. 创建变换函数:
osg::ref_ptr<osg::Node> CreateAutoTransform(osg::Vec3& position,float nSize,std::string&lable,
osg::AutoTransform::AutoRotateMode mode,osgText::Text::AxisAlignment alignment)
{
// 1.创建节点
osg::ref_ptr<osg::Geode> geode = new osg::Geode();
// 2.创建字体
std::string fontName("fonts/cour.ttf");
osg::ref_ptr<osgText::Text>text = new osgText::Text();
geode->addDrawable(t......
阅读全文