Moved basics of fixed function pipeline implementation from osgvolume example into osgVolume

This commit is contained in:
Robert Osfield
2009-01-16 11:27:20 +00:00
parent 5e629d1236
commit 29ac92df0e
5 changed files with 316 additions and 6 deletions

View File

@@ -138,3 +138,26 @@ LightingProperty::LightingProperty(const LightingProperty& isp,const osg::CopyOp
Property(isp, copyop)
{
}
/////////////////////////////////////////////////////////////////////////////
//
// CollectPropertiesVisitor
//
CollectPropertiesVisitor::CollectPropertiesVisitor() {}
void CollectPropertiesVisitor::apply(Property&) {}
void CollectPropertiesVisitor::apply(CompositeProperty& cp)
{
for(unsigned int i=0; i<cp.getNumProperties(); ++i)
{
cp.getProperty(i)->accept(*this);
}
}
void CollectPropertiesVisitor::apply(TransferFunctionProperty& tf) { _tfProperty = &tf; }
void CollectPropertiesVisitor::apply(ScalarProperty&) {}
void CollectPropertiesVisitor::apply(IsoSurfaceProperty& iso) { _isoProperty = &iso; }
void CollectPropertiesVisitor::apply(AlphaFuncProperty& af) { _afProperty = &af; }
void CollectPropertiesVisitor::apply(MaximumIntensityProjectionProperty& mip) { _mipProperty = &mip; }
void CollectPropertiesVisitor::apply(LightingProperty& lp) { _lightingProperty = &lp; }