|
楼主 |
发表于 2008-9-3 21:08:57
|
显示全部楼层
回复 2楼 的帖子
执行到animationpath::clear场景就消失了,是不是应该先停下cameraManipulator呢?
void CVBHOsg::setPath(int x,int y)
{
osg::Vec3 eye,center,up;
mViewer->getCamera()->getViewMatrixAsLookAt(eye,center,up);
mPlan.getAnimationPath()->clear();
//animation->getAnimationPath()->clear();
mViewer->setCameraManipulator(new osgGA::AnimationPathManipulator(mPlan.createPath((int)(eye.x()),(int)(eye.y()),x,y)));
mViewer->getCameraManipulator()->home(0);
}
[ 本帖最后由 Kin 于 2008-9-3 21:15 编辑 ] |
|