osg
️GIS软件开发工程师
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
osg 设置osg::Node的 CullCallback应用 约束模型显示范围
//定义一个callback类class CNodeCullCallback : public osg::Callback{public: CNodeCullCallback(void){}; ~CNodeCullCallback(void){}; virtual bool run(osg::Object* object, osg::...原创 2020-02-26 14:39:23 · 845 阅读 · 0 评论 -
osg 动态读取PageLOD数据文件后 处理数据节点 callback 方法
创建读取文件回调类//.hclass CReadFileCallbackEx : public osgDB::ReadFileCallback{public: CReadFileCallbackEx(); virtual ~CReadFileCallbackEx(); virtual osgDB::ReaderWriter::ReadResult readNod...原创 2020-02-26 14:25:46 · 975 阅读 · 0 评论 -
osg点选 框选对象
//点选 event事件虚函数调用的点选void PointSelect( osgViewer::Viewer* viewer, const osgGA::GUIEventAdapter& ea ){ osgGroupPtr root = dynamic_cast<osg::Group*>(viewer->getSceneData()); if (r...原创 2020-02-24 12:19:53 · 1279 阅读 · 0 评论 -
osg光标点探测地理坐标
**********ex,ey的坐标原点在窗口左下角************bool HitTestCoordinateByPickHandle( float ex, float ey, double& dx, double& dy, double& dz ){ if (m_pViewer==NULL) return false; osg...原创 2020-02-24 12:18:13 · 337 阅读 · 0 评论 -
osg::Node osg::Group osg::Switch osg::MatrixTransform类接口说明
一、osg::Node类类描述:osg::Node为结点类,下有派生类无数,是OSG中最重要的类之一,也是最常用的类之一。1、Node () Node (const Node &node, const CopyOp ©op=CopyOp::SHALLOW_COPY)说明:构造函数,其中第二个重载函数是从已知的Node当中构建出新的Node,里面含有...原创 2020-02-24 12:17:09 · 823 阅读 · 0 评论 -
osg 场景节点添加 删除 隐藏
添加节点我们通过osg::ref_ptr<osg::Group> root = new osg::Group();申请场景根节点通过osg::ref_ptr<osg::Node> node = new osg::Node();可以申请多个节点,从而达到在场景中添加多个场景如:osg::ref_ptr<osg::Group> root = new o...原创 2020-02-24 12:14:14 · 2264 阅读 · 0 评论 -
osgUtil::CullVisitor
前言在osgUtil::CullVisitor,我们发现apply函数的重载中,有CullVisitor::apply(Group& node),CullVisitor::apply(Switch& node), CullVisitor::apply(LOD& node),CullVisitor::apply(Geode& node),CullVisitor::...转载 2020-01-09 08:04:48 · 1091 阅读 · 0 评论 -
osg函数 SceneView::cull
osgUtil::CullVisitor:“筛选访问器”当我们使用它遍历场景图形的各个节点时, CullVisitor 将会对每一个遇到的节点执行场景筛选的工作,判断它是否会超出视截锥体范围, 过于渺小,或者被遮挡节点(OccluderNode)挡住,从而将无助益于场景浏览的物体筛选并 剔除,降低场景绘制的资源消耗osg::RenderInfo:“渲染信息”管理器负责保存和管理与场景绘...原创 2020-01-08 16:44:33 · 462 阅读 · 0 评论 -
osg::Matrix矩阵 变换/旋转 连乘
osg::Matrix mat = osg::Matrix::translate(osg::vec3(x,y,z));//偏移mat *= osg::Matrix::rotate(osg::inDegrees(_rotateX),osg::X_AXIS);//绕x轴旋转_rotateX度mat *= osg::Matrix::rotate(osg::inDegrees(_rotateY),os...原创 2020-01-08 16:23:58 · 3421 阅读 · 1 评论 -
OSG::Geode只有一个点的OSG::Geometry不显示解决方法
相机默认裁剪模式:DEFAULT_CULLING = VIEW_FRUSTUM_SIDES_CULLING| SMALL_FEATURE_CULLING| SHADOW_OCCLUSION_CULLING| ...原创 2020-01-08 16:17:53 · 868 阅读 · 0 评论 -
转:osggeometry修改更新顶点
osg::Geometry *geometry = geode->getDrawable(0)->asGeometry();geometry->setDataVariance(osg::Object::DYNAMIC); // 顶点数据 osg::Vec3Array* vertices = dynamic_cast<osg::Vec3Array*>...原创 2020-01-08 16:13:40 · 1090 阅读 · 0 评论 -
OSG中的示例程序简介(转载)
1.example_osganimate一)演示了路径动画的使用(AnimationPath、AnimationPathCallback),路径动画回调可以作用在Camera、CameraView、MatrixTransform、PositionAttitudeTransform等四种类型的节点上。二)演示了osgSim::OverlayNode的使用2.example_osganimatione...转载 2018-07-06 09:12:07 · 394 阅读 · 0 评论
分享