OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Types | Protected Attributes | List of all members
osgUtil::GLObjectsVisitor Class Reference

#include <GLObjectsVisitor.h>

Inheritance diagram for osgUtil::GLObjectsVisitor:
Inheritance graph
[legend]
Collaboration diagram for osgUtil::GLObjectsVisitor:
Collaboration graph
[legend]

Public Types

enum  ModeValues {
  SWITCH_ON_DISPLAY_LISTS = 0x1, SWITCH_OFF_DISPLAY_LISTS = 0x2, COMPILE_DISPLAY_LISTS = 0x4, COMPILE_STATE_ATTRIBUTES = 0x8,
  RELEASE_DISPLAY_LISTS = 0x10, RELEASE_STATE_ATTRIBUTES = 0x20, SWITCH_ON_VERTEX_BUFFER_OBJECTS = 0x40, SWITCH_OFF_VERTEX_BUFFER_OBJECTS = 0x80,
  CHECK_BLACK_LISTED_MODES = 0x100
}
 
typedef unsigned int Mode
 
- Public Types inherited from osg::NodeVisitor
enum  TraversalMode { TRAVERSE_NONE, TRAVERSE_PARENTS, TRAVERSE_ALL_CHILDREN, TRAVERSE_ACTIVE_CHILDREN }
 
enum  VisitorType {
  NODE_VISITOR = 0, UPDATE_VISITOR, EVENT_VISITOR, COLLECT_OCCLUDER_VISITOR,
  CULL_VISITOR, INTERSECTION_VISITOR
}
 
- Public Types inherited from osg::Object
enum  DataVariance { DYNAMIC, STATIC, UNSPECIFIED }
 

Public Member Functions

 GLObjectsVisitor (Mode mode=COMPILE_DISPLAY_LISTS|COMPILE_STATE_ATTRIBUTES|CHECK_BLACK_LISTED_MODES)
 
 META_NodeVisitor (osgUtil, GLObjectsVisitor) virtual void reset()
 
void setMode (Mode mode)
 
Mode getMode () const
 
void setState (osg::State *state)
 
osg::StategetState ()
 
void setRenderInfo (osg::RenderInfo &renderInfo)
 
osg::RenderInfogetRenderInfo ()
 
virtual void apply (osg::Node &node)
 
virtual void apply (osg::Geode &node)
 
void apply (osg::Drawable &drawable)
 
void apply (osg::StateSet &stateset)
 
