14#ifndef PROPERTYMANAGER
15#define PROPERTYMANAGER 1
42 bool getProperty(
const std::string& name, T& value)
const
52 void setProperty(
const std::string& name,
const T& value)
74 const UserValueObject* uvo =
dynamic_cast<const UserValueObject*
>(object);
78 value = uvo->getValue();
105 std::string propertyName;
108 OSG_NOTICE<<
"Reading propertyName="<<propertyName<<std::endl;
115 OSG_NOTICE<<
"Reading value="<<value<<std::endl;
144 typedef std::map<double, osg::ref_ptr<osg::UserDataContainer> >
KeyFrameMap;
151 _keyFrameMap[time] = udc;
188 _propertyManager(pm),
189 _propertyName(propertyName) {}
201 _propertyManager(pm) {}
#define OSG_NOTICE
Definition Notify:86
This class provides an object-oriented thread mutex interface.
Definition Mutex:31
Definition GUIActionAdapter:62
Definition GUIEventAdapter:82
Definition GUIEventHandler:50
Definition PropertyManager:133
double _firstTime
Definition PropertyManager:175
PropertyManager * getPropertyManager() const
Definition PropertyManager:142
double _latestTime
Definition PropertyManager:176
void assign(osg::UserDataContainer *destination, osg::UserDataContainer *source)
const KeyFrameMap & getKeyFrameMap() const
Definition PropertyManager:147
virtual void update(osg::Node &node)
KeyFrameMap & getKeyFrameMap()
Definition PropertyManager:146
KeyFrameMap _keyFrameMap
Definition PropertyManager:173
void setPropertyManager(PropertyManager *pm)
Definition PropertyManager:141
bool getPause() const
Definition PropertyManager:157
PropertyAnimation()
Definition PropertyManager:135
double _pauseTime
Definition PropertyManager:178
bool _pause
Definition PropertyManager:177
virtual void operator()(osg::Node *node, osg::NodeVisitor *nv)
osg::ref_ptr< PropertyManager > _pm
Definition PropertyManager:168
void setPause(bool pause)
std::map< double, osg::ref_ptr< osg::UserDataContainer > > KeyFrameMap
Definition PropertyManager:144
void addKeyFrame(double time, osg::UserDataContainer *udc)
Definition PropertyManager:149
void assign(osg::UserDataContainer *udc, osg::Object *obj)
double getAnimationTime() const
Definition PropertyManager:30
int unref() const
Definition PropertyManager:59
META_Object(osgPresentation, PropertyManager) template< typename T > bool getProperty(const std
Definition PropertyManager:37
PropertyManager(const PropertyManager &pm, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
Definition PropertyManager:34
OpenThreads::Mutex _mutex
Definition PropertyManager:63
PropertyManager()
Definition PropertyManager:33
int ref() const
Definition PropertyManager:58
@ SHALLOW_COPY
Definition CopyOp:47
Definition ImageSequence:29
Definition NodeVisitor:82
void setUserValue(const std::string &name, const T &value)
Definition ValueObject:377
Object()
Definition Object:69
bool getUserValue(const std::string &name, T &value) const
int unref() const
Definition Referenced:178
int ref() const
Definition Referenced:161
Definition ValueObject:283
Definition UserDataContainer:26
Definition AnimationMaterial:26
bool getUserValue(const osg::NodePath &nodepath, const std::string &name, T &value)
Definition PropertyManager:70
OSGPRESENTATION_EXPORT const osg::Object * getUserObject(const osg::NodePath &nodepath, const std::string &name)
OSGPRESENTATION_EXPORT bool containsPropertyReference(const std::string &str)
author: Julien Valentin 2017 (mp3butcher@hotmail.com)
Definition AlphaFunc:19
std::vector< Node * > NodePath
Definition Node:47
#define OSGPRESENTATION_EXPORT
Definition osgPresentation/Export:38
Definition PropertyManager:185
ImageSequenceUpdateCallback(osg::ImageSequence *is, PropertyManager *pm, const std::string &propertyName)
Definition PropertyManager:186
osg::ref_ptr< osg::ImageSequence > _imageSequence
Definition PropertyManager:193
virtual void operator()(osg::Node *node, osg::NodeVisitor *nv)
std::string _propertyName
Definition PropertyManager:195
osg::ref_ptr< PropertyManager > _propertyManager
Definition PropertyManager:194
Definition PropertyManager:199
virtual bool handle(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &)
osg::ref_ptr< PropertyManager > _propertyManager
Definition PropertyManager:205
PropertyEventCallback(PropertyManager *pm)
Definition PropertyManager:200
Definition PropertyManager:90
PropertyReader & operator>>(T &value)
Definition PropertyManager:121
osg::NodePath _nodePath
Definition PropertyManager:127
PropertyReader(const osg::NodePath &nodePath, const std::string &str)
Definition PropertyManager:91
bool ok()
Definition PropertyManager:123
bool read(T &value)
Definition PropertyManager:97
std::istringstream _sstream
Definition PropertyManager:128
bool fail()
Definition PropertyManager:124
bool _errorGenerated
Definition PropertyManager:126