Added support to slideshow3D for -s commandline option allow the size of

the display to be specified.

Also implementaited some code for display position and speed info in
osgProducer::Viewer, not fully implemented yet.
This commit is contained in:
Robert Osfield
2003-11-04 16:38:10 +00:00
parent 8ed0f3ea95
commit 54a8ea33ce
9 changed files with 137 additions and 27 deletions

View File

@@ -18,10 +18,7 @@ SlideShowConstructor::SlideShowConstructor()
{
_slideDistance = osg::DisplaySettings::instance()->getScreenDistance();
_slideHeight = osg::DisplaySettings::instance()->getScreenHeight();
_slideWidth = _slideHeight*1280.0f/1024.f;
_slideOrigin.set(-_slideWidth*0.5f,_slideDistance,-_slideHeight*0.5f);
_slideWidth = osg::DisplaySettings::instance()->getScreenWidth();
_backgroundColor.set(0.0f,0.0f,0.0f,1.0f);
_textColor.set(1.0f,1.0f,1.0f,1.0f);
@@ -60,6 +57,8 @@ void SlideShowConstructor::setPresentationAspectRatio(const std::string& str)
void SlideShowConstructor::createPresentation()
{
_slideOrigin.set(-_slideWidth*0.5f,_slideDistance,-_slideHeight*0.5f);
_titleHeight = _slideHeight*0.06f;
_titleWidth = _slideWidth*0.8f;
_titleOrigin = _slideOrigin + osg::Vec3(_titlePositionRatios.x()*_slideWidth,_titlePositionRatios.y()*1.0f,_titlePositionRatios.z()*_slideHeight);
@@ -85,6 +84,8 @@ void SlideShowConstructor::createPresentation()
hp->center = slideCenter;
hp->up.set(0.0f,0.0f,1.0f);
std::cout<<" slideCenter "<<slideCenter<<std::endl;
if (_presentationDuration!=0.0)
{
_presentationSwitch->setUserData(new Duration(_presentationDuration));