《OpenSceneGraph三维渲染引擎编程指南》书中选中高亮效果示例。
osgFX特效

OSG选中效果展示

2、得到鼠标的位置

OSG选中效果展示

osgFX特效
1、高亮,在开头的时候写了;

2、线框:

1 #include<osgFX/Outline>
2 osg::Geode *geode = new osg::Geode;
3 geode->addDrawable(new osg::ShapeDrawable(new osg::Box(osg::Vec3(), 2))); 测试可行
4 //声明Effect节点并把Geode添加到其中
5 osgFX::Outline *outline = new osgFX::Outline;
6 outline->addChild(geode);
7 outline->setColor(osg::Vec4(1.0, 1.0, 0.0, 1.0));
8 outline->setWidth(5.0f);

 

相关文章:

  • 2021-12-21
  • 2021-09-07
  • 2022-12-23
  • 2022-12-23
  • 2021-06-11
  • 2022-12-23
  • 2021-04-22
  • 2021-12-03
猜你喜欢
  • 2021-10-06
  • 2022-12-23
  • 2021-08-29
  • 2021-11-30
  • 2022-01-04
  • 2021-08-22
  • 2021-07-15
相关资源
相似解决方案