ValueObject
Go to the documentation of this file.
/* -*-c++-*- OpenSceneGraph - Copyright (C) 2011 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 OSG_VALUEOBJECT
#define OSG_VALUEOBJECT 1
#include <osg/Object>
#include <osg/UserDataContainer>
#include <osg/BoundingBox>
#include <osg/BoundingSphere>
#include <typeinfo>
namespace osg {
// forward declare core OSG math classes
class Vec2b;
class Vec3b;
class Vec4b;
class Vec2ub;
class Vec3ub;
class Vec4ub;
class Vec2s;
class Vec3s;
class Vec4s;
class Vec2us;
class Vec3us;
class Vec4us;
class Vec2i;
class Vec3i;
class Vec4i;
class Vec2ui;
class Vec3ui;
class Vec4ui;
class Vec2f;
class Vec3f;
class Vec4f;
class Vec2d;
class Vec3d;
class Vec4d;
class Quat;
class Plane;
class Matrixf;
class Matrixd;
template<typename T>
class GetScalarValue;
template<typename T>
class SetScalarValue;
class ValueObject : public Object
{
public:
ValueObject() : Object(true) {}
ValueObject(const std::string& name) : Object(true) { setName(name); }
ValueObject(const ValueObject& rhs, const osg::CopyOp copyop=osg::CopyOp::SHALLOW_COPY): Object(rhs,copyop) {}
META_Object(osg, ValueObject)
virtual ValueObject* asValueObject() { return this; }
virtual const ValueObject* asValueObject() const { return this; }
class GetValueVisitor
{
public:
virtual ~GetValueVisitor() {}
virtual void apply(bool /*in_value*/) {}
virtual void apply(char /*in_value*/) {}
virtual void apply(unsigned char /*in_value*/) {}
virtual void apply(short /*in_value*/) {}
virtual void apply(unsigned short /*in_value*/) {}
virtual void apply(int /*in_value*/) {}
virtual void apply(unsigned int /*in_value*/) {}
virtual void apply(float /*in_value*/) {}
virtual void apply(double /*in_value*/) {}
virtual void apply(const std::string& /*in_value*/) {}
virtual void apply(const osg::Vec2b& /*in_value*/) {}
virtual void apply(const osg::Vec3b& /*in_value*/) {}
virtual void apply(const osg::Vec4b& /*in_value*/) {}
virtual void apply(const osg::Vec2ub& /*in_value*/) {}
virtual void apply(const osg::Vec3ub& /*in_value*/) {}
virtual void apply(const osg::Vec4ub& /*in_value*/) {}
virtual void apply(const osg::Vec2s& /*in_value*/) {}
virtual void apply(const osg::Vec3s& /*in_value*/) {}
virtual void apply(const osg::Vec4s& /*in_value*/) {}
virtual void apply(const osg::Vec2us& /*in_value*/) {}
virtual void apply(const osg::Vec3us& /*in_value*/) {}
virtual void apply(const osg::Vec4us& /*in_value*/) {}
virtual void apply(const osg::Vec2i& /*in_value*/) {}
virtual void apply(const osg::Vec3i& /*in_value*/) {}
virtual void apply(const osg::Vec4i& /*in_value*/) {}
virtual void apply(const osg::Vec2ui& /*in_value*/) {}
virtual void apply(const osg::Vec3ui& /*in_value*/) {}
virtual void apply(const osg::Vec4ui& /*in_value*/) {}
virtual void apply(const osg::Vec2f& /*in_value*/) {}
virtual void apply(const osg::Vec3f& /*in_value*/) {}
virtual void apply(const osg::Vec4f& /*in_value*/) {}
virtual void apply(const osg::Vec2d& /*in_value*/) {}
virtual void apply(const osg::Vec3d& /*in_value*/) {}
virtual void apply(const osg::Vec4d& /*in_value*/) {}
virtual void apply(const osg::Quat& /*in_value*/) {}
virtual void apply(const osg::Plane& /*in_value*/) {}
virtual void apply(const osg::Matrixf& /*in_value*/) {}
virtual void apply(const osg::Matrixd& /*in_value*/) {}
virtual void apply(const osg::BoundingBoxf& /*in_value*/) {}
virtual void apply(const osg::BoundingBoxd& /*in_value*/) {}
virtual void apply(const osg::BoundingSpheref& /*in_value*/) {}
virtual void apply(const osg::BoundingSphered& /*in_value*/) {}
};
class SetValueVisitor
{
public:
virtual ~SetValueVisitor() {}
virtual void apply(bool& /*in_value*/) {}
virtual void apply(char& /*in_value*/) {}
virtual void apply(unsigned char& /*in_value*/) {}
virtual void apply(short& /*in_value*/) {}
virtual void apply(unsigned short& /*in_value*/) {}
virtual void apply(int& /*in_value*/) {}
virtual void apply(unsigned int& /*in_value*/) {}
virtual void apply(float& /*in_value*/) {}
virtual void apply(double& /*in_value*/) {}
virtual void apply(std::string& /*in_value*/) {}
virtual void apply(osg::Vec2b& /*in_value*/) {}
virtual void apply(osg::Vec3b& /*in_value*/) {}
virtual void apply(osg::Vec4b& /*in_value*/) {}
virtual void apply(osg::Vec2ub& /*in_value*/) {}
virtual void apply(osg::Vec3ub& /*in_value*/) {}
virtual void apply(osg::Vec4ub& /*in_value*/) {}
virtual void apply(osg::Vec2s& /*in_value*/) {}
virtual void apply(osg::Vec3s& /*in_value*/) {}
virtual void apply(osg::Vec4s& /*in_value*/) {}
virtual void apply(osg::Vec2us& /*in_value*/) {}
virtual void apply(osg::Vec3us& /*in_value*/) {}
virtual void apply(osg::Vec4us& /*in_value*/) {}
virtual void apply(osg::Vec2i& /*in_value*/) {}
virtual void apply(osg::Vec3i& /*in_value*/) {}
virtual void apply(osg::Vec4i& /*in_value*/) {}
virtual void apply(osg::Vec2ui& /*in_value*/) {}
virtual void apply(osg::Vec3ui& /*in_value*/) {}
virtual void apply(osg::Vec4ui& /*in_value*/) {}
virtual void apply(osg::Vec2f& /*in_value*/) {}
virtual void apply(osg::Vec3f& /*in_value*/) {}
virtual void apply(osg::Vec4f& /*in_value*/) {}
virtual void apply(osg::Vec2d& /*in_value*/) {}
virtual void apply(osg::Vec3d& /*in_value*/) {}
virtual void apply(osg::Vec4d& /*in_value*/) {}
virtual void apply(osg::Quat& /*in_value*/) {}
virtual void apply(osg::Plane& /*in_value*/) {}
virtual void apply(osg::Matrixf& /*in_value*/) {}
virtual void apply(osg::Matrixd& /*in_value*/) {}
virtual void apply(osg::BoundingBoxf& /*in_value*/) {}
virtual void apply(osg::BoundingBoxd& /*in_value*/) {}
virtual void apply(osg::BoundingSpheref& /*in_value*/) {}
virtual void apply(osg::BoundingSphered& /*in_value*/) {}
};
virtual bool get(GetValueVisitor& /*gvv*/) const { return false; }
virtual bool set(SetValueVisitor& /*gvv*/) { return false; }
template<typename T>
bool getScalarValue(T& value) { GetScalarValue<T> gsv; if (get(gsv) && gsv.set) { value = gsv.value; return true; } else return false; }
template<typename T>
bool setScalarValue(T value) { SetScalarValue<T> ssv(value); return set(ssv) && ssv.set; }
protected:
virtual ~ValueObject() {}
};
template<typename T>
class GetScalarValue : public ValueObject::GetValueVisitor
{
public:
GetScalarValue() : set(false), value(0) {}
bool set;
T value;
virtual void apply(bool in_value) { value = in_value ? 1 : 0; set = true; }
virtual void apply(char in_value) { value = in_value; set = true; }
virtual void apply(unsigned char in_value) { value = in_value; set = true; }
virtual void apply(short in_value) { value = in_value; set = true; }
virtual void apply(unsigned short in_value) { value = in_value; set = true; }
virtual void apply(int in_value) { value = in_value; set = true; }
virtual void apply(unsigned int in_value) { value = in_value; set = true; }
virtual void apply(float in_value) { value = in_value; set = true; }
virtual void apply(double in_value) { value = in_value; set = true; }
};
template<>
class GetScalarValue <bool> : public ValueObject::GetValueVisitor
{
public:
GetScalarValue() : set(false), value(0) {}
bool set;
bool value;
virtual void apply(bool in_value) { value = in_value; set = true; }
virtual void apply(char in_value) { value = in_value != 0; set = true; }
virtual void apply(unsigned char in_value) { value = in_value != 0; set = true; }
virtual void apply(short in_value) { value = in_value != 0; set = true; }
virtual void apply(unsigned short in_value) { value = in_value != 0; set = true; }
virtual void apply(int in_value) { value = in_value != 0; set = true; }
virtual void apply(unsigned int in_value) { value = in_value != 0; set = true; }
virtual void apply(float in_value) { value = in_value != 0.0f; set = true; }
virtual void apply(double in_value) { value = in_value != 0.0; set = true; }
};
template<typename T>
class SetScalarValue : public ValueObject::SetValueVisitor
{
public:
SetScalarValue(T in_value) : set(false), value(in_value) {}
bool set;
T value;
virtual void apply(bool& in_value) { in_value=(value!=0); set = true;}
virtual void apply(char& in_value) { in_value=value; set = true;}
virtual void apply(unsigned char& in_value) { in_value=value; set = true;}
virtual void apply(short& in_value) { in_value=value; set = true;}
virtual void apply(unsigned short& in_value) { in_value=value; set = true;}
virtual void apply(int& in_value) { in_value=value; set = true;}
virtual void apply(unsigned int& in_value) { in_value=value; set = true;}
virtual void apply(float& in_value) { in_value=value; set = true;}
virtual void apply(double& in_value) { in_value=value; set = true;}
};
template< typename T >
struct ValueObjectClassNameTrait
{
static const char* className() { return "TemplateValueObject"; }
};
template< typename T >
class TemplateValueObject : public ValueObject
{
public:
TemplateValueObject():
ValueObject(),
_value() {}
TemplateValueObject(const T& value) :
ValueObject(),
_value(value) {}
TemplateValueObject(const std::string& name, const T& value) :
ValueObject(name),
_value(value) {}
TemplateValueObject(const TemplateValueObject& rhs, const osg::CopyOp copyop=osg::CopyOp::SHALLOW_COPY) :
ValueObject(rhs,copyop),
_value(rhs._value) {}
virtual Object* cloneType() const { return new TemplateValueObject(); }
virtual Object* clone(const CopyOp& copyop) const { return new TemplateValueObject(*this, copyop); }
virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast<const TemplateValueObject*>(obj)!=NULL; }
virtual const char* libraryName() const { return "osg"; }
virtual const char* className() const { return ValueObjectClassNameTrait<T>::className(); }
void setValue(const T& value) { _value = value; }
const T& getValue() const { return _value; }
virtual bool get(GetValueVisitor& gvv) const { gvv.apply(_value); return true; }
virtual bool set(SetValueVisitor& svv) { svv.apply(_value); return true; }
protected:
virtual ~TemplateValueObject() {}
static const char* s_TemplateValueObject_className;
T _value;
};
#define META_ValueObject(TYPE,NAME) \
template<> struct ValueObjectClassNameTrait<TYPE> { static const char* className() { return #NAME; } }; \
typedef TemplateValueObject<TYPE> NAME;
META_ValueObject(std::string, StringValueObject)
META_ValueObject(bool, BoolValueObject)
META_ValueObject(char, CharValueObject)
META_ValueObject(unsigned char, UCharValueObject)
META_ValueObject(short, ShortValueObject)
META_ValueObject(unsigned short, UShortValueObject)
META_ValueObject(int, IntValueObject)
META_ValueObject(unsigned int, UIntValueObject)
META_ValueObject(float, FloatValueObject)
META_ValueObject(double, DoubleValueObject)
META_ValueObject(Vec2f, Vec2fValueObject)
META_ValueObject(Vec3f, Vec3fValueObject)
META_ValueObject(Vec4f, Vec4fValueObject)
META_ValueObject(Vec2d, Vec2dValueObject)
META_ValueObject(Vec3d, Vec3dValueObject)
META_ValueObject(Vec4d, Vec4dValueObject)
META_ValueObject(Quat, QuatValueObject)
META_ValueObject(Plane, PlaneValueObject)
META_ValueObject(Matrixf, MatrixfValueObject)
META_ValueObject(Matrixd, MatrixdValueObject)
META_ValueObject(BoundingBoxf, BoundingBoxfValueObject)
META_ValueObject(BoundingBoxd, BoundingBoxdValueObject)
META_ValueObject(BoundingSpheref, BoundingSpherefValueObject)
META_ValueObject(BoundingSphered, BoundingSpheredValueObject)
template<typename T>
bool osg::Object::getUserValue(const std::string& name, T& value) const
{
typedef TemplateValueObject<T> UserValueObject;
const osg::UserDataContainer* udc = asUserDataContainer();
if (!udc) udc = _userDataContainer;
if (!udc) return false;
const Object* obj = udc->getUserObject(name);
if (obj && typeid(*obj)==typeid(UserValueObject))
{
const UserValueObject* uvo = static_cast<const UserValueObject*>(obj);
value = uvo->getValue();
return true;
}
else
{
return false;
}
}
template<typename T>
void osg::Object::setUserValue(const std::string& name, const T& value)
{
typedef TemplateValueObject<T> UserValueObject;
osg::UserDataContainer* udc = asUserDataContainer();
if (!udc)
{
getOrCreateUserDataContainer();
udc = _userDataContainer;
}
unsigned int i = udc->getUserObjectIndex(name);
if (i<udc->getNumUserObjects())
{
Object* obj = udc->getUserObject(i);
if (typeid(*obj)==typeid(UserValueObject))
{
UserValueObject* uvo = static_cast<UserValueObject*>(obj);
uvo->setValue(value);
}
else
{
udc->setUserObject(i, new UserValueObject(name, value));
}
}
else
{
udc->addUserObject(new UserValueObject(name,value));
}
}
template<class P, class T>
T* getOrCreateUserObjectOfType(P* parent)
{
T* object=0;
const char* name = typeid(T).name();
osg::UserDataContainer* udc = parent->getOrCreateUserDataContainer();
unsigned int index = udc->getUserObjectIndex(name);
if (index<udc->getNumUserObjects())
{
osg::Object* userObject = udc->getUserObject(index);
if (typeid(*userObject)==typeid(T))
{
object = static_cast<T*>(userObject);
// OSG_NOTICE<<"Reusing "<<name<<std::endl;
}
else
{
// OSG_NOTICE<<"Replacing "<<name<<", original object "<<userObject->className()<<std::endl;
object = new T;
object->setName(name);
udc->setUserObject(index, object);
}
}
else
{
object = new T;
object->setName(name);
udc->addUserObject(object);
// OSG_NOTICE<<"Creating new "<<name<<std::endl;
}
return object;
}
}
#endif
BoundingBox
BoundingSphere
Object
UserDataContainer
META_ValueObject
#define META_ValueObject(TYPE, NAME)
Definition ValueObject:322
osg::CopyOp
Definition CopyOp:41
osg::CopyOp::SHALLOW_COPY
@ SHALLOW_COPY
Definition CopyOp:47
osg::GetScalarValue< bool >::apply
virtual void apply(double in_value)
Definition ValueObject:250
osg::GetScalarValue< bool >::apply
virtual void apply(bool in_value)
Definition ValueObject:242
osg::GetScalarValue< bool >::apply
virtual void apply(char in_value)
Definition ValueObject:243
osg::GetScalarValue< bool >::apply
virtual void apply(unsigned int in_value)
Definition ValueObject:248
osg::GetScalarValue< bool >::apply
virtual void apply(short in_value)
Definition ValueObject:245
osg::GetScalarValue< bool >::GetScalarValue
GetScalarValue()
Definition ValueObject:237
osg::GetScalarValue< bool >::apply
virtual void apply(float in_value)
Definition ValueObject:249
osg::GetScalarValue< bool >::apply
virtual void apply(unsigned char in_value)
Definition ValueObject:244
osg::GetScalarValue< bool >::value
bool value
Definition ValueObject:240
osg::GetScalarValue< bool >::set
bool set
Definition ValueObject:239
osg::GetScalarValue< bool >::apply
virtual void apply(unsigned short in_value)
Definition ValueObject:246
osg::GetScalarValue< bool >::apply
virtual void apply(int in_value)
Definition ValueObject:247
osg::GetScalarValue
Definition ValueObject:214
osg::GetScalarValue::apply
virtual void apply(char in_value)
Definition ValueObject:223
osg::GetScalarValue::apply
virtual void apply(short in_value)
Definition ValueObject:225
osg::GetScalarValue::apply
virtual void apply(unsigned short in_value)
Definition ValueObject:226
osg::GetScalarValue::apply
virtual void apply(bool in_value)
Definition ValueObject:222
osg::GetScalarValue::apply
virtual void apply(float in_value)
Definition ValueObject:229
osg::GetScalarValue::GetScalarValue
GetScalarValue()
Definition ValueObject:217
osg::GetScalarValue::apply
virtual void apply(unsigned int in_value)
Definition ValueObject:228
osg::GetScalarValue::apply
virtual void apply(unsigned char in_value)
Definition ValueObject:224
osg::GetScalarValue::apply
virtual void apply(int in_value)
Definition ValueObject:227
osg::GetScalarValue::apply
virtual void apply(double in_value)
Definition ValueObject:230
osg::GetScalarValue::value
T value
Definition ValueObject:220
osg::GetScalarValue::set
bool set
Definition ValueObject:219
osg::Matrixd
Definition Matrixd:27
osg::Matrixf
Definition Matrixf:27
osg::Object
Definition Object:61
osg::Object::setUserValue
void setUserValue(const std::string &name, const T &value)
Definition ValueObject:377
osg::Object::setName
virtual void setName(const std::string &name)
Definition Object:203
osg::Object::asUserDataContainer
virtual UserDataContainer * asUserDataContainer()
Definition Object:175
osg::Object::Object
Object()
Definition Object:69
osg::Object::_userDataContainer
osg::UserDataContainer * _userDataContainer
Definition Object:306
osg::Object::getUserValue
bool getUserValue(const std::string &name, T &value) const
osg::Object::getOrCreateUserDataContainer
osg::UserDataContainer * getOrCreateUserDataContainer()
osg::Plane
A plane class. It can be used to represent an infinite plane.
Definition Plane:34
osg::Quat
Definition Quat:30
osg::SetScalarValue
Definition ValueObject:255
osg::SetScalarValue::set
bool set
Definition ValueObject:260
osg::SetScalarValue::apply
virtual void apply(int &in_value)
Definition ValueObject:268
osg::SetScalarValue::apply
virtual void apply(short &in_value)
Definition ValueObject:266
osg::SetScalarValue::apply
virtual void apply(float &in_value)
Definition ValueObject:270
osg::SetScalarValue::apply
virtual void apply(unsigned char &in_value)
Definition ValueObject:265
osg::SetScalarValue::apply
virtual void apply(double &in_value)
Definition ValueObject:271
osg::SetScalarValue::apply
virtual void apply(unsigned short &in_value)
Definition ValueObject:267
osg::SetScalarValue::SetScalarValue
SetScalarValue(T in_value)
Definition ValueObject:258
osg::SetScalarValue::apply
virtual void apply(bool &in_value)
Definition ValueObject:263
osg::SetScalarValue::apply
virtual void apply(unsigned int &in_value)
Definition ValueObject:269
osg::SetScalarValue::apply
virtual void apply(char &in_value)
Definition ValueObject:264
osg::SetScalarValue::value
T value
Definition ValueObject:261
osg::TemplateValueObject
Definition ValueObject:283
osg::TemplateValueObject::setValue
void setValue(const T &value)
Definition ValueObject:308
osg::TemplateValueObject::TemplateValueObject
TemplateValueObject(const TemplateValueObject &rhs, const osg::CopyOp copyop=osg::CopyOp::SHALLOW_COPY)
Definition ValueObject:298
osg::TemplateValueObject::s_TemplateValueObject_className
static const char * s_TemplateValueObject_className
Definition ValueObject:317
osg::TemplateValueObject::className
virtual const char * className() const
Definition ValueObject:306
osg::TemplateValueObject::TemplateValueObject
TemplateValueObject(const T &value)
Definition ValueObject:290
osg::TemplateValueObject::~TemplateValueObject
virtual ~TemplateValueObject()
Definition ValueObject:316
osg::TemplateValueObject::TemplateValueObject
TemplateValueObject()
Definition ValueObject:286
osg::TemplateValueObject::cloneType
virtual Object * cloneType() const
Definition ValueObject:302
osg::TemplateValueObject::get
virtual bool get(GetValueVisitor &gvv) const
Definition ValueObject:311
osg::TemplateValueObject::TemplateValueObject
TemplateValueObject(const std::string &name, const T &value)
Definition ValueObject:294
osg::TemplateValueObject::clone
virtual Object * clone(const CopyOp &copyop) const
Definition ValueObject:303
osg::TemplateValueObject::_value
T _value
Definition ValueObject:319
osg::TemplateValueObject::libraryName
virtual const char * libraryName() const
Definition ValueObject:305
osg::TemplateValueObject::set
virtual bool set(SetValueVisitor &svv)
Definition ValueObject:312
osg::TemplateValueObject::isSameKindAs
virtual bool isSameKindAs(const Object *obj) const
Definition ValueObject:304
osg::TemplateValueObject::getValue
const T & getValue() const
Definition ValueObject:309
osg::UserDataContainer
Definition UserDataContainer:26
osg::UserDataContainer::addUserObject
virtual unsigned int addUserObject(Object *obj)=0
osg::UserDataContainer::getUserObjectIndex
virtual unsigned int getUserObjectIndex(const osg::Object *obj, unsigned int startPos=0) const =0
osg::UserDataContainer::setUserObject
virtual void setUserObject(unsigned int i, Object *obj)=0
osg::UserDataContainer::getUserObject
virtual Object * getUserObject(unsigned int i)=0
osg::ValueObject::GetValueVisitor
Definition ValueObject:85
osg::ValueObject::GetValueVisitor::apply
virtual void apply(double)
Definition ValueObject:96
osg::ValueObject::GetValueVisitor::apply
virtual void apply(unsigned int)
Definition ValueObject:94
osg::ValueObject::GetValueVisitor::apply
virtual void apply(const osg::Vec4ui &)
Definition ValueObject:121
osg::ValueObject::GetValueVisitor::apply
virtual void apply(const osg::BoundingBoxf &)
Definition ValueObject:135
osg::ValueObject::GetValueVisitor::apply
virtual void apply(unsigned short)
Definition ValueObject:92
osg::ValueObject::GetValueVisitor::apply
virtual void apply(const osg::Vec4b &)
Definition ValueObject:101
osg::ValueObject::GetValueVisitor::apply
virtual void apply(const osg::Plane &)
Definition ValueObject:132
osg::ValueObject::GetValueVisitor::apply
virtual void apply(const osg::Matrixf &)
Definition ValueObject:133
osg::ValueObject::GetValueVisitor::apply
virtual void apply(unsigned char)
Definition ValueObject:90
osg::ValueObject::GetValueVisitor::apply
virtual void apply(const osg::Vec2us &)
Definition ValueObject:111
osg::ValueObject::GetValueVisitor::apply
virtual void apply(int)
Definition ValueObject:93
osg::ValueObject::GetValueVisitor::apply
virtual void apply(const osg::Vec2d &)
Definition ValueObject:127
osg::ValueObject::GetValueVisitor::apply
virtual void apply(const osg::Quat &)
Definition ValueObject:131
osg::ValueObject::GetValueVisitor::apply
virtual void apply(const osg::Vec3s &)
Definition ValueObject:108
osg::ValueObject::GetValueVisitor::apply
virtual void apply(const osg::BoundingBoxd &)
Definition ValueObject:136
osg::ValueObject::GetValueVisitor::apply
virtual void apply(const osg::BoundingSpheref &)
Definition ValueObject:137
osg::ValueObject::GetValueVisitor::apply
virtual void apply(const osg::Vec3b &)
Definition ValueObject:100
osg::ValueObject::GetValueVisitor::apply
virtual void apply(const osg::Vec4s &)
Definition ValueObject:109
osg::ValueObject::GetValueVisitor::apply
virtual void apply(short)
Definition ValueObject:91
osg::ValueObject::GetValueVisitor::apply
virtual void apply(const osg::Vec4i &)
Definition ValueObject:117
osg::ValueObject::GetValueVisitor::apply
virtual void apply(char)
Definition ValueObject:89
osg::ValueObject::GetValueVisitor::apply
virtual void apply(const osg::Vec3us &)
Definition ValueObject:112
osg::ValueObject::GetValueVisitor::apply
virtual void apply(const osg::Vec3d &)
Definition ValueObject:128
osg::ValueObject::GetValueVisitor::apply
virtual void apply(const osg::Vec4f &)
Definition ValueObject:125
osg::ValueObject::GetValueVisitor::apply
virtual void apply(const osg::Vec4us &)
Definition ValueObject:113
osg::ValueObject::GetValueVisitor::apply
virtual void apply(const osg::Vec3f &)
Definition ValueObject:124
osg::ValueObject::GetValueVisitor::apply
virtual void apply(const osg::Vec2i &)
Definition ValueObject:115
osg::ValueObject::GetValueVisitor::apply
virtual void apply(const osg::Vec4ub &)
Definition ValueObject:105
osg::ValueObject::GetValueVisitor::apply
virtual void apply(const osg::Vec2f &)
Definition ValueObject:123
osg::ValueObject::GetValueVisitor::apply
virtual void apply(const osg::Vec2ub &)
Definition ValueObject:103
osg::ValueObject::GetValueVisitor::~GetValueVisitor
virtual ~GetValueVisitor()
Definition ValueObject:87
osg::ValueObject::GetValueVisitor::apply
virtual void apply(const std::string &)
Definition ValueObject:97
osg::ValueObject::GetValueVisitor::apply
virtual void apply(const osg::Matrixd &)
Definition ValueObject:134
osg::ValueObject::GetValueVisitor::apply
virtual void apply(const osg::BoundingSphered &)
Definition ValueObject:138
osg::ValueObject::GetValueVisitor::apply
virtual void apply(const osg::Vec2s &)
Definition ValueObject:107
osg::ValueObject::GetValueVisitor::apply
virtual void apply(const osg::Vec3ui &)
Definition ValueObject:120
osg::ValueObject::GetValueVisitor::apply
virtual void apply(const osg::Vec3i &)
Definition ValueObject:116
osg::ValueObject::GetValueVisitor::apply
virtual void apply(const osg::Vec2b &)
Definition ValueObject:99
osg::ValueObject::GetValueVisitor::apply
virtual void apply(const osg::Vec2ui &)
Definition ValueObject:119
osg::ValueObject::GetValueVisitor::apply
virtual void apply(const osg::Vec4d &)
Definition ValueObject:129
osg::ValueObject::GetValueVisitor::apply
virtual void apply(float)
Definition ValueObject:95
osg::ValueObject::GetValueVisitor::apply
virtual void apply(bool)
Definition ValueObject:88
osg::ValueObject::GetValueVisitor::apply
virtual void apply(const osg::Vec3ub &)
Definition ValueObject:104
osg::ValueObject::SetValueVisitor
Definition ValueObject:143
osg::ValueObject::SetValueVisitor::apply
virtual void apply(osg::Vec2b &)
Definition ValueObject:157
osg::ValueObject::SetValueVisitor::apply
virtual void apply(osg::Vec4f &)
Definition ValueObject:183
osg::ValueObject::SetValueVisitor::apply
virtual void apply(osg::Vec3d &)
Definition ValueObject:186
osg::ValueObject::SetValueVisitor::apply
virtual void apply(osg::Vec3ui &)
Definition ValueObject:178
osg::ValueObject::SetValueVisitor::apply
virtual void apply(osg::Vec2ui &)
Definition ValueObject:177
osg::ValueObject::SetValueVisitor::apply
virtual void apply(osg::Vec2d &)
Definition ValueObject:185
osg::ValueObject::SetValueVisitor::apply
virtual void apply(osg::Vec2f &)
Definition ValueObject:181
osg::ValueObject::SetValueVisitor::apply
virtual void apply(osg::Vec3ub &)
Definition ValueObject:162
osg::ValueObject::SetValueVisitor::apply
virtual void apply(osg::BoundingBoxd &)
Definition ValueObject:194
osg::ValueObject::SetValueVisitor::apply
virtual void apply(osg::Vec4s &)
Definition ValueObject:167
osg::ValueObject::SetValueVisitor::apply
virtual void apply(osg::Vec4i &)
Definition ValueObject:175
osg::ValueObject::SetValueVisitor::apply
virtual void apply(osg::Plane &)
Definition ValueObject:190
osg::ValueObject::SetValueVisitor::apply
virtual void apply(osg::Matrixf &)
Definition ValueObject:191
osg::ValueObject::SetValueVisitor::apply
virtual void apply(osg::Vec4b &)
Definition ValueObject:159
osg::ValueObject::SetValueVisitor::apply
virtual void apply(osg::Vec3b &)
Definition ValueObject:158
osg::ValueObject::SetValueVisitor::apply
virtual void apply(unsigned char &)
Definition ValueObject:148
osg::ValueObject::SetValueVisitor::apply
virtual void apply(osg::BoundingSpheref &)
Definition ValueObject:195
osg::ValueObject::SetValueVisitor::~SetValueVisitor
virtual ~SetValueVisitor()
Definition ValueObject:145
osg::ValueObject::SetValueVisitor::apply
virtual void apply(osg::Vec4ui &)
Definition ValueObject:179
osg::ValueObject::SetValueVisitor::apply
virtual void apply(bool &)
Definition ValueObject:146
osg::ValueObject::SetValueVisitor::apply
virtual void apply(unsigned int &)
Definition ValueObject:152
osg::ValueObject::SetValueVisitor::apply
virtual void apply(osg::Vec4us &)
Definition ValueObject:171
osg::ValueObject::SetValueVisitor::apply
virtual void apply(osg::Vec3s &)
Definition ValueObject:166
osg::ValueObject::SetValueVisitor::apply
virtual void apply(osg::Vec2us &)
Definition ValueObject:169
osg::ValueObject::SetValueVisitor::apply
virtual void apply(osg::Vec4ub &)
Definition ValueObject:163
osg::ValueObject::SetValueVisitor::apply
virtual void apply(osg::Quat &)
Definition ValueObject:189
osg::ValueObject::SetValueVisitor::apply
virtual void apply(char &)
Definition ValueObject:147
osg::ValueObject::SetValueVisitor::apply
virtual void apply(float &)
Definition ValueObject:153
osg::ValueObject::SetValueVisitor::apply
virtual void apply(osg::BoundingSphered &)
Definition ValueObject:196
osg::ValueObject::SetValueVisitor::apply
virtual void apply(osg::Vec2s &)
Definition ValueObject:165
osg::ValueObject::SetValueVisitor::apply
virtual void apply(osg::Vec3i &)
Definition ValueObject:174
osg::ValueObject::SetValueVisitor::apply
virtual void apply(short &)
Definition ValueObject:149
osg::ValueObject::SetValueVisitor::apply
virtual void apply(osg::Vec4d &)
Definition ValueObject:187
osg::ValueObject::SetValueVisitor::apply
virtual void apply(osg::Vec3us &)
Definition ValueObject:170
osg::ValueObject::SetValueVisitor::apply
virtual void apply(osg::Matrixd &)
Definition ValueObject:192
osg::ValueObject::SetValueVisitor::apply
virtual void apply(std::string &)
Definition ValueObject:155
osg::ValueObject::SetValueVisitor::apply
virtual void apply(unsigned short &)
Definition ValueObject:150
osg::ValueObject::SetValueVisitor::apply
virtual void apply(osg::Vec2ub &)
Definition ValueObject:161
osg::ValueObject::SetValueVisitor::apply
virtual void apply(osg::Vec2i &)
Definition ValueObject:173
osg::ValueObject::SetValueVisitor::apply
virtual void apply(osg::Vec3f &)
Definition ValueObject:182
osg::ValueObject::SetValueVisitor::apply
virtual void apply(int &)
Definition ValueObject:151
osg::ValueObject::SetValueVisitor::apply
virtual void apply(double &)
Definition ValueObject:154
osg::ValueObject::SetValueVisitor::apply
virtual void apply(osg::BoundingBoxf &)
Definition ValueObject:193
osg::ValueObject::asValueObject
virtual const ValueObject * asValueObject() const
Definition ValueObject:82
osg::ValueObject::ValueObject
ValueObject(const std::string &name)
Definition ValueObject:71
osg::ValueObject::META_Object
META_Object(osg, ValueObject) virtual ValueObject *asValueObject()
Definition ValueObject:74
osg::ValueObject::get
virtual bool get(GetValueVisitor &) const
Definition ValueObject:199
osg::ValueObject::~ValueObject
virtual ~ValueObject()
Definition ValueObject:209
osg::ValueObject::ValueObject
ValueObject(const ValueObject &rhs, const osg::CopyOp copyop=osg::CopyOp::SHALLOW_COPY)
Definition ValueObject:72
osg::ValueObject::set
virtual bool set(SetValueVisitor &)
Definition ValueObject:200
osg::ValueObject::getScalarValue
bool getScalarValue(T &value)
Definition ValueObject:203
osg::ValueObject::ValueObject
ValueObject()
Definition ValueObject:70
osg::ValueObject::setScalarValue
bool setScalarValue(T value)
Definition ValueObject:206
osg::Vec2b
Definition Vec2b:26
osg::Vec2d
Definition Vec2d:29
osg::Vec2f
Definition Vec2f:29
osg::Vec2i
Definition Vec2i:22
osg::Vec2s
Definition Vec2s:20
osg::Vec2ub
Definition Vec2ub:22
osg::Vec2ui
Definition Vec2ui:22
osg::Vec2us
Definition Vec2us:20
osg::Vec3b
Definition Vec3b:26
osg::Vec3d
Definition Vec3d:30
osg::Vec3f
Definition Vec3f:29
osg::Vec3i
Definition Vec3i:22
osg::Vec3s
Definition Vec3s:20
osg::Vec3ub
Definition Vec3ub:26
osg::Vec3ui
Definition Vec3ui:22
osg::Vec3us
Definition Vec3us:20
osg::Vec4b
Definition Vec4b:26
osg::Vec4d
Definition Vec4d:29
osg::Vec4f
Definition Vec4f:28
osg::Vec4i
Definition Vec4i:22
osg::Vec4s
Definition Vec4s:26
osg::Vec4ub
Definition Vec4ub:28
osg::Vec4ui
Definition Vec4ui:22
osg::Vec4us
Definition Vec4us:26
osg
Definition AlphaFunc:19
osg::META_ValueObject
META_ValueObject(std::string, StringValueObject) META_ValueObject(bool
osg::BoundingBoxd
BoundingBoxImpl< Vec3d > BoundingBoxd
Definition BoundingBox:252
osg::getOrCreateUserObjectOfType
T * getOrCreateUserObjectOfType(P *parent)
Definition ValueObject:410
osg::BoundingBoxf
BoundingBoxImpl< Vec3f > BoundingBoxf
Definition BoundingBox:251
osg::BoundingSpheref
BoundingSphereImpl< Vec3f > BoundingSpheref
Definition BoundingSphere:308
osg::BoundingSphered
BoundingSphereImpl< Vec3d > BoundingSphered
Definition BoundingSphere:309
NULL
#define NULL
Definition osg/Export:55
osg::ValueObjectClassNameTrait
Definition ValueObject:276
osg::ValueObjectClassNameTrait::className
static const char * className()
Definition ValueObject:277