0
点赞
收藏
分享

微信扫一扫

osg的Matrix详解

心智的年轮 2022-04-26 阅读 34
c++osg

#include<Windows.h>
#include<osgDB/ReadFile>
#include<osgViewer/viewer>
#include<osg/ShapeDrawable>
#include<osgText/Text>
#include<osg/LineWidth>
#include<osg/MatrixTransform>
#include<osgViewer/ViewerEventHandlers>
#include<osgGA/StateSetManipulator>

using namespace std;

osg::Geode* makeCoordinate(double x, double y, double z)
{
	osg::ref_ptr<osg::Sphere> pSphereShape = new osg::Sphere(osg::Vec3(0, 0, 0), x / 30.0f);
	osg::ref_ptr<osg::ShapeDrawable> pShapeDrawable = new osg::ShapeDrawable(pSphereShape.get());
	pShapeDrawable->setColor(osg::Vec4(1.0, 1.0, 0.0, 1.0));

	//创建保存几何信息的对象
	osg::ref_ptr<osg::Geometry> geom = new o
举报

相关推荐

0 条评论