/* * osgART/VideoPlane * osgART: AR ToolKit for OpenSceneGraph * * Copyright (c) 2005-2007 ARToolworks, Inc. All rights reserved. * * Rev Date Who Changes * 1.0 2006-12-08 --- Version 1.0 release. * */ /* * This file is part of osgART - AR Toolkit for OpenSceneGraph * * Copyright (c) 2005-2007 ARToolworks, Inc. All rights reserved. * * (See the AUTHORS file in the root of this distribution.) * * * OSGART is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * OSGART 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 * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with OSGART; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * */ #ifndef OSGART_VIDEOPLANE #define OSGART_VIDEOPLANE // STL include #include // graphics include #include #include #include #include #include // local include #include "osgART/Export" #include "osgART/GenericVideoObject" #include "osgART/GenericVideo" namespace osgART { /** * \class VideoPlane. * A default video object displaying a video on a plane surface. * The plane is centred in 0.0 in the XY Plane. the dimension of the plane is 2x2. */ class OSGART_EXPORT VideoPlane : public GenericVideoObject { public: /** * \brief default constructor. * \param width width of the texture * \param height of the texture */ VideoPlane(GenericVideo* video); /** * Initialize */ virtual void init(); /** * Add a video * \param layerVideoID ID of the video that is to be added to the * layered texture */ void addVideo(GenericVideo* video); protected: /** * \brief destructor. */ virtual ~VideoPlane(); virtual osg::Node* buildObject(); virtual osg::Geode* buildGeometry(); virtual void setTransparency(float alpha); osg::ref_ptr m_geometry; float m_width; float m_height; typedef std::deque< osg::ref_ptr > VideoArray; typedef std::deque< osg::ref_ptr > TextureArray; VideoArray m_layervideos; TextureArray m_LayerTextures; }; }; #endif