set name string for update callbacks
This makes it easier to find nodes with update callbacks in the scene graph dump.
This commit is contained in:
@@ -657,7 +657,9 @@ public:
|
|||||||
SGExpressiond const* animationValue) :
|
SGExpressiond const* animationValue) :
|
||||||
_condition(condition),
|
_condition(condition),
|
||||||
_animationValue(animationValue)
|
_animationValue(animationValue)
|
||||||
{ }
|
{
|
||||||
|
setName("SGTranslateAnimation::UpdateCallback");
|
||||||
|
}
|
||||||
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
|
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
|
||||||
{
|
{
|
||||||
if (!_condition || _condition->test()) {
|
if (!_condition || _condition->test()) {
|
||||||
@@ -921,6 +923,7 @@ public:
|
|||||||
_animationValue[0] = animationValue[0];
|
_animationValue[0] = animationValue[0];
|
||||||
_animationValue[1] = animationValue[1];
|
_animationValue[1] = animationValue[1];
|
||||||
_animationValue[2] = animationValue[2];
|
_animationValue[2] = animationValue[2];
|
||||||
|
setName("SGScaleAnimation::UpdateCallback");
|
||||||
}
|
}
|
||||||
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
|
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
|
||||||
{
|
{
|
||||||
@@ -1443,7 +1446,9 @@ public:
|
|||||||
_maxAnimationValue(maxAnimationValue),
|
_maxAnimationValue(maxAnimationValue),
|
||||||
_minStaticValue(minValue),
|
_minStaticValue(minValue),
|
||||||
_maxStaticValue(maxValue)
|
_maxStaticValue(maxValue)
|
||||||
{}
|
{
|
||||||
|
setName("SGRangeAnimation::UpdateCallback");
|
||||||
|
}
|
||||||
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
|
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
|
||||||
{
|
{
|
||||||
osg::LOD* lod = static_cast<osg::LOD*>(node);
|
osg::LOD* lod = static_cast<osg::LOD*>(node);
|
||||||
@@ -1699,7 +1704,9 @@ public:
|
|||||||
UpdateCallback(const SGPropertyNode* configNode, const SGExpressiond* v) :
|
UpdateCallback(const SGPropertyNode* configNode, const SGExpressiond* v) :
|
||||||
_prev_value(-1),
|
_prev_value(-1),
|
||||||
_animationValue(v)
|
_animationValue(v)
|
||||||
{ }
|
{
|
||||||
|
setName("SGBlendAnimation::UpdateCallback");
|
||||||
|
}
|
||||||
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
|
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
|
||||||
{
|
{
|
||||||
double blend = _animationValue->getValue();
|
double blend = _animationValue->getValue();
|
||||||
@@ -1778,6 +1785,7 @@ public:
|
|||||||
rNode->getDoubleValue( "max", 1));
|
rNode->getDoubleValue( "max", 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
setName("SGTimedAnimation::UpdateCallback");
|
||||||
}
|
}
|
||||||
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
|
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
|
||||||
{
|
{
|
||||||
@@ -1866,7 +1874,9 @@ class SGShadowAnimation::UpdateCallback : public osg::NodeCallback {
|
|||||||
public:
|
public:
|
||||||
UpdateCallback(const SGCondition* condition) :
|
UpdateCallback(const SGCondition* condition) :
|
||||||
_condition(condition)
|
_condition(condition)
|
||||||
{}
|
{
|
||||||
|
setName("SGShadowAnimation::UpdateCallback");
|
||||||
|
}
|
||||||
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
|
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
|
||||||
{
|
{
|
||||||
if (_condition->test())
|
if (_condition->test())
|
||||||
@@ -1959,7 +1969,9 @@ class SGTexTransformAnimation::UpdateCallback :
|
|||||||
public:
|
public:
|
||||||
UpdateCallback(const SGCondition* condition) :
|
UpdateCallback(const SGCondition* condition) :
|
||||||
_condition(condition)
|
_condition(condition)
|
||||||
{ }
|
{
|
||||||
|
setName("SGTexTransformAnimation::UpdateCallback");
|
||||||
|
}
|
||||||
virtual void operator () (osg::StateAttribute* sa, osg::NodeVisitor*)
|
virtual void operator () (osg::StateAttribute* sa, osg::NodeVisitor*)
|
||||||
{
|
{
|
||||||
if (!_condition || _condition->test()) {
|
if (!_condition || _condition->test()) {
|
||||||
|
|||||||
@@ -136,8 +136,6 @@ public:
|
|||||||
SGPropertyNode* modelRoot);
|
SGPropertyNode* modelRoot);
|
||||||
virtual osg::Group* createAnimationGroup(osg::Group& parent);
|
virtual osg::Group* createAnimationGroup(osg::Group& parent);
|
||||||
private:
|
private:
|
||||||
class UpdateCallback;
|
|
||||||
class SpinUpdateCallback;
|
|
||||||
SGSharedPtr<const SGCondition> _condition;
|
SGSharedPtr<const SGCondition> _condition;
|
||||||
SGSharedPtr<const SGExpressiond> _animationValue;
|
SGSharedPtr<const SGExpressiond> _animationValue;
|
||||||
SGVec3d _axis;
|
SGVec3d _axis;
|
||||||
|
|||||||
Reference in New Issue
Block a user