- Public Member Functions inherited from osg::NodeVisitor
 NodeVisitor (TraversalMode tm=TRAVERSE_NONE)
 
 NodeVisitor (VisitorType type, TraversalMode tm=TRAVERSE_NONE)
 
 NodeVisitor (const NodeVisitor &nv, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 
virtual ~NodeVisitor ()
 
 META_Object (osg, NodeVisitor) virtual NodeVisitor *asNodeVisitor()
 
virtual const NodeVisitorasNodeVisitor () const
 
virtual void reset ()
 
void setVisitorType (VisitorType type)
 
VisitorType getVisitorType () const
 
void setTraversalNumber (unsigned int fn)
 
unsigned int getTraversalNumber () const
 
void setFrameStamp (FrameStamp *fs)
 
const FrameStampgetFrameStamp () const
 
void setTraversalMask (Node::NodeMask mask)
 
Node::NodeMask getTraversalMask () const
 
void setNodeMaskOverride (Node::NodeMask mask)
 
Node::NodeMask getNodeMaskOverride () const
 
bool validNodeMask (const osg::Node &node) const
 
void setTraversalMode (TraversalMode mode)
 
TraversalMode getTraversalMode () const
 
void traverse (Node &node)
 
void pushOntoNodePath (Node *node)
 
void popFromNodePath ()
 
NodePathgetNodePath ()
 
const NodePathgetNodePath () const
 
virtual osg::Vec3 getEyePoint () const
 
virtual osg::Vec3 getViewPoint () const
 
virtual float getDistanceToEyePoint (const Vec3 &, bool) const
 
virtual float getDistanceFromEyePoint (const Vec3 &, bool) const
 
virtual float getDistanceToViewPoint (const Vec3 &, bool) const
 
virtual void apply (Geometry &geometry)
 
virtual void apply (Billboard &node)
 
virtual void apply (Group &node)
 
virtual void apply (ProxyNode &node)
 
virtual void apply (Projection &node)
 
virtual void apply (CoordinateSystemNode &node)
 
virtual void apply (ClipNode &node)
 
virtual void apply (TexGenNode &node)
 
virtual void apply (LightSource &node)
 
virtual void apply (Transform &node)
 
virtual void apply (Camera &node)
 
virtual void apply (CameraView &node)
 
virtual void apply (MatrixTransform &node)
 
virtual void apply (PositionAttitudeTransform &node)
 
virtual void apply (Switch &node)
 
virtual void apply (Sequence &node)
 
virtual void apply (LOD &node)
 
virtual void apply (PagedLOD &node)
 
virtual void apply (ClearNode &node)
 
virtual void apply (OccluderNode &node)
 
virtual void apply (OcclusionQueryNode &node)
 
void setDatabaseRequestHandler (DatabaseRequestHandler *handler)
 
DatabaseRequestHandlergetDatabaseRequestHandler ()
 
const DatabaseRequestHandlergetDatabaseRequestHandler () const
 
void setImageRequestHandler (ImageRequestHandler *handler)
 
ImageRequestHandlergetImageRequestHandler ()
 
const ImageRequestHandlergetImageRequestHandler () const
 
- Public Member Functions inherited from osg::Object
 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 StateAttributeasStateAttribute ()
 
virtual const StateAttributeasStateAttribute () const
 
virtual UniformasUniform ()
 
virtual const UniformasUniform () 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)
 
osg::UserDataContainergetUserDataContainer ()
 
const osg::UserDataContainergetUserDataContainer () const
 
osg::UserDataContainergetOrCreateUserDataContainer ()
 
virtual void setUserData (Referenced *obj)
 
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 Types

typedef std::set< osg::Drawable * > DrawableAppliedSet
 
typedef std::set< osg::StateSet * > StatesSetAppliedSet
 

Protected Attributes

Mode _mode
 
osg::RenderInfo _renderInfo
 
DrawableAppliedSet _drawablesAppliedSet
 
StatesSetAppliedSet _stateSetAppliedSet
 
osg::ref_ptr< osg::Program_lastCompiledProgram
 
- Protected Attributes inherited from osg::NodeVisitor
VisitorType _visitorType
 
unsigned int _traversalNumber
 
ref_ptr< FrameStamp_frameStamp
 
TraversalMode _traversalMode
 
Node::NodeMask _traversalMask
 
Node::NodeMask _nodeMaskOverride
 
NodePath _nodePath
 
ref_ptr< DatabaseRequestHandler_databaseRequestHandler
 
ref_ptr< ImageRequestHandler_imageRequestHandler
 
- Protected Attributes inherited from osg::Object
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 setThreadSafeReferenceCounting (bool enableThreadSafeReferenceCounting)
 
static bool getThreadSafeReferenceCounting ()
 
static void setDeleteHandler (DeleteHandler *handler)
 
static DeleteHandlergetDeleteHandler ()
 
- Protected Member Functions inherited from osg::Object
virtual ~Object ()
 
- Protected Member Functions inherited from osg::Referenced
virtual ~Referenced ()
 
void signalObserversAndDelete (bool signalDelete, bool doDelete) const
 
void deleteUsingDeleteHandler () const
 

Detailed Description

Visitor for traversing scene graph and setting each osg::Drawable's _useDisplayList flag, with option to immediately compile osg::Drawable OpenGL Display lists and osg::StateAttribute's.

Definition at line 30 of file GLObjectsVisitor.h.

Member Typedef Documentation

Definition at line 107 of file GLObjectsVisitor.h.

