|
osg::ref_ptr<osgEarth::Features::Feature> _pointFeature=new Feature(new PointSet(),mapNode->getMapSRS());
_pointFeature->getGeometry()->push_back(osg::Vec3d(120,30,0));
PointSymbol* ps=_pointFeature->style()->getOrCreate<PointSymbol>();
ps->size()=4.0;
ps->fill()->color()=Color::Yellow;
_pointFeature->style()->add(ps);
osg::ref_ptr<osgEarth::Annotation::FeatureNode> _pointFeatureNode=new FeatureNode(mapNode,_pointFeature.get());
_pointFeatureNode->getOrCreateStateSet()->setMode(GL_LIGHTING,osg::StateAttribute::OFF);
group->addChild(_pointFeatureNode.get());
以前用的osgEarth2.3,现在代码要改吗? |
|