Converted osg::notify to OSG_INFO etc.
This commit is contained in:
@@ -39,7 +39,7 @@ ConnectedParticleSystem::~ConnectedParticleSystem()
|
||||
|
||||
Particle* ConnectedParticleSystem::createParticle(const Particle* ptemplate)
|
||||
{
|
||||
// osg::notify(osg::NOTICE)<<this<< " Creating particle "<<std::endl;
|
||||
// OSG_NOTICE<<this<< " Creating particle "<<std::endl;
|
||||
|
||||
Particle* particle = ParticleSystem::createParticle(ptemplate);
|
||||
int particleIndex = (int)(particle - &_particles[0]);
|
||||
@@ -55,7 +55,7 @@ Particle* ConnectedParticleSystem::createParticle(const Particle* ptemplate)
|
||||
|
||||
if (_lastParticleCreated != Particle::INVALID_INDEX)
|
||||
{
|
||||
// osg::notify(osg::NOTICE)<<this<< " Connecting "<<_lastParticleCreated<<" to "<<particleIndex<<std::endl;
|
||||
// OSG_NOTICE<<this<< " Connecting "<<_lastParticleCreated<<" to "<<particleIndex<<std::endl;
|
||||
|
||||
// write up the last created particle to this new particle
|
||||
_particles[_lastParticleCreated].setNextParticle(particleIndex);
|
||||
@@ -72,7 +72,7 @@ Particle* ConnectedParticleSystem::createParticle(const Particle* ptemplate)
|
||||
|
||||
void ConnectedParticleSystem::reuseParticle(int particleIndex)
|
||||
{
|
||||
// osg::notify(osg::NOTICE)<<this<< " Reusing particle "<<particleIndex<<std::endl;
|
||||
// OSG_NOTICE<<this<< " Reusing particle "<<particleIndex<<std::endl;
|
||||
|
||||
if (particleIndex<0 || particleIndex>=(int)_particles.size()) return;
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ void osgParticle::FluidProgram::execute(double dt)
|
||||
double compenstated_dt = dt;
|
||||
if (relative_wind.length2() < dt*dt*wind_accel.length2())
|
||||
{
|
||||
// osg::notify(osg::NOTICE)<<"** Could be critical: dt="<<dt<<" critical_dt="<<sqrtf(critical_dt2)<<std::endl;
|
||||
// OSG_NOTICE<<"** Could be critical: dt="<<dt<<" critical_dt="<<sqrtf(critical_dt2)<<std::endl;
|
||||
double critical_dt2 = relative_wind.length2()/wind_accel.length2();
|
||||
compenstated_dt = sqrtf(critical_dt2)*0.8f;
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ void osgParticle::ModularEmitter::emit(double dt)
|
||||
}
|
||||
else
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"run out of particle"<<std::endl;
|
||||
OSG_NOTICE<<"run out of particle"<<std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ void osgParticle::MultiSegmentPlacer::place(Particle* P) const
|
||||
}
|
||||
else
|
||||
{
|
||||
osg::notify(osg::WARN) << "this MultiSegmentPlacer has less than 2 vertices\n";
|
||||
OSG_WARN << "this MultiSegmentPlacer has less than 2 vertices\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ bool osgParticle::Particle::update(double dt)
|
||||
_s_coord = _s_tile * fmod(_cur_tile , 1.0 / _s_tile);
|
||||
_t_coord = 1.0 - _t_tile * (static_cast<int>(_cur_tile * _t_tile) + 1);
|
||||
|
||||
// osg::notify(osg::NOTICE)<<this<<" setting tex coords "<<_s_coord<<" "<<_t_coord<<std::endl;
|
||||
// OSG_NOTICE<<this<<" setting tex coords "<<_s_coord<<" "<<_t_coord<<std::endl;
|
||||
}
|
||||
|
||||
// compute the current values for size, alpha and color.
|
||||
@@ -209,7 +209,7 @@ void osgParticle::Particle::render(osg::GLBeginEndAdapter* gl, const osg::Vec3&
|
||||
break;
|
||||
|
||||
default:
|
||||
osg::notify(osg::WARN) << "Invalid shape for particles\n";
|
||||
OSG_WARN << "Invalid shape for particles\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -128,12 +128,12 @@ void osgParticle::ParticleProcessor::traverse(osg::NodeVisitor& nv)
|
||||
}
|
||||
else
|
||||
{
|
||||
osg::notify(osg::WARN) << "osgParticle::ParticleProcessor::traverse(NodeVisitor&) requires a valid FrameStamp to function, particles not updated.\n";
|
||||
OSG_WARN << "osgParticle::ParticleProcessor::traverse(NodeVisitor&) requires a valid FrameStamp to function, particles not updated.\n";
|
||||
}
|
||||
|
||||
} else
|
||||
{
|
||||
osg::notify(osg::WARN) << "ParticleProcessor \"" << getName() << "\": invalid particle system\n";
|
||||
OSG_WARN << "ParticleProcessor \"" << getName() << "\": invalid particle system\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ void osgParticle::ParticleSystem::drawImplementation(osg::RenderInfo& renderInfo
|
||||
}
|
||||
|
||||
#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE)
|
||||
osg::notify(osg::NOTICE)<<"Warning: ParticleSystem::drawImplementation(..) not fully implemented."<<std::endl;
|
||||
OSG_NOTICE<<"Warning: ParticleSystem::drawImplementation(..) not fully implemented."<<std::endl;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ void osgParticle::ParticleSystemUpdater::traverse(osg::NodeVisitor& nv)
|
||||
}
|
||||
else
|
||||
{
|
||||
osg::notify(osg::WARN) << "osgParticle::ParticleSystemUpdater::traverse(NodeVisitor&) requires a valid FrameStamp to function, particles not updated.\n";
|
||||
OSG_WARN << "osgParticle::ParticleSystemUpdater::traverse(NodeVisitor&) requires a valid FrameStamp to function, particles not updated.\n";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -88,8 +88,8 @@ bool osgParticle::ParticleSystemUpdater::removeParticleSystem(unsigned int pos,
|
||||
unsigned int endOfRemoveRange = pos + numParticleSystemsToRemove;
|
||||
if( endOfRemoveRange > _psv.size() )
|
||||
{
|
||||
osg::notify(osg::DEBUG_INFO)<<"Warning: ParticleSystem::removeParticleSystem(i,numParticleSystemsToRemove) has been passed an excessive number"<<std::endl;
|
||||
osg::notify(osg::DEBUG_INFO)<<" of ParticleSystems to remove, trimming just to end of ParticleSystem list."<<std::endl;
|
||||
OSG_DEBUG<<"Warning: ParticleSystem::removeParticleSystem(i,numParticleSystemsToRemove) has been passed an excessive number"<<std::endl;
|
||||
OSG_DEBUG<<" of ParticleSystems to remove, trimming just to end of ParticleSystem list."<<std::endl;
|
||||
endOfRemoveRange = _psv.size();
|
||||
}
|
||||
_psv.erase(_psv.begin()+pos, _psv.begin()+endOfRemoveRange);
|
||||
|
||||
@@ -324,7 +324,7 @@ void PrecipitationEffect::update()
|
||||
{
|
||||
_dirty = false;
|
||||
|
||||
osg::notify(osg::INFO)<<"PrecipitationEffect::update()"<<std::endl;
|
||||
OSG_INFO<<"PrecipitationEffect::update()"<<std::endl;
|
||||
|
||||
float length_u = _cellSize.x();
|
||||
float length_v = _cellSize.y();
|
||||
@@ -341,9 +341,9 @@ void PrecipitationEffect::update()
|
||||
_inverse_dv.set(0.0f, 1.0f/length_v, 0.0f);
|
||||
_inverse_dw.set(0.0f, 0.0f, 1.0f/length_w);
|
||||
|
||||
osg::notify(osg::INFO)<<"Cell size X="<<length_u<<std::endl;
|
||||
osg::notify(osg::INFO)<<"Cell size Y="<<length_v<<std::endl;
|
||||
osg::notify(osg::INFO)<<"Cell size Z="<<length_w<<std::endl;
|
||||
OSG_INFO<<"Cell size X="<<length_u<<std::endl;
|
||||
OSG_INFO<<"Cell size Y="<<length_v<<std::endl;
|
||||
OSG_INFO<<"Cell size Z="<<length_w<<std::endl;
|
||||
|
||||
|
||||
{
|
||||
@@ -492,7 +492,7 @@ void PrecipitationEffect::setUpGeometries(unsigned int numParticles)
|
||||
unsigned int pointRenderBin = 11;
|
||||
|
||||
|
||||
osg::notify(osg::INFO)<<"PrecipitationEffect::setUpGeometries("<<numParticles<<")"<<std::endl;
|
||||
OSG_INFO<<"PrecipitationEffect::setUpGeometries("<<numParticles<<")"<<std::endl;
|
||||
|
||||
bool needGeometryRebuild = false;
|
||||
|
||||
@@ -732,7 +732,7 @@ void PrecipitationEffect::setUpGeometries(unsigned int numParticles)
|
||||
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE)
|
||||
_pointStateSet->setMode(GL_VERTEX_PROGRAM_POINT_SIZE, osg::StateAttribute::ON);
|
||||
#else
|
||||
osg::notify(osg::NOTICE)<<"Warning: ParticleEffect::setUpGeometries(..) not fully implemented."<<std::endl;
|
||||
OSG_NOTICE<<"Warning: ParticleEffect::setUpGeometries(..) not fully implemented."<<std::endl;
|
||||
#endif
|
||||
|
||||
_pointStateSet->setRenderBinDetails(pointRenderBin,"DepthSortedBin");
|
||||
@@ -764,12 +764,12 @@ void PrecipitationEffect::cull(PrecipitationDrawableSet& pds, osgUtil::CullVisit
|
||||
inverse_modelview.invert(*(cv->getModelViewMatrix()));
|
||||
|
||||
osg::Vec3 eyeLocal = osg::Vec3(0.0f,0.0f,0.0f) * inverse_modelview;
|
||||
//osg::notify(osg::NOTICE)<<" eyeLocal "<<eyeLocal<<std::endl;
|
||||
//OSG_NOTICE<<" eyeLocal "<<eyeLocal<<std::endl;
|
||||
|
||||
float eye_k = (eyeLocal-_origin)*_inverse_dw;
|
||||
osg::Vec3 eye_kPlane = eyeLocal-_dw*eye_k-_origin;
|
||||
|
||||
// osg::notify(osg::NOTICE)<<" eye_kPlane "<<eye_kPlane<<std::endl;
|
||||
// OSG_NOTICE<<" eye_kPlane "<<eye_kPlane<<std::endl;
|
||||
|
||||
float eye_i = eye_kPlane*_inverse_du;
|
||||
float eye_j = eye_kPlane*_inverse_dv;
|
||||
@@ -791,7 +791,7 @@ void PrecipitationEffect::cull(PrecipitationDrawableSet& pds, osgUtil::CullVisit
|
||||
int j_max = (int)ceil(eye_j + j_delta);
|
||||
int k_max = (int)ceil(eye_k + k_delta);
|
||||
|
||||
//osg::notify(osg::NOTICE)<<"i_delta="<<i_delta<<" j_delta="<<j_delta<<" k_delta="<<k_delta<<std::endl;
|
||||
//OSG_NOTICE<<"i_delta="<<i_delta<<" j_delta="<<j_delta<<" k_delta="<<k_delta<<std::endl;
|
||||
|
||||
unsigned int numTested=0;
|
||||
unsigned int numInFrustum=0;
|
||||
@@ -818,8 +818,8 @@ void PrecipitationEffect::cull(PrecipitationDrawableSet& pds, osgUtil::CullVisit
|
||||
#ifdef DO_TIMING
|
||||
osg::Timer_t endTick = osg::Timer::instance()->tick();
|
||||
|
||||
osg::notify(osg::NOTICE)<<"time for cull "<<osg::Timer::instance()->delta_m(startTick,endTick)<<"ms numTested="<<numTested<<" numInFrustum"<<numInFrustum<<std::endl;
|
||||
osg::notify(osg::NOTICE)<<" quads "<<pds._quadPrecipitationDrawable->getCurrentCellMatrixMap().size()<<" lines "<<pds._linePrecipitationDrawable->getCurrentCellMatrixMap().size()<<" points "<<pds._pointPrecipitationDrawable->getCurrentCellMatrixMap().size()<<std::endl;
|
||||
OSG_NOTICE<<"time for cull "<<osg::Timer::instance()->delta_m(startTick,endTick)<<"ms numTested="<<numTested<<" numInFrustum"<<numInFrustum<<std::endl;
|
||||
OSG_NOTICE<<" quads "<<pds._quadPrecipitationDrawable->getCurrentCellMatrixMap().size()<<" lines "<<pds._linePrecipitationDrawable->getCurrentCellMatrixMap().size()<<" points "<<pds._pointPrecipitationDrawable->getCurrentCellMatrixMap().size()<<std::endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -979,6 +979,6 @@ if (!_geometry) return;
|
||||
|
||||
glPopMatrix();
|
||||
#else
|
||||
osg::notify(osg::NOTICE)<<"Warning: ParticleEffect::drawImplementation(..) not fully implemented."<<std::endl;
|
||||
OSG_NOTICE<<"Warning: ParticleEffect::drawImplementation(..) not fully implemented."<<std::endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user