Added support for recording animation paths in the osgProducer::Viewer.

This commit is contained in:
Robert Osfield
2003-04-05 22:24:48 +00:00
parent 79fd5786d8
commit c7a7bd03cb
6 changed files with 145 additions and 10 deletions

View File

@@ -340,6 +340,23 @@ const osg::Node* OsgCameraGroup::getTopMostSceneData() const
return _scene_data.get();
}
void OsgCameraGroup::setView(const osg::Matrix& matrix)
{
Producer::Matrix pm(matrix.ptr());
CameraGroup::setView(pm);
}
const osg::Matrix OsgCameraGroup::getViewMatrix() const
{
osg::Matrix matrix;
if (_cfg && _cfg->getNumberOfCameras()>=1)
{
Producer::Camera *cam = _cfg->getCamera(0);
matrix.set(cam->getViewMatrix());
}
return matrix;
}
void OsgCameraGroup::frame()
{
osg::Node* node = getTopMostSceneData();