BrainTrain
 All Classes Namespaces Files Functions Variables Macros Pages
brtr::AddInteractionCallbackToDrawableVisitor Class Reference

NodeVisitor for batch replacing all UserDataContainer of all Drawables. More...

#include <AddInteractionCallbackToDrawableVisitor.h>

Inheritance diagram for brtr::AddInteractionCallbackToDrawableVisitor:

Public Member Functions

 AddInteractionCallbackToDrawableVisitor (brtr::BaseInteractionCallback *callbackToAdd)
 Constructor. More...
 
virtual void apply (osg::Geode &geode)
 

Private Attributes

osg::ref_ptr
< osg::DefaultUserDataContainer > 
_containerToAdd
 

Detailed Description

NodeVisitor for batch replacing all UserDataContainer of all Drawables.

New Container contains the provided InteractionCallback. Mainly used for making imported objects (e.g. from blender) interact-able.

Author
Gleb Ostrowski
Version
1.0
Date
2014
Precondition
needs a Node which will accept it. Should have some Geode's for this to work

Definition at line 17 of file AddInteractionCallbackToDrawableVisitor.h.

Constructor & Destructor Documentation

brtr::AddInteractionCallbackToDrawableVisitor::AddInteractionCallbackToDrawableVisitor ( brtr::BaseInteractionCallback callbackToAdd)

Constructor.

Parameters
callbackToAddthe callback which should be add to all drawables in the object
Returns

Definition at line 5 of file AddInteractionCallbackToDrawableVisitor.cpp.

Member Function Documentation

void brtr::AddInteractionCallbackToDrawableVisitor::apply ( osg::Geode &  geode)
virtual

Definition at line 11 of file AddInteractionCallbackToDrawableVisitor.cpp.

Member Data Documentation

osg::ref_ptr<osg::DefaultUserDataContainer> brtr::AddInteractionCallbackToDrawableVisitor::_containerToAdd
private

Definition at line 28 of file AddInteractionCallbackToDrawableVisitor.h.


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