Converted osg::notify to OSG_INFO etc.

This commit is contained in:
Robert Osfield
2010-05-28 16:04:19 +00:00
parent 1119f29f67
commit 030f4c06a9
8 changed files with 65 additions and 65 deletions

View File

@@ -98,23 +98,23 @@ osg::Node* createCube(const osg::Vec3& center, float size, unsigned int numSlice
void FixedFunctionTechnique::init()
{
osg::notify(osg::INFO)<<"FixedFunctionTechnique::init()"<<std::endl;
OSG_INFO<<"FixedFunctionTechnique::init()"<<std::endl;
if (!_volumeTile)
{
osg::notify(osg::NOTICE)<<"FixedFunctionTechnique::init(), error no volume tile assigned."<<std::endl;
OSG_NOTICE<<"FixedFunctionTechnique::init(), error no volume tile assigned."<<std::endl;
return;
}
if (_volumeTile->getLayer()==0)
{
osg::notify(osg::NOTICE)<<"FixedFunctionTechnique::init(), error no layer assigend to volume tile."<<std::endl;
OSG_NOTICE<<"FixedFunctionTechnique::init(), error no layer assigend to volume tile."<<std::endl;
return;
}
if (_volumeTile->getLayer()->getImage()==0)
{
osg::notify(osg::NOTICE)<<"FixedFunctionTechnique::init(), error no image assigned to layer."<<std::endl;
OSG_NOTICE<<"FixedFunctionTechnique::init(), error no image assigned to layer."<<std::endl;
return;
}
@@ -152,7 +152,7 @@ void FixedFunctionTechnique::init()
if (_volumeTile->getLayer() && !masterLocator)
{
masterLocator = _volumeTile->getLayer()->getLocator();
osg::notify(osg::NOTICE)<<"assigning locator = "<<masterLocator<<std::endl;
OSG_NOTICE<<"assigning locator = "<<masterLocator<<std::endl;
}
osg::Matrix matrix;
@@ -161,7 +161,7 @@ void FixedFunctionTechnique::init()
matrix = masterLocator->getTransform();
}
osg::notify(osg::NOTICE)<<"Matrix = "<<matrix<<std::endl;
OSG_NOTICE<<"Matrix = "<<matrix<<std::endl;
osg::Texture::FilterMode minFilter = osg::Texture::NEAREST;
osg::Texture::FilterMode magFilter = osg::Texture::NEAREST;
@@ -257,12 +257,12 @@ void FixedFunctionTechnique::init()
void FixedFunctionTechnique::update(osgUtil::UpdateVisitor* uv)
{
// osg::notify(osg::NOTICE)<<"FixedFunctionTechnique:update(osgUtil::UpdateVisitor* nv):"<<std::endl;
// OSG_NOTICE<<"FixedFunctionTechnique:update(osgUtil::UpdateVisitor* nv):"<<std::endl;
}
void FixedFunctionTechnique::cull(osgUtil::CullVisitor* cv)
{
//osg::notify(osg::NOTICE)<<"FixedFunctionTechnique::cull(osgUtil::CullVisitor* nv)"<<std::endl;
//OSG_NOTICE<<"FixedFunctionTechnique::cull(osgUtil::CullVisitor* nv)"<<std::endl;
if (_node.valid())
{
_node->accept(*cv);
@@ -271,12 +271,12 @@ void FixedFunctionTechnique::cull(osgUtil::CullVisitor* cv)
void FixedFunctionTechnique::cleanSceneGraph()
{
osg::notify(osg::NOTICE)<<"FixedFunctionTechnique::cleanSceneGraph()"<<std::endl;
OSG_NOTICE<<"FixedFunctionTechnique::cleanSceneGraph()"<<std::endl;
}
void FixedFunctionTechnique::traverse(osg::NodeVisitor& nv)
{
// osg::notify(osg::NOTICE)<<"FixedFunctionTechnique::traverse(osg::NodeVisitor& nv)"<<std::endl;
// OSG_NOTICE<<"FixedFunctionTechnique::traverse(osg::NodeVisitor& nv)"<<std::endl;
if (!_volumeTile) return;
// if app traversal update the frame count.
@@ -305,7 +305,7 @@ void FixedFunctionTechnique::traverse(osg::NodeVisitor& nv)
if (_volumeTile->getDirty())
{
osg::notify(osg::INFO)<<"******* Doing init ***********"<<std::endl;
OSG_INFO<<"******* Doing init ***********"<<std::endl;
_volumeTile->init();
}
}

View File

@@ -59,8 +59,8 @@ osg::BoundingSphere Layer::computeBound() const
osg::Vec3d left, right;
getLocator()->computeLocalBounds(left, right);
//osg::notify(osg::NOTICE)<<"left = "<<left<<std::endl;
//osg::notify(osg::NOTICE)<<"right = "<<right<<std::endl;
//OSG_NOTICE<<"left = "<<left<<std::endl;
//OSG_NOTICE<<"right = "<<right<<std::endl;
return osg::BoundingSphere((left+right)*0.5, (right-left).length()*0.5);
}
@@ -145,13 +145,13 @@ void ImageLayer::offsetAndScaleImage(const osg::Vec4& offset, const osg::Vec4& s
osg::Vec4 minValue, maxValue;
if (computeMinMax(minValue, maxValue))
{
osg::notify(osg::NOTICE)<<"ImageLayer::offsetAndScaleImage("<<offset<<" and "<<scale<<")"<<std::endl;
osg::notify(osg::NOTICE)<<" before _texelOffset "<<_texelOffset<<std::endl;
osg::notify(osg::NOTICE)<<" before _texelScale "<<_texelScale<<std::endl;
osg::notify(osg::NOTICE)<<" before minValue "<<minValue<<std::endl;
osg::notify(osg::NOTICE)<<" before maxValue "<<maxValue<<std::endl;
osg::notify(osg::NOTICE)<<" before minValue transformed "<<minValue[0]*_texelScale[0]+_texelOffset[0]<<std::endl;
osg::notify(osg::NOTICE)<<" before maxValue transformed "<<maxValue[0]*_texelScale[0]+_texelOffset[0]<<std::endl;
OSG_NOTICE<<"ImageLayer::offsetAndScaleImage("<<offset<<" and "<<scale<<")"<<std::endl;
OSG_NOTICE<<" before _texelOffset "<<_texelOffset<<std::endl;
OSG_NOTICE<<" before _texelScale "<<_texelScale<<std::endl;
OSG_NOTICE<<" before minValue "<<minValue<<std::endl;
OSG_NOTICE<<" before maxValue "<<maxValue<<std::endl;
OSG_NOTICE<<" before minValue transformed "<<minValue[0]*_texelScale[0]+_texelOffset[0]<<std::endl;
OSG_NOTICE<<" before maxValue transformed "<<maxValue[0]*_texelScale[0]+_texelOffset[0]<<std::endl;
}
#endif
@@ -177,19 +177,19 @@ void ImageLayer::offsetAndScaleImage(const osg::Vec4& offset, const osg::Vec4& s
#if 0
if (computeMinMax(minValue, maxValue))
{
osg::notify(osg::NOTICE)<<" after _texelOffset "<<_texelOffset<<std::endl;
osg::notify(osg::NOTICE)<<" after _texelScale "<<_texelScale<<std::endl;
osg::notify(osg::NOTICE)<<" after minValue "<<minValue<<std::endl;
osg::notify(osg::NOTICE)<<" after maxValue "<<maxValue<<std::endl;
osg::notify(osg::NOTICE)<<" after minValue transformed "<<minValue[0]*_texelScale[0]+_texelOffset[0]<<std::endl;
osg::notify(osg::NOTICE)<<" after maxValue transformed "<<maxValue[0]*_texelScale[0]+_texelOffset[0]<<std::endl;
OSG_NOTICE<<" after _texelOffset "<<_texelOffset<<std::endl;
OSG_NOTICE<<" after _texelScale "<<_texelScale<<std::endl;
OSG_NOTICE<<" after minValue "<<minValue<<std::endl;
OSG_NOTICE<<" after maxValue "<<maxValue<<std::endl;
OSG_NOTICE<<" after minValue transformed "<<minValue[0]*_texelScale[0]+_texelOffset[0]<<std::endl;
OSG_NOTICE<<" after maxValue transformed "<<maxValue[0]*_texelScale[0]+_texelOffset[0]<<std::endl;
}
#endif
}
void ImageLayer::rescaleToZeroToOneRange()
{
osg::notify(osg::INFO)<<"ImageLayer::rescaleToZeroToOneRange()"<<std::endl;
OSG_INFO<<"ImageLayer::rescaleToZeroToOneRange()"<<std::endl;
osg::Vec4 minValue, maxValue;
if (computeMinMax(minValue, maxValue))
@@ -207,8 +207,8 @@ void ImageLayer::rescaleToZeroToOneRange()
float scale = 0.99f/(maxComponent-minComponent);
float offset = -minComponent * scale;
osg::notify(osg::INFO)<<" scale "<<scale<<std::endl;
osg::notify(osg::INFO)<<" offset "<<offset<<std::endl;
OSG_INFO<<" scale "<<scale<<std::endl;
OSG_INFO<<" offset "<<offset<<std::endl;
offsetAndScaleImage(osg::Vec4(offset, offset, offset, offset),
osg::Vec4(scale, scale, scale, scale));
@@ -291,7 +291,7 @@ void CompositeLayer::update(osg::NodeVisitor& nv)
//
osg::Image* osgVolume::createNormalMapTexture(osg::Image* image_3d)
{
osg::notify(osg::INFO)<<"Computing NormalMapTexture"<<std::endl;
OSG_INFO<<"Computing NormalMapTexture"<<std::endl;
GLenum dataType = image_3d->getDataType();
@@ -317,7 +317,7 @@ osg::Image* osgVolume::createNormalMapTexture(osg::Image* image_3d)
alphaOffset = 3;
break;
default:
osg::notify(osg::NOTICE)<<"Source pixel format not support for normal map generation."<<std::endl;
OSG_NOTICE<<"Source pixel format not support for normal map generation."<<std::endl;
return 0;
}
@@ -401,7 +401,7 @@ osg::Image* osgVolume::createNormalMapTexture(osg::Image* image_3d)
grad.normalize();
//osg::notify(osg::NOTICE)<<"normal "<<grad<<std::endl;
//OSG_NOTICE<<"normal "<<grad<<std::endl;
if (grad.x()==0.0f && grad.y()==0.0f && grad.z()==0.0f)
{
@@ -481,7 +481,7 @@ osg::Image* osgVolume::createNormalMapTexture(osg::Image* image_3d)
}
osg::notify(osg::INFO)<<"Created NormalMapTexture"<<std::endl;
OSG_INFO<<"Created NormalMapTexture"<<std::endl;
return normalmap_3d.release();
}
@@ -532,7 +532,7 @@ struct ApplyTransferFunctionOperator
osg::Image* osgVolume::applyTransferFunction(osg::Image* image, osg::TransferFunction1D* transferFunction)
{
osg::notify(osg::INFO)<<"Applying transfer function"<<std::endl;
OSG_INFO<<"Applying transfer function"<<std::endl;
osg::Image* output_image = new osg::Image;
output_image->allocateImage(image->s(),image->t(), image->r(), GL_RGBA, GL_UNSIGNED_BYTE);

View File

@@ -109,7 +109,7 @@ bool Locator::computeLocalBounds(Locator& source, osg::Vec3d& bottomLeft, osg::V
bool Locator::computeLocalBounds(osg::Vec3d& bottomLeft, osg::Vec3d& topRight) const
{
osg::notify(osg::NOTICE)<<"Locator::computeLocalBounds"<<std::endl;
OSG_NOTICE<<"Locator::computeLocalBounds"<<std::endl;
typedef std::list<osg::Vec3d> Corners;
Corners corners;

View File

@@ -337,25 +337,25 @@ bool PropertyAdjustmentCallback::handle(const osgGA::GUIEventAdapter& ea,osgGA::
if (_updateAlphaCutOff && cpv._isoProperty.valid())
{
osg::notify(osg::INFO)<<"Setting isoProperty to "<<v<<std::endl;
OSG_INFO<<"Setting isoProperty to "<<v<<std::endl;
cpv._isoProperty->setValue(v);
}
if (_updateAlphaCutOff && cpv._afProperty.valid())
{
osg::notify(osg::INFO)<<"Setting afProperty to "<<v2<<std::endl;
OSG_INFO<<"Setting afProperty to "<<v2<<std::endl;
cpv._afProperty->setValue(v2);
}
if (_updateTransparency && cpv._transparencyProperty.valid())
{
osg::notify(osg::INFO)<<"Setting transparency to "<<v2<<std::endl;
OSG_INFO<<"Setting transparency to "<<v2<<std::endl;
cpv._transparencyProperty->setValue(v2);
}
if (_updateSampleDensity && cpv._sampleDensityProperty.valid())
{
osg::notify(osg::INFO)<<"Setting sample density to "<<v4<<std::endl;
OSG_INFO<<"Setting sample density to "<<v4<<std::endl;
cpv._sampleDensityProperty->setValue(v4);
}
}

View File

@@ -96,23 +96,23 @@ enum ShadingModel
void RayTracedTechnique::init()
{
osg::notify(osg::INFO)<<"RayTracedTechnique::init()"<<std::endl;
OSG_INFO<<"RayTracedTechnique::init()"<<std::endl;
if (!_volumeTile)
{
osg::notify(osg::NOTICE)<<"RayTracedTechnique::init(), error no volume tile assigned."<<std::endl;
OSG_NOTICE<<"RayTracedTechnique::init(), error no volume tile assigned."<<std::endl;
return;
}
if (_volumeTile->getLayer()==0)
{
osg::notify(osg::NOTICE)<<"RayTracedTechnique::init(), error no layer assigend to volume tile."<<std::endl;
OSG_NOTICE<<"RayTracedTechnique::init(), error no layer assigend to volume tile."<<std::endl;
return;
}
if (_volumeTile->getLayer()->getImage()==0)
{
osg::notify(osg::NOTICE)<<"RayTracedTechnique::init(), error no image assigned to layer."<<std::endl;
OSG_NOTICE<<"RayTracedTechnique::init(), error no image assigned to layer."<<std::endl;
return;
}
@@ -186,8 +186,8 @@ void RayTracedTechnique::init()
imageMatrix = layerLocator->getTransform();
}
osg::notify(osg::INFO)<<"RayTracedTechnique::init() : geometryMatrix = "<<geometryMatrix<<std::endl;
osg::notify(osg::INFO)<<"RayTracedTechnique::init() : imageMatrix = "<<imageMatrix<<std::endl;
OSG_INFO<<"RayTracedTechnique::init() : geometryMatrix = "<<geometryMatrix<<std::endl;
OSG_INFO<<"RayTracedTechnique::init() : imageMatrix = "<<imageMatrix<<std::endl;
osg::Texture::InternalFormatMode internalFormatMode = osg::Texture::USE_IMAGE_DATA_FORMAT;
@@ -271,12 +271,12 @@ void RayTracedTechnique::init()
#if 1
osgDB::writeImageFile(*(tf->getImage()),"tf.png");
osg::notify(osg::NOTICE)<<"imageLayer->getTexelOffset()[3]="<<imageLayer->getTexelOffset()[3]<<std::endl;
osg::notify(osg::NOTICE)<<"imageLayer->getTexelScale()[3]="<<imageLayer->getTexelScale()[3]<<std::endl;
osg::notify(osg::NOTICE)<<"tfOffset="<<tfOffset<<std::endl;
osg::notify(osg::NOTICE)<<"tfScale="<<tfScale<<std::endl;
osg::notify(osg::NOTICE)<<"tf->getMinimum()="<<tf->getMinimum()<<std::endl;
osg::notify(osg::NOTICE)<<"tf->getMaximum()="<<tf->getMaximum()<<std::endl;
OSG_NOTICE<<"imageLayer->getTexelOffset()[3]="<<imageLayer->getTexelOffset()[3]<<std::endl;
OSG_NOTICE<<"imageLayer->getTexelScale()[3]="<<imageLayer->getTexelScale()[3]<<std::endl;
OSG_NOTICE<<"tfOffset="<<tfOffset<<std::endl;
OSG_NOTICE<<"tfScale="<<tfScale<<std::endl;
OSG_NOTICE<<"tf->getMinimum()="<<tf->getMinimum()<<std::endl;
OSG_NOTICE<<"tf->getMaximum()="<<tf->getMaximum()<<std::endl;
#endif
tf_texture->setResizeNonPowerOfTwoHint(false);
@@ -349,13 +349,13 @@ void RayTracedTechnique::init()
osg::Shader* fragmentShader = osgDB::readShaderFile(osg::Shader::FRAGMENT, "shaders/volume_iso.frag");
if (fragmentShader)
{
osg::notify(osg::INFO)<<"Shader found"<<std::endl;
OSG_INFO<<"Shader found"<<std::endl;
program->addShader(fragmentShader);
}
else
{
osg::notify(osg::INFO)<<"No Shader found"<<std::endl;
OSG_INFO<<"No Shader found"<<std::endl;
#include "Shaders/volume_iso_frag.cpp"
program->addShader(new osg::Shader(osg::Shader::FRAGMENT, volume_iso_frag));
@@ -538,12 +538,12 @@ void RayTracedTechnique::init()
void RayTracedTechnique::update(osgUtil::UpdateVisitor* uv)
{
// osg::notify(osg::NOTICE)<<"RayTracedTechnique:update(osgUtil::UpdateVisitor* nv):"<<std::endl;
// OSG_NOTICE<<"RayTracedTechnique:update(osgUtil::UpdateVisitor* nv):"<<std::endl;
}
void RayTracedTechnique::cull(osgUtil::CullVisitor* cv)
{
//osg::notify(osg::NOTICE)<<"RayTracedTechnique::cull(osgUtil::CullVisitor* nv)"<<std::endl;
//OSG_NOTICE<<"RayTracedTechnique::cull(osgUtil::CullVisitor* nv)"<<std::endl;
if (_transform.valid())
{
_transform->accept(*cv);
@@ -552,12 +552,12 @@ void RayTracedTechnique::cull(osgUtil::CullVisitor* cv)
void RayTracedTechnique::cleanSceneGraph()
{
osg::notify(osg::NOTICE)<<"RayTracedTechnique::cleanSceneGraph()"<<std::endl;
OSG_NOTICE<<"RayTracedTechnique::cleanSceneGraph()"<<std::endl;
}
void RayTracedTechnique::traverse(osg::NodeVisitor& nv)
{
// osg::notify(osg::NOTICE)<<"RayTracedTechnique::traverse(osg::NodeVisitor& nv)"<<std::endl;
// OSG_NOTICE<<"RayTracedTechnique::traverse(osg::NodeVisitor& nv)"<<std::endl;
if (!_volumeTile) return;
// if app traversal update the frame count.
@@ -586,7 +586,7 @@ void RayTracedTechnique::traverse(osg::NodeVisitor& nv)
if (_volumeTile->getDirty())
{
osg::notify(osg::INFO)<<"******* Doing init ***********"<<std::endl;
OSG_INFO<<"******* Doing init ***********"<<std::endl;
_volumeTile->init();
}
}

View File

@@ -94,7 +94,7 @@ void Volume::registerVolumeTile(VolumeTile* volumeTile)
if (_volumeTileSet.size() > s_maxNumVolumeTiles) s_maxNumVolumeTiles = _volumeTileSet.size();
// osg::notify(osg::NOTICE)<<"Volume::registerVolumeTile "<<volumeTile<<" total number of VolumeTile "<<_volumeTileSet.size()<<" max = "<<s_maxNumVolumeTiles<<std::endl;
// OSG_NOTICE<<"Volume::registerVolumeTile "<<volumeTile<<" total number of VolumeTile "<<_volumeTileSet.size()<<" max = "<<s_maxNumVolumeTiles<<std::endl;
}
void Volume::unregisterVolumeTile(VolumeTile* volumeTile)
@@ -110,5 +110,5 @@ void Volume::unregisterVolumeTile(VolumeTile* volumeTile)
_volumeTileSet.erase(volumeTile);
// osg::notify(osg::NOTICE)<<"Volume::unregisterVolumeTile "<<volumeTile<<" total number of VolumeTile "<<_volumeTileSet.size()<<" max = "<<s_maxNumVolumeTiles<<std::endl;
// OSG_NOTICE<<"Volume::unregisterVolumeTile "<<volumeTile<<" total number of VolumeTile "<<_volumeTileSet.size()<<" max = "<<s_maxNumVolumeTiles<<std::endl;
}

View File

@@ -34,24 +34,24 @@ VolumeTechnique::~VolumeTechnique()
void VolumeTechnique::init()
{
osg::notify(osg::NOTICE)<<className()<<"::initialize(..) not implementated yet"<<std::endl;
OSG_NOTICE<<className()<<"::initialize(..) not implementated yet"<<std::endl;
}
void VolumeTechnique::update(osgUtil::UpdateVisitor* uv)
{
osg::notify(osg::NOTICE)<<className()<<"::update(..) not implementated yet"<<std::endl;
OSG_NOTICE<<className()<<"::update(..) not implementated yet"<<std::endl;
if (_volumeTile) _volumeTile->osg::Group::traverse(*uv);
}
void VolumeTechnique::cull(osgUtil::CullVisitor* cv)
{
osg::notify(osg::NOTICE)<<className()<<"::cull(..) not implementated yet"<<std::endl;
OSG_NOTICE<<className()<<"::cull(..) not implementated yet"<<std::endl;
if (_volumeTile) _volumeTile->osg::Group::traverse(*cv);
}
void VolumeTechnique::cleanSceneGraph()
{
osg::notify(osg::NOTICE)<<className()<<"::cleanSceneGraph(..) not implementated yet"<<std::endl;
OSG_NOTICE<<className()<<"::cleanSceneGraph(..) not implementated yet"<<std::endl;
}
void VolumeTechnique::traverse(osg::NodeVisitor& nv)

View File

@@ -112,7 +112,7 @@ void VolumeTile::traverse(osg::NodeVisitor& nv)
osgVolume::Volume* volume = dynamic_cast<Volume*>(*itr);
if (volume)
{
osg::notify(osg::INFO)<<"Assigning volume system "<<volume<<std::endl;
OSG_INFO<<"Assigning volume system "<<volume<<std::endl;
setVolume(volume);
}
}