openscenegraph
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
osg::Object Class Referenceabstract

#include <Object>

Inheritance diagram for osg::Object:
osg::Referenced osg::AnimationPath osg::AudioSink osg::AudioStream osg::BufferData osg::BufferData::ModifiedCallback osg::BufferObject osg::Callback osg::ConvexPlanarOccluder osg::Drawable::ComputeBoundingBoxCallback osg::Drawable::CreateVertexArrayStateCallback osg::Drawable::DrawCallback osg::DummyObject osg::EllipsoidModel osg::GraphicsContext osg::Node osg::Node::ComputeBoundingSphereCallback osg::NodeVisitor osg::Program::ProgramBinary osg::RefMatrixd osg::RefMatrixf osg::RenderBuffer osg::Script osg::ScriptEngine osg::Shader osg::ShaderBinary osg::ShaderComponent osg::ShaderComposer osg::Shape osg::StateAttribute osg::StateSet osg::TessellationHints osg::TransferFunction osg::Uniform osg::UserDataContainer osg::ValueMap osg::ValueObject osg::ValueStack osg::View osgAnimation::Action osgAnimation::Action::Callback osgAnimation::Animation osgAnimation::AnimationUpdateCallbackBase osgAnimation::Channel osgAnimation::MorphTransform osgAnimation::RigTransform osgAnimation::StackedTransformElement osgAnimation::VertexInfluenceMap osgDB::DatabaseRevision osgDB::DatabaseRevisions osgDB::FileList osgDB::ImageProcessor osgDB::MapIteratorObject osgDB::Options osgDB::ReaderWriter osgGA::Device osgGA::Event osgGA::GUIEventAdapter::TouchData osgManipulator::DraggerCallback osgParticle::Counter osgParticle::Interpolator osgParticle::Operator osgParticle::Placer osgParticle::Shooter osgPresentation::AnimationMaterial osgPresentation::HomePosition osgPresentation::JumpData osgPresentation::KeyPosition osgPresentation::PropertyManager osgShadow::ShadowSettings osgShadow::ShadowTechnique osgSim::BlinkSequence osgSim::LightPointSystem osgSim::ObjectRecordData osgSim::Sector osgSim::SequenceGroup osgSim::ShapeAttributeList osgTerrain::Layer osgTerrain::Locator osgTerrain::TerrainTechnique osgText::Bevel osgText::Font osgText::Style osgUI::AlignmentSettings osgUI::ColorPalette osgUI::FrameSettings osgUI::Item osgUI::Style osgUI::Tab osgUI::TextSettings osgUI::Validator osgUtil::PositionalStateContainer osgUtil::RenderBin osgUtil::SceneView osgUtil::StateGraph osgViewer::Keystone osgViewer::ViewConfig osgViewer::ViewerBase osgVolume::ImageDetails osgVolume::Layer osgVolume::Locator osgVolume::Locator::LocatorCallback osgVolume::Property osgVolume::VolumeTechnique osgWidget::BrowserManager osgWidget::Style osgWidget::StyleManager

Public Types

enum  DataVariance { DYNAMIC , STATIC , UNSPECIFIED }
 

