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

NodeVisitor for batch replacing all Geometry in all visited Geodes. More...

#include <GeometryPlacerVisitor.h>

Inheritance diagram for brtr::GeometryPlacerVisitor:

Public Member Functions

 GeometryPlacerVisitor (osg::Geometry *geometryToPlace)
 Constructor. More...
 
virtual void apply (osg::Geode &geode)
 Change the Geometry of this Geode. More...
 
osg::ref_ptr< osg::Geometry > getGeometryToPlace () const
 
void setGeometryToPlace (osg::ref_ptr< osg::Geometry > val)
 

Private Attributes

osg::ref_ptr< osg::Geometry > _geometryToPlace
 

Detailed Description

NodeVisitor for batch replacing all Geometry in all visited Geodes.

Takes a geometry as argument and replaces every geometry in the sub scene Useful for batch replacing a bunch of geometrys which were placed as dummys in Blender and then imported. Rotation and Scaling of the Geometry will persist.

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 15 of file GeometryPlacerVisitor.h.

Constructor & Destructor Documentation

brtr::GeometryPlacerVisitor::GeometryPlacerVisitor ( osg::Geometry *  geometryToPlace)

Constructor.

Parameters
geometryToPlacegeometry to replace the found drawables
Returns

Definition at line 6 of file GeometryPlacerVisitor.cpp.

Member Function Documentation

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

Change the Geometry of this Geode.

Parameters
geodethe Geode which will be alternate

Definition at line 11 of file GeometryPlacerVisitor.cpp.

osg::ref_ptr< osg::Geometry > brtr::GeometryPlacerVisitor::getGeometryToPlace ( ) const

Definition at line 16 of file GeometryPlacerVisitor.cpp.

void brtr::GeometryPlacerVisitor::setGeometryToPlace ( osg::ref_ptr< osg::Geometry >  val)

Definition at line 20 of file GeometryPlacerVisitor.cpp.

Member Data Documentation

osg::ref_ptr<osg::Geometry> brtr::GeometryPlacerVisitor::_geometryToPlace
private

Definition at line 34 of file GeometryPlacerVisitor.h.


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