OpenSceneGraph
Classes | Namespaces | Macros | Functions
Object File Reference
#include <osg/Referenced>
#include <osg/CopyOp>
#include <osg/ref_ptr>
#include <osg/Notify>
#include <string>
#include <vector>

Classes

class  osg::Object
 Base class/standard interface for objects which require IO support, cloning and reference counting. More...
 
class  osg::DummyObject
 DummyObject that can be used as placeholder but otherwise has no other functionality. More...
 

Namespaces

 osg
 The core osg library provides the basic scene graph classes such as Nodes, State and Drawables, and maths and general helper classes.
 

Macros

#define OSG_OBJECT   1
 
#define _ADDQUOTES(def)   #def
 
#define ADDQUOTES(def)   _ADDQUOTES(def)
 
#define META_Object(library, name)
 META_Object macro define the standard clone, isSameKindAs and className methods. More...
 
#define OSG_INIT_SINGLETON_PROXY(ProxyName, Func)   static struct ProxyName{ ProxyName() { Func; } } s_##ProxyName;
 Helper macro that creates a static proxy object to call singleton function on it's construction, ensuring that the singleton gets initialized at startup. More...
 

Functions

template<typename T >
T * osg::clone (const T *t, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 
template<typename T >
T * osg::clone (const T *t, const std::string &name, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 
template<typename T >
T * osg::cloneType (const T *t)
 
void osg::resizeGLObjectBuffers (osg::Object *object, unsigned int maxSize)
 
template<class T >
void osg::resizeGLObjectBuffers (const osg::ref_ptr< T > &object, unsigned int maxSize)
 
void osg::releaseGLObjects (osg::Object *object, osg::State *state=0)
 
template<class T >
void osg::releaseGLObjects (const osg::ref_ptr< T > &object, osg::State *state=0)
 

Macro Definition Documentation

◆ _ADDQUOTES

#define _ADDQUOTES (   def)    #def

◆ ADDQUOTES

#define ADDQUOTES (   def)    _ADDQUOTES(def)

◆ META_Object

#define META_Object (   library,
  name 
)
Value:
virtual osg::Object* cloneType() const { return new name (); } \
virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new name (*this,copyop); } \
virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast<const name *>(obj)!=NULL; } \
virtual const char* libraryName() const { return #library; }\
virtual const char* className() const { return #name; }
#define NULL
Definition: Export:55
Base class/standard interface for objects which require IO support, cloning and reference counting...
Definition: Object:60
Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...
Definition: CopyOp:41
T * clone(const T *t, const std::string &name, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
Definition: Object:349
T * cloneType(const T *t)
Definition: Object:365

META_Object macro define the standard clone, isSameKindAs and className methods.

Use when subclassing from Object to make it more convenient to define the standard pure virtual clone, isSameKindAs and className methods which are required for all Object subclasses.

Referenced by osgViewer::AcrossAllScreens::AcrossAllScreens(), osgPresentation::AnimationMaterial::AnimationMaterial(), osgPresentation::AnimationMaterialCallback::AnimationMaterialCallback(), osg::AnimationPath::AnimationPath(), osg::AnimationPathCallback::AnimationPathCallback(), osgAnimation::AnimationUpdateCallback< osg::UniformCallback >::AnimationUpdateCallback(), osgSim::AzimElevationSector::AzimElevationSector(), osgSim::AzimSector::AzimSector(), osgParticle::BounceOperator::BounceOperator(), osgWidget::BrowserManager::BrowserManager(), osg::Callback::Callback(), osgAnimation::Action::Callback::Callback(), osg::StateSet::Callback::Callback(), osg::CallbackObject::CallbackObject(), osg::Capability::Capability(), osg::Capabilityi::Capabilityi(), osg::Drawable::ComputeBoundingBoxCallback::ComputeBoundingBoxCallback(), osg::Node::ComputeBoundingSphereCallback::ComputeBoundingSphereCallback(), osgSim::ConeSector::ConeSector(), osg::ConvexPlanarOccluder::ConvexPlanarOccluder(), osg::Drawable::CreateVertexArrayStateCallback::CreateVertexArrayStateCallback(), osgSim::DirectionalSector::DirectionalSector(), osg::Disablei::Disablei(), osgParticle::DomainOperator::DomainOperator(), osg::DrawableCullCallback::DrawableCullCallback(), osg::DrawableEventCallback::DrawableEventCallback(), osg::DrawableUpdateCallback::DrawableUpdateCallback(), osg::Drawable::DrawCallback::DrawCallback(), osg::Camera::DrawCallback::DrawCallback(), osgSim::ElevationSector::ElevationSector(), osg::Enablei::Enablei(), osgGA::EventHandler::EventHandler(), osgGA::GUIEventHandler::GUIEventHandler(), osgDB::ImageOptions::ImageOptions(), osgUI::Item::Item(), osgShadow::LightSpacePerspectiveShadowMapCB::LightSpacePerspectiveShadowMapCB(), osgShadow::LightSpacePerspectiveShadowMapDB::LightSpacePerspectiveShadowMapDB(), osgShadow::LightSpacePerspectiveShadowMapVB::LightSpacePerspectiveShadowMapVB(), osgVolume::Locator::Locator(), osgVolume::Locator::LocatorCallback::LocatorCallback(), osgDB::MapIteratorObject::MapIteratorObject(), osg::BufferData::ModifiedCallback::ModifiedCallback(), osgAnimation::MorphTransformSoftware::MorphTransformSoftware(), osg::NodeCallback::NodeCallback(), osgViewer::PanoramicSphericalDisplay::PanoramicSphericalDisplay(), osgShadow::ProjectionShadowMap< MinimalShadowMap, LightSpacePerspectiveShadowMapAlgorithm >::ProjectionShadowMap(), osgDB::ReaderWriter::ReaderWriter(), osgAnimation::RigComputeBoundingBoxCallback::RigComputeBoundingBoxCallback(), osgViewer::SingleScreen::SingleScreen(), osgViewer::SingleWindow::SingleWindow(), osgParticle::SinkOperator::SinkOperator(), osgViewer::SphericalDisplay::SphericalDisplay(), osg::StateAttributeCallback::StateAttributeCallback(), osgUI::Tab::Tab(), osg::TessellationHints::TessellationHints(), osgGA::GUIEventAdapter::TouchData::TouchData(), osg::UniformCallback::UniformCallback(), osgAnimation::UpdateMorphGeometry::UpdateMorphGeometry(), osgAnimation::UpdateRigGeometry::UpdateRigGeometry(), osgViewer::ViewConfig::ViewConfig(), and osgViewer::WoWVxDisplay::WoWVxDisplay().

◆ OSG_INIT_SINGLETON_PROXY

#define OSG_INIT_SINGLETON_PROXY (   ProxyName,
  Func 
)    static struct ProxyName{ ProxyName() { Func; } } s_##ProxyName;

Helper macro that creates a static proxy object to call singleton function on it's construction, ensuring that the singleton gets initialized at startup.

◆ OSG_OBJECT

#define OSG_OBJECT   1