Renamed osgUtil::RenderGraph to osgUtil::StateGraph

This commit is contained in:
Robert Osfield
2005-10-13 12:51:00 +00:00
parent 5d1b46d25f
commit fb524952b6
26 changed files with 209 additions and 357 deletions

View File

@@ -153,14 +153,14 @@ void LightPointNode::traverse(osg::NodeVisitor& nv)
osg::Matrix matrix = cv->getModelViewMatrix();
osg::RefMatrix& projection = cv->getProjectionMatrix();
osgUtil::RenderGraph* rg = cv->getCurrentRenderGraph();
osgUtil::StateGraph* rg = cv->getCurrentStateGraph();
if (rg->leaves_empty())
{
// this is first leaf to be added to RenderGraph
// this is first leaf to be added to StateGraph
// and therefore should not already know to current render bin,
// so need to add it.
cv->getCurrentRenderBin()->addRenderGraph(rg);
cv->getCurrentRenderBin()->addStateGraph(rg);
}
#ifdef USE_TIMER
@@ -181,7 +181,7 @@ void LightPointNode::traverse(osg::NodeVisitor& nv)
else
{
// will need to replace UserData.
osg::notify(osg::WARN) << "Warning: Replacing osgUtil::RenderGraph::_userData to support osgSim::LightPointNode, may have undefined results."<<std::endl;
osg::notify(osg::WARN) << "Warning: Replacing osgUtil::StateGraph::_userData to support osgSim::LightPointNode, may have undefined results."<<std::endl;
}
}
@@ -197,9 +197,9 @@ void LightPointNode::traverse(osg::NodeVisitor& nv)
}
}
// search for a drawable in the RenderLead list equal to the attached the one attached to RenderGraph user data
// search for a drawable in the RenderLead list equal to the attached the one attached to StateGraph user data
// as this will be our special light point drawable.
osgUtil::RenderGraph::LeafList::iterator litr;
osgUtil::StateGraph::LeafList::iterator litr;
for(litr = rg->_leaves.begin();
litr != rg->_leaves.end() && (*litr)->_drawable!=drawable;
++litr)
@@ -208,7 +208,7 @@ void LightPointNode::traverse(osg::NodeVisitor& nv)
if (litr == rg->_leaves.end())
{
// havn't found the drawable added in the RenderLeaf list, there this my be the
// first time through LightPointNode in this frame, so need to add drawable into the RenderGraph RenderLeaf list
// first time through LightPointNode in this frame, so need to add drawable into the StateGraph RenderLeaf list
// and update its time signatures.
drawable->reset();

View File

@@ -91,7 +91,7 @@ class PrintVisitor : public NodeVisitor
CullVisitor::CullVisitor():
NodeVisitor(CULL_VISITOR,TRAVERSE_ACTIVE_CHILDREN),
_currentRenderGraph(NULL),
_currentStateGraph(NULL),
_currentRenderBin(NULL),
_computed_znear(FLT_MAX),
_computed_zfar(-FLT_MAX),
@@ -1185,8 +1185,7 @@ void CullVisitor::apply(osg::CameraNode& camera)
setCurrentRenderBin(previousRenderBin);
if (rtts->getRenderGraphList().size()==0 && rtts->getRenderBinList().size()==0)
if (rtts->getStateGraphList().size()==0 && rtts->getRenderBinList().size()==0)
{
// getting to this point means that all the subgraph has been
// culled by small feature culling or is beyond LOD ranges.

View File

@@ -13,7 +13,7 @@ CXXFILES = \
IntersectVisitor.cpp\
Optimizer.cpp\
RenderBin.cpp\
RenderGraph.cpp\
StateGraph.cpp\
RenderLeaf.cpp\
RenderStage.cpp\
PositionalStateContainer.cpp\

View File

@@ -37,7 +37,7 @@ void PositionalStateContainer::draw(osg::State& state,RenderLeaf*& previous, con
if (previous)
{
RenderGraph::moveToRootRenderGraph(state,previous->_parent);
StateGraph::moveToRootStateGraph(state,previous->_parent);
state.apply();
previous = NULL;
}

View File

@@ -136,7 +136,7 @@ RenderBin::RenderBin(const RenderBin& rhs,const CopyOp& copyop):
_parent(rhs._parent),
_stage(rhs._stage),
_bins(rhs._bins),
_renderGraphList(rhs._renderGraphList),
_stateGraphList(rhs._stateGraphList),
_renderLeafList(rhs._renderLeafList),
_sortMode(rhs._sortMode),
_sortCallback(rhs._sortCallback),
@@ -151,7 +151,7 @@ RenderBin::~RenderBin()
void RenderBin::reset()
{
_renderGraphList.clear();
_stateGraphList.clear();
_bins.clear();
}
@@ -199,7 +199,7 @@ void RenderBin::sortImplementation()
struct SortByStateFunctor
{
bool operator() (const RenderGraph* lhs,const RenderGraph* rhs) const
bool operator() (const StateGraph* lhs,const StateGraph* rhs) const
{
return (*(lhs->_stateset)<*(rhs->_stateset));
}
@@ -210,15 +210,15 @@ void RenderBin::sortByState()
//osg::notify(osg::NOTICE)<<"sortByState()"<<std::endl;
// actually we'll do nothing right now, as fine grained sorting by state
// appears to cost more to do than it saves in draw. The contents of
// the RenderGraph leaves is already coarse grained sorted, this
// the StateGraph leaves is already coarse grained sorted, this
// sorting is as a function of the cull traversal.
// cout << "doing sortByState "<<this<<endl;
}
struct RenderGraphFrontToBackSortFunctor
struct StateGraphFrontToBackSortFunctor
{
bool operator() (const RenderGraph* lhs,const RenderGraph* rhs) const
bool operator() (const StateGraph* lhs,const StateGraph* rhs) const
{
return (lhs->_minimumDistance<rhs->_minimumDistance);
}
@@ -226,14 +226,14 @@ struct RenderGraphFrontToBackSortFunctor
void RenderBin::sortByStateThenFrontToBack()
{
for(RenderGraphList::iterator itr=_renderGraphList.begin();
itr!=_renderGraphList.end();
for(StateGraphList::iterator itr=_stateGraphList.begin();
itr!=_stateGraphList.end();
++itr)
{
(*itr)->sortFrontToBack();
(*itr)->getMinimumDistance();
}
std::sort(_renderGraphList.begin(),_renderGraphList.end(),RenderGraphFrontToBackSortFunctor());
std::sort(_stateGraphList.begin(),_stateGraphList.end(),StateGraphFrontToBackSortFunctor());
}
struct FrontToBackSortFunctor
@@ -247,7 +247,7 @@ struct FrontToBackSortFunctor
void RenderBin::sortFrontToBack()
{
copyLeavesFromRenderGraphListToRenderLeafList();
copyLeavesFromStateGraphListToRenderLeafList();
// now sort the list into acending depth order.
std::sort(_renderLeafList.begin(),_renderLeafList.end(),FrontToBackSortFunctor());
@@ -265,7 +265,7 @@ struct BackToFrontSortFunctor
void RenderBin::sortBackToFront()
{
copyLeavesFromRenderGraphListToRenderLeafList();
copyLeavesFromStateGraphListToRenderLeafList();
// now sort the list into acending depth order.
std::sort(_renderLeafList.begin(),_renderLeafList.end(),BackToFrontSortFunctor());
@@ -273,14 +273,14 @@ void RenderBin::sortBackToFront()
// cout << "sort back to front"<<endl;
}
void RenderBin::copyLeavesFromRenderGraphListToRenderLeafList()
void RenderBin::copyLeavesFromStateGraphListToRenderLeafList()
{
_renderLeafList.clear();
int totalsize=0;
RenderGraphList::iterator itr;
for(itr=_renderGraphList.begin();
itr!=_renderGraphList.end();
StateGraphList::iterator itr;
for(itr=_stateGraphList.begin();
itr!=_stateGraphList.end();
++itr)
{
totalsize += (*itr)->_leaves.size();
@@ -289,11 +289,11 @@ void RenderBin::copyLeavesFromRenderGraphListToRenderLeafList()
_renderLeafList.reserve(totalsize);
// first copy all the leaves from the render graphs into the leaf list.
for(itr=_renderGraphList.begin();
itr!=_renderGraphList.end();
for(itr=_stateGraphList.begin();
itr!=_stateGraphList.end();
++itr)
{
for(RenderGraph::LeafList::iterator dw_itr = (*itr)->_leaves.begin();
for(StateGraph::LeafList::iterator dw_itr = (*itr)->_leaves.begin();
dw_itr != (*itr)->_leaves.end();
++dw_itr)
{
@@ -302,7 +302,7 @@ void RenderBin::copyLeavesFromRenderGraphListToRenderLeafList()
}
// empty the render graph list to prevent it being drawn along side the render leaf list (see drawImplementation.)
_renderGraphList.clear();
_stateGraphList.clear();
}
RenderBin* RenderBin::find_or_insert(int binNum,const std::string& binName)
@@ -368,12 +368,12 @@ void RenderBin::drawImplementation(osg::State& state,RenderLeaf*& previous)
// draw coarse grained ordering.
for(RenderGraphList::iterator oitr=_renderGraphList.begin();
oitr!=_renderGraphList.end();
for(StateGraphList::iterator oitr=_stateGraphList.begin();
oitr!=_stateGraphList.end();
++oitr)
{
for(RenderGraph::LeafList::iterator dw_itr = (*oitr)->_leaves.begin();
for(StateGraph::LeafList::iterator dw_itr = (*oitr)->_leaves.begin();
dw_itr != (*oitr)->_leaves.end();
++dw_itr)
{
@@ -419,12 +419,12 @@ bool RenderBin::getStats(Statistics* primStats)
}
for(RenderGraphList::iterator oitr=_renderGraphList.begin();
oitr!=_renderGraphList.end();
for(StateGraphList::iterator oitr=_stateGraphList.begin();
oitr!=_stateGraphList.end();
++oitr)
{
for(RenderGraph::LeafList::iterator dw_itr = (*oitr)->_leaves.begin();
for(StateGraph::LeafList::iterator dw_itr = (*oitr)->_leaves.begin();
dw_itr != (*oitr)->_leaves.end();
++dw_itr)
{

View File

@@ -11,7 +11,7 @@
* OpenSceneGraph Public License for more details.
*/
#include <osgUtil/RenderLeaf>
#include <osgUtil/RenderGraph>
#include <osgUtil/StateGraph>
using namespace osg;
using namespace osgUtil;
@@ -33,12 +33,12 @@ void RenderLeaf::render(State& state,RenderLeaf* previous)
state.applyModelViewMatrix(_modelview.get());
// apply state if required.
RenderGraph* prev_rg = previous->_parent;
RenderGraph* prev_rg_parent = prev_rg->_parent;
RenderGraph* rg = _parent;
StateGraph* prev_rg = previous->_parent;
StateGraph* prev_rg_parent = prev_rg->_parent;
StateGraph* rg = _parent;
if (prev_rg_parent!=rg->_parent)
{
RenderGraph::moveRenderGraph(state,prev_rg_parent,rg->_parent);
StateGraph::moveStateGraph(state,prev_rg_parent,rg->_parent);
// send state changes and matrix changes to OpenGL.
state.apply(rg->_stateset);
@@ -63,7 +63,7 @@ void RenderLeaf::render(State& state,RenderLeaf* previous)
state.applyModelViewMatrix(_modelview.get());
// apply state if required.
RenderGraph::moveRenderGraph(state,NULL,_parent->_parent);
StateGraph::moveStateGraph(state,NULL,_parent->_parent);
state.apply(_parent->_stateset);

View File

@@ -703,7 +703,7 @@ void RenderStage::drawImplementation(osg::State& state,RenderLeaf*& previous)
// now reset the state so its back in its default state.
if (previous)
{
RenderGraph::moveToRootRenderGraph(state,previous->_parent);
StateGraph::moveToRootStateGraph(state,previous->_parent);
state.apply();
previous = NULL;
}

View File

@@ -94,7 +94,7 @@ void SceneView::setDefaults(unsigned int options)
_state = new State;
_rendergraph = new RenderGraph;
_rendergraph = new StateGraph;
_renderStage = new RenderStage;
@@ -120,7 +120,7 @@ void SceneView::setDefaults(unsigned int options)
_cullVisitor = new CullVisitor;
_cullVisitor->setRenderGraph(_rendergraph.get());
_cullVisitor->setStateGraph(_rendergraph.get());
_cullVisitor->setRenderStage(_renderStage.get());
_globalStateSet->setGlobalDefaults();
@@ -397,8 +397,8 @@ void SceneView::cull()
}
if (!_rendergraph)
{
osg::notify(osg::INFO) << "Warning: no valid osgUtil::SceneView:: attached, creating a global default RenderGraph automatically."<< std::endl;
_rendergraph = new RenderGraph;
osg::notify(osg::INFO) << "Warning: no valid osgUtil::SceneView:: attached, creating a global default StateGraph automatically."<< std::endl;
_rendergraph = new StateGraph;
}
if (!_renderStage)
{
@@ -441,11 +441,11 @@ void SceneView::cull()
{
if (!_cullVisitorLeft.valid()) _cullVisitorLeft = dynamic_cast<CullVisitor*>(_cullVisitor->cloneType());
if (!_rendergraphLeft.valid()) _rendergraphLeft = dynamic_cast<RenderGraph*>(_rendergraph->cloneType());
if (!_rendergraphLeft.valid()) _rendergraphLeft = dynamic_cast<StateGraph*>(_rendergraph->cloneType());
if (!_renderStageLeft.valid()) _renderStageLeft = dynamic_cast<RenderStage*>(_renderStage->clone(osg::CopyOp::DEEP_COPY_ALL));
if (!_cullVisitorRight.valid()) _cullVisitorRight = dynamic_cast<CullVisitor*>(_cullVisitor->cloneType());
if (!_rendergraphRight.valid()) _rendergraphRight = dynamic_cast<RenderGraph*>(_rendergraph->cloneType());
if (!_rendergraphRight.valid()) _rendergraphRight = dynamic_cast<StateGraph*>(_rendergraph->cloneType());
if (!_renderStageRight.valid()) _renderStageRight = dynamic_cast<RenderStage*>(_renderStage->clone(osg::CopyOp::DEEP_COPY_ALL));
_cullVisitorLeft->setDatabaseRequestHandler(_cullVisitor->getDatabaseRequestHandler());
@@ -488,7 +488,7 @@ void SceneView::cull()
}
void SceneView::cullStage(const osg::Matrixd& projection,const osg::Matrixd& modelview,osgUtil::CullVisitor* cullVisitor, osgUtil::RenderGraph* rendergraph, osgUtil::RenderStage* renderStage)
void SceneView::cullStage(const osg::Matrixd& projection,const osg::Matrixd& modelview,osgUtil::CullVisitor* cullVisitor, osgUtil::StateGraph* rendergraph, osgUtil::RenderStage* renderStage)
{
if (!_sceneData || !_viewport->valid()) return;
@@ -556,7 +556,7 @@ void SceneView::cullStage(const osg::Matrixd& projection,const osg::Matrixd& mod
cullVisitor->setClearNode(NULL); // reset earth sky on each frame.
cullVisitor->setRenderGraph(rendergraph);
cullVisitor->setStateGraph(rendergraph);
cullVisitor->setRenderStage(renderStage);
cullVisitor->setState( _state.get() );
@@ -627,11 +627,11 @@ void SceneView::cullStage(const osg::Matrixd& projection,const osg::Matrixd& mod
renderStage->sort();
// prune out any empty RenderGraph children.
// prune out any empty StateGraph children.
// note, this would be not required if the rendergraph had been
// reset at the start of each frame (see top of this method) but
// a clean has been used instead to try to minimize the amount of
// allocation and deleteing of the RenderGraph nodes.
// allocation and deleteing of the StateGraph nodes.
rendergraph->prune();
}

View File

@@ -10,14 +10,14 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#include <osgUtil/RenderGraph>
#include <osgUtil/StateGraph>
#include <osg/Notify>
using namespace osg;
using namespace osgUtil;
void RenderGraph::reset()
void StateGraph::reset()
{
_parent = NULL;
_stateset = NULL;
@@ -28,9 +28,9 @@ void RenderGraph::reset()
_leaves.clear();
}
/** recursively clean the RenderGraph of all its drawables, lights and depths.
/** recursively clean the StateGraph of all its drawables, lights and depths.
* Leaves children intact, and ready to be populated again.*/
void RenderGraph::clean()
void StateGraph::clean()
{
// clean local drawables etc.
@@ -46,8 +46,8 @@ void RenderGraph::clean()
}
/** recursively prune the RenderGraph of empty children.*/
void RenderGraph::prune()
/** recursively prune the StateGraph of empty children.*/
void StateGraph::prune()
{
std::vector<const osg::StateSet*> toEraseList;

View File

@@ -35,8 +35,8 @@
#include <osg/Vec3>
#include <osgUtil/CullVisitor>
#include <osgUtil/RenderBin>
#include <osgUtil/RenderGraph>
#include <osgUtil/RenderStage>
#include <osgUtil/StateGraph>
// Must undefine IN and OUT macros defined in Windows headers
#ifdef IN
@@ -75,9 +75,9 @@ BEGIN_OBJECT_REFLECTOR(osgUtil::CullVisitor)
I_Method0(const osg::ClearNode *, getClearNode);
I_Method1(void, pushStateSet, IN, const osg::StateSet *, ss);
I_Method0(void, popStateSet);
I_Method1(void, setRenderGraph, IN, osgUtil::RenderGraph *, rg);
I_Method0(osgUtil::RenderGraph *, getRootRenderGraph);
I_Method0(osgUtil::RenderGraph *, getCurrentRenderGraph);
I_Method1(void, setStateGraph, IN, osgUtil::StateGraph *, rg);
I_Method0(osgUtil::StateGraph *, getRootStateGraph);
I_Method0(osgUtil::StateGraph *, getCurrentStateGraph);
I_Method1(void, setRenderStage, IN, osgUtil::RenderStage *, rg);
I_Method0(osgUtil::RenderStage *, getRenderStage);
I_Method0(osgUtil::RenderBin *, getCurrentRenderBin);
@@ -104,11 +104,11 @@ BEGIN_OBJECT_REFLECTOR(osgUtil::CullVisitor)
I_ReadOnlyProperty(osgUtil::CullVisitor::value_type, CalculatedNearPlane);
I_Property(const osg::ClearNode *, ClearNode);
I_Property(osgUtil::RenderBin *, CurrentRenderBin);
I_ReadOnlyProperty(osgUtil::RenderGraph *, CurrentRenderGraph);
I_ReadOnlyProperty(osgUtil::StateGraph *, CurrentStateGraph);
I_ReadOnlyProperty(osg::Vec3, EyePoint);
I_WriteOnlyProperty(osgUtil::RenderGraph *, RenderGraph);
I_Property(osgUtil::RenderStage *, RenderStage);
I_ReadOnlyProperty(osgUtil::RenderGraph *, RootRenderGraph);
I_ReadOnlyProperty(osgUtil::StateGraph *, RootStateGraph);
I_Property(osg::State *, State);
I_WriteOnlyProperty(osgUtil::StateGraph *, StateGraph);
END_REFLECTOR

View File

@@ -14,12 +14,12 @@ CXXFILES =\
PositionalStateContainer.cpp\
ReflectionMapGenerator.cpp\
RenderBin.cpp\
RenderGraph.cpp\
RenderLeaf.cpp\
RenderStage.cpp\
SceneView.cpp\
Simplifier.cpp\
SmoothingVisitor.cpp\
StateGraph.cpp\
Statistics.cpp\
TangentSpaceGenerator.cpp\
Tesselator.cpp\

View File

@@ -13,9 +13,9 @@
#include <osg/Object>
#include <osg/State>
#include <osgUtil/RenderBin>
#include <osgUtil/RenderGraph>
#include <osgUtil/RenderLeaf>
#include <osgUtil/RenderStage>
#include <osgUtil/StateGraph>
#include <osgUtil/Statistics>
// Must undefine IN and OUT macros defined in Windows headers
@@ -32,7 +32,7 @@ END_REFLECTOR
TYPE_NAME_ALIAS(std::vector< osgUtil::RenderLeaf * >, osgUtil::RenderBin::RenderLeafList);
TYPE_NAME_ALIAS(std::vector< osgUtil::RenderGraph * >, osgUtil::RenderBin::RenderGraphList);
TYPE_NAME_ALIAS(std::vector< osgUtil::StateGraph * >, osgUtil::RenderBin::StateGraphList);
TYPE_NAME_ALIAS(std::map< int COMMA osg::ref_ptr< osgUtil::RenderBin > >, osgUtil::RenderBin::RenderBinList);
@@ -59,14 +59,14 @@ BEGIN_OBJECT_REFLECTOR(osgUtil::RenderBin)
I_Method0(osgUtil::RenderStage *, getStage);
I_Method0(const osgUtil::RenderStage *, getStage);
I_Method0(int, getBinNum);
I_Method0(osgUtil::RenderBin::RenderGraphList &, getRenderGraphList);
I_Method0(const osgUtil::RenderBin::RenderGraphList &, getRenderGraphList);
I_Method0(osgUtil::RenderBin::StateGraphList &, getStateGraphList);
I_Method0(const osgUtil::RenderBin::StateGraphList &, getStateGraphList);
I_Method0(osgUtil::RenderBin::RenderBinList &, getRenderBinList);
I_Method0(const osgUtil::RenderBin::RenderBinList &, getRenderBinList);
I_Method0(osgUtil::RenderBin::RenderLeafList &, getRenderLeafList);
I_Method0(const osgUtil::RenderBin::RenderLeafList &, getRenderLeafList);
I_Method2(osgUtil::RenderBin *, find_or_insert, IN, int, binNum, IN, const std::string &, binName);
I_Method1(void, addRenderGraph, IN, osgUtil::RenderGraph *, rg);
I_Method1(void, addStateGraph, IN, osgUtil::StateGraph *, rg);
I_Method0(void, sort);
I_Method0(void, sortImplementation);
I_Method1(void, setSortMode, IN, osgUtil::RenderBin::SortMode, mode);
@@ -86,16 +86,16 @@ BEGIN_OBJECT_REFLECTOR(osgUtil::RenderBin)
I_Method1(bool, getStats, IN, osgUtil::Statistics *, primStats);
I_Method1(void, getPrims, IN, osgUtil::Statistics *, primStats);
I_Method2(bool, getPrims, IN, osgUtil::Statistics *, primStats, IN, int, nbin);
I_Method0(void, copyLeavesFromRenderGraphListToRenderLeafList);
I_Method0(void, copyLeavesFromStateGraphListToRenderLeafList);
I_ReadOnlyProperty(int, BinNum);
I_Property(osgUtil::RenderBin::DrawCallback *, DrawCallback);
I_ReadOnlyProperty(osgUtil::RenderBin *, Parent);
I_ReadOnlyProperty(osgUtil::RenderBin::RenderBinList &, RenderBinList);
I_ReadOnlyProperty(osgUtil::RenderBin::RenderGraphList &, RenderGraphList);
I_ReadOnlyProperty(osgUtil::RenderBin::RenderLeafList &, RenderLeafList);
I_Property(osgUtil::RenderBin::SortCallback *, SortCallback);
I_Property(osgUtil::RenderBin::SortMode, SortMode);
I_ReadOnlyProperty(osgUtil::RenderStage *, Stage);
I_ReadOnlyProperty(osgUtil::RenderBin::StateGraphList &, StateGraphList);
END_REFLECTOR
BEGIN_ABSTRACT_OBJECT_REFLECTOR(osgUtil::RenderBin::DrawCallback)
@@ -124,7 +124,7 @@ END_REFLECTOR
STD_MAP_REFLECTOR(std::map< int COMMA osg::ref_ptr< osgUtil::RenderBin > >);
STD_VECTOR_REFLECTOR(std::vector< osgUtil::RenderGraph * >);
STD_VECTOR_REFLECTOR(std::vector< osgUtil::RenderLeaf * >);
STD_VECTOR_REFLECTOR(std::vector< osgUtil::StateGraph * >);

View File

@@ -23,9 +23,9 @@
#include <osg/Vec4>
#include <osg/Viewport>
#include <osgUtil/CullVisitor>
#include <osgUtil/RenderGraph>
#include <osgUtil/RenderStage>
#include <osgUtil/SceneView>
#include <osgUtil/StateGraph>
// Must undefine IN and OUT macros defined in Windows headers
#ifdef IN
@@ -130,15 +130,15 @@ BEGIN_OBJECT_REFLECTOR(osgUtil::SceneView)
I_Method1(void, setCollectOccludersVisitor, IN, osg::CollectOccludersVisitor *, cov);
I_Method0(osg::CollectOccludersVisitor *, getCollectOccludersVisitor);
I_Method0(const osg::CollectOccludersVisitor *, getCollectOccludersVisitor);
I_Method1(void, setRenderGraph, IN, osgUtil::RenderGraph *, rg);
I_Method0(osgUtil::RenderGraph *, getRenderGraph);
I_Method0(const osgUtil::RenderGraph *, getRenderGraph);
I_Method1(void, setRenderGraphLeft, IN, osgUtil::RenderGraph *, rg);
I_Method0(osgUtil::RenderGraph *, getRenderGraphLeft);
I_Method0(const osgUtil::RenderGraph *, getRenderGraphLeft);
I_Method1(void, setRenderGraphRight, IN, osgUtil::RenderGraph *, rg);
I_Method0(osgUtil::RenderGraph *, getRenderGraphRight);
I_Method0(const osgUtil::RenderGraph *, getRenderGraphRight);
I_Method1(void, setStateGraph, IN, osgUtil::StateGraph *, rg);
I_Method0(osgUtil::StateGraph *, getStateGraph);
I_Method0(const osgUtil::StateGraph *, getStateGraph);
I_Method1(void, setStateGraphLeft, IN, osgUtil::StateGraph *, rg);
I_Method0(osgUtil::StateGraph *, getStateGraphLeft);
I_Method0(const osgUtil::StateGraph *, getStateGraphLeft);
I_Method1(void, setStateGraphRight, IN, osgUtil::StateGraph *, rg);
I_Method0(osgUtil::StateGraph *, getStateGraphRight);
I_Method0(const osgUtil::StateGraph *, getStateGraphRight);
I_Method1(void, setRenderStage, IN, osgUtil::RenderStage *, rs);
I_Method0(osgUtil::RenderStage *, getRenderStage);
I_Method0(const osgUtil::RenderStage *, getRenderStage);
@@ -198,14 +198,14 @@ BEGIN_OBJECT_REFLECTOR(osgUtil::SceneView)
I_Property(osg::StateSet *, LocalStateSet);
I_Property(bool, PrioritizeTextures);
I_Property(const osg::Matrixd &, ProjectionMatrix);
I_Property(osgUtil::RenderGraph *, RenderGraph);
I_Property(osgUtil::RenderGraph *, RenderGraphLeft);
I_Property(osgUtil::RenderGraph *, RenderGraphRight);
I_Property(osgUtil::RenderStage *, RenderStage);
I_Property(osgUtil::RenderStage *, RenderStageLeft);
I_Property(osgUtil::RenderStage *, RenderStageRight);
I_Property(osg::Node *, SceneData);
I_Property(osg::State *, State);
I_Property(osgUtil::StateGraph *, StateGraph);
I_Property(osgUtil::StateGraph *, StateGraphLeft);
I_Property(osgUtil::StateGraph *, StateGraphRight);
I_Property(osg::NodeVisitor *, UpdateVisitor);
I_Property(const osg::Matrixd &, ViewMatrix);
I_Property(osg::Viewport *, Viewport);

View File

@@ -11,8 +11,8 @@
#include <osg/Referenced>
#include <osg/StateSet>
#include <osgUtil/RenderGraph>
#include <osgUtil/RenderLeaf>
#include <osgUtil/StateGraph>
// Must undefine IN and OUT macros defined in Windows headers
#ifdef IN
@@ -26,15 +26,15 @@ BEGIN_VALUE_REFLECTOR(osgUtil::LeafDepthSortFunctor)
I_Constructor0();
END_REFLECTOR
TYPE_NAME_ALIAS(std::map< const osg::StateSet * COMMA osg::ref_ptr< osgUtil::RenderGraph > >, osgUtil::RenderGraph::ChildList);
TYPE_NAME_ALIAS(std::map< const osg::StateSet * COMMA osg::ref_ptr< osgUtil::StateGraph > >, osgUtil::StateGraph::ChildList);
TYPE_NAME_ALIAS(std::vector< osg::ref_ptr< osgUtil::RenderLeaf > >, osgUtil::RenderGraph::LeafList);
TYPE_NAME_ALIAS(std::vector< osg::ref_ptr< osgUtil::RenderLeaf > >, osgUtil::StateGraph::LeafList);
BEGIN_OBJECT_REFLECTOR(osgUtil::RenderGraph)
BEGIN_OBJECT_REFLECTOR(osgUtil::StateGraph)
I_BaseType(osg::Referenced);
I_Constructor0();
I_Constructor2(IN, osgUtil::RenderGraph *, parent, IN, const osg::StateSet *, stateset);
I_Method0(osgUtil::RenderGraph *, cloneType);
I_Constructor2(IN, osgUtil::StateGraph *, parent, IN, const osg::StateSet *, stateset);
I_Method0(osgUtil::StateGraph *, cloneType);
I_Method1(void, setUserData, IN, osg::Referenced *, obj);
I_Method0(osg::Referenced *, getUserData);
I_Method0(const osg::Referenced *, getUserData);
@@ -46,25 +46,13 @@ BEGIN_OBJECT_REFLECTOR(osgUtil::RenderGraph)
I_Method0(void, reset);
I_Method0(void, clean);
I_Method0(void, prune);
I_Method1(osgUtil::RenderGraph *, find_or_insert, IN, const osg::StateSet *, stateset);
I_Method1(osgUtil::StateGraph *, find_or_insert, IN, const osg::StateSet *, stateset);
I_Method1(void, addLeaf, IN, osgUtil::RenderLeaf *, leaf);
I_ReadOnlyProperty(float, AverageDistance);
I_ReadOnlyProperty(float, MinimumDistance);
I_Property(osg::Referenced *, UserData);
END_REFLECTOR
BEGIN_VALUE_REFLECTOR(osg::ref_ptr< osgUtil::RenderGraph >)
I_Constructor0();
I_Constructor1(IN, osgUtil::RenderGraph *, t);
I_Constructor1(IN, const osg::ref_ptr< osgUtil::RenderGraph > &, rp);
I_Method0(bool, valid);
I_Method0(osgUtil::RenderGraph *, get);
I_Method0(const osgUtil::RenderGraph *, get);
I_Method0(osgUtil::RenderGraph *, take);
I_Method0(osgUtil::RenderGraph *, release);
I_ReadOnlyProperty(osgUtil::RenderGraph *, );
END_REFLECTOR
BEGIN_VALUE_REFLECTOR(osg::ref_ptr< osgUtil::RenderLeaf >)
I_Constructor0();
I_Constructor1(IN, osgUtil::RenderLeaf *, t);
@@ -77,7 +65,19 @@ BEGIN_VALUE_REFLECTOR(osg::ref_ptr< osgUtil::RenderLeaf >)
I_ReadOnlyProperty(osgUtil::RenderLeaf *, );
END_REFLECTOR
STD_MAP_REFLECTOR(std::map< const osg::StateSet * COMMA osg::ref_ptr< osgUtil::RenderGraph > >);
BEGIN_VALUE_REFLECTOR(osg::ref_ptr< osgUtil::StateGraph >)
I_Constructor0();
I_Constructor1(IN, osgUtil::StateGraph *, t);
I_Constructor1(IN, const osg::ref_ptr< osgUtil::StateGraph > &, rp);
I_Method0(bool, valid);
I_Method0(osgUtil::StateGraph *, get);
I_Method0(const osgUtil::StateGraph *, get);
I_Method0(osgUtil::StateGraph *, take);
I_Method0(osgUtil::StateGraph *, release);
I_ReadOnlyProperty(osgUtil::StateGraph *, );
END_REFLECTOR
STD_MAP_REFLECTOR(std::map< const osg::StateSet * COMMA osg::ref_ptr< osgUtil::StateGraph > >);
STD_VECTOR_REFLECTOR(std::vector< osg::ref_ptr< osgUtil::RenderLeaf > >);