Create a LOD'd database --PagedLOD Create a PagedLOD'd database (default) TextureType? --compressed Use OpenGL compression on RGB destination imagery (default) --RGBA-compressed Use OpenGL compression on RGBA d
osg::LOD:细节层次节点,根据观察者与LOD节点距离的层次变换,显示不同的子节点 osg::PagedLOD:分页细节层次节点,它与LOD节点的主要区别是可以指定外部的模型文件作为子节点 osgSim::Impostor:图片缓存细节层次节点,这种LOD节点可以用缓存图片来代替模型子节点 osg::Switch:开关节点,控制某个子节点显示或隐藏,可用于表达...
osg::ref_ptr<osg::Node> node = osgDB::readNodeFile(path); osg::ref_ptr<osg::PagedLOD> lod = new osg::PagedLOD(); auto bs = node->getBound(); auto c = bs.center(); auto r = bs.radius(); lod->setCenter(c); lod->setRadius(r); lod->setRangeMode(osg::LOD::RangeMode::...
OSG中的osg::PagedLOD节点实现了这两种功能的整合,而分页数据库(DatabasePager)的核心工作对象正是PagedLOD。相对于静态LOD模型,PagedLOD作为一种动态LOD或连续性LOD技术,能够避免无法表示由粗到细的连续变化的问题,从而避免了静态LOD的局限性。动态LOD技术对于提升渲染性能发挥着重要作用。 在OSG中osg::DatabasePager类...
osgdem参数说明: osgdem.exe --help Usage: osgdem [options] filename ... Options: --HEIGHT_FIELD 创建高程数据 --LOD 创建LOD数据 --POLYGONAL 创建高程数据field database --PagedLOD 创建LOD数据页 --RGB-16 16位图像 --RGB-24 24位图像 --comment 往顶部点炮的文件加一个注释描述什么的 --compres...
osg::PagedLOD example int main() { osg::ref_ptr<osgViewer::Viewer> viewer1 = new osgViewer::Viewer; osg::ref_ptr<osg::PagedLOD> pageLdc1 = new osg::PagedLOD; pageLdc1->setFileName(, "D:\\参考手册\\BIM\\osg\\library.OSGB"); pageLdc1->setRange(, , ); view ...
PagedLOD即分页LOD,能根据视点范围动态选择加载哪些节点。这两个技术将在后文详细解读。 图3.11 createRootNode流程 图3.11展示了创建根节点的详细流程。其中,在创建影像图层和高程图层中,相应的execute函数里分别调用了createImage()函数和createHeightfields()函数,这两个函数根据数据中的option属性,调用了相应driver...
osgconv的意义是把多个模型归为一个以及发布它。而osgarchive的意义是模型归档后可以调度其中的一个模型。这使得pagedLod在其中大放光彩,osgdem采用的就是osga格式来调度压缩包OSGA中的各文件。 首先来举一例来说明它最经常的用途:转换OSG文件格式为IVE文件格式 Osgconv glider.osg glider.ive 这样就会生成一个glider...
OSG_NOTICE<<" total = "<size() + _inactivePagedLODList->size()<<std::endl; } #endif } DatabasePager::removeExpiredSubgraphs()函数的主要作用是通过目前正在使用的PagedLOD节点移除到指定定时间时间以来未访问过(过期的)的子节点。 注意,这段操作应该只从更新循环中调用。探究这个DatabasePager::removeEx...