/创建一个线段交集检测对象
osgUtil::LineSegmentIntersector::Intersections intersections;
float x = eagetX();
float y = eagetY();
if (viewer->computeIntersections(x,y,intersections))
{
//得到相交交集的交点
/for(osgUtil::LineSegmentIntersector::Intersections::iterator hitr = intersectionsbegin();
hitr != intersectionsend();
++hitr)/
osgUtil::LineSegmentIntersector::Intersections::iterator hitr = intersectionsbegin();//找到第一个交接点即可
然后:
(hitr)drawable->getBound()center()找到这个几何体的中心位置进行下一步 *** 作即可!
一下载资料:
1、下载源码:
在>
以上就是关于OSG中怎样通过点击一菜单按钮,使某一对象高亮显示全部的内容,包括:OSG中怎样通过点击一菜单按钮,使某一对象高亮显示、小白请教osg(OpenSceneGraph)如何安装、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)