/**********************************************************
*Write by FlySky
*zzuxp@163.com http://www.OsgChina.org
**********************************************************/
#include <osgViewer/Viewer>
#include <osg/Node>
#include <osg/Geometry>
#include <osg/Geode>
#include <osg/Group>
#include <osg/AutoTransform>
#include <osgDB/ReadFile>
#include <osgDB/WriteFile>
#include <osgText/Text>
#include <osgUtil/Optimizer>
#include <iostream>
//创建自动变换节点
osg::ref_ptr<osg::Node> createAutoTransform(osg::Vec3& position, float size, std::string& label,
osg::AutoTransform::AutoRotateMode autoMode, osgText::Text::AxisAlignment axisAlignment)
{
osg::ref_ptr<osg::Geode> geode = new osg::Geode();
//字体
std::string font("fonts/cour.ttf");
//创建Text对象
osg::ref_ptr<osgText::Text> text = new osgText::Text()
OSG学习:自动对齐节点示例
最新推荐文章于 2024-04-08 17:22:26 发布