typedef unsigned int osgUtil::GLObjectsVisitor::Mode

Definition at line 48 of file GLObjectsVisitor.h.

Definition at line 108 of file GLObjectsVisitor.h.

Member Enumeration Documentation

Operation modes of the.

Enumerator
SWITCH_ON_DISPLAY_LISTS 
SWITCH_OFF_DISPLAY_LISTS 
COMPILE_DISPLAY_LISTS 
COMPILE_STATE_ATTRIBUTES 
RELEASE_DISPLAY_LISTS 
RELEASE_STATE_ATTRIBUTES 
SWITCH_ON_VERTEX_BUFFER_OBJECTS 
SWITCH_OFF_VERTEX_BUFFER_OBJECTS 
CHECK_BLACK_LISTED_MODES 

Definition at line 35 of file GLObjectsVisitor.h.

Constructor & Destructor Documentation

osgUtil::GLObjectsVisitor::GLObjectsVisitor ( Mode  mode = COMPILE_DISPLAY_LISTS|COMPILE_STATE_ATTRIBUTES|CHECK_BLACK_LISTED_MODES)

Construct a GLObjectsVisitor to traverse all children, operating on node according to specified mode, such as to compile or release display list/texture objects etc. Default mode is to compile GL objects.

Member Function Documentation

virtual void osgUtil::GLObjectsVisitor::apply ( osg::Node node)
virtual

Simply traverse using standard NodeVisitor traverse method.

Reimplemented from osg::NodeVisitor.

virtual void osgUtil::GLObjectsVisitor::apply ( osg::Geode node)
virtual

For each Geode visited set the display list usage according to the _displayListMode.

Reimplemented from osg::NodeVisitor.

void osgUtil::GLObjectsVisitor::apply ( osg::Drawable drawable)
virtual

Reimplemented from osg::NodeVisitor.

void osgUtil::GLObjectsVisitor::apply ( osg::StateSet stateset)
Mode osgUtil::GLObjectsVisitor::getMode ( ) const
inline

Get the operational mode.

Definition at line 70 of file GLObjectsVisitor.h.

osg::RenderInfo& osgUtil::GLObjectsVisitor::getRenderInfo ( )
inline

Definition at line 89 of file GLObjectsVisitor.h.

osg::State* osgUtil::GLObjectsVisitor::getState ( )
inline

Definition at line 79 of file GLObjectsVisitor.h.

osgUtil::GLObjectsVisitor::META_NodeVisitor ( osgUtil  ,
GLObjectsVisitor   
)
inline

Definition at line 57 of file GLObjectsVisitor.h.

void osgUtil::GLObjectsVisitor::setMode ( Mode  mode)
inline

Set the operational mode of what operations to do on the scene graph.

Definition at line 67 of file GLObjectsVisitor.h.

void osgUtil::GLObjectsVisitor::setRenderInfo ( osg::RenderInfo renderInfo)
inline

Definition at line 84 of file GLObjectsVisitor.h.

void osgUtil::GLObjectsVisitor::setState ( osg::State state)
inline

Set the State to use during traversal.

Definition at line 74 of file GLObjectsVisitor.h.

Member Data Documentation

DrawableAppliedSet osgUtil::GLObjectsVisitor::_drawablesAppliedSet
protected

Definition at line 112 of file GLObjectsVisitor.h.

osg::ref_ptr<osg::Program> osgUtil::GLObjectsVisitor::_lastCompiledProgram
protected

Definition at line 114 of file GLObjectsVisitor.h.

Mode osgUtil::GLObjectsVisitor::_mode
protected

Definition at line 110 of file GLObjectsVisitor.h.

osg::RenderInfo osgUtil::GLObjectsVisitor::_renderInfo
protected

Definition at line 111 of file GLObjectsVisitor.h.

StatesSetAppliedSet osgUtil::GLObjectsVisitor::_stateSetAppliedSet
protected

Definition at line 113 of file GLObjectsVisitor.h.


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