|
发表于 2013-1-30 15:05:46
|
显示全部楼层
osg: lane plane(osg::vec4(10,0,0,0));
osgUtil::PlaneIntersector* pi = new osgUtil::PlaneIntersector(plane);
osgUtil::IntersectionVisitor iv(pi);
if(pi->containsIntersections())
{
for(osgUtil::PlaneIntersector::Intersections::iterator it = pi->getIntersections().begin();
it!=pi.getIntersections().end(); it++)
{
//交点坐标
std::vector<osg::vec3d> intersectPoints = it->polyline;
//对应的参考矩阵
osg::RefMatrix mat = it->matrix;
}
} |
|