Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Action class NodeVisitor that supports osgPresentation nodes.
- Loading branch information
1 parent
7bc7115
commit 28155c6
Showing
19 changed files
with
355 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
/* -*-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. | ||
*/ | ||
|
||
#ifndef OSGPRESENTATION_ACTION | ||
#define OSGPRESENTATION_ACTION 1 | ||
|
||
#include <osgPresentation/Export> | ||
#include <osg/NodeVisitor> | ||
|
||
namespace osgPresentation | ||
{ | ||
|
||
// forward declare osgPresention nodes | ||
class Group; | ||
|
||
class Element; | ||
class Text; | ||
class Volume; | ||
class Model; | ||
class Image; | ||
class Movie; | ||
|
||
class Section; | ||
class Layer; | ||
class Slide; | ||
class Presentation; | ||
|
||
/** Action base class that is a NodeVistor that addes osgPresentation node support.*/ | ||
class OSGPRESENTATION_EXPORT Action : public osg::NodeVisitor | ||
{ | ||
public: | ||
Action(osg::NodeVisitor::TraversalMode traversalMode=osg::NodeVisitor::TRAVERSE_ACTIVE_CHILDREN): | ||
osg::NodeVisitor(traversalMode) {} | ||
|
||
virtual void apply(osgPresentation::Group& group); | ||
|
||
virtual void apply(osgPresentation::Element& element); | ||
virtual void apply(osgPresentation::Text& text); | ||
virtual void apply(osgPresentation::Volume& volume); | ||
virtual void apply(osgPresentation::Model& model); | ||
virtual void apply(osgPresentation::Image& image); | ||
virtual void apply(osgPresentation::Movie& movie); | ||
|
||
virtual void apply(osgPresentation::Section& section); | ||
virtual void apply(osgPresentation::Layer& layer); | ||
virtual void apply(osgPresentation::Slide& slide); | ||
virtual void apply(osgPresentation::Presentation& presentation); | ||
}; | ||
|
||
|
||
struct OSGPRESENTATION_EXPORT LoadAction : public Action | ||
{ | ||
void apply(osgPresentation::Element& element); | ||
}; | ||
|
||
struct OSGPRESENTATION_EXPORT UnloadAction : public Action | ||
{ | ||
void apply(osgPresentation::Element& element); | ||
}; | ||
|
||
struct OSGPRESENTATION_EXPORT ResetAction : public Action | ||
{ | ||
void apply(osgPresentation::Element& element); | ||
}; | ||
|
||
struct OSGPRESENTATION_EXPORT PauseAction : public Action | ||
{ | ||
void apply(osgPresentation::Element& element); | ||
}; | ||
|
||
struct OSGPRESENTATION_EXPORT PlayAction : public Action | ||
{ | ||
void apply(osgPresentation::Element& element); | ||
}; | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.