Added beginings of Text implementation
This commit is contained in:
@@ -15,6 +15,8 @@
|
||||
#define OSGPRESENTATION_ELEMENT 1
|
||||
|
||||
#include <osgPresentation/Group>
|
||||
#include <osgUtil/UpdateVisitor>
|
||||
#include <osgGA/EventVisitor>
|
||||
|
||||
namespace osgPresentation {
|
||||
|
||||
@@ -31,6 +33,31 @@ class OSGPRESENTATION_EXPORT Element : public osgPresentation::Group
|
||||
|
||||
META_Node(osgPresentation, Element);
|
||||
|
||||
virtual void traverse(osg::NodeVisitor& nv);
|
||||
|
||||
/** Load the subgraph implementation of the element.*/
|
||||
virtual bool load() { return false; }
|
||||
|
||||
/** Remove the the subgraph implementation, freeing up space.*/
|
||||
virtual bool unload() { removeChildren(0, getNumChildren()); return true; }
|
||||
|
||||
/** Return true if the subgraph implementation has been loaded.*/
|
||||
virtual bool loaded() const { return getNumChildren()!=0; }
|
||||
|
||||
|
||||
/** Do updates as part of the update traversal.*/
|
||||
virtual void updateTraversal(osgUtil::UpdateVisitor& uv);
|
||||
|
||||
/** Do updates as part of the event traversal.*/
|
||||
virtual void eventTraversal(osgGA::EventVisitor& ev);
|
||||
|
||||
/** Enter the element for the first time, starting any animations, movies, audio etc..*/
|
||||
virtual void enter() {}
|
||||
|
||||
/** Leave the element, stopping any animations, movies, audio etc..*/
|
||||
virtual void leave() {}
|
||||
|
||||
|
||||
protected :
|
||||
|
||||
virtual ~Element() {}
|
||||
|
||||
@@ -19,6 +19,10 @@
|
||||
|
||||
namespace osgPresentation {
|
||||
|
||||
|
||||
typedef std::pair< osg::ref_ptr<osg::Object>, std::string> ObjectDescription;
|
||||
typedef std::list< ObjectDescription > PropertyList;
|
||||
|
||||
/** osgPresentation::Group
|
||||
*/
|
||||
class OSGPRESENTATION_EXPORT Group : public osg::MatrixTransform
|
||||
@@ -49,6 +53,10 @@ class OSGPRESENTATION_EXPORT Group : public osg::MatrixTransform
|
||||
return setUserValue(name, value);
|
||||
}
|
||||
|
||||
/** Get all types of Properties supported by Presentation Object type, return true if the Properties are supported, false otherwise.*/
|
||||
virtual bool getSupportedProperties(PropertyList&) { return false; }
|
||||
|
||||
|
||||
protected :
|
||||
|
||||
virtual ~Group() {}
|
||||
|
||||
@@ -31,6 +31,12 @@ class OSGPRESENTATION_EXPORT Text : public osgPresentation::Element
|
||||
|
||||
META_Node(osgPresentation, Text);
|
||||
|
||||
/** load the text 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 ~Text() {}
|
||||
|
||||
Reference in New Issue
Block a user