diff --git a/examples/osgpresentation/osgpresentation.cpp b/examples/osgpresentation/osgpresentation.cpp index 9cf4bbc29..bada73f49 100644 --- a/examples/osgpresentation/osgpresentation.cpp +++ b/examples/osgpresentation/osgpresentation.cpp @@ -108,17 +108,21 @@ int main(int argc, char** argv) osg::ref_ptr element = new osgPresentation::Element; osg::ref_ptr text = new osgPresentation::Text; osg::ref_ptr model = new osgPresentation::Model; + osg::ref_ptr audio = new osgPresentation::Audio; + osg::ref_ptr image = new osgPresentation::Image; + osg::ref_ptr movie = new osgPresentation::Movie; + osg::ref_ptr volume = new osgPresentation::Volume; presentation->addChild(slide.get()); slide->addChild(layer.get()); //layer->addChild(element.get()); - layer->addChild(group.get()); - group->addChild(element.get()); - group->addChild(model.get()); - group->addChild(text.get()); - group->addChild(new osgPresentation::Audio); - group->addChild(new osgPresentation::Movie); - group->addChild(new osgPresentation::Volume); - + //layer->addChild(group.get()); + layer->addChild(element.get()); + // layer->addChild(model.get()); + layer->addChild(text.get()); + layer->addChild(audio.get()); + layer->addChild(image.get()); + layer->addChild(movie.get()); + layer->addChild(volume.get()); text->setProperty("string",std::string("This is a first test")); text->setProperty("font",std::string("times.ttf")); @@ -126,7 +130,18 @@ int main(int argc, char** argv) text->setProperty("width",std::string("103.2")); model->setProperty("filename", std::string("dumptruck.osgt")); - presentation->setProperty("scale",2.0); + + image->setProperty("filename", std::string("Images/lz.rgb")); + image->setProperty("scale",0.75); + + movie->setProperty("filename", std::string("/home/robert/Data/Movie/big_buck_bunny_1080p_stereo.ogg")); + movie->setProperty("scale",0.75); + + volume->setProperty("filename", std::string("/home/robert/Data/MaleVisibleHumanHead")); + volume->setProperty("scale",0.75); + volume->setProperty("technique",std::string("iso-surface")); + + presentation->setProperty("scale",1.0); osgPresentation::PrintSupportedProperties psp(std::cout); diff --git a/include/osgPresentation/Audio b/include/osgPresentation/Audio index 388b660df..d78a41b03 100644 --- a/include/osgPresentation/Audio +++ b/include/osgPresentation/Audio @@ -31,6 +31,12 @@ class OSGPRESENTATION_EXPORT Audio : public osgPresentation::Element META_Presentation(Audio); + /** load the audio subgraph.*/ + virtual bool load(); + + /** Get all types of Properties supported by Presentation Object type, return true if the Properties are supported, false otherwise.*/ + virtual bool getSupportedProperties(PropertyList&); + protected : virtual ~Audio() {} diff --git a/include/osgPresentation/Image b/include/osgPresentation/Image index 59075cdb4..e7a9f87e2 100644 --- a/include/osgPresentation/Image +++ b/include/osgPresentation/Image @@ -31,6 +31,12 @@ class OSGPRESENTATION_EXPORT Image : public osgPresentation::Element META_Presentation(Image); + /** load the image subgraph.*/ + virtual bool load(); + + /** Get all types of Properties supported by Presentation Object type, return true if the Properties are supported, false otherwise.*/ + virtual bool getSupportedProperties(PropertyList&); + protected : virtual ~Image() {} diff --git a/include/osgPresentation/Model b/include/osgPresentation/Model index 99d8c7e1d..9b641d419 100644 --- a/include/osgPresentation/Model +++ b/include/osgPresentation/Model @@ -31,7 +31,7 @@ class OSGPRESENTATION_EXPORT Model : public osgPresentation::Element META_Presentation(Model); - /** load the text subgraph.*/ + /** load the model subgraph.*/ virtual bool load(); /** Get all types of Properties supported by Presentation Object type, return true if the Properties are supported, false otherwise.*/ diff --git a/include/osgPresentation/Movie b/include/osgPresentation/Movie index 97ad5f96f..89f12bb2b 100644 --- a/include/osgPresentation/Movie +++ b/include/osgPresentation/Movie @@ -31,6 +31,12 @@ class OSGPRESENTATION_EXPORT Movie : public osgPresentation::Element META_Presentation(Movie); + /** load the movie subgraph.*/ + virtual bool load(); + + /** Get all types of Properties supported by Presentation Object type, return true if the Properties are supported, false otherwise.*/ + virtual bool getSupportedProperties(PropertyList&); + protected : virtual ~Movie() {} diff --git a/include/osgPresentation/Volume b/include/osgPresentation/Volume index 56738eebb..7cf9348db 100644 --- a/include/osgPresentation/Volume +++ b/include/osgPresentation/Volume @@ -31,6 +31,12 @@ class OSGPRESENTATION_EXPORT Volume : public osgPresentation::Element META_Presentation(Volume); + /** load the volume subgraph.*/ + virtual bool load(); + + /** Get all types of Properties supported by Presentation Object type, return true if the Properties are supported, false otherwise.*/ + virtual bool getSupportedProperties(PropertyList&); + protected : virtual ~Volume() {} diff --git a/src/osgPresentation/Audio.cpp b/src/osgPresentation/Audio.cpp new file mode 100644 index 000000000..de9cf8684 --- /dev/null +++ b/src/osgPresentation/Audio.cpp @@ -0,0 +1,42 @@ +/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2013 Robert Osfield + * + * This library is open source and may be redistributed and/or modified under + * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or + * (at your option) any later version. The full license is in LICENSE file + * included with this distribution, and on the openscenegraph.org website. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * OpenSceneGraph Public License for more details. +*/ + +#include +#include +#include + +using namespace osgPresentation; + + +bool Audio::load() +{ + OSG_NOTICE<<"Audio::load() Not implemented yet"< +#include +#include +#include +#include + +using namespace osgPresentation; + + +bool Image::load() +{ + OSG_NOTICE<<"Image::load() Not implemented yet"< +#include +#include +#include +#include + +using namespace osgPresentation; + + +bool Movie::load() +{ + OSG_NOTICE<<"Movie::load() Not implemented yet"< +#include +#include +#include + +using namespace osgPresentation; + + +bool Volume::load() +{ + OSG_NOTICE<<"Volume::load() Not implemented yet"<