MuYe510 发表于 2014-12-16 19:45:19

通过ModelLayer添加模型至球上,为何添加不上?

通过ModelLayer添加模型至球上,为何添加不上?
代码如下:
                                       osgEarth::Drivers::SimpleModelOptions opt;

                                       opt.url()="./data/model/new.ive";


                                       opt.location()=osg::Vec3d(lon,lat, 10, /*10*/0);//lon和lat单位是度,elevation单位是米,例如(112, 36, 1000)
                                       
                                       osgEarth::ModelLayer *layer = new osgEarth::ModelLayer(“model”, opt );

                                       GetMapNode()->getMap()->addModelLayer( layer );
路径是正确的,求大神指导

MuYe510 发表于 2014-12-17 16:42:10

结贴吧,解决了

jevonsea 发表于 2014-12-18 16:39:53

LZ怎么解决的?提供下解决方案

MuYe510 发表于 2014-12-18 17:40:13

jevonsea 发表于 2014-12-18 16:39
LZ怎么解决的?提供下解决方案

模型尺寸太小了,缩放一下,参考simple_model.earth

jevonsea 发表于 2014-12-19 08:27:57

哦了
页: [1]
查看完整版本: 通过ModelLayer添加模型至球上,为何添加不上?