|
发表于 2011-9-1 23:17:46
|
显示全部楼层
本帖最后由 x_wp 于 2011-9-1 23:58 编辑
OSG有个例子叫osgspheresegment,好像不断在绘制部分球面与地面的交线,没研究过,不知是不是楼主要的功能。
该范例程序第111行有这么一句:
-
- osgSim::SphereSegment::LineList lines = ss_->computeIntersection(possie, terrain_.get());
复制代码
computeIntersection的另一个重载为:
LineList osgSim::SphereSegment::computeIntersection(const osg::Matrixd& matrix, osg::Node* subgraph)
有对这个方法的注释:
Compute the interesection lines between subgraph and this sphere segment.
The matrix is the transform that takes the subgraph into the same coordiante frame as the sphere segment. The resulting intersections are in the coordinate frame of the sphere segment.
楼主可以研究一下,另外osgclip这个例子似乎也有点剖解模型的意思。 |
|