Added write(ostream&) method to allow one to print out the current state

This commit is contained in:
Robert Osfield 2008-04-18 13:57:08 +00:00
parent 648199cb2b
commit 196a550cda
2 changed files with 26 additions and 1 deletions

View File

@ -235,7 +235,8 @@ class OSG_EXPORT CullSettings
const ClampProjectionMatrixCallback* getClampProjectionMatrixCallback() const { return _clampProjectionMatrixCallback.get(); }
/** Write out internal settings of CullSettings. */
void write(std::ostream& out);
protected:

View File

@ -146,3 +146,27 @@ void CullSettings::readCommandLine(ArgumentParser& arguments)
}
}
void CullSettings::write(std::ostream& out)
{
out<<"CullSettings: "<<this<<" {"<<std::endl;
out<<" _inheritanceMask = "<<_inheritanceMask<<std::endl;
out<<" _inheritanceMaskActionOnAttributeSetting = "<<_inheritanceMaskActionOnAttributeSetting<<std::endl;
out<<" _computeNearFar = "<<_computeNearFar<<std::endl;
out<<" _cullingMode = "<<_cullingMode<<std::endl;
out<<" _LODScale = "<<_LODScale<<std::endl;
out<<" _smallFeatureCullingPixelSize = "<<_smallFeatureCullingPixelSize<<std::endl;
out<<" _clampProjectionMatrixCallback = "<<_clampProjectionMatrixCallback.get()<<std::endl;
out<<" _nearFarRatio = "<<_nearFarRatio<<std::endl;
out<<" _impostorActive = "<<_impostorActive<<std::endl;
out<<" _depthSortImpostorSprites = "<<_depthSortImpostorSprites<<std::endl;
out<<" _impostorPixelErrorThreshold = "<<_impostorPixelErrorThreshold<<std::endl;
out<<" _numFramesToKeepImpostorSprites = "<<_numFramesToKeepImpostorSprites<<std::endl;
out<<" _cullMask = "<<_cullMask<<std::endl;
out<<" _cullMaskLeft = "<<_cullMaskLeft<<std::endl;
out<<" _cullMaskRight = "<<_cullMaskRight<<std::endl;
out<<"{"<<std::endl;
}