Converted osg::notify to OSG_INFO etc.
This commit is contained in:
@@ -40,6 +40,6 @@ void ActionBlendIn::computeWeight(unsigned int frame)
|
||||
double ratio = ( (frame+1) * 1.0 / (getNumFrames()) );
|
||||
double w = _weight * ratio;
|
||||
|
||||
osg::notify(osg::DEBUG_INFO) << getName() << " BlendIn frame " << frame << " weight " << w << std::endl;
|
||||
OSG_DEBUG << getName() << " BlendIn frame " << frame << " weight " << w << std::endl;
|
||||
_animation->setWeight(w);
|
||||
}
|
||||
|
||||
@@ -36,6 +36,6 @@ void ActionBlendOut::computeWeight(unsigned int frame)
|
||||
{
|
||||
double ratio = ( (frame+1) * 1.0 / (getNumFrames()) );
|
||||
double w = _weight * (1.0-ratio);
|
||||
osg::notify(osg::DEBUG_INFO) << getName() << " BlendOut frame " << frame << " weight " << w << std::endl;
|
||||
OSG_DEBUG << getName() << " BlendOut frame " << frame << " weight " << w << std::endl;
|
||||
_animation->setWeight(w);
|
||||
}
|
||||
|
||||
@@ -98,16 +98,16 @@ void UpdateActionVisitor::apply(Action& action)
|
||||
bool result = action.evaluateFrame(frame, frameInAction, loopDone);
|
||||
if (!result)
|
||||
{
|
||||
osg::notify(osg::DEBUG_INFO) << action.getName() << " Action frame " << frameInAction << " finished" << std::endl;
|
||||
OSG_DEBUG << action.getName() << " Action frame " << frameInAction << " finished" << std::endl;
|
||||
return;
|
||||
}
|
||||
osg::notify(osg::DEBUG_INFO) << action.getName() << " Action frame " << frame << " relative to loop " << frameInAction << " no loop " << loopDone<< std::endl;
|
||||
OSG_DEBUG << action.getName() << " Action frame " << frame << " relative to loop " << frameInAction << " no loop " << loopDone<< std::endl;
|
||||
|
||||
frame = frameInAction;
|
||||
Action::Callback* cb = action.getFrameCallback(frame);
|
||||
while (cb)
|
||||
{
|
||||
osg::notify(osg::DEBUG_INFO) << action.getName() << " evaluate callback " << cb->getName() << " at " << frame << std::endl;
|
||||
OSG_DEBUG << action.getName() << " evaluate callback " << cb->getName() << " at " << frame << std::endl;
|
||||
(*cb)(&action, this);
|
||||
cb = cb->getNestedCallback();
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ void LinkVisitor::link(AnimationUpdateCallbackBase* cb)
|
||||
result += cb->link(_animations[i].get());
|
||||
_nbLinkedTarget += result;
|
||||
}
|
||||
osg::notify(osg::NOTICE) << "LinkVisitor links " << result << " for \"" << cb->getName() << '"' << std::endl;
|
||||
OSG_NOTICE << "LinkVisitor links " << result << " for \"" << cb->getName() << '"' << std::endl;
|
||||
}
|
||||
|
||||
void LinkVisitor::handle_stateset(osg::StateSet* stateset)
|
||||
|
||||
@@ -271,7 +271,7 @@ bool UpdateMorph::link(osgAnimation::Channel* channel)
|
||||
}
|
||||
else
|
||||
{
|
||||
osg::notify(osg::WARN) << "Channel " << channel->getName() << " does not contain a valid symbolic name for this class" << std::endl;
|
||||
OSG_WARN << "Channel " << channel->getName() << " does not contain a valid symbolic name for this class" << std::endl;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
_boundingBox.expandBy(center + vec);
|
||||
_boundingBox.expandBy(center - vec);
|
||||
_computed = true;
|
||||
// osg::notify(osg::NOTICE) << "build the bounding box for RigGeometry " << rig.getName() << " " << _boundingBox._min << " " << _boundingBox._max << std::endl;
|
||||
// OSG_NOTICE << "build the bounding box for RigGeometry " << rig.getName() << " " << _boundingBox._min << " " << _boundingBox._max << std::endl;
|
||||
return _boundingBox;
|
||||
}
|
||||
protected:
|
||||
@@ -98,7 +98,7 @@ void RigGeometry::buildVertexInfluenceSet()
|
||||
{
|
||||
if (!_vertexInfluenceMap.valid())
|
||||
{
|
||||
osg::notify(osg::WARN) << "buildVertexInfluenceSet can't be called without VertexInfluence already set to the RigGeometry ( " << getName() << " ) " << std::endl;
|
||||
OSG_WARN << "buildVertexInfluenceSet can't be called without VertexInfluence already set to the RigGeometry ( " << getName() << " ) " << std::endl;
|
||||
return;
|
||||
}
|
||||
_vertexInfluenceSet.clear();
|
||||
@@ -109,14 +109,14 @@ void RigGeometry::buildVertexInfluenceSet()
|
||||
|
||||
_vertexInfluenceSet.buildVertex2BoneList();
|
||||
_vertexInfluenceSet.buildUniqVertexSetToBoneSetList();
|
||||
osg::notify(osg::NOTICE) << "uniq groups " << _vertexInfluenceSet.getUniqVertexSetToBoneSetList().size() << " for " << getName() << std::endl;
|
||||
OSG_NOTICE << "uniq groups " << _vertexInfluenceSet.getUniqVertexSetToBoneSetList().size() << " for " << getName() << std::endl;
|
||||
}
|
||||
|
||||
void RigGeometry::computeMatrixFromRootSkeleton()
|
||||
{
|
||||
if (!_root.valid())
|
||||
{
|
||||
osg::notify(osg::WARN) << "Warning " << className() <<"::computeMatrixFromRootSkeleton if you have this message it means you miss to call buildTransformer(Skeleton* root), or your RigGeometry (" << getName() <<") is not attached to a Skeleton subgraph" << std::endl;
|
||||
OSG_WARN << "Warning " << className() <<"::computeMatrixFromRootSkeleton if you have this message it means you miss to call buildTransformer(Skeleton* root), or your RigGeometry (" << getName() <<") is not attached to a Skeleton subgraph" << std::endl;
|
||||
return;
|
||||
}
|
||||
osg::MatrixList mtxList = getParent(0)->getWorldMatrices(_root.get());
|
||||
|
||||
@@ -55,7 +55,7 @@ void RigTransformHardware::computeMatrixPaletteUniform(const osg::Matrix& transf
|
||||
osg::Matrix resultBoneMatrix = invBindMatrix * boneMatrix;
|
||||
osg::Matrix result = transformFromSkeletonToGeometry * resultBoneMatrix * invTransformFromSkeletonToGeometry;
|
||||
if (!_uniformMatrixPalette->setElement(i, result))
|
||||
osg::notify(osg::WARN) << "RigTransformHardware::computeUniformMatrixPalette can't set uniform at " << i << " elements" << std::endl;
|
||||
OSG_WARN << "RigTransformHardware::computeUniformMatrixPalette can't set uniform at " << i << " elements" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ bool RigTransformHardware::createPalette(int nbVertexes, BoneMap boneMap, const
|
||||
{
|
||||
if (boneMap.find(bw.getBoneName()) == boneMap.end())
|
||||
{
|
||||
osg::notify(osg::INFO) << "RigTransformHardware::createPalette can't find bone " << bw.getBoneName() << " skip this influence" << std::endl;
|
||||
OSG_INFO << "RigTransformHardware::createPalette can't find bone " << bw.getBoneName() << " skip this influence" << std::endl;
|
||||
continue;
|
||||
}
|
||||
boneNameCountMap[bw.getBoneName()] = 1; // for stats
|
||||
@@ -105,20 +105,20 @@ bool RigTransformHardware::createPalette(int nbVertexes, BoneMap boneMap, const
|
||||
}
|
||||
else
|
||||
{
|
||||
osg::notify(osg::WARN) << "RigTransformHardware::createPalette Bone " << bw.getBoneName() << " has a weight " << bw.getWeight() << " for vertex " << vertexIndex << " this bone will not be in the palette" << std::endl;
|
||||
OSG_WARN << "RigTransformHardware::createPalette Bone " << bw.getBoneName() << " has a weight " << bw.getWeight() << " for vertex " << vertexIndex << " this bone will not be in the palette" << std::endl;
|
||||
}
|
||||
}
|
||||
maxBonePerVertex = osg::maximum(maxBonePerVertex, bonesForThisVertex);
|
||||
}
|
||||
osg::notify(osg::INFO) << "RigTransformHardware::createPalette maximum number of bone per vertex is " << maxBonePerVertex << std::endl;
|
||||
osg::notify(osg::INFO) << "RigTransformHardware::createPalette matrix palette has " << boneNameCountMap.size() << " entries" << std::endl;
|
||||
OSG_INFO << "RigTransformHardware::createPalette maximum number of bone per vertex is " << maxBonePerVertex << std::endl;
|
||||
OSG_INFO << "RigTransformHardware::createPalette matrix palette has " << boneNameCountMap.size() << " entries" << std::endl;
|
||||
|
||||
for (BoneNameCountMap::iterator it = boneNameCountMap.begin(); it != boneNameCountMap.end(); ++it)
|
||||
{
|
||||
osg::notify(osg::INFO) << "RigTransformHardware::createPalette Bone " << it->first << " is used " << it->second << " times" << std::endl;
|
||||
OSG_INFO << "RigTransformHardware::createPalette Bone " << it->first << " is used " << it->second << " times" << std::endl;
|
||||
}
|
||||
|
||||
osg::notify(osg::INFO) << "RigTransformHardware::createPalette will use " << boneNameCountMap.size() * 4 << " uniforms" << std::endl;
|
||||
OSG_INFO << "RigTransformHardware::createPalette will use " << boneNameCountMap.size() * 4 << " uniforms" << std::endl;
|
||||
|
||||
|
||||
for (int i = 0 ; i < (int)vertexIndexWeight.size(); i++)
|
||||
@@ -199,13 +199,13 @@ bool RigTransformHardware::init(RigGeometry& geom)
|
||||
osg::Vec3Array* positionSrc = dynamic_cast<osg::Vec3Array*>(source.getVertexArray());
|
||||
if (!positionSrc)
|
||||
{
|
||||
osg::notify(osg::WARN) << "RigTransformHardware no vertex array in the geometry " << geom.getName() << std::endl;
|
||||
OSG_WARN << "RigTransformHardware no vertex array in the geometry " << geom.getName() << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!geom.getSkeleton())
|
||||
{
|
||||
osg::notify(osg::WARN) << "RigTransformHardware no skeleton set in geometry " << geom.getName() << std::endl;
|
||||
OSG_WARN << "RigTransformHardware no skeleton set in geometry " << geom.getName() << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@ bool RigTransformHardware::init(RigGeometry& geom)
|
||||
_shader = osg::Shader::readShaderFile(osg::Shader::VERTEX,"skinning.vert");
|
||||
|
||||
if (!_shader.valid()) {
|
||||
osg::notify(osg::WARN) << "RigTransformHardware can't load VertexShader" << std::endl;
|
||||
OSG_WARN << "RigTransformHardware can't load VertexShader" << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -240,7 +240,7 @@ bool RigTransformHardware::init(RigGeometry& geom)
|
||||
ss << getMatrixPaletteUniform()->getNumElements();
|
||||
str.replace(start, toreplace.size(), ss.str());
|
||||
_shader->setShaderSource(str);
|
||||
osg::notify(osg::INFO) << "Shader " << str << std::endl;
|
||||
OSG_INFO << "Shader " << str << std::endl;
|
||||
}
|
||||
|
||||
int attribIndex = 11;
|
||||
@@ -251,7 +251,7 @@ bool RigTransformHardware::init(RigGeometry& geom)
|
||||
ss << "boneWeight" << i;
|
||||
program->addBindAttribLocation(ss.str(), attribIndex + i);
|
||||
geom.setVertexAttribData(attribIndex + i, osg::Geometry::ArrayData(getVertexAttrib(i),osg::Geometry::BIND_PER_VERTEX));
|
||||
osg::notify(osg::INFO) << "set vertex attrib " << ss.str() << std::endl;
|
||||
OSG_INFO << "set vertex attrib " << ss.str() << std::endl;
|
||||
}
|
||||
program->addShader(_shader.get());
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ void RigTransformSoftware::operator()(RigGeometry& geom)
|
||||
return;
|
||||
|
||||
if (!geom.getSourceGeometry()) {
|
||||
osg::notify(osg::WARN) << this << " RigTransformSoftware no source geometry found on RigGeometry" << std::endl;
|
||||
OSG_WARN << this << " RigTransformSoftware no source geometry found on RigGeometry" << std::endl;
|
||||
return;
|
||||
}
|
||||
osg::Geometry& source = *geom.getSourceGeometry();
|
||||
@@ -123,7 +123,7 @@ void RigTransformSoftware::initVertexSetFromBones(const BoneMap& map, const Vert
|
||||
BoneMap::const_iterator it = map.find(bname);
|
||||
if (it == map.end())
|
||||
{
|
||||
osg::notify(osg::WARN) << "RigTransformSoftware Bone " << bname << " not found, skip the influence group " <<bname << std::endl;
|
||||
OSG_WARN << "RigTransformSoftware Bone " << bname << " not found, skip the influence group " <<bname << std::endl;
|
||||
continue;
|
||||
}
|
||||
Bone* bone = it->second.get();
|
||||
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
{
|
||||
if (foundNonBone)
|
||||
{
|
||||
osg::notify(osg::WARN) <<
|
||||
OSG_WARN <<
|
||||
"Warning: a Bone was found after a non-Bone child "
|
||||
"within a Skeleton. Children of a Bone must be ordered "
|
||||
"with all child Bones first for correct update order." << std::endl;
|
||||
|
||||
@@ -558,7 +558,7 @@ bool StatsHandler::handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdap
|
||||
FindTimelineStats finder;
|
||||
viewer->getSceneData()->accept(finder);
|
||||
if (!finder._timelines.empty()) {
|
||||
osg::notify(osg::NOTICE)<<std::endl<<"Stats report:"<<std::endl;
|
||||
OSG_NOTICE<<std::endl<<"Stats report:"<<std::endl;
|
||||
typedef std::vector<osg::Stats*> StatsList;
|
||||
StatsList statsList;
|
||||
|
||||
@@ -574,7 +574,7 @@ bool StatsHandler::handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdap
|
||||
if (itr==statsList.begin()) (*itr)->report(osg::notify(osg::NOTICE), i);
|
||||
else (*itr)->report(osg::notify(osg::NOTICE), i, " ");
|
||||
}
|
||||
osg::notify(osg::NOTICE)<<std::endl;
|
||||
OSG_NOTICE<<std::endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -164,14 +164,14 @@ void Timeline::addActionAt(unsigned int frame, Action* action, int priority)
|
||||
{
|
||||
Command& command = *it;
|
||||
if (command._action.second.get() == action) {
|
||||
osg::notify(osg::INFO) << "Timeline::addActionAt command " << action->getName() << " already added this frame, declined" << std::endl;
|
||||
OSG_INFO << "Timeline::addActionAt command " << action->getName() << " already added this frame, declined" << std::endl;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (isActive(action))
|
||||
{
|
||||
osg::notify(osg::INFO) << "Timeline::addActionAt command " << action->getName() << " already active, remove the old" << std::endl;
|
||||
OSG_INFO << "Timeline::addActionAt command " << action->getName() << " already active, remove the old" << std::endl;
|
||||
removeAction(action);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ void UpdateBone::operator()(osg::Node* node, osg::NodeVisitor* nv)
|
||||
Bone* b = dynamic_cast<Bone*>(node);
|
||||
if (!b)
|
||||
{
|
||||
osg::notify(osg::WARN) << "Warning: UpdateBone set on non-Bone object." << std::endl;
|
||||
OSG_WARN << "Warning: UpdateBone set on non-Bone object." << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ bool UpdateMaterial::link(osgAnimation::Channel* channel)
|
||||
}
|
||||
else
|
||||
{
|
||||
osg::notify(osg::WARN) << "Channel " << channel->getName() << " does not contain a valid symbolic name for this class " << className() << std::endl;
|
||||
OSG_WARN << "Channel " << channel->getName() << " does not contain a valid symbolic name for this class " << className() << std::endl;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ bool UpdateMatrixTransform::link(osgAnimation::Channel* channel)
|
||||
}
|
||||
}
|
||||
|
||||
osg::notify(osg::INFO) << "UpdateMatrixTransform::link Channel " << channel->getName() << " does not contain a symbolic name that can be linked to a StackedTransformElement." << std::endl;
|
||||
OSG_INFO << "UpdateMatrixTransform::link Channel " << channel->getName() << " does not contain a symbolic name that can be linked to a StackedTransformElement." << std::endl;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ void VertexInfluenceSet::buildVertex2BoneList()
|
||||
int index = viw.first;
|
||||
float weight = viw.second;
|
||||
if (vi.getName().empty())
|
||||
osg::notify(osg::WARN) << "VertexInfluenceSet::buildVertex2BoneList warning vertex " << index << " is not assigned to a bone" << std::endl;
|
||||
OSG_WARN << "VertexInfluenceSet::buildVertex2BoneList warning vertex " << index << " is not assigned to a bone" << std::endl;
|
||||
_vertex2Bones[index].push_back(BoneWeight(vi.getName(), weight));
|
||||
}
|
||||
}
|
||||
@@ -51,7 +51,7 @@ void VertexInfluenceSet::buildVertex2BoneList()
|
||||
sum += bones[i].getWeight();
|
||||
if (sum < 1e-4)
|
||||
{
|
||||
osg::notify(osg::WARN) << "VertexInfluenceSet::buildVertex2BoneList warning the vertex " << it->first << " seems to have 0 weight, skip normalize for this vertex" << std::endl;
|
||||
OSG_WARN << "VertexInfluenceSet::buildVertex2BoneList warning the vertex " << it->first << " seems to have 0 weight, skip normalize for this vertex" << std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user