13 #ifndef PROPERTYMANAGER
14 #define PROPERTYMANAGER 1
16 #include <osg/UserDataContainer>
17 #include <osg/ValueObject>
18 #include <osg/ImageSequence>
19 #include <osgGA/GUIEventHandler>
21 #include <osgPresentation/Export>
41 bool getProperty(const std::
string& name, T& value)
const
73 const UserValueObject* uvo =
dynamic_cast<const UserValueObject*
>(object);
77 value = uvo->getValue();
104 std::string propertyName;
107 OSG_NOTICE<<
"Reading propertyName="<<propertyName<<std::endl;
114 OSG_NOTICE<<
"Reading value="<<value<<std::endl;
143 typedef std::map<double, osg::ref_ptr<osg::UserDataContainer> >
KeyFrameMap;
150 _keyFrameMap[time] = udc;
153 virtual void reset();
155 void setPause(
bool pause);
158 double getAnimationTime()
const;
187 _propertyManager(pm),
188 _propertyName(propertyName) {}
200 _propertyManager(pm) {}
bool getUserValue(const osg::NodePath &nodepath, const std::string &name, T &value)
This class provides an object-oriented thread mutex interface.
void setProperty(const std::string &name, const T &value)
void setUserValue(const std::string &name, const T &value)
void addKeyFrame(double time, osg::UserDataContainer *udc)
PropertyEventCallback(PropertyManager *pm)
PropertyManager(const PropertyManager &pm, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
#define OSGPRESENTATION_EXPORT
PropertyReader(const osg::NodePath &nodePath, const std::string &str)
osg::ref_ptr< osg::ImageSequence > _imageSequence
const KeyFrameMap & getKeyFrameMap() const
KeyFrameMap & getKeyFrameMap()
osg::ref_ptr< PropertyManager > _propertyManager
#define META_Object(library, name)
void setPropertyManager(PropertyManager *pm)
osg::ref_ptr< PropertyManager > _propertyManager
std::istringstream _sstream
osg::ref_ptr< PropertyManager > _pm
std::map< double, osg::ref_ptr< osg::UserDataContainer > > KeyFrameMap
OpenThreads::Mutex _mutex
PropertyReader & operator>>(T &value)
std::string _propertyName
OSGPRESENTATION_EXPORT bool containsPropertyReference(const std::string &str)
OSGPRESENTATION_EXPORT const osg::Object * getUserObject(const osg::NodePath &nodepath, const std::string &name)
ImageSequenceUpdateCallback(osg::ImageSequence *is, PropertyManager *pm, const std::string &propertyName)
PropertyManager * getPropertyManager() const
std::vector< Node * > NodePath
bool getUserValue(const std::string &name, T &value) const