|
楼主 |
发表于 2010-4-13 01:21:04
|
显示全部楼层
2# array
osg::Vec3Array* coords = dynamic_cast<osg::Vec3Array*>(mLocus->getVertexArray());
coords->push_back(mPrePos);
coords->push_back(mCurrentPos);
mLocus->setVertexArray(coords);
mLocus->addPrimitiveSet(new osgrawArrays(osg:primitiveSetINES,coords->size()-2,coords->size()-1));
mLocus为osg::geometry, mPrePos,mCurrentPos为两点位置,每一帧得到新mPrePos,mCurrentPos的值,然后实现一条轨迹的显示.
但是不知道如何获取mCurrentPos的值 |
|