Public Member Functions

 Object ()
 
 Object (bool threadSafeRefUnref)
 
 Object (const Object &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 
virtual ObjectcloneType () const =0
 
virtual Objectclone (const CopyOp &) const =0
 
virtual bool isSameKindAs (const Object *) const
 
virtual const char * libraryName () const =0
 
virtual const char * className () const =0
 
std::string getCompoundClassName () const
 
virtual NodeasNode ()
 
virtual const NodeasNode () const
 
virtual NodeVisitorasNodeVisitor ()
 
virtual const NodeVisitorasNodeVisitor () const
 
virtual StateSetasStateSet ()
 
virtual const StateSetasStateSet () const
 
virtual StateAttributeasStateAttribute ()
 
virtual const StateAttributeasStateAttribute () const
 
virtual UniformasUniform ()
 
virtual const UniformasUniform () const
 
virtual CameraasCamera ()
 
virtual const CameraasCamera () const
 
virtual DrawableasDrawable ()
 
virtual const DrawableasDrawable () const
 
virtual CallbackasCallback ()
 
virtual const CallbackasCallback () const
 
virtual CallbackObjectasCallbackObject ()
 
virtual const CallbackObjectasCallbackObject () const
 
virtual UserDataContainerasUserDataContainer ()
 
virtual const UserDataContainerasUserDataContainer () const
 
virtual ValueObjectasValueObject ()
 
virtual const ValueObjectasValueObject () const
 
virtual ImageasImage ()
 
virtual const ImageasImage () const
 
virtual void setThreadSafeRefUnref (bool threadSafe)
 
virtual void setName (const std::string &name)
 
void setName (const char *name)
 
const std::string & getName () const
 
void setDataVariance (DataVariance dv)
 
DataVariance getDataVariance () const
 
virtual void computeDataVariance ()
 
void setUserDataContainer (osg::UserDataContainer *udc)
 
template<class T >
void setUserDataContainer (const ref_ptr< T > &udc)
 
osg::UserDataContainergetUserDataContainer ()
 
const osg::UserDataContainergetUserDataContainer () const
 
osg::UserDataContainergetOrCreateUserDataContainer ()
 
virtual void setUserData (Referenced *obj)
 
template<class T >
void setUserData (const ref_ptr< T > &ud)
 
virtual ReferencedgetUserData ()
 
virtual const ReferencedgetUserData () const
 
template<typename T >
bool getUserValue (const std::string &name, T &value) const
 
template<typename T >
void setUserValue (const std::string &name, const T &value)
 
virtual void resizeGLObjectBuffers (unsigned int)
 
virtual void releaseGLObjects (osg::State *=0) const
 
template<typename T >
BoolValueObject UCharValueObject UShortValueObject UIntValueObject DoubleValueObject Vec3fValueObject Vec2dValueObject Vec4dValueObject PlaneValueObject MatrixdValueObject BoundingBoxdValueObject BoundingSpheredValueObject bool getUserValue (const std::string &name, T &value) const
 
- Public Member Functions inherited from osg::Referenced
 Referenced ()
 
 Referenced (bool threadSafeRefUnref)
 
 Referenced (const Referenced &)
 
Referencedoperator= (const Referenced &)
 
bool getThreadSafeRefUnref () const
 
OpenThreads::MutexgetRefMutex () const
 
int ref () const
 
int unref () const
 
int unref_nodelete () const
 
int referenceCount () const
 
ObserverSetgetObserverSet () const
 
ObserverSetgetOrCreateObserverSet () const
 
void addObserver (Observer *observer) const
 
void removeObserver (Observer *observer) const
 

Protected Member Functions

virtual ~Object ()
 
- Protected Member Functions inherited from osg::Referenced
virtual ~Referenced ()
 
void signalObserversAndDelete (bool signalDelete, bool doDelete) const
 
void deleteUsingDeleteHandler () const
 

Protected Attributes

std::string _name
 
DataVariance _dataVariance
 
osg::UserDataContainer_userDataContainer
 
- Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr _observerSet
 
OpenThreads::Atomic _refCount
 

Additional Inherited Members

- Static Public Member Functions inherited from osg::Referenced
static OpenThreads::MutexgetGlobalReferencedMutex ()
 
static void setDeleteHandler (DeleteHandler *handler)
 
static DeleteHandlergetDeleteHandler ()
 

Detailed Description

Base class/standard interface for objects which require IO support, cloning and reference counting. Based on GOF Composite, Prototype and Template Method patterns.

Member Enumeration Documentation

◆ DataVariance

Enumerator
DYNAMIC 
STATIC 
UNSPECIFIED 

Constructor & Destructor Documentation

◆ Object() [1/3]

osg::Object::Object ( )
inline

Construct an object. Note Object is a pure virtual base class and therefore cannot be constructed on its own, only derived classes which override the clone and className methods are concrete classes and can be constructed.

◆ Object() [2/3]

osg::Object::Object ( bool  threadSafeRefUnref)
inlineexplicit

◆ Object() [3/3]

osg::Object::Object ( const Object ,
const CopyOp copyop = CopyOp::SHALLOW_COPY 
)

Copy constructor, optional CopyOp object can be used to control shallow vs deep copying of dynamic data.

◆ ~Object()

virtual osg::Object::~Object ( )
protectedvirtual

Object destructor. Note, is protected so that Objects cannot be deleted other than by being dereferenced and the reference count being zero (see osg::Referenced), preventing the deletion of nodes which are still in use. This also means that Nodes cannot be created on stack i.e Node node will not compile, forcing all nodes to be created on the heap i.e Node* node = new Node().

Member Function Documentation

◆ asCallback() [1/2]

virtual Callback * osg::Object::asCallback ( )
inlinevirtual

◆ asCallback() [2/2]

virtual const Callback * osg::Object::asCallback ( ) const
inlinevirtual

◆ asCallbackObject() [1/2]

virtual CallbackObject * osg::Object::asCallbackObject ( )
inlinevirtual

◆ asCallbackObject() [2/2]

virtual const CallbackObject * osg::Object::asCallbackObject ( ) const
inlinevirtual

◆ asCamera() [1/2]

virtual Camera * osg::Object::asCamera ( )
inlinevirtual

Convert 'this' into a Camera pointer if Node is a Camera, otherwise return 0. Equivalent to dynamic_cast<Camera*>(this).

Reimplemented in osg::Camera.

◆ asCamera() [2/2]

virtual const Camera * osg::Object::asCamera ( ) const
inlinevirtual

convert 'const this' into a const Camera pointer if Node is a Camera, otherwise return 0. Equivalent to dynamic_cast<const Camera*>(this).

Reimplemented in osg::Camera.

◆ asDrawable() [1/2]

virtual Drawable * osg::Object::asDrawable ( )
inlinevirtual

Convert 'this' into a Drawable pointer if Object is a Drawable, otherwise return 0. Equivalent to dynamic_cast<Drawable*>(this).

Reimplemented in osg::Drawable, and osg::Node.

◆ asDrawable() [2/2]

virtual const Drawable * osg::Object::asDrawable ( ) const
inlinevirtual

convert 'const this' into a const Drawable pointer if Object is a Drawable, otherwise return 0. Equivalent to dynamic_cast<const Drawable*>(this).

Reimplemented in osg::Drawable, and osg::Node.

◆ asImage() [1/2]

virtual Image * osg::Object::asImage ( )
inlinevirtual

Convert 'this' into a Image pointer if Object is a Image, otherwise return 0. Equivalent to dynamic_cast<Image*>(this).

Reimplemented in osg::BufferData, and osg::Image.

◆ asImage() [2/2]

virtual const Image * osg::Object::asImage ( ) const
inlinevirtual

Convert 'this' into a Image pointer if Object is a Image, otherwise return 0. Equivalent to dynamic_cast<Image*>(this).

Reimplemented in osg::BufferData, and osg::Image.

◆ asNode() [1/2]

virtual Node * osg::Object::asNode ( )
inlinevirtual

Convert 'this' into a Node pointer if Object is a Node, otherwise return 0. Equivalent to dynamic_cast<Node*>(this).

Reimplemented in osg::Node.

◆ asNode() [2/2]

virtual const Node * osg::Object::asNode ( ) const
inlinevirtual

convert 'const this' into a const Node pointer if Object is a Node, otherwise return 0. Equivalent to dynamic_cast<const Node*>(this).

Reimplemented in osg::Node.

◆ asNodeVisitor() [1/2]

virtual NodeVisitor * osg::Object::asNodeVisitor ( )
inlinevirtual

Convert 'this' into a NodeVisitor pointer if Object is a NodeVisitor, otherwise return 0. Equivalent to dynamic_cast<NodeVisitor*>(this).

◆ asNodeVisitor() [2/2]

virtual const NodeVisitor * osg::Object::asNodeVisitor ( ) const
inlinevirtual

convert 'const this' into a const NodeVisitor pointer if Object is a NodeVisitor, otherwise return 0. Equivalent to dynamic_cast<const NodeVisitor*>(this).

Reimplemented in osg::NodeVisitor.

◆ asStateAttribute() [1/2]

virtual StateAttribute * osg::Object::asStateAttribute ( )
inlinevirtual

Convert 'this' into a StateAttribute pointer if Object is a StateAttribute, otherwise return 0. Equivalent to dynamic_cast<StateAttribute*>(this).

Reimplemented in osg::StateAttribute.

◆ asStateAttribute() [2/2]

virtual const StateAttribute * osg::Object::asStateAttribute ( ) const
inlinevirtual

convert 'const this' into a const StateAttribute pointer if Object is a StateAttribute, otherwise return 0. Equivalent to dynamic_cast<const StateAttribute*>(this).

Reimplemented in osg::StateAttribute.

◆ asStateSet() [1/2]

virtual StateSet * osg::Object::asStateSet ( )
inlinevirtual

Convert 'this' into a StateSet pointer if Object is a StateSet, otherwise return 0. Equivalent to dynamic_cast<StateSet*>(this).

Reimplemented in osg::StateSet.

◆ asStateSet() [2/2]

virtual const StateSet * osg::Object::asStateSet ( ) const
inlinevirtual

convert 'const this' into a const StateSet pointer if Object is a StateSet, otherwise return 0. Equivalent to dynamic_cast<const StateSet*>(this).

Reimplemented in osg::StateSet.

◆ asUniform() [1/2]

virtual Uniform * osg::Object::asUniform ( )
inlinevirtual

Convert 'this' into a Uniform pointer if Object is a Uniform, otherwise return 0. Equivalent to dynamic_cast<Uniform*>(this).

Reimplemented in osg::Uniform.

◆ asUniform() [2/2]

virtual const Uniform * osg::Object::asUniform ( ) const
inlinevirtual

convert 'const this' into a const Uniform pointer if Object is a Uniform, otherwise return 0. Equivalent to dynamic_cast<const Uniform*>(this).

Reimplemented in osg::Uniform.

◆ asUserDataContainer() [1/2]

virtual UserDataContainer * osg::Object::asUserDataContainer ( )
inlinevirtual

Convert 'this' into a UserDataContainer pointer if Object is a UserDataContainer, otherwise return 0. Equivalent to dynamic_cast<UserDataContainer*>(this).

Reimplemented in osg::UserDataContainer.

◆ asUserDataContainer() [2/2]

virtual const UserDataContainer * osg::Object::asUserDataContainer ( ) const
inlinevirtual

convert 'const this' into a const UserDataContainer pointer if Object is a UserDataContainer, otherwise return 0. Equivalent to dynamic_cast<const UserDataContainer*>(this).

Reimplemented in osg::UserDataContainer.

◆ asValueObject() [1/2]

virtual ValueObject * osg::Object::asValueObject ( )
inlinevirtual

Convert 'this' into a ValueObject pointer if Object is a ValueObject, otherwise return 0. Equivalent to dynamic_cast<ValueObject*>(this).

◆ asValueObject() [2/2]

virtual const ValueObject * osg::Object::asValueObject ( ) const
inlinevirtual

Convert 'this' into a ValueObject pointer if Object is a ValueObject, otherwise return 0. Equivalent to dynamic_cast<ValueObject*>(this).

Reimplemented in osg::ValueObject.

◆ className()

virtual const char * osg::Object::className ( ) const
pure virtual

return the name of the object's class type. Must be defined by derived classes.

Implemented in osg::Array, osg::AudioSink, osg::AudioStream, osg::AutoTransform, osg::BufferObject, osg::BufferData, osg::BufferTemplate< T >, osg::BufferTemplate< std::vector< T > >, osg::ClipPlane, osg::DrawPixels, osg::GraphicsContext, osg::Hint, osg::Image, osg::ImageSequence, osg::ImageStream, osg::Light, osg::RefMatrixd, osg::RefMatrixf, osg::Node, osg::PrimitiveSet, osg::DrawArrays, osg::DrawArrayLengths, osg::DrawElementsUByte, osg::DrawElementsUShort, osg::DrawElementsUInt, osg::MultiDrawArrays, osg::DrawElementsIndirectUByte, osg::DrawElementsIndirectUShort, osg::DrawElementsIndirectUInt, osg::MultiDrawElementsIndirectUShort, osg::MultiDrawElementsIndirectUByte, osg::MultiDrawElementsIndirectUInt, osg::DrawArraysIndirect, osg::MultiDrawArraysIndirect, osg::ShaderAttribute, osg::Shape, osg::ShapeDrawable, osg::StateAttribute, osg::StateSet, osg::Texture, osg::UserDataContainer, osg::TemplateValueObject< T >, osg::VertexAttribDivisor, osgAnimation::Channel, osgAnimation::MorphGeometry, osgDB::Archive, osgFX::Effect, osgGA::AnimationPathManipulator, osgGA::CameraManipulator, osgGA::CameraViewSwitchManipulator, osgGA::DriveManipulator, osgGA::KeySwitchMatrixManipulator, osgGA::SphericalManipulator, osgGA::StandardManipulator, osgGA::StateSetManipulator, osgGA::UFOManipulator, osgManipulator::AntiSquish, osgParticle::CenteredPlacer, osgParticle::Counter, osgParticle::Emitter, osgParticle::Interpolator, osgParticle::Operator, osgParticle::ParticleEffect, osgParticle::ParticleProcessor, osgParticle::Placer, osgParticle::PrecipitationEffect, osgParticle::Program, osgParticle::Shooter, osgParticle::VariableRateCounter, osgShadow::ShadowTechnique, osgSim::ImpostorSprite, osgSim::Sector, osgText::Font, osgText::GlyphTexture, osgText::Text, osgText::TextBase, osgUtil::PositionalStateContainer, osgUtil::RenderBin, osgUtil::RenderStage, osgUtil::StateGraph, osgViewer::GraphicsWindowWin32, osgViewer::PixelBufferWin32, osgViewer::GraphicsWindowX11, osgViewer::PixelBufferX11, osgViewer::GraphicsWindow, and osgViewer::GraphicsWindowEmbedded.

◆ clone()

virtual Object * osg::Object::clone ( const CopyOp ) const
pure virtual

◆ cloneType()

virtual Object * osg::Object::cloneType ( ) const
pure virtual

◆ computeDataVariance()

virtual void osg::Object::computeDataVariance ( )
inlinevirtual

Compute the DataVariance based on an assessment of callback etc.

Reimplemented in osg::Drawable, and osg::StateSet.

◆ getCompoundClassName()

std::string osg::Object::getCompoundClassName ( ) const
inline

return the compound class name that combines the library name and class name.

◆ getDataVariance()

DataVariance osg::Object::getDataVariance ( ) const
inline

Get the data variance of this object.

◆ getName()

const std::string & osg::Object::getName ( ) const
inline

Get the name of object.

◆ getOrCreateUserDataContainer()

osg::UserDataContainer * osg::Object::getOrCreateUserDataContainer ( )

Convenience method that returns the UserDataContainer, and if one doesn't already exist creates and assigns a DefaultUserDataContainer to the Object and then return this new UserDataContainer.

◆ getUserData() [1/2]

virtual Referenced * osg::Object::getUserData ( )
virtual

◆ getUserData() [2/2]

virtual const Referenced * osg::Object::getUserData ( ) const
virtual

Get const user data.

Reimplemented in osg::DefaultUserDataContainer, osgUtil::StateGraph, and osg::UserDataContainer.

◆ getUserDataContainer() [1/2]

osg::UserDataContainer * osg::Object::getUserDataContainer ( )
inline

get the UserDataContainer attached to this object.

◆ getUserDataContainer() [2/2]

const osg::UserDataContainer * osg::Object::getUserDataContainer ( ) const
inline

get the const UserDataContainer attached to this object.

◆ getUserValue() [1/2]

template<typename T >
bool osg::Object::getUserValue ( const std::string &  name,
T &  value 
) const

Convenience method that casts the named UserObject to osg::TemplateValueObject<T> and gets the value. To use this template method you need to include the osg/ValueObject header.

◆ getUserValue() [2/2]

template<typename T >
BoolValueObject UCharValueObject UShortValueObject UIntValueObject DoubleValueObject Vec3fValueObject Vec2dValueObject Vec4dValueObject PlaneValueObject MatrixdValueObject BoundingBoxdValueObject BoundingSpheredValueObject bool osg::Object::getUserValue ( const std::string &  name,
T &  value 
) const

provide implementation of osg::Object::getUserValue(..) template

◆ isSameKindAs()

virtual bool osg::Object::isSameKindAs ( const Object ) const
inlinevirtual

Reimplemented in osg::Array, osg::IndexArray, osg::AudioStream, osg::BufferObject, osg::BufferData, osg::BufferTemplate< T >, osg::BufferTemplate< std::vector< T > >, osg::DrawPixels, osg::Image, osg::ImageSequence, osg::ImageStream, osg::RefMatrixd, osg::RefMatrixf, osg::Node, osg::PrimitiveSet, osg::DrawArrays, osg::DrawArrayLengths, osg::DrawElementsUByte, osg::DrawElementsUShort, osg::DrawElementsUInt, osg::DrawElementsIndirectUByte, osg::DrawElementsIndirectUShort, osg::DrawElementsIndirectUInt, osg::Shape, osg::ShapeDrawable, osg::StateAttribute, osg::StateSet, osg::UserDataContainer, osg::TemplateValueObject< T >, osg::GraphicsContext, osg::AutoTransform, osg::ClipPlane, osg::Hint, osg::Light, osg::MultiDrawArrays, osg::MultiDrawElementsIndirectUShort, osg::MultiDrawElementsIndirectUByte, osg::MultiDrawElementsIndirectUInt, osg::DrawArraysIndirect, osg::MultiDrawArraysIndirect, osg::ShaderAttribute, osg::Texture, osg::VertexAttribDivisor, osgAnimation::MorphGeometry, osgFX::Effect, osgManipulator::AntiSquish, osgParticle::CenteredPlacer, osgParticle::Counter, osgParticle::Emitter, osgParticle::Interpolator, osgParticle::Operator, osgParticle::ParticleEffect, osgParticle::ParticleProcessor, osgParticle::Placer, osgParticle::PrecipitationEffect, osgParticle::Program, osgParticle::Shooter, osgParticle::VariableRateCounter, osgShadow::ShadowTechnique, osgSim::ImpostorSprite, osgSim::Sector, osgText::Font, osgText::Text, osgText::TextBase, osgUtil::PositionalStateContainer, osgUtil::RenderBin, osgUtil::RenderStage, and osgUtil::StateGraph.

◆ libraryName()

virtual const char * osg::Object::libraryName ( ) const
pure virtual

return the name of the object's library. Must be defined by derived classes. The OpenSceneGraph convention is that the namespace of a library is the same as the library name.

Implemented in osg::Array, osg::AudioSink, osg::AudioStream, osg::AutoTransform, osg::BufferObject, osg::BufferData, osg::BufferTemplate< T >, osg::BufferTemplate< std::vector< T > >, osg::ClipPlane, osg::DrawPixels, osg::GraphicsContext, osg::Hint, osg::Image, osg::ImageSequence, osg::ImageStream, osg::Light, osg::RefMatrixd, osg::RefMatrixf, osg::Node, osg::PrimitiveSet, osg::DrawArrays, osg::DrawArrayLengths, osg::DrawElementsUByte, osg::DrawElementsUShort, osg::DrawElementsUInt, osg::MultiDrawArrays, osg::DrawElementsIndirectUByte, osg::DrawElementsIndirectUShort, osg::DrawElementsIndirectUInt, osg::DrawArraysIndirect, osg::ShaderAttribute, osg::Shape, osg::ShapeDrawable, osg::StateAttribute, osg::StateSet, osg::Texture, osg::UserDataContainer, osg::TemplateValueObject< T >, osg::VertexAttribDivisor, osgAnimation::Channel, osgAnimation::MorphGeometry, osgDB::Archive, osgFX::Effect, osgManipulator::AntiSquish, osgParticle::CenteredPlacer, osgParticle::Counter, osgParticle::Emitter, osgParticle::Interpolator, osgParticle::Operator, osgParticle::ParticleEffect, osgParticle::ParticleProcessor, osgParticle::Placer, osgParticle::PrecipitationEffect, osgParticle::Program, osgParticle::Shooter, osgParticle::VariableRateCounter, osgShadow::ShadowTechnique, osgSim::ImpostorSprite, osgSim::Sector, osgText::Font, osgText::Text, osgText::TextBase, osgUtil::PositionalStateContainer, osgUtil::RenderBin, osgUtil::StateGraph, osgViewer::GraphicsWindowWin32, osgViewer::PixelBufferWin32, osgViewer::GraphicsWindowX11, osgViewer::PixelBufferX11, osgViewer::GraphicsWindow, and osgViewer::GraphicsWindowEmbedded.

◆ releaseGLObjects()

virtual void osg::Object::releaseGLObjects ( osg::State = 0) const
inlinevirtual

◆ resizeGLObjectBuffers()

virtual void osg::Object::resizeGLObjectBuffers ( unsigned int  )
inlinevirtual

◆ setDataVariance()

void osg::Object::setDataVariance ( DataVariance  dv)
inline

Set the data variance of this object. Can be set to either STATIC for values that do not change over the lifetime of the object, or DYNAMIC for values that vary over the lifetime of the object. The DataVariance value can be used by routines such as optimization codes that wish to share static data. UNSPECIFIED is used to specify that the DataVariance hasn't been set yet.

◆ setName() [1/2]

void osg::Object::setName ( const char *  name)
inline

Set the name of object using a C style string.

◆ setName() [2/2]

virtual void osg::Object::setName ( const std::string &  name)
inlinevirtual

Set the name of object using C++ style string.

Reimplemented in osg::Uniform, and osgAnimation::Channel.

◆ setThreadSafeRefUnref()

virtual void osg::Object::setThreadSafeRefUnref ( bool  threadSafe)
virtual

Set whether to use a mutex to ensure ref() and unref() are thread safe.

Reimplemented from osg::Referenced.

Reimplemented in osg::Drawable, osg::Group, osg::LightSource, osg::Node, osg::Program, osg::StateSet, osg::TexGenNode, osgSim::OverlayNode, osgText::Font, and osgText::GlyphTexture.

◆ setUserData() [1/2]

template<class T >
void osg::Object::setUserData ( const ref_ptr< T > &  ud)
inline

◆ setUserData() [2/2]

virtual void osg::Object::setUserData ( Referenced obj)
virtual

Set user data, data must be subclassed from Referenced to allow automatic memory handling. If your own data isn't directly subclassed from Referenced then create an adapter object which points to your own object and handles the memory addressing.

Reimplemented in osgUtil::StateGraph, osg::DefaultUserDataContainer, and osg::UserDataContainer.

◆ setUserDataContainer() [1/2]

template<class T >
void osg::Object::setUserDataContainer ( const ref_ptr< T > &  udc)
inline

◆ setUserDataContainer() [2/2]

void osg::Object::setUserDataContainer ( osg::UserDataContainer udc)

set the UserDataContainer object.

◆ setUserValue()

template<typename T >
void osg::Object::setUserValue ( const std::string &  name,
const T &  value 
)

Convenience method that creates the osg::TemplateValueObject<T> to store the specified value and adds it as a named UserObject. To use this template method you need to include the osg/ValueObject header.

provide implementation of osg::Object::setUserValue(..) template.

Member Data Documentation

◆ _dataVariance

DataVariance osg::Object::_dataVariance
protected

◆ _name

std::string osg::Object::_name
protected

◆ _userDataContainer

osg::UserDataContainer* osg::Object::_userDataContainer
protected

The documentation for this class was generated from the following files: