一、代码
#include<map>
#include<vector>
#include<Windows.h>
#include <osgViewer\Viewer>
#include <osg\Node>
#include <osg\Geode>
#include <osg\Group>
#include <osg\PositionAttitudeTransform>
#include <osgDB\ReadFile>
#include <osgDB\WriteFile>
#include <osgUtil\Optimizer>
//键盘事件
#include<osgViewer/ViewerEventHandlers>
//osgGA相关的库
#include<osgGA/StateSetManipulator>
#include<osgEarthUtil/EarthManipulator>
#include<osg/LineWidth>
#include<osg/Point>
osg::ref_ptr<osg::Node> createPoint()
{
osg::ref_ptr<osg::Geometry> geom = new osg::Geometry();//定义一个几何体
//首先定义四个点
osg::ref_ptr<osg::Vec3Array> v = new osg::Vec3Array();//定义一个几何体坐